[Mplayer-cvslog] CVS: main/postproc rgb2rgb_template.c,1.68,1.69

Michael Niedermayer CVS syncmail at mplayerhq.hu
Sun May 2 16:26:30 CEST 2004


CVS change done by Michael Niedermayer CVS

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

Modified Files:
	rgb2rgb_template.c 
Log Message:
bigendian fix by (Romain Dolbeau <dolbeau at irisa dot fr>)
with #if defined(WORDS_BIGENDIAN) && (WORDS_BIGENDIAN == 1) -> #ifdef WORDS_BIGENDIAN by me


Index: rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.68
retrieving revision 1.69
diff -u -r1.68 -r1.69
--- rgb2rgb_template.c	1 May 2004 20:15:21 -0000	1.68
+++ rgb2rgb_template.c	2 May 2004 14:26:28 -0000	1.69
@@ -1532,8 +1532,13 @@
 		int i, *idst = (int32_t *) dst;
 		const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc;
 		for(i = 0; i < chromWidth; i++){
+#ifdef WORDS_BIGENDIAN
+			*idst++ = (yc[0] << 24)+ (uc[0] << 16) +
+			    (yc[1] << 8) + (vc[0] << 0);
+#else
 			*idst++ = yc[0] + (uc[0] << 8) +
 			    (yc[1] << 16) + (vc[0] << 24);
+#endif
 			yc += 2;
 			uc++;
 			vc++;
@@ -1634,8 +1639,13 @@
 		int i, *idst = (int32_t *) dst;
 		const uint8_t *yc = ysrc, *uc = usrc, *vc = vsrc;
 		for(i = 0; i < chromWidth; i++){
+#ifdef WORDS_BIGENDIAN
+			*idst++ = (uc[0] << 24)+ (yc[0] << 16) +
+			    (vc[0] << 8) + (yc[1] << 0);
+#else
 			*idst++ = uc[0] + (yc[0] << 8) +
 			    (vc[0] << 16) + (yc[1] << 24);
+#endif
 			yc += 2;
 			uc++;
 			vc++;




More information about the MPlayer-cvslog mailing list