From a3da634db69b842535cc7844243b639d4159edcd Mon Sep 17 00:00:00 2001 From: Wim Taymans Date: Thu, 27 Nov 2014 10:51:58 +0100 Subject: [PATCH] video-format: improve unpack i420 unpack_i420 does not need extra code to handle odd widths, the orc code already handles it fine. --- gst-libs/gst/video/video-format.c | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/gst-libs/gst/video/video-format.c b/gst-libs/gst/video/video-format.c index 41263a300f..c971ac34a9 100644 --- a/gst-libs/gst/video/video-format.c +++ b/gst-libs/gst/video/video-format.c @@ -86,14 +86,7 @@ unpack_planar_420 (const GstVideoFormatInfo * info, GstVideoPackFlags flags, guint8 *v_line = GET_V_LINE (uv); guint8 *ayuv = dest; - video_orc_unpack_I420 (dest, y_line, u_line, v_line, width); - - if (width & 1) { - gint i = width - 1; - - ayuv[i * 4 + 2] = u_line[i >> 1]; - ayuv[i * 4 + 3] = v_line[i >> 1]; - } + video_orc_unpack_I420 (ayuv, y_line, u_line, v_line, width); } static void