mirror of https://github.com/mpv-player/mpv
preserve alpha channel when converting rgb32 to bgr32 in plain C
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23022 b3059339-0415-0410-9bf9-f77b7e298cf2
This commit is contained in:
parent
8c86c5cc58
commit
79b2f1581d
|
@ -1423,7 +1423,7 @@ static inline void RENAME(rgb32tobgr32)(const uint8_t *src, uint8_t *dst, long s
|
|||
: "memory");
|
||||
#endif
|
||||
for (; idx<15; idx+=4) {
|
||||
register int v = *(uint32_t *)&s[idx], g = v & 0xff00;
|
||||
register int v = *(uint32_t *)&s[idx], g = v & 0xff00ff00;
|
||||
v &= 0xff00ff;
|
||||
*(uint32_t *)&d[idx] = (v>>16) + g + (v<<16);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue