mirror of
https://github.com/mpv-player/mpv
synced 2024-09-05 02:48:21 +02:00
Fixes rgb32to16 conversion for I think all platforms since the int8
cast should never have worked. Tested on PowerPC and fixes the black GUI to show the content. patch by Rene Rebe <rene at exactcode dot de> git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@14983 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
f0fc50f974
commit
99e20d343f
@ -403,10 +403,8 @@ static inline void RENAME(rgb32to16)(const uint8_t *src, uint8_t *dst, unsigned
|
||||
#endif
|
||||
while(s < end)
|
||||
{
|
||||
// FIXME on bigendian
|
||||
const int src= *s; s += 4;
|
||||
*d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8);
|
||||
// *d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800);
|
||||
register int rgb = *(uint32_t*)s; s += 4;
|
||||
*d++ = ((rgb&0xFF)>>3) + ((rgb&0xFC00)>>5) + ((rgb&0xF80000)>>8);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user