summaryrefslogtreecommitdiff
authorharlekin <harlekin>2002-10-10 10:17:20 (UTC)
committer harlekin <harlekin>2002-10-10 10:17:20 (UTC)
commit6e766588ca61322c59d0a527cb240522d9d8210e (patch) (side-by-side diff)
tree4a4114876f4bfaac699177a0b44f3424644d256f
parent2cbc91d6aff15c931426f3c835b5126c7da3ba2b (diff)
downloadopie-6e766588ca61322c59d0a527cb240522d9d8210e.zip
opie-6e766588ca61322c59d0a527cb240522d9d8210e.tar.gz
opie-6e766588ca61322c59d0a527cb240522d9d8210e.tar.bz2
little changes to the gamma
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/multimedia/opieplayer2/lib.cpp1
-rw-r--r--noncore/multimedia/opieplayer2/mediaplayer.cpp2
-rw-r--r--noncore/multimedia/opieplayer2/playlistwidgetgui.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/videowidget.cpp6
-rw-r--r--noncore/multimedia/opieplayer2/xinecontrol.cpp4
-rw-r--r--noncore/multimedia/opieplayer2/yuv2rgb.h15
6 files changed, 17 insertions, 15 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp
index 85030de..c0e5acd 100644
--- a/noncore/multimedia/opieplayer2/lib.cpp
+++ b/noncore/multimedia/opieplayer2/lib.cpp
@@ -214,71 +214,72 @@ QString Lib::metaInfo( int number) {
int Lib::error() {
return xine_get_error( m_xine );
};
void Lib::handleXineEvent( xine_event_t* t ) {
if ( t->type == XINE_EVENT_PLAYBACK_FINISHED ) {
emit stopped();
}
}
void Lib::setShowVideo( bool video ) {
m_video = video;
::null_set_show_video( m_videoOutput, video );
}
bool Lib::isShowingVideo() {
return ::null_is_showing_video( m_videoOutput );
}
bool Lib::hasVideo() {
//looks like it is not implemented yet
//return xine_get_stream_info( m_xine, XINE_STREAM_INFO_VIDEO_CHANNELS );
// ugly hack until xine is ready, look for the width of the video
int test = xine_get_stream_info( m_xine, 2 );
if( test > 0 ) {
// qDebug( QString(" has video: %1").arg( test ) );
return true;
} else {
//qDebug ( "does not have video ");
return false;
}
}
void Lib::showVideoFullScreen( bool fullScreen ) {
::null_set_fullscreen( m_videoOutput, fullScreen );
}
bool Lib::isVideoFullScreen() {
return ::null_is_fullscreen( m_videoOutput );
}
void Lib::setScaling( bool scale ) {
::null_set_scaling( m_videoOutput, scale );
}
void Lib::setGamma( int value ) {
//qDebug( QString( "%1").arg(value) );
+ int gammaValue = ( 100 + value );
::null_set_videoGamma( m_videoOutput, value );
}
bool Lib::isScaling() {
return ::null_is_scaling( m_videoOutput );
}
void Lib::xine_event_handler( void* user_data, xine_event_t* t ) {
( (Lib*)user_data)->handleXineEvent( t );
}
void Lib::xine_display_frame( void* user_data, uint8_t *frame,
int width, int height, int bytes ) {
( (Lib*)user_data)->drawFrame( frame, width, height, bytes );
}
void Lib::drawFrame( uint8_t* frame, int width, int height, int bytes ) {
if ( !m_video ) {
qWarning("not showing video now");
return;
}
m_wid-> setVideoFrame ( frame, width, height, bytes );
}
diff --git a/noncore/multimedia/opieplayer2/mediaplayer.cpp b/noncore/multimedia/opieplayer2/mediaplayer.cpp
index 5069a49..606f8e9 100644
--- a/noncore/multimedia/opieplayer2/mediaplayer.cpp
+++ b/noncore/multimedia/opieplayer2/mediaplayer.cpp
@@ -1,86 +1,86 @@
#include <qpe/qpeapplication.h>
#include <qpe/qlibrary.h>
#include <qpe/resource.h>
#include <qpe/config.h>
#include <qpe/qcopenvelope_qws.h>
#include <qfileinfo.h>
#include <qmainwindow.h>
#include <qmessagebox.h>
#include <qwidgetstack.h>
#include <qfile.h>
#include "mediaplayer.h"
#include "playlistwidget.h"
#include "audiowidget.h"
#include "videowidget.h"
#include "volumecontrol.h"
#include "mediaplayerstate.h"
// for setBacklight()
#include <linux/fb.h>
#include <sys/file.h>
#include <sys/ioctl.h>
extern AudioWidget *audioUI;
extern VideoWidget *videoUI;
extern PlayListWidget *playList;
extern MediaPlayerState *mediaPlayerState;
#define FBIOBLANK 0x4611
MediaPlayer::MediaPlayer( QObject *parent, const char *name )
: QObject( parent, name ), volumeDirection( 0 ), currentFile( NULL ) {
- playList->setCaption(tr("OpiePlayer: Initializating"));
+ playList->setCaption( tr( "OpiePlayer: Initializating" ) );
qApp->processEvents();
// QPEApplication::grabKeyboard(); // EVIL
connect( qApp,SIGNAL( aboutToQuit()),SLOT( cleanUp()) );
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( setPlaying( bool ) ) );
connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pauseCheck( bool ) ) );
connect( mediaPlayerState, SIGNAL( next() ), this, SLOT( next() ) );
connect( mediaPlayerState, SIGNAL( prev() ), this, SLOT( prev() ) );
connect( mediaPlayerState, SIGNAL( blankToggled( bool ) ), this, SLOT ( blank( bool ) ) );
connect( audioUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
connect( audioUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
connect( audioUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
connect( audioUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
connect( videoUI, SIGNAL( moreClicked() ), this, SLOT( startIncreasingVolume() ) );
connect( videoUI, SIGNAL( lessClicked() ), this, SLOT( startDecreasingVolume() ) );
connect( videoUI, SIGNAL( moreReleased() ), this, SLOT( stopChangingVolume() ) );
connect( videoUI, SIGNAL( lessReleased() ), this, SLOT( stopChangingVolume() ) );
volControl = new VolumeControl;
xineControl = new XineControl();
playList->setCaption(tr("OpiePlayer"));
}
MediaPlayer::~MediaPlayer() {
delete xineControl;
delete volControl;
}
void MediaPlayer::pauseCheck( bool b ) {
if ( b && !mediaPlayerState->playing() ) {
mediaPlayerState->setPaused( FALSE );
}
}
void MediaPlayer::play() {
mediaPlayerState->setPlaying( FALSE );
mediaPlayerState->setPlaying( TRUE );
}
void MediaPlayer::setPlaying( bool play ) {
if ( !play ) {
return;
}
diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
index 1042a0c..49356d3 100644
--- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
+++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp
@@ -58,100 +58,100 @@
#include "audiowidget.h"
#include "videowidget.h"
#include "mediaplayerstate.h"
extern MediaPlayerState *mediaPlayerState;
PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags fl )
: QMainWindow( parent, name, fl ) {
d = new PlayListWidgetPrivate;
d->setDocumentUsed = FALSE;
d->current = NULL;
setBackgroundMode( PaletteButton );
setToolBarsMovable( FALSE );
// Create Toolbar
QPEToolBar *toolbar = new QPEToolBar( this );
toolbar->setHorizontalStretchable( TRUE );
// Create Menubar
QPEMenuBar *menu = new QPEMenuBar( toolbar );
menu->setMargin( 0 );
bar = new QPEToolBar( this );
bar->setLabel( tr( "Play Operations" ) );
tbDeletePlaylist = new QPushButton( Resource::loadIconSet( "trash" ), "", bar, "close" );
tbDeletePlaylist->setFlat( TRUE );
tbDeletePlaylist->setFixedSize( 20, 20 );
tbDeletePlaylist->hide();
pmPlayList = new QPopupMenu( this );
menu->insertItem( tr( "File" ), pmPlayList );
pmView = new QPopupMenu( this );
menu->insertItem( tr( "View" ), pmView );
pmView->isCheckable();
skinsMenu = new QPopupMenu( this );
pmView->insertItem( tr( "Skins" ), skinsMenu );
skinsMenu->isCheckable();
gammaMenu = new QPopupMenu( this );
pmView->insertItem( tr( "Gamma (Video)" ), gammaMenu );
gammaSlider = new QSlider( QSlider::Vertical, gammaMenu );
- gammaSlider->setRange( -100, 100 );
+ gammaSlider->setRange( -40, 40 );
gammaSlider->setTickmarks( QSlider::Left );
gammaSlider->setTickInterval( 20 );
- gammaSlider->setFocusPolicy( QWidget::NoFocus );
+ //gammaSlider->setFocusPolicy( QWidget::NoFocus );
gammaSlider->setValue( 0 );
gammaSlider->setMinimumHeight( 50 );
gammaLCD = new QLCDNumber( 3, gammaMenu );
gammaMenu->insertItem( gammaSlider );
gammaMenu->insertItem( gammaLCD );
connect( gammaSlider, SIGNAL( valueChanged( int ) ), gammaLCD, SLOT( display( int ) ) );
vbox5 = new QVBox( this );
QVBox *vbox4 = new QVBox( vbox5 );
QHBox *hbox6 = new QHBox( vbox4 );
tabWidget = new QTabWidget( hbox6, "tabWidget" );
QWidget *pTab;
pTab = new QWidget( tabWidget, "pTab" );
tabWidget->insertTab( pTab, "Playlist");
QGridLayout *Playout = new QGridLayout( pTab );
Playout->setSpacing( 2);
Playout->setMargin( 2);
// Add the playlist area
QVBox *vbox3 = new QVBox( pTab );
d->playListFrame = vbox3;
QHBox *hbox2 = new QHBox( vbox3 );
d->selectedFiles = new PlayListSelection( hbox2 );
vbox1 = new QVBox( hbox2 );
QPEApplication::setStylusOperation( d->selectedFiles->viewport(), QPEApplication::RightOnHold );
QVBox *stretch1 = new QVBox( vbox1 ); // add stretch
Playout->addMultiCellWidget( vbox3, 0, 0, 0, 1 );
QWidget *aTab;
aTab = new QWidget( tabWidget, "aTab" );
QGridLayout *Alayout = new QGridLayout( aTab );
Alayout->setSpacing( 2 );
Alayout->setMargin( 2 );
audioView = new QListView( aTab, "Audioview" );
audioView->addColumn( tr( "Title" ), 140 );
audioView->addColumn( tr( "Size" ), -1 );
audioView->addColumn( tr( "Media" ), -1 );
audioView->addColumn( tr( "Path" ), 0 );
diff --git a/noncore/multimedia/opieplayer2/videowidget.cpp b/noncore/multimedia/opieplayer2/videowidget.cpp
index f5f5c37..7b8ad7a 100644
--- a/noncore/multimedia/opieplayer2/videowidget.cpp
+++ b/noncore/multimedia/opieplayer2/videowidget.cpp
@@ -89,97 +89,97 @@ QWidget( parent, name, f ), scaledWidth( 0 ), scaledHeight( 0 ) {
setCaption( tr("OpiePlayer - Video") );
videoFrame = new XineVideoWidget ( this, "Video frame" );
connect ( videoFrame, SIGNAL( videoResized ( const QSize & )), this, SIGNAL( videoResized ( const QSize & )));
connect ( videoFrame, SIGNAL( clicked () ), this, SLOT ( backToNormal() ) );
Config cfg("OpiePlayer");
cfg.setGroup("Options");
skin = cfg.readEntry("Skin","default");
QString skinPath = "opieplayer2/skins/" + skin;
pixBg = new QPixmap( Resource::loadPixmap( QString("%1/background").arg(skinPath) ) );
imgUp = new QImage( Resource::loadImage( QString("%1/skinV_up").arg(skinPath) ) );
imgDn = new QImage( Resource::loadImage( QString("%1/skinV_down").arg(skinPath) ) );
imgButtonMask = new QImage( imgUp->width(), imgUp->height(), 8, 255 );
imgButtonMask->fill( 0 );
for ( int i = 0; i < 7; i++ ) {
QString filename = QString( QPEApplication::qpeDir() + "/pics/" + skinPath + "/skinV_mask_" + skinV_mask_file_names[i] + ".png" );
masks[i] = new QBitmap( filename );
if ( !masks[i]->isNull() ) {
QImage imgMask = masks[i]->convertToImage();
uchar **dest = imgButtonMask->jumpTable();
for ( int y = 0; y < imgUp->height(); y++ ) {
uchar *line = dest[y];
for ( int x = 0; x < imgUp->width(); x++ ) {
if ( !qRed( imgMask.pixel( x, y ) ) )
line[x] = i + 1;
}
}
}
}
for ( int i = 0; i < 7; i++ ) {
buttonPixUp[i] = NULL;
buttonPixDown[i] = NULL;
}
setBackgroundPixmap( *pixBg );
slider = new QSlider( Qt::Horizontal, this );
slider->setMinValue( 0 );
slider->setMaxValue( 1 );
slider->setBackgroundPixmap( Resource::loadPixmap( backgroundPix ) );
- slider->setFocusPolicy( QWidget::NoFocus );
+ //slider->setFocusPolicy( QWidget::NoFocus );
resizeEvent( NULL );
connect( slider, SIGNAL( sliderPressed() ), this, SLOT( sliderPressed() ) );
connect( slider, SIGNAL( sliderReleased() ), this, SLOT( sliderReleased() ) );
connect( mediaPlayerState, SIGNAL( lengthChanged(long) ), this, SLOT( setLength(long) ) );
connect( mediaPlayerState, SIGNAL( viewChanged(char) ), this, SLOT( setView(char) ) );
connect( mediaPlayerState, SIGNAL( playingToggled(bool) ), this, SLOT( setPlaying(bool) ) );
setLength( mediaPlayerState->length() );
setPosition( mediaPlayerState->position() );
setFullscreen( mediaPlayerState->fullscreen() );
setPlaying( mediaPlayerState->playing() );
}
VideoWidget::~VideoWidget() {
for ( int i = 0; i < 7; i++ ) {
delete buttonPixUp[i];
delete buttonPixDown[i];
}
delete pixBg;
delete imgUp;
delete imgDn;
delete imgButtonMask;
for ( int i = 0; i < 7; i++ ) {
delete masks[i];
}
}
QPixmap *combineVImageWithBackground( QImage img, QPixmap bg, QPoint offset ) {
QPixmap pix( img.width(), img.height() );
QPainter p( &pix );
p.drawTiledPixmap( pix.rect(), bg, offset );
p.drawImage( 0, 0, img );
return new QPixmap( pix );
}
QPixmap *maskVPixToMask( QPixmap pix, QBitmap mask ) {
QPixmap *pixmap = new QPixmap( pix );
pixmap->setMask( mask );
return pixmap;
}
void VideoWidget::resizeEvent( QResizeEvent * ) {
@@ -391,98 +391,98 @@ void VideoWidget::makeVisible() {
setBackgroundPixmap( *pixBg );
if ( mediaPlayerState->streaming() ) {
slider->hide();
disconnect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
disconnect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
} else {
slider->show();
connect( mediaPlayerState, SIGNAL( positionChanged(long) ),this, SLOT( setPosition(long) ) );
connect( mediaPlayerState, SIGNAL( positionUpdated(long) ),this, SLOT( setPosition(long) ) );
}
QWidget *d = QApplication::desktop();
int w=d->width();
int h=d->height();
if(w>h) {
int newW=(w/2)-(246/2); //this will only work with 320x240
videoFrame->setGeometry( QRect( newW, 4, 240, 170 ) );
} else
videoFrame->setGeometry( QRect( 0, 30, 240, 170 ) );
// qApp->processEvents();
}
}
void VideoWidget::paintEvent( QPaintEvent * pe) {
QPainter p( this );
if ( mediaPlayerState->fullscreen() ) {
// Clear the background
p.setBrush( QBrush( Qt::black ) );
} else {
if ( !pe->erased() ) {
// Combine with background and double buffer
QPixmap pix( pe->rect().size() );
QPainter p( &pix );
p.translate( -pe->rect().topLeft().x(), -pe->rect().topLeft().y() );
p.drawTiledPixmap( pe->rect(), *pixBg, pe->rect().topLeft() );
for ( int i = 0; i < numVButtons; i++ ) {
paintButton( &p, i );
}
QPainter p2( this );
p2.drawPixmap( pe->rect().topLeft(), pix );
} else {
QPainter p( this );
for ( int i = 0; i < numVButtons; i++ )
paintButton( &p, i );
}
- slider->repaint( TRUE );
- }
+ //slider->repaint( TRUE );
+ }
}
void VideoWidget::closeEvent( QCloseEvent* ) {
mediaPlayerState->setList();
}
void VideoWidget::keyReleaseEvent( QKeyEvent *e) {
switch ( e->key() ) {
////////////////////////////// Zaurus keys
case Key_Home:
break;
case Key_F9: //activity
break;
case Key_F10: //contacts
// hide();
break;
case Key_F11: //menu
break;
case Key_F12: //home
break;
case Key_F13: //mail
break;
case Key_Space: {
if(mediaPlayerState->playing()) {
mediaPlayerState->setPlaying(FALSE);
} else {
mediaPlayerState->setPlaying(TRUE);
}
}
break;
case Key_Down:
// toggleButton(6);
emit lessClicked();
emit lessReleased();
// toggleButton(6);
break;
case Key_Up:
// toggleButton(5);
emit moreClicked();
emit moreReleased();
// toggleButton(5);
break;
case Key_Right:
mediaPlayerState->setNext();
break;
diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp
index 81693e1..31ac9dc 100644
--- a/noncore/multimedia/opieplayer2/xinecontrol.cpp
+++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp
@@ -1,98 +1,98 @@
/*
                This file is part of the Opie Project
              Copyright (c) 2002 Max Reiss <harlekin@handhelds.org>
Copyright (c) 2002 L. Potter <ljp@llornkcor.com>
Copyright (c) 2002 Holger Freyther <zecke@handhelds.org>
=.
.=l.
           .>+-=
 _;:,     .>    :=|. This program is free software; you can
.> <`_,   >  .   <= redistribute it and/or modify it under
:`=1 )Y*s>-.--   : the terms of the GNU General Public
.="- .-=="i,     .._ License as published by the Free Software
 - .   .-<_>     .<> Foundation; either version 2 of the License,
     ._= =}       : or (at your option) any later version.
    .%`+i>       _;_.
    .i_,=:_.      -<s. This program is distributed in the hope that
     +  .  -:.       = it will be useful, but WITHOUT ANY WARRANTY;
    : ..    .:,     . . . without even the implied warranty of
    =_        +     =;=|` MERCHANTABILITY or FITNESS FOR A
  _.=:.       :    :=>`: PARTICULAR PURPOSE. See the GNU
..}^=.=       =       ; General Public License for more
++=   -.     .`     .: details.
 :     =  ...= . :.=-
 -.   .:....=;==+<; You should have received a copy of the GNU
  -_. . .   )=.  = General Public License along with
    --        :-=` this library; see the file COPYING.LIB.
If not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA.
*/
#include <qtimer.h>
#include <qmessagebox.h>
#include <qpe/qcopenvelope_qws.h>
#include <qpe/qpeapplication.h>
#include "xinecontrol.h"
#include "mediaplayerstate.h"
#include "videowidget.h"
extern MediaPlayerState *mediaPlayerState;
extern VideoWidget *videoUI;
XineControl::XineControl( QObject *parent, const char *name )
: QObject( parent, name ) {
- libXine = new XINE::Lib(videoUI->vidWidget() );
+ libXine = new XINE::Lib( videoUI->vidWidget() );
- connect ( videoUI, SIGNAL( videoResized ( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) );
+ connect ( videoUI, SIGNAL( videoResized( const QSize & )), this, SLOT( videoResized ( const QSize & ) ) );
connect( mediaPlayerState, SIGNAL( pausedToggled( bool ) ), this, SLOT( pause( bool ) ) );
connect( this, SIGNAL( positionChanged( long ) ), mediaPlayerState, SLOT( updatePosition( long ) ) );
connect( mediaPlayerState, SIGNAL( playingToggled( bool ) ), this, SLOT( stop( bool ) ) );
connect( mediaPlayerState, SIGNAL( fullscreenToggled( bool ) ), this, SLOT( setFullscreen( bool ) ) );
connect( mediaPlayerState, SIGNAL( positionChanged( long ) ), this, SLOT( seekTo( long ) ) );
connect( mediaPlayerState, SIGNAL( videoGammaChanged( int ) ), this, SLOT( setGamma( int ) ) );
connect( libXine, SIGNAL( stopped() ), this, SLOT( nextMedia() ) );
disabledSuspendScreenSaver = FALSE;
}
XineControl::~XineControl() {
#if defined(Q_WS_QWS) && !defined(QT_NO_COP)
if ( disabledSuspendScreenSaver ) {
disabledSuspendScreenSaver = FALSE;
// Re-enable the suspend mode
QCopEnvelope( "QPE/System", "setScreenSaverMode(int)" ) << QPEApplication::Enable;
}
#endif
delete libXine;
}
void XineControl::play( const QString& fileName ) {
hasVideoChannel = FALSE;
hasAudioChannel = FALSE;
m_fileName = fileName;
//qDebug("<<FILENAME: " + fileName + ">>>>");
if ( !libXine->play( fileName ) ) {
QMessageBox::warning( 0l , tr( "Failure" ), getErrorCode() );
return;
}
mediaPlayerState->setPlaying( true );
char whichGui;
// qDebug( QString( "libXine->hasVideo() return : %1 ").arg( libXine->hasVideo() ) );
if ( !libXine->hasVideo() ) {
whichGui = 'a';
qDebug("HAS AUDIO");
libXine->setShowVideo( false );
hasAudioChannel = TRUE;
} else {
whichGui = 'v';
qDebug("HAS VIDEO");
libXine->setShowVideo( true );
hasVideoChannel = TRUE;
}
diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.h b/noncore/multimedia/opieplayer2/yuv2rgb.h
index 5b9c3f6..e453243 100644
--- a/noncore/multimedia/opieplayer2/yuv2rgb.h
+++ b/noncore/multimedia/opieplayer2/yuv2rgb.h
@@ -46,106 +46,107 @@ struct yuv2rgb_s {
* configure converter for scaling factors
*/
int (*configure) (yuv2rgb_t *this,
int source_width, int source_height,
int y_stride, int uv_stride,
int dest_width, int dest_height,
int rgb_stride);
/*
* this is the function to call for the yuv2rgb and scaling process
*/
yuv2rgb_fun_t yuv2rgb_fun;
/*
* this is the function to call for the yuy2->rgb and scaling process
*/
yuy22rgb_fun_t yuy22rgb_fun;
/*
* this is the function to call for the yuv2rgb for a single pixel
* (used for converting clut colors)
*/
yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun;
/* private stuff below */
int source_width, source_height;
int y_stride, uv_stride;
int dest_width, dest_height;
int rgb_stride;
int step_dx, step_dy;
int do_scale;
uint8_t *y_buffer;
uint8_t *u_buffer;
uint8_t *v_buffer;
void *y_chunk;
void *u_chunk;
void *v_chunk;
void **table_rV;
void **table_gU;
int *table_gV;
void **table_bU;
uint8_t *cmap;
scale_line_func_t scale_line;
-
+
} ;
/*
* convenience class to easily create a lot of converters
*/
struct yuv2rgb_factory_s {
yuv2rgb_t* (*create_converter) (yuv2rgb_factory_t *this);
- /*
- * adjust gamma (-100 to 100 looks fine)
+ /*
+ * adjust gamma (-100 to 100 looks fine)
* for all converters produced by this factory
*/
void (*set_gamma) (yuv2rgb_factory_t *this, int gamma);
- /*
- * get gamma value
+ /*
+ * get gamma value
*/
int (*get_gamma) (yuv2rgb_factory_t *this);
-
+
/* private data */
int mode;
int swapped;
uint8_t *cmap;
int gamma;
int entry_size;
uint32_t matrix_coefficients;
void *table_rV[256];
void *table_gU[256];
int table_gV[256];
void *table_bU[256];
/* preselected functions for mode/swap/hardware */
yuv2rgb_fun_t yuv2rgb_fun;
yuy22rgb_fun_t yuy22rgb_fun;
yuv2rgb_single_pixel_fun_t yuv2rgb_single_pixel_fun;
};
yuv2rgb_factory_t *yuv2rgb_factory_init (int mode, int swapped, uint8_t *colormap);
-
+
/*
* internal stuff below this line
*/
void mmx_yuv2rgb_set_gamma(int gamma);
void yuv2rgb_init_mmxext (yuv2rgb_factory_t *this);
void yuv2rgb_init_mmx (yuv2rgb_factory_t *this);
void yuv2rgb_init_mlib (yuv2rgb_factory_t *this);
+void yuv2rgb_init_arm (yuv2rgb_factory_t *this);
#endif