mirror of
https://gitee.com/openharmony/third_party_ffmpeg
synced 2024-11-23 19:30:05 +00:00
preserve alpha channel when converting rgb32 to bgr32 in plain C
Originally committed as revision 23022 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
This commit is contained in:
parent
19b202f9d1
commit
3052ddb2a8
@ -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
Block a user