mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-10-03 01:02:19 +00:00
videoconvert: fix height round down
This commit is contained in:
parent
22da49a55c
commit
ce2ad4ae4a
1 changed files with 2 additions and 6 deletions
|
@ -796,17 +796,13 @@ static void
|
||||||
convert_YUY2_I420 (VideoConvert * convert, GstVideoFrame * dest,
|
convert_YUY2_I420 (VideoConvert * convert, GstVideoFrame * dest,
|
||||||
const GstVideoFrame * src)
|
const GstVideoFrame * src)
|
||||||
{
|
{
|
||||||
int i, h;
|
int i;
|
||||||
gint width = convert->width;
|
gint width = convert->width;
|
||||||
gint height = convert->height;
|
gint height = convert->height;
|
||||||
gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
|
gboolean interlaced = GST_VIDEO_FRAME_IS_INTERLACED (src);
|
||||||
gint l1, l2;
|
gint l1, l2;
|
||||||
|
|
||||||
h = height;
|
for (i = 0; i < GST_ROUND_DOWN_2 (height); i += 2) {
|
||||||
if (width & 1)
|
|
||||||
h--;
|
|
||||||
|
|
||||||
for (i = 0; i < h; i += 2) {
|
|
||||||
GET_LINE_OFFSETS (interlaced, i, l1, l2);
|
GET_LINE_OFFSETS (interlaced, i, l1, l2);
|
||||||
|
|
||||||
video_convert_orc_convert_YUY2_I420 (FRAME_GET_Y_LINE (dest, l1),
|
video_convert_orc_convert_YUY2_I420 (FRAME_GET_Y_LINE (dest, l1),
|
||||||
|
|
Loading…
Reference in a new issue