vapostproc: Negotiate interlaced.
authorVíctor Manuel Jáquez Leal <vjaquez@igalia.com>
Tue, 5 Oct 2021 18:15:44 +0000 (20:15 +0200)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Wed, 13 Oct 2021 14:59:09 +0000 (14:59 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1109>

subprojects/gst-plugins-bad/sys/va/gstvafilter.c
subprojects/gst-plugins-bad/sys/va/gstvavpp.c

index e8b6312..9ca1ee0 100644 (file)
@@ -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 *
index e0f35ee..6e25b79 100644 (file)
@@ -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;