diff options
author | Ivo van Poorten <ivop@euronet.nl> | 2007-04-18 16:40:58 +0000 |
---|---|---|
committer | Ivo van Poorten <ivop@euronet.nl> | 2007-04-18 16:40:58 +0000 |
commit | 3052ddb2a8530eff621350739c58a4dd2f06ec76 (patch) | |
tree | 794520c6e908851efddf701cd881fdc1d468712e /libswscale | |
parent | 19b202f9d102c5758ea32f051c09dceaad30bf6e (diff) | |
download | ffmpeg-streaming-3052ddb2a8530eff621350739c58a4dd2f06ec76.zip ffmpeg-streaming-3052ddb2a8530eff621350739c58a4dd2f06ec76.tar.gz |
preserve alpha channel when converting rgb32 to bgr32 in plain C
Originally committed as revision 23022 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/rgb2rgb_template.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libswscale/rgb2rgb_template.c b/libswscale/rgb2rgb_template.c index f06e4ed..989b5bb 100644 --- a/libswscale/rgb2rgb_template.c +++ b/libswscale/rgb2rgb_template.c @@ -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); } |