aboutsummaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2003-04-25 17:22:11 +0000
committerMichael Niedermayer <michaelni@gmx.at>2003-04-25 17:22:11 +0000
commitd7b8e4b62249e295c3b5ebf1e5ee1faf044561a5 (patch)
tree474672f8ae268e50fa5273b511ae27891c9fd69b /postproc
parent700490a4d119aad0627821da025ac522a92cac5f (diff)
downloadffmpeg-d7b8e4b62249e295c3b5ebf1e5ee1faf044561a5.tar.gz
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
Diffstat (limited to 'postproc')
-rw-r--r--postproc/rgb2rgb_template.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c
index cedbf700a7..85c8f440e3 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
}