mirror of
https://github.com/mpv-player/mpv
synced 2024-11-18 21:16:10 +01:00
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
This commit is contained in:
parent
4c2a619642
commit
ab10907f7d
@ -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