From 9c9f97251a44cb4f05993cbe9dabfc40560a147f Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Fri, 2 Jul 2010 14:56:02 +0200 Subject: [PATCH] ffmpegcolorspace: Fix conversion of packed 4:2:2 YUV to RGB The last pixel wasn't written before. Fixes bug #623384. --- gst/ffmpegcolorspace/imgconvert_template.h | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/gst/ffmpegcolorspace/imgconvert_template.h b/gst/ffmpegcolorspace/imgconvert_template.h index 4928601..e9b46a4 100644 --- a/gst/ffmpegcolorspace/imgconvert_template.h +++ b/gst/ffmpegcolorspace/imgconvert_template.h @@ -47,6 +47,14 @@ static void glue (uyvy422_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src, s1 += 4; } + + if (w) { + YUV_TO_RGB1_CCIR(s1[0], s1[2]); + + YUV_TO_RGB2_CCIR(r, g, b, s1[1]); + RGB_OUT(d1, r, g, b); + } + d += dst->linesize[0]; s += src->linesize[0]; } @@ -78,6 +86,14 @@ static void glue (yuv422_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src, s1 += 4; } + + if (w) { + YUV_TO_RGB1_CCIR(s1[1], s1[3]); + + YUV_TO_RGB2_CCIR(r, g, b, s1[0]); + RGB_OUT(d1, r, g, b); + } + d += dst->linesize[0]; s += src->linesize[0]; } @@ -109,6 +125,14 @@ static void glue (yvyu422_to_, RGB_NAME)(AVPicture *dst, const AVPicture *src, s1 += 4; } + + if (w) { + YUV_TO_RGB1_CCIR(s1[3], s1[1]); + + YUV_TO_RGB2_CCIR(r, g, b, s1[0]); + RGB_OUT(d1, r, g, b); + } + d += dst->linesize[0]; s += src->linesize[0]; } -- 2.7.4