-rw-r--r-- | noncore/multimedia/opieplayer2/lib.cpp | 9 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/lib.h | 7 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.cpp | 60 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/mediaplayerstate.h | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/nullvideo.c | 43 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.cpp | 11 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidget.h | 4 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.cpp | 25 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/playlistwidgetgui.h | 10 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.cpp | 15 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinecontrol.h | 33 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/xinevideowidget.cpp | 88 | ||||
-rw-r--r-- | noncore/multimedia/opieplayer2/yuv2rgb.c | 17 |
13 files changed, 244 insertions, 88 deletions
diff --git a/noncore/multimedia/opieplayer2/lib.cpp b/noncore/multimedia/opieplayer2/lib.cpp index b2143a0..748ae1f 100644 --- a/noncore/multimedia/opieplayer2/lib.cpp +++ b/noncore/multimedia/opieplayer2/lib.cpp @@ -62,2 +62,3 @@ extern "C" { void null_set_mode( vo_driver_t* self, int depth, int rgb ); + void null_set_videoGamma( vo_driver_t* self , int value ); void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_data); @@ -94,3 +95,3 @@ Lib::Lib(XineVideoWidget* widget) { ::null_set_mode( m_videoOutput, qt_screen->depth(), qt_screen->pixelType() ); - m_wid-> setImage ( new QImage ( Resource::loadImage(""))); + m_wid-> setImage ( new QImage ( Resource::loadImage("") ) ); m_wid->repaint(); @@ -205,2 +206,8 @@ void Lib::setScaling( bool scale ) { } + +void Lib::setGamma( int value ) { + //qDebug( QString( "%1").arg(value) ); + ::null_set_videoGamma( m_videoOutput, value ); +} + bool Lib::isScaling() { diff --git a/noncore/multimedia/opieplayer2/lib.h b/noncore/multimedia/opieplayer2/lib.h index abd8c65..b9d0a8a 100644 --- a/noncore/multimedia/opieplayer2/lib.h +++ b/noncore/multimedia/opieplayer2/lib.h @@ -114,2 +114,9 @@ namespace XINE { void setScaling( bool ); + + /** + * Set the Gamma value for video output + * @param int the value between -100 and 100, 0 is original + */ + void setGamma( int ); + /** diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp index d984022..4ec5989 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.cpp +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.cpp @@ -1 +1,36 @@ +/* + 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. + +*/ + +// this file is based on work by trolltech + #include <qpe/qpeapplication.h> @@ -23,5 +58,2 @@ MediaPlayerState::MediaPlayerState( QObject *parent, const char *name ) MediaPlayerState::~MediaPlayerState() { -// Config cfg( "OpiePlayer" ); -// writeConfig( cfg ); - } @@ -36,2 +68,3 @@ void MediaPlayerState::readConfig( Config& cfg ) { usePlaylist = cfg.readBoolEntry( "UsePlayList" ); + videoGamma = cfg.readNumEntry( "VideoGamma" ); usePlaylist = TRUE; @@ -47,8 +80,9 @@ void MediaPlayerState::readConfig( Config& cfg ) { void MediaPlayerState::writeConfig( Config& cfg ) const { - cfg.setGroup("Options"); - cfg.writeEntry("FullScreen", isFullscreen ); - cfg.writeEntry("Scaling", isScaled ); - cfg.writeEntry("Looping", isLooping ); - cfg.writeEntry("Shuffle", isShuffled ); - cfg.writeEntry("UsePlayList", usePlaylist ); + cfg.setGroup( "Options" ); + cfg.writeEntry( "FullScreen", isFullscreen ); + cfg.writeEntry( "Scaling", isScaled ); + cfg.writeEntry( "Looping", isLooping ); + cfg.writeEntry( "Shuffle", isShuffled ); + cfg.writeEntry( "UsePlayList", usePlaylist ); + cfg.writeEntry( "VideoGamma", videoGamma ); } @@ -211,2 +245,10 @@ void MediaPlayerState::updatePosition( long p ){ +void MediaPlayerState::setVideoGamma( int v ){ + if ( videoGamma == v ) { + return; + } + videoGamma = v; + emit videoGammaChanged( v ); +} + void MediaPlayerState::setLength( long l ) { diff --git a/noncore/multimedia/opieplayer2/mediaplayerstate.h b/noncore/multimedia/opieplayer2/mediaplayerstate.h index 215a2a8..4fef8e0 100644 --- a/noncore/multimedia/opieplayer2/mediaplayerstate.h +++ b/noncore/multimedia/opieplayer2/mediaplayerstate.h @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. @@ -33,2 +33,4 @@ +// this file is based on work by trolltech + #ifndef MEDIA_PLAYER_STATE_H @@ -81,2 +83,3 @@ public slots: void setBlanked( bool b ); + void setVideoGamma( int v ); @@ -113,2 +116,3 @@ signals: void blankToggled( bool ); + void videoGammaChanged( int ); void prev(); @@ -127,3 +131,3 @@ private: char curView; - + int videoGamma; void readConfig( Config& cfg ); diff --git a/noncore/multimedia/opieplayer2/nullvideo.c b/noncore/multimedia/opieplayer2/nullvideo.c index bd52869..ceda333 100644 --- a/noncore/multimedia/opieplayer2/nullvideo.c +++ b/noncore/multimedia/opieplayer2/nullvideo.c @@ -1 +1,33 @@ +/* + 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. + +*/ @@ -33,3 +65,3 @@ struct null_driver_s { int yuv2rgb_swap; - int zuv2rgb_gamma; + int yuv2rgb_gamma; uint8_t *yuv2rgb_cmap; @@ -607,2 +639,8 @@ int null_is_scaling( vo_driver_t* self ){ } + +void null_set_videoGamma( vo_driver_t* self , int value ) { + ((null_driver_t*) self) ->yuv2rgb_gamma = value; + ((null_driver_t*) self) ->yuv2rgb_factory->set_gamma( ((null_driver_t*) self) ->yuv2rgb_factory, value ); +} + void null_set_scaling( vo_driver_t* self, int scale ){ @@ -617,2 +655,4 @@ void null_set_gui_height( vo_driver_t* self, int height ){ } + + void null_set_mode( vo_driver_t* self, int depth, int rgb ){ @@ -672 +712,2 @@ void null_display_handler(vo_driver_t* self, display_xine_frame_t t, void* user_ } + diff --git a/noncore/multimedia/opieplayer2/playlistwidget.cpp b/noncore/multimedia/opieplayer2/playlistwidget.cpp index 6c4d07f..3bd04bc 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidget.cpp @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. @@ -120,2 +120,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) connect( d->selectedFiles, SIGNAL( doubleClicked( QListViewItem *) ), this, SLOT( playIt( QListViewItem *) ) ); + connect ( gammaSlider, SIGNAL( valueChanged( int ) ), mediaPlayerState, SLOT( setVideoGamma( int ) ) ); @@ -135,3 +136,3 @@ PlayListWidget::PlayListWidget( QWidget* parent, const char* name, WFlags fl ) PlayListWidget::~PlayListWidget() { - // WTF?!@?! + // WTF?!@?! @@ -735,3 +736,3 @@ void PlayListWidget::populateAudioView() { size=0; - else + else size = QFile( dit.current()->file() ).size(); @@ -936,3 +937,3 @@ void PlayListWidget::writem3u() { // no, cause it takes to long... - + list += d->selectedFiles->current()->file() + "\n"; diff --git a/noncore/multimedia/opieplayer2/playlistwidget.h b/noncore/multimedia/opieplayer2/playlistwidget.h index 2742252..dcfdd48 100644 --- a/noncore/multimedia/opieplayer2/playlistwidget.h +++ b/noncore/multimedia/opieplayer2/playlistwidget.h @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp index 6ecd016..250833c 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.cpp @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. @@ -101,2 +101,21 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags + gammaMenu = new QPopupMenu( this ); + pmView->insertItem( tr( "Gamma" ), gammaMenu ); + gammaMenu->setMinimumHeight( 50 ); + + gammaSlider = new QSlider( QSlider::Vertical, gammaMenu ); + gammaSlider->setRange( -100, 100 ); + gammaSlider->setTickmarks( QSlider::Left ); + gammaSlider->setTickInterval( 20 ); + 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 ); @@ -109,3 +128,3 @@ PlayListWidgetGui::PlayListWidgetGui( QWidget* parent, const char* name, WFlags pTab = new QWidget( tabWidget, "pTab" ); - tabWidget->insertTab( pTab,"Playlist"); + tabWidget->insertTab( pTab, "Playlist"); diff --git a/noncore/multimedia/opieplayer2/playlistwidgetgui.h b/noncore/multimedia/opieplayer2/playlistwidgetgui.h index 4c8d737..61fd40d 100644 --- a/noncore/multimedia/opieplayer2/playlistwidgetgui.h +++ b/noncore/multimedia/opieplayer2/playlistwidgetgui.h @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. @@ -46,3 +46,4 @@ #include <qaction.h> - +#include <qslider.h> +#include <qlcdnumber.h> @@ -106,2 +107,5 @@ protected: QPopupMenu *pmView ; + QPopupMenu *gammaMenu; + QSlider *gammaSlider; + QLCDNumber *gammaLCD; bool fromSetDocument; diff --git a/noncore/multimedia/opieplayer2/xinecontrol.cpp b/noncore/multimedia/opieplayer2/xinecontrol.cpp index 12d80ba..d18fde5 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.cpp +++ b/noncore/multimedia/opieplayer2/xinecontrol.cpp @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. @@ -53,2 +53,3 @@ XineControl::XineControl( QObject *parent, const char *name ) 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() ) ); @@ -73,5 +74,5 @@ void XineControl::play( const QString& fileName ) { m_fileName = fileName; - - qDebug("<<FILENAME: " + fileName + ">>>>"); - + + //qDebug("<<FILENAME: " + fileName + ">>>>"); + libXine->play( fileName ); @@ -116,2 +117,6 @@ void XineControl::nextMedia() { +void XineControl::setGamma( int value ) { + libXine->setGamma( value ); +} + void XineControl::stop( bool isSet ) { diff --git a/noncore/multimedia/opieplayer2/xinecontrol.h b/noncore/multimedia/opieplayer2/xinecontrol.h index 4263b36..1de610b 100644 --- a/noncore/multimedia/opieplayer2/xinecontrol.h +++ b/noncore/multimedia/opieplayer2/xinecontrol.h @@ -21,3 +21,3 @@ _.=:. : :=>`: PARTICULAR PURPOSE. See the GNU -..}^=.= = ; Library General Public License for more +..}^=.= = ; General Public License for more ++= -. .` .: details. @@ -25,3 +25,3 @@ -. .:....=;==+<; You should have received a copy of the GNU - -_. . . )=. = Library General Public License along with + -_. . . )=. = General Public License along with -- :-=` this library; see the file COPYING.LIB. @@ -52,4 +52,18 @@ public slots: void stop( bool ); + + /** + * Pause the media stream + * @param if pause or not + */ void pause( bool ); + + /** + * Set videos fullscreen + * @param yes or no + */ void setFullscreen( bool ); + + /** + * + */ long currentTime(); @@ -59,5 +73,17 @@ public slots: long position(); + + /** + * Proceed to the next media file in playlist + */ void nextMedia(); + void videoResized ( const QSize &s ); + /** + * Set the gamma value of the video output + * @param int value between -100 and 100, 0 is original + */ + void setGamma( int ); + + private: @@ -65,3 +91,3 @@ private: MediaDetect mdetect; - long m_currentTime; + long m_currentTime; long m_position; @@ -72,2 +98,3 @@ private: bool hasAudioChannel : 1; + signals: diff --git a/noncore/multimedia/opieplayer2/xinevideowidget.cpp b/noncore/multimedia/opieplayer2/xinevideowidget.cpp index bc95d86..d06d62a 100644 --- a/noncore/multimedia/opieplayer2/xinevideowidget.cpp +++ b/noncore/multimedia/opieplayer2/xinevideowidget.cpp @@ -131,10 +131,10 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) for ( int i = dp. numRects ( ) - 1; i >= 0; i-- ) { - const QRect &clip = dp. rect ( i ); + const QRect &clip = dp. rect ( i ); - qt_bug_workaround_clip_rects [i] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); + qt_bug_workaround_clip_rects [i] = qt_screen-> mapFromDevice ( clip, QSize ( qt_screen-> width ( ), qt_screen-> height ( ))); - uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb ); - uchar *src = frame; + uchar *dst = fb + ( clip. x ( ) * m_bytes_per_pixel ) + ( clip. y ( ) * m_bytes_per_line_fb ); + uchar *src = frame; - switch ( rot ) { + switch ( rot ) { case 0: src += ( (( clip. x ( ) - framerect. x ( )) * m_bytes_per_pixel ) + (( clip. y ( ) - framerect. y ( )) * m_bytes_per_line_frame ) ); break; @@ -143,48 +143,48 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) case 3: src += ( (( clip. y ( ) - framerect. y ( )) * m_bytes_per_pixel ) + (( clip. x ( ) - framerect. x ( )) * m_bytes_per_line_frame ) ); break; - default: break; - } + default: break; + } - uint leftfill = 0; - uint framefill = 0; - uint rightfill = 0; - uint clipwidth = clip. width ( ) * m_bytes_per_pixel; + uint leftfill = 0; + uint framefill = 0; + uint rightfill = 0; + uint clipwidth = clip. width ( ) * m_bytes_per_pixel; - if ( clip. left ( ) < framerect. left ( )) - leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth; - if ( clip. right ( ) > framerect. right ( )) - rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth; + if ( clip. left ( ) < framerect. left ( )) + leftfill = (( framerect. left ( ) - clip. left ( )) * m_bytes_per_pixel ) <? clipwidth; + if ( clip. right ( ) > framerect. right ( )) + rightfill = (( clip. right ( ) - framerect. right ( )) * m_bytes_per_pixel ) <? clipwidth; - framefill = clipwidth - ( leftfill + rightfill ); + framefill = clipwidth - ( leftfill + rightfill ); - for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) { - if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) { - memset ( dst, 0, clipwidth ); - } + for ( int y = clip. top ( ); y <= clip. bottom ( ); y++ ) { + if (( y < framerect. top ( )) || ( y > framerect. bottom ( ))) { + memset ( dst, 0, clipwidth ); + } else { - if ( leftfill ) - memset ( dst, 0, leftfill ); - - if ( framefill ) { - switch ( rot ) { - case 0: memcpy ( dst + leftfill, src, framefill ); break; - case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; - case 2: memcpy_rev ( dst + leftfill, src, framefill ); break; - case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; - default: break; + if ( leftfill ) + memset ( dst, 0, leftfill ); + + if ( framefill ) { + switch ( rot ) { + case 0: memcpy ( dst + leftfill, src, framefill ); break; + case 1: memcpy_step ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; + case 2: memcpy_rev ( dst + leftfill, src, framefill ); break; + case 3: memcpy_step_rev ( dst + leftfill, src, framefill, m_bytes_per_line_frame ); break; + default: break; + } } - } if ( rightfill ) - memset ( dst + leftfill + framefill, 0, rightfill ); + memset ( dst + leftfill + framefill, 0, rightfill ); } - dst += m_bytes_per_line_fb; + dst += m_bytes_per_line_fb; - switch ( rot ) { - case 0: src += m_bytes_per_line_frame; break; - case 1: src -= m_bytes_per_pixel; break; - case 2: src -= m_bytes_per_line_frame; break; + switch ( rot ) { + case 0: src += m_bytes_per_line_frame; break; + case 1: src -= m_bytes_per_pixel; break; + case 2: src -= m_bytes_per_line_frame; break; case 3: src += m_bytes_per_pixel; break; - default: break; + default: break; + } } - } } @@ -193,8 +193,8 @@ void XineVideoWidget::paintEvent ( QPaintEvent * ) { - // QVFB hack by MArtin Jones - QPainter p ( this ); + // QVFB hack by MArtin Jones + QPainter p ( this ); - for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) { - p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [i]. topLeft ( )), qt_bug_workaround_clip_rects [i]. size ( )), QBrush ( NoBrush ) ); - } + for ( int i = qt_bug_workaround_clip_rects. size ( ) - 1; i >= 0; i-- ) { + p. fillRect ( QRect ( mapFromGlobal ( qt_bug_workaround_clip_rects [i]. topLeft ( )), qt_bug_workaround_clip_rects [i]. size ( )), QBrush ( NoBrush ) ); + } } diff --git a/noncore/multimedia/opieplayer2/yuv2rgb.c b/noncore/multimedia/opieplayer2/yuv2rgb.c index 22bb4cb..e8e86e6 100644 --- a/noncore/multimedia/opieplayer2/yuv2rgb.c +++ b/noncore/multimedia/opieplayer2/yuv2rgb.c @@ -3065,12 +3065,11 @@ yuv2rgb_t *yuv2rgb_create_converter (yuv2rgb_factory_t *factory) { */ - void yuv2rgb_set_gamma (yuv2rgb_factory_t *this, int gamma) { - - int i; - - for (i = 0; i < 256; i++) { - (uint8_t *)this->table_rV[i] += this->entry_size*(gamma - this->gamma); - (uint8_t *)this->table_gU[i] += this->entry_size*(gamma - this->gamma); - (uint8_t *)this->table_bU[i] += this->entry_size*(gamma - this->gamma); - } + + int i; + + for (i = 0; i < 256; i++) { + (uint8_t *)this->table_rV[i] += this->entry_size*(gamma - this->gamma); + (uint8_t *)this->table_gU[i] += this->entry_size*(gamma - this->gamma); + (uint8_t *)this->table_bU[i] += this->entry_size*(gamma - this->gamma); + } #ifdef ARCH_X86 |