summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-24 00:10:49 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-24 00:23:49 +0100
commit3d00ba2688f69a55ed2832349b802997bef7f876 (patch)
treecac9b4d5a960469c7b9c5c50da4f764a46394250
parent341bd6ec6a8f9b3fe028f8725bca080b712c8a87 (diff)
downloadffmpeg-streaming-3d00ba2688f69a55ed2832349b802997bef7f876.zip
ffmpeg-streaming-3d00ba2688f69a55ed2832349b802997bef7f876.tar.gz
swscale/yuv2rgb: fix width % 8 != 0 and rgb/bgr8 output
Fixes Ticket2570 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libswscale/yuv2rgb.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 8e92e6d..bef43dc 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -504,7 +504,27 @@ YUV2RGBFUNC(yuv2rgb_c_8_ordered_dither, uint8_t, 0)
LOADCHROMA(3);
PUTRGB8(dst_2, py_2, 3, 6 + 8);
PUTRGB8(dst_1, py_1, 3, 6);
-CLOSEYUV2RGBFUNC(8)
+
+ENDYUV2RGBLINE(8, 0)
+ const uint8_t *d32 = ff_dither_8x8_32[y & 7];
+ const uint8_t *d64 = ff_dither_8x8_73[y & 7];
+ LOADCHROMA(0);
+ PUTRGB8(dst_1, py_1, 0, 0);
+ PUTRGB8(dst_2, py_2, 0, 0 + 8);
+
+ LOADCHROMA(1);
+ PUTRGB8(dst_2, py_2, 1, 2 + 8);
+ PUTRGB8(dst_1, py_1, 1, 2);
+
+ENDYUV2RGBLINE(8, 1)
+ const uint8_t *d32 = ff_dither_8x8_32[y & 7];
+ const uint8_t *d64 = ff_dither_8x8_73[y & 7];
+ LOADCHROMA(0);
+ PUTRGB8(dst_1, py_1, 0, 0);
+ PUTRGB8(dst_2, py_2, 0, 0 + 8);
+
+ENDYUV2RGBFUNC()
+
YUV2RGBFUNC(yuv2rgb_c_4_ordered_dither, uint8_t, 0)
const uint8_t * d64 = ff_dither_8x8_73[y & 7];
OpenPOWER on IntegriCloud