# HG changeset patch # User ivo # Date 1176914458 0 # Node ID beb4ac492c5e2e9a9640b3ccbf1a656f4930cd72 # Parent ec0ead587e2fbf554586e863e15518dedd49ad2b preserve alpha channel when converting rgb32 to bgr32 in plain C diff -r ec0ead587e2f -r beb4ac492c5e libswscale/rgb2rgb_template.c --- 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); }