[MPlayer-cvslog] CVS: main/postproc rgb2rgb.c,1.62,1.63
Nicolas Plourde CVS
syncmail at mplayerhq.hu
Wed Apr 27 20:17:55 CEST 2005
CVS change done by Nicolas Plourde CVS
Update of /cvsroot/mplayer/main/postproc
In directory mail:/var2/tmp/cvs-serv16670/postproc
Modified Files:
rgb2rgb.c
Log Message:
fix palette8tobgr32/palette8torgb32 on big endian
Index: rgb2rgb.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -r1.62 -r1.63
--- rgb2rgb.c 21 Oct 2004 11:55:20 -0000 1.62
+++ rgb2rgb.c 27 Apr 2005 18:17:53 -0000 1.63
@@ -332,11 +332,17 @@
for(i=0; i<num_pixels; i++)
{
+ #ifdef WORDS_BIGENDIAN
+ dst[3]= palette[ src[i]*4+2 ];
+ dst[2]= palette[ src[i]*4+1 ];
+ dst[1]= palette[ src[i]*4+0 ];
+ #else
//FIXME slow?
dst[0]= palette[ src[i]*4+2 ];
dst[1]= palette[ src[i]*4+1 ];
dst[2]= palette[ src[i]*4+0 ];
// dst[3]= 0; /* do we need this cleansing? */
+ #endif
dst+= 4;
}
}
@@ -346,11 +352,18 @@
unsigned i;
for(i=0; i<num_pixels; i++)
{
+ #ifdef WORDS_BIGENDIAN
+ dst[3]= palette[ src[i]*4+0 ];
+ dst[2]= palette[ src[i]*4+1 ];
+ dst[1]= palette[ src[i]*4+2 ];
+ #else
//FIXME slow?
dst[0]= palette[ src[i]*4+0 ];
dst[1]= palette[ src[i]*4+1 ];
dst[2]= palette[ src[i]*4+2 ];
// dst[3]= 0; /* do we need this cleansing? */
+ #endif
+
dst+= 4;
}
}
More information about the MPlayer-cvslog
mailing list