summaryrefslogtreecommitdiffstats
path: root/postproc
diff options
context:
space:
mode:
authormichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-23 23:52:57 +0000
committermichael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2>2002-10-23 23:52:57 +0000
commitab10907f7df9042293f0721f485635c387608437 (patch)
tree584b2b1487551097b85054512e41e046cd2c0454 /postproc
parent4c2a619642e768e72cfdc45d15cb4fbcfbb96b12 (diff)
downloadmpv-ab10907f7df9042293f0721f485635c387608437.tar.bz2
mpv-ab10907f7df9042293f0721f485635c387608437.tar.xz
fixing RGB32->RGB16 on big endian patch by (Colin Leroy <colin at colino dot net>)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@7892 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r--postproc/rgb2rgb_template.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/postproc/rgb2rgb_template.c b/postproc/rgb2rgb_template.c
index 44e764e66d..887856d9c7 100644
--- a/postproc/rgb2rgb_template.c
+++ b/postproc/rgb2rgb_template.c
@@ -364,11 +364,20 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned
#endif
while(s < end)
{
+#ifndef WORDS_BIGENDIAN
const int b= *s++;
const int g= *s++;
const int r= *s++;
+#else
+ const int a= *s++; /*skip*/
+ const int r= *s++;
+ const int g= *s++;
+ const int b= *s++;
+#endif
*d++ = (b>>3) | ((g&0xFC)<<3) | ((r&0xF8)<<8);
+#ifndef WORDS_BIGENDIAN
s++;
+#endif
}
}