[Mplayer-cvslog] CVS: main/postproc rgb2rgb_template.c,1.64,1.65

Michael Niedermayer CVS michael at mplayerhq.hu
Fri Apr 25 19:22:34 CEST 2003


Update of /cvsroot/mplayer/main/postproc
In directory mail:/var/tmp.root/cvs-serv28742

Modified Files:
	rgb2rgb_template.c 
Log Message:
bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)


Index: rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- rgb2rgb_template.c	25 Apr 2003 17:16:55 -0000	1.64
+++ rgb2rgb_template.c	25 Apr 2003 17:22:11 -0000	1.65
@@ -1340,9 +1340,15 @@
 	unsigned num_pixels = src_size >> 2;
 	for(i=0; i<num_pixels; i++)
 	{
-		dst[4*i + 0] = src[4*i + 2];
-		dst[4*i + 1] = src[4*i + 1];
-		dst[4*i + 2] = src[4*i + 0];
+#ifdef WORDS_BIGENDIAN  
+	  dst[4*i + 1] = src[4*i + 3];
+	  dst[4*i + 2] = src[4*i + 2];
+	  dst[4*i + 3] = src[4*i + 1];
+#else
+	  dst[4*i + 0] = src[4*i + 2];
+	  dst[4*i + 1] = src[4*i + 1];
+	  dst[4*i + 2] = src[4*i + 0];
+#endif
 	}
 #endif
 }



More information about the MPlayer-cvslog mailing list