From ed9cc50f012a030d9ac2aa861ccc453c7d058ec8 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Thu, 11 Nov 2004 14:42:08 +0000 Subject: [PATCH] gst/ffmpegcolorspace/imgconvert.c: Actually test for odd width/height rather than testing whether a temporary variabl... Original commit message from CVS: * gst/ffmpegcolorspace/imgconvert.c: (yuv420p_to_yuv422): Actually test for odd width/height rather than testing whether a temporary variable that was 0 before we subtracted 1 is now not equal to zero (which it always is). --- ChangeLog | 7 +++++++ gst/ffmpegcolorspace/imgconvert.c | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index fe5030225d..53af42d7ae 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2004-11-11 Ronald S. Bultje + + * gst/ffmpegcolorspace/imgconvert.c: (yuv420p_to_yuv422): + Actually test for odd width/height rather than testing whether + a temporary variable that was 0 before we subtracted 1 is now + not equal to zero (which it always is). + 2004-11-11 Zaheer Abbas Merali * sys/v4l2/gstv4l2element.c: (gst_v4l2_iface_supported): diff --git a/gst/ffmpegcolorspace/imgconvert.c b/gst/ffmpegcolorspace/imgconvert.c index af16a3bed2..80a19be536 100644 --- a/gst/ffmpegcolorspace/imgconvert.c +++ b/gst/ffmpegcolorspace/imgconvert.c @@ -880,7 +880,7 @@ yuv420p_to_yuv422 (AVPicture * dst, const AVPicture * src, *line1++ = *line2++ = *cr1++; } /* odd width */ - if (w) { + if (width % 2 != 0) { *line1++ = *lum1++; *line2++ = *lum2++; *line1++ = *line2++ = *cb1++; @@ -892,7 +892,7 @@ yuv420p_to_yuv422 (AVPicture * dst, const AVPicture * src, cr2 += src->linesize[2]; } /* odd height */ - if (h) { + if (height % 2 != 0) { line1 = linesrc; lum1 = lumsrc; cb1 = cb2; @@ -905,7 +905,7 @@ yuv420p_to_yuv422 (AVPicture * dst, const AVPicture * src, *line1++ = *cr1++; } /* odd width */ - if (w) { + if (width % 2 != 0) { *line1++ = *lum1++; *line1++ = *cb1++; }