summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-25 17:22:11 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2003-04-25 17:22:11 +0000
commit9e938f2f34cf3de4c01fad11e968c3aa2b84ce7f (patch)
tree3abfc7a1469b5d4490f33c7bbd26ae1444bd852b /postproc
parentacf20201dbb99020c694c0d4edd31ddc7e17c44b (diff)
downloadmpv-9e938f2f34cf3de4c01fad11e968c3aa2b84ce7f.tar.bz2
mpv-9e938f2f34cf3de4c01fad11e968c3aa2b84ce7f.tar.xz
bigendian fix by (Samuel Kleiner <kleiner at cd dot chalmers dot se>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@9989 b3059339-0415-0410-9bf9-f77b7e298cf2
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
}