[FFmpeg-cvslog] swscale/swscale_unscaled: Fix rounding difference with RGBA output between little and big endian
Michael Niedermayer
git at videolan.org
Mon Jun 29 14:29:42 CEST 2015
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jun 29 13:51:43 2015 +0200| [f6ab967eae497733f6adc12b30075980fd6eea98] | committer: Michael Niedermayer
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 at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=f6ab967eae497733f6adc12b30075980fd6eea98
---
libswscale/swscale_unscaled.c | 5 +++++
tests/ref/fate/dds-rgb16 | 2 +-
2 files changed, 6 insertions(+), 1 deletion(-)
diff --git a/libswscale/swscale_unscaled.c b/libswscale/swscale_unscaled.c
index b426fa1..1dc42c8 100644
--- a/libswscale/swscale_unscaled.c
+++ b/libswscale/swscale_unscaled.c
@@ -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;
}
diff --git a/tests/ref/fate/dds-rgb16 b/tests/ref/fate/dds-rgb16
index 96e7368..688d3b9 100644
--- a/tests/ref/fate/dds-rgb16
+++ b/tests/ref/fate/dds-rgb16
@@ -1,2 +1,2 @@
#tb 0: 1/25
-0, 0, 0, 1, 32768, 0x1ec4fed2
+0, 0, 0, 1, 32768, 0x7991785d
More information about the ffmpeg-cvslog
mailing list