aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/swscale_unscaled.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2015-06-29 13:51:43 +0200
committerMichael Niedermayer <michael@niedermayer.cc>2015-07-28 02:42:15 +0200
commitbf44ab5181d42ee74768c32b07128a176d38b0c0 (patch)
treeb49b03d650f37e3ed2b98dca1579d9ee565e0a8e /libswscale/swscale_unscaled.c
parent98d916300afeb5291f2a8eb8c0deb9fc33f545dc (diff)
downloadffmpeg-bf44ab5181d42ee74768c32b07128a176d38b0c0.tar.gz
swscale/swscale_unscaled: Fix rounding difference with RGBA output between little and big endian
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
Diffstat (limited to 'libswscale/swscale_unscaled.c')
-rw-r--r--libswscale/swscale_unscaled.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index da457dfbdb..d3d0cf30b2 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -1242,6 +1242,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;
}