[SCM] libav/experimental: bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)

siretart at users.alioth.debian.org siretart at users.alioth.debian.org
Sun Jun 30 15:36:07 UTC 2013


The following commit has been merged in the experimental branch:
commit d7b8e4b62249e295c3b5ebf1e5ee1faf044561a5
Author: Michael Niedermayer <michaelni at gmx.at>
Date:   Fri Apr 25 17:22:11 2003 +0000

    bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)
    
    Originally committed as revision 9989 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc

diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c
index cedbf70..85c8f44 100644
--- a/postproc/rgb2rgb_template.c
+++ b/postproc/rgb2rgb_template.c
@@ -1340,9 +1340,15 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, unsign
 	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
 }

-- 
Libav/FFmpeg packaging



More information about the pkg-multimedia-commits mailing list