From: U. Artie Eoff Date: Thu, 23 Jun 2022 15:11:16 +0000 (-0400) Subject: va: filter: add scale method field and setter X-Git-Tag: 1.22.0~1393 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=280678fe42b381f5e3dd03929c96d33ffa3678ff;p=platform%2Fupstream%2Fgstreamer.git va: filter: add scale method field and setter Part-of: --- diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c index f14f544..0554255 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c @@ -58,6 +58,8 @@ struct _GstVaFilter guint rotation; GstVideoOrientationMethod orientation; + guint32 scale_method; + gboolean crop_enabled; VARectangle input_region; @@ -934,6 +936,18 @@ gst_va_filter_get_surface_formats (GstVaFilter * self) return ret; } +gboolean +gst_va_filter_set_scale_method (GstVaFilter * self, guint32 method) +{ + g_return_val_if_fail (GST_IS_VA_FILTER (self), FALSE); + + GST_OBJECT_LOCK (self); + self->scale_method = method; + GST_OBJECT_UNLOCK (self); + + return TRUE; +} + static gboolean _from_video_orientation_method (GstVideoOrientationMethod orientation, guint * mirror, guint * rotation) @@ -1617,6 +1631,7 @@ _create_pipeline_buffer (GstVaFilter * self, GstVaSample * src, .output_surface_flag = dst->flags, .input_color_properties = self->input_color_properties, .output_color_properties = self->output_color_properties, + .filter_flags = self->scale_method, /* output to SDR */ .output_hdr_metadata = NULL, }; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.h b/subprojects/gst-plugins-bad/sys/va/gstvafilter.h index 0c93233..b3d4597 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.h +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.h @@ -120,6 +120,8 @@ gboolean gst_va_filter_install_properties (GstVaFilter * self, gboolean gst_va_filter_install_deinterlace_properties (GstVaFilter * self, GObjectClass * klass); +gboolean gst_va_filter_set_scale_method (GstVaFilter * self, + guint32 method); gboolean gst_va_filter_set_orientation (GstVaFilter * self, GstVideoOrientationMethod orientation); GstVideoOrientationMethod gst_va_filter_get_orientation (GstVaFilter * self);