d3d11compositor: Skip zero alpha input

Blending such input is a waste of resource since nothing will
be rendered

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/4456>
This commit is contained in:
Seungha Yang 2023-04-17 21:34:19 +09:00
parent 917424b3fb
commit 0d9f08ce9a

View file

@ -766,6 +766,9 @@ gst_d3d11_compositor_pad_check_frame_obscured (GstVideoAggregatorPad * pad,
* left unscaled) * left unscaled)
*/ */
if (cpad->alpha == 0)
return TRUE;
gst_d3d11_compositor_pad_get_output_size (cpad, GST_VIDEO_INFO_PAR_N (info), gst_d3d11_compositor_pad_get_output_size (cpad, GST_VIDEO_INFO_PAR_N (info),
GST_VIDEO_INFO_PAR_D (info), &width, &height, &x_offset, &y_offset); GST_VIDEO_INFO_PAR_D (info), &width, &height, &x_offset, &y_offset);