[FFmpeg-cvslog] swscale/yuv2rgb: Fix width % 4 != 0 with bgr4_byte/rgb4_byte
Michael Niedermayer
git at videolan.org
Wed Dec 24 00:42:22 CET 2014
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Wed Dec 24 00:33:21 2014 +0100| [3a2bed1f9ebc1a3b477c54d2cdba4be0cc4f372b] | committer: Michael Niedermayer
swscale/yuv2rgb: Fix width % 4 != 0 with bgr4_byte/rgb4_byte
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=3a2bed1f9ebc1a3b477c54d2cdba4be0cc4f372b
---
libswscale/yuv2rgb.c | 18 +++++++++++++++++-
1 file changed, 17 insertions(+), 1 deletion(-)
diff --git a/libswscale/yuv2rgb.c b/libswscale/yuv2rgb.c
index 41b603e..8ed36e4 100644
--- a/libswscale/yuv2rgb.c
+++ b/libswscale/yuv2rgb.c
@@ -608,7 +608,23 @@ YUV2RGBFUNC(yuv2rgb_c_4b_ordered_dither, uint8_t, 0)
LOADCHROMA(3);
PUTRGB4DB(dst_2, py_2, 3, 6 + 8);
PUTRGB4DB(dst_1, py_1, 3, 6);
-CLOSEYUV2RGBFUNC(8)
+ENDYUV2RGBLINE(8, 0)
+ const uint8_t *d64 = ff_dither_8x8_73[y & 7];
+ const uint8_t *d128 = ff_dither_8x8_220[y & 7];
+ LOADCHROMA(0);
+ PUTRGB4DB(dst_1, py_1, 0, 0);
+ PUTRGB4DB(dst_2, py_2, 0, 0 + 8);
+
+ LOADCHROMA(1);
+ PUTRGB4DB(dst_2, py_2, 1, 2 + 8);
+ PUTRGB4DB(dst_1, py_1, 1, 2);
+ENDYUV2RGBLINE(8, 1)
+ const uint8_t *d64 = ff_dither_8x8_73[y & 7];
+ const uint8_t *d128 = ff_dither_8x8_220[y & 7];
+ LOADCHROMA(0);
+ PUTRGB4DB(dst_1, py_1, 0, 0);
+ PUTRGB4DB(dst_2, py_2, 0, 0 + 8);
+ENDYUV2RGBFUNC()
YUV2RGBFUNC(yuv2rgb_c_1_ordered_dither, uint8_t, 0)
const uint8_t *d128 = ff_dither_8x8_220[y & 7];
More information about the ffmpeg-cvslog
mailing list