[MPlayer-cvslog] CVS: main/postproc rgb2rgb_template.c,1.72,1.73
Diego Biurrun CVS
syncmail at mplayerhq.hu
Tue Mar 22 11:11:44 CET 2005
CVS change done by Diego Biurrun CVS
Update of /cvsroot/mplayer/main/postproc
In directory mail:/var2/tmp/cvs-serv3351/postproc
Modified Files:
rgb2rgb_template.c
Log Message:
Fixes rgb32to16 conversion for I think all platforms since the int8
cast should never have worked. Tested on PowerPC and fixes the black GUI
to show the content.
patch by Rene Rebe <rene at exactcode dot de>
Index: rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.72
retrieving revision 1.73
diff -u -r1.72 -r1.73
--- rgb2rgb_template.c 21 Oct 2004 11:55:20 -0000 1.72
+++ rgb2rgb_template.c 22 Mar 2005 10:11:42 -0000 1.73
@@ -403,10 +403,8 @@
#endif
while(s < end)
{
- // FIXME on bigendian
- const int src= *s; s += 4;
- *d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8);
-// *d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800);
+ register int rgb = *(uint32_t*)s; s += 4;
+ *d++ = ((rgb&0xFF)>>3) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>8);
}
}
More information about the MPlayer-cvslog
mailing list