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:
ivo 2007-04-18 16:40:58 +00:00
parent 8c86c5cc58
commit 79b2f1581d
1 changed files with 1 additions and 1 deletions

View File

@ -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);
}