Fix chroma shift when scaling from ARGB on LE and BGRA on BE
authorCédric Schieli <cschieli@gmail.com>
Sat, 2 May 2009 08:40:53 +0000 (08:40 +0000)
committerCédric Schieli <cschieli@gmail.com>
Sat, 2 May 2009 08:40:53 +0000 (08:40 +0000)
Originally committed as revision 29242 to svn://svn.mplayerhq.hu/mplayer/trunk/libswscale

libswscale/swscale_template.c

index fe68c16..a605b9b 100644 (file)
@@ -2533,7 +2533,7 @@ inline static void RENAME(hcscale)(SwsContext *c, uint16_t *dst, long dstWidth,
     if (isGray(srcFormat) || srcFormat==PIX_FMT_MONOBLACK || srcFormat==PIX_FMT_MONOWHITE)
         return;
 
     if (isGray(srcFormat) || srcFormat==PIX_FMT_MONOBLACK || srcFormat==PIX_FMT_MONOWHITE)
         return;
 
-    if (srcFormat==PIX_FMT_RGB32_1) {
+    if (srcFormat==PIX_FMT_RGB32_1 || srcFormat==PIX_FMT_BGR32_1) {
         src1 += ALT32_CORR;
         src2 += ALT32_CORR;
     }
         src1 += ALT32_CORR;
         src2 += ALT32_CORR;
     }