[MPlayer-cvslog] CVS: main/postproc rgb2rgb_template.c,1.76,1.77

Alan Curry CVS syncmail at mplayerhq.hu
Fri Feb 24 10:53:02 CET 2006


CVS change done by Alan Curry CVS

Update of /cvsroot/mplayer/main/postproc
In directory mail:/var2/tmp/cvs-serv26637

Modified Files:
	rgb2rgb_template.c 
Log Message:
Fix rgb32tobgr16, rgb32to15, and rgb32tobgr15. All had the same problem that
was fixed in rgb32to16 about a year ago: using only the first 8 bits of the
32-bit pixel.


Index: rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.76
retrieving revision 1.77
diff -u -r1.76 -r1.77
--- rgb2rgb_template.c	13 Feb 2006 12:44:17 -0000	1.76
+++ rgb2rgb_template.c	24 Feb 2006 09:52:59 -0000	1.77
@@ -468,8 +468,8 @@
 #endif
 	while(s < end)
 	{
-		const int src= *s; s += 4;
-		*d++ = ((src&0xF8)<<8) + ((src&0xFC00)>>5) + ((src&0xF80000)>>19);
+		register int rgb = *(uint32_t*)s; s += 4;
+		*d++ = ((rgb&0xF8)<<8) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>19);
 	}
 }
 
@@ -564,8 +564,8 @@
 #endif
 	while(s < end)
 	{
-		const int src= *s; s += 4;
-		*d++ = ((src&0xFF)>>3) + ((src&0xF800)>>6) + ((src&0xF80000)>>9);
+		register int rgb = *(uint32_t*)s; s += 4;
+		*d++ = ((rgb&0xFF)>>3) + ((rgb&0xF800)>>6) + ((rgb&0xF80000)>>9);
 	}
 }
 
@@ -625,8 +625,8 @@
 #endif
 	while(s < end)
 	{
-		const int src= *s; s += 4;
-		*d++ = ((src&0xF8)<<7) + ((src&0xF800)>>6) + ((src&0xF80000)>>19);
+		register int rgb = *(uint32_t*)s; s += 4;
+		*d++ = ((rgb&0xF8)<<7) + ((rgb&0xF800)>>6) + ((rgb&0xF80000)>>19);
 	}
 }
 




More information about the MPlayer-cvslog mailing list