Mercurial > mplayer.hg
changeset 23004:beb4ac492c5e
preserve alpha channel when converting rgb32 to bgr32 in plain C
author | ivo |
---|---|
date | Wed, 18 Apr 2007 16:40:58 +0000 |
parents | ec0ead587e2f |
children | 661085642a71 |
files | libswscale/rgb2rgb_template.c |
diffstat | 1 files changed, 1 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- a/libswscale/rgb2rgb_template.c Wed Apr 18 16:40:07 2007 +0000 +++ b/libswscale/rgb2rgb_template.c Wed Apr 18 16:40:58 2007 +0000 @@ -1423,7 +1423,7 @@ : "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); }