From: U. Artie Eoff Date: Thu, 23 Jun 2022 15:39:57 +0000 (-0400) Subject: va: compositor/filter: use scale method setter X-Git-Tag: 1.22.0~1392 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=178f4fcd200f68e4c9bab0f1607fb97138e87cc9;p=platform%2Fupstream%2Fgstreamer.git va: compositor/filter: use scale method setter Use the filter's scale method member instead of the sample's member. Removes the filter_flags member from the composite sample. Part-of: --- diff --git a/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c b/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c index 6477bff..d948c80 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvacompositor.c @@ -1049,7 +1049,6 @@ gst_va_compositor_sample_next (gpointer data) .height = (pad->height == DEFAULT_PAD_HEIGHT) ? GST_VIDEO_INFO_HEIGHT (&vaggpad->info) : pad->height, }, - .flags = generator->comp->scale_method, .alpha = pad->alpha, }; /* *INDENT-ON* */ @@ -1133,6 +1132,9 @@ gst_va_compositor_aggregate_frames (GstVideoAggregator * vagg, GST_OBJECT_LOCK (self); + if (!gst_va_filter_set_scale_method (self->filter, self->scale_method)) + GST_WARNING_OBJECT (self, "couldn't set filter scale method"); + if (!gst_va_filter_compose (self->filter, &tx)) { GST_ERROR_OBJECT (self, "couldn't apply filter"); ret = GST_FLOW_ERROR; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c index 0554255..cb5c4d4 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c @@ -1806,15 +1806,17 @@ gst_va_filter_compose (GstVaFilter * self, GstVaComposeTransaction * tx) /* (transfer full), unref it */ gst_buffer_unref (sample->buffer); + GST_OBJECT_LOCK (self); /* *INDENT-OFF* */ params = (VAProcPipelineParameterBuffer) { .surface = in_surface, .surface_region = &sample->input_region, .output_region = &sample->output_region, .output_background_color = 0xff000000, - .filter_flags = sample->flags, + .filter_flags = self->scale_method, }; /* *INDENT-ON* */ + GST_OBJECT_UNLOCK (self); /* only send blend state when sample is not fully opaque */ if ((self->pipeline_caps.blend_flags & VA_BLEND_GLOBAL_ALPHA) diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.h b/subprojects/gst-plugins-bad/sys/va/gstvafilter.h index b3d4597..6955242 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.h +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.h @@ -87,9 +87,6 @@ struct _GstVaComposeSample /* input buffer (transfer full) */ GstBuffer *buffer; - /* scale method flags */ - guint32 flags; - VARectangle input_region; VARectangle output_region;