summaryrefslogtreecommitdiffstats
path: root/gui/bitmap.c
diff options
context:
space:
mode:
authorreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-02 16:38:22 +0000
committerreimar <reimar@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-05-02 16:38:22 +0000
commit20fbe131b28618176a663afafef06d0ec12a55d3 (patch)
tree7b6f12b4f7752859c1d096bf9d05007d0ef50394 /gui/bitmap.c
parent20d27407649f7a2e3fcaa700d6a6b71bd66df306 (diff)
downloadmpv-20fbe131b28618176a663afafef06d0ec12a55d3.tar.bz2
mpv-20fbe131b28618176a663afafef06d0ec12a55d3.tar.xz
Simplify bgr2rgb
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23216 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'gui/bitmap.c')
-rw-r--r--gui/bitmap.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/gui/bitmap.c b/gui/bitmap.c
index ccd99befa9..4e61ba600f 100644
--- a/gui/bitmap.c
+++ b/gui/bitmap.c
@@ -93,15 +93,10 @@ static int conv24to32( txSample * bf )
static void bgr2rgb( txSample * bf )
{
- unsigned char c;
int i;
for ( i=0;i < (int)bf->ImageSize;i+=4 )
- {
- c=bf->Image[i];
- bf->Image[i]=bf->Image[i+2];
- bf->Image[i+2]=c;
- }
+ FFSWAP(uint8_t, bf->Image[i], bf->Image[i+2]);
}
static void Normalize( txSample * bf )