mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
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
This commit is contained in:
parent
7801d21d13
commit
470ba6f28a
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user