1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-24 13:56:33 +02:00

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
This commit is contained in:
Michael Niedermayer 2015-06-29 13:51:43 +02:00 committed by Michael Niedermayer
parent 483a02e25f
commit d1f8eaf3d2

View 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;
}