diff options
author | Colin Leroy <colin@colino.net> | 2002-10-23 23:52:57 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2002-10-23 23:52:57 +0000 |
commit | 470ba6f28a020d23beae561b18f1d413ce339256 (patch) | |
tree | f9f6ee59b58e78cf41d4645c38f62733a51a138b /postproc | |
parent | 7801d21d13dcf442d92614534c312d1e69df2467 (diff) | |
download | ffmpeg-470ba6f28a020d23beae561b18f1d413ce339256.tar.gz |
fixing RGB32->RGB16 on big endian patch by (Colin Leroy <colin at colino dot net>)
Originally committed as revision 7892 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
Diffstat (limited to 'postproc')
-rw-r--r-- | postproc/rgb2rgb_template.c | 9 |
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 } } |