From ce2ad4ae4a0a2bd7172c37be87b13ccae1bdd84e Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 5 Sep 2013 11:04:03 +0200 Subject: [PATCH] videoconvert: fix height round down --- gst/videoconvert/videoconvert.c | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/gst/videoconvert/videoconvert.c b/gst/videoconvert/videoconvert.c index 4d5446d..233cc64 100644 --- a/gst/videoconvert/videoconvert.c +++ b/gst/videoconvert/videoconvert.c @@ -796,17 +796,13 @@ static void convert_YUY2_I420 (VideoConvert * convert, GstVideoFrame * dest, const GstVideoFrame * src) { - int i, h; + int i; gint width = convert->width; gint height = convert->height; gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src); gint l1, l2; - h = height; - if (width & 1) - h--; - - for (i = 0; i < h; i += 2) { + for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) { GET_LINE_OFFSETS (interlaced, i, l1, l2); video_convert_orc_convert_YUY2_I420 (FRAME_GET_Y_LINE (dest, l1), -- 2.7.4