From 21cb7fd0ff26c7d8077303ee5142258e5f3d6295 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Thu, 17 Jun 2010 16:57:43 +0200 Subject: [PATCH] ffmpegcolorspace: Fix Y42B to YUY2/YVYU/UYVY conversion for odd widths --- gst/ffmpegcolorspace/imgconvert.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index 2e09740a6e..9bf43b33cd 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -1184,6 +1184,7 @@ yuv422p_to_yuv422 (AVPicture * dst, const AVPicture * src, if (w) { p[0] = lum[0]; p[1] = cb[0]; + p[3] = cr[0]; } p1 += dst->linesize[0]; lum1 += src->linesize[0]; @@ -1219,6 +1220,11 @@ yuv422p_to_uyvy422 (AVPicture * dst, const AVPicture * src, cb++; cr++; } + if (w) { + p[1] = lum[0]; + p[0] = cb[0]; + p[2] = cr[0]; + } p1 += dst->linesize[0]; lum1 += src->linesize[0]; cb1 += src->linesize[1]; @@ -1253,6 +1259,11 @@ yuv422p_to_yvyu422 (AVPicture * dst, const AVPicture * src, cb++; cr++; } + if (w) { + p[0] = lum[0]; + p[3] = cb[0]; + p[1] = cr[0]; + } p1 += dst->linesize[0]; lum1 += src->linesize[0]; cb1 += src->linesize[1];