aboutsummaryrefslogtreecommitdiffstats
path: root/libswscale/yuv2rgb.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-12-24 00:32:53 +0100
committerMichael Niedermayer <michaelni@gmx.at>2014-12-24 00:32:53 +0100
commit3848512d48206b632af9b3f0a57484e813824220 (patch)
tree45c99df597d26b9fa05ee6ac35276f74d05d3e10 /libswscale/yuv2rgb.c
parent3d00ba2688f69a55ed2832349b802997bef7f876 (diff)
downloadffmpeg-3848512d48206b632af9b3f0a57484e813824220.tar.gz
swscale/yuv2rgb: Fix width % 4 != 0 with bgr4/rgb4
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/yuv2rgb.c')
-rw-r--r--libswscale/yuv2rgb.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index bef43dc32c..41b603e444 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -557,7 +557,27 @@ YUV2RGBFUNC(yuv2rgb_c_4_ordered_dither, uint8_t, 0)
LOADCHROMA(3);
PUTRGB4D(dst_2, py_2, 3, 6 + 8);
PUTRGB4D(dst_1, py_1, 3, 6);
-CLOSEYUV2RGBFUNC(4)
+
+ENDYUV2RGBLINE(4, 0)
+ const uint8_t * d64 = ff_dither_8x8_73[y & 7];
+ const uint8_t *d128 = ff_dither_8x8_220[y & 7];
+ int acc;
+ LOADCHROMA(0);
+ PUTRGB4D(dst_1, py_1, 0, 0);
+ PUTRGB4D(dst_2, py_2, 0, 0 + 8);
+
+ LOADCHROMA(1);
+ PUTRGB4D(dst_2, py_2, 1, 2 + 8);
+ PUTRGB4D(dst_1, py_1, 1, 2);
+
+ENDYUV2RGBLINE(4, 1)
+ const uint8_t * d64 = ff_dither_8x8_73[y & 7];
+ const uint8_t *d128 = ff_dither_8x8_220[y & 7];
+ int acc;
+ LOADCHROMA(0);
+ PUTRGB4D(dst_1, py_1, 0, 0);
+ PUTRGB4D(dst_2, py_2, 0, 0 + 8);
+ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_4b_ordered_dither, uint8_t, 0)
const uint8_t *d64 = ff_dither_8x8_73[y & 7];