videoconvert: don't convert too much with odd width

This commit is contained in:
Wim Taymans 2013-09-05 16:25:36 +02:00
parent bbeac11e74
commit ce2b40670a

View file

@ -987,11 +987,12 @@ convert_AYUV_Y42B (VideoConvert * convert, GstVideoFrame * dest,
gint width = convert->width;
gint height = convert->height;
/* FIXME, only works for even width */
video_convert_orc_convert_AYUV_Y42B (FRAME_GET_Y_LINE (dest, 0),
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);
FRAME_GET_STRIDE (src), width / 2, height);
}
static void
@ -1091,11 +1092,12 @@ convert_Y42B_AYUV (VideoConvert * convert, GstVideoFrame * dest,
gint width = convert->width;
gint height = convert->height;
/* FIXME, only for even width */
video_convert_orc_convert_Y42B_AYUV (FRAME_GET_LINE (dest, 0),
FRAME_GET_STRIDE (dest), FRAME_GET_Y_LINE (src, 0),
FRAME_GET_Y_STRIDE (src), FRAME_GET_U_LINE (src, 0),
FRAME_GET_U_STRIDE (src), FRAME_GET_V_LINE (src, 0),
FRAME_GET_V_STRIDE (src), (width) / 2, height);
FRAME_GET_V_STRIDE (src), width / 2, height);
}
static void