swscale/swscale_unscaled: Fix rounding difference with RGBA output between little...
authorMichael Niedermayer <michaelni@gmx.at>
Mon, 29 Jun 2015 11:51:43 +0000 (13:51 +0200)
committerMichael Niedermayer <michael@niedermayer.cc>
Sat, 18 Jul 2015 18:23:45 +0000 (20:23 +0200)
Fixes fate/dds-rgb16 on big endian

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit f6ab967eae497733f6adc12b30075980fd6eea98)

Conflicts:

tests/ref/fate/dds-rgb16

libswscale/swscale_unscaled.c

index b426fa1..1dc42c8 100644 (file)
@@ -1243,6 +1243,11 @@ static rgbConvFn findRgbConvFn(SwsContext *c)
     if ((dstFormat == AV_PIX_FMT_RGB32_1 || dstFormat == AV_PIX_FMT_BGR32_1) && !isRGBA32(srcFormat) && ALT32_CORR<0)
         return NULL;
 
+    // Maintain symmetry between endianness
+    if (c->flags & SWS_BITEXACT)
+        if ((dstFormat == AV_PIX_FMT_RGB32   || dstFormat == AV_PIX_FMT_BGR32  ) && !isRGBA32(srcFormat) && ALT32_CORR>0)
+            return NULL;
+
     return conv;
 }