From a2aa2cda42f42be38a946548a599b95c708838bb Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Tue, 5 Oct 2021 20:15:44 +0200 Subject: [PATCH] vapostproc: Negotiate interlaced. Part-of: --- subprojects/gst-plugins-bad/sys/va/gstvafilter.c | 5 +---- subprojects/gst-plugins-bad/sys/va/gstvavpp.c | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c index e8b6312..9ca1ee0 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c @@ -1033,12 +1033,9 @@ gst_va_filter_enable_cropping (GstVaFilter * self, gboolean cropping) static inline GstCaps * _create_base_caps (GstVaFilter * self) { - /* XXX(victor): remove interlace-mode when deinterlacing is - * supported */ return gst_caps_new_simple ("video/x-raw", "width", GST_TYPE_INT_RANGE, self->min_width, self->max_width, "height", GST_TYPE_INT_RANGE, - self->min_height, self->max_height, "interlace-mode", G_TYPE_STRING, - "progressive", NULL); + self->min_height, self->max_height, NULL); } GstCaps * diff --git a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c index e0f35ee..6e25b79 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvavpp.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvavpp.c @@ -392,6 +392,12 @@ gst_va_vpp_set_info (GstVaBaseTransform * btrans, GstCaps * incaps, GstVaVpp *self = GST_VA_VPP (btrans); GstCapsFeatures *infeat, *outfeat; + if (GST_VIDEO_INFO_INTERLACE_MODE (in_info) != + GST_VIDEO_INFO_INTERLACE_MODE (out_info)) { + GST_ERROR_OBJECT (self, "input and output formats do not match"); + return FALSE; + } + if (!gst_video_info_is_equal (in_info, out_info)) { if (GST_VIDEO_INFO_FORMAT (in_info) != GST_VIDEO_INFO_FORMAT (out_info)) self->op_flags |= VPP_CONVERT_FORMAT; -- 2.7.4