diff options
author | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-09-05 11:05:36 +0200 |
---|---|---|
committer | Wim Taymans <wim.taymans@collabora.co.uk> | 2013-09-05 11:05:36 +0200 |
commit | 700afbf6fdf77554707419246d2ca19cf7cdd472 (patch) | |
tree | 0a4e9da6960c773a83389cf2fc19a7a5bd600852 /gst/videoconvert | |
parent | ce2ad4ae4a0a2bd7172c37be87b13ccae1bdd84e (diff) | |
download | gstreamer-plugins-base-700afbf6fdf77554707419246d2ca19cf7cdd472.tar.gz |
videoconvert: handle lines in one go
Handle odd heights in 1 go when no vertical subsampling is used.
Diffstat (limited to 'gst/videoconvert')
-rw-r--r-- | gst/videoconvert/videoconvert.c | 28 |
1 files changed, 4 insertions, 24 deletions
diff --git a/gst/videoconvert/videoconvert.c b/gst/videoconvert/videoconvert.c index 233cc644e..8816a6f5a 100644 --- a/gst/videoconvert/videoconvert.c +++ b/gst/videoconvert/videoconvert.c @@ -828,14 +828,7 @@ convert_YUY2_AYUV (VideoConvert * convert, GstVideoFrame * dest, video_convert_orc_convert_YUY2_AYUV (FRAME_GET_LINE (dest, 0), FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, - height & 1 ? height - 1 : height); - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } + FRAME_GET_STRIDE (src), (width + 1) / 2, height); } static void @@ -903,14 +896,7 @@ convert_UYVY_AYUV (VideoConvert * convert, GstVideoFrame * dest, video_convert_orc_convert_UYVY_AYUV (FRAME_GET_LINE (dest, 0), FRAME_GET_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, - height & 1 ? height - 1 : height); - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } + FRAME_GET_STRIDE (src), (width + 1) / 2, height); } static void @@ -960,6 +946,7 @@ convert_AYUV_I420 (VideoConvert * convert, GstVideoFrame * dest, gint width = convert->width; gint height = convert->height; + /* FIXME, what about odd width/height */ video_convert_orc_convert_AYUV_I420 (FRAME_GET_Y_LINE (dest, 0), 2 * FRAME_GET_Y_STRIDE (dest), FRAME_GET_Y_LINE (dest, 1), 2 * FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), @@ -1004,14 +991,7 @@ convert_AYUV_Y42B (VideoConvert * convert, GstVideoFrame * dest, FRAME_GET_Y_STRIDE (dest), FRAME_GET_U_LINE (dest, 0), FRAME_GET_U_STRIDE (dest), FRAME_GET_V_LINE (dest, 0), FRAME_GET_V_STRIDE (dest), FRAME_GET_LINE (src, 0), - FRAME_GET_STRIDE (src), (width + 1) / 2, - height & 1 ? height - 1 : height); - - /* now handle last line */ - if (height & 1) { - UNPACK_FRAME (src, convert->tmplines[0], height - 1, width); - PACK_FRAME (dest, convert->tmplines[0], height - 1, width); - } + FRAME_GET_STRIDE (src), (width + 1) / 2, height); } static void |