d3d11convert: Use new colorimetry compare function

Avoid conversion if both are functionally identical

Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/2765>
This commit is contained in:
Seungha Yang 2022-07-17 00:33:55 +09:00 committed by GStreamer Marge Bot
parent 953257782d
commit 687f9feac6

View file

@ -1516,9 +1516,10 @@ gst_d3d11_base_convert_set_info (GstD3D11BaseFilter * filter,
if (in_width == out_info->width && in_height == out_info->height
&& in_info->finfo == out_info->finfo && self->borders_w == 0 &&
self->borders_h == 0 &&
gst_video_colorimetry_is_equal (&in_info->colorimetry,
&out_info->colorimetry) && !need_flip) {
self->borders_h == 0 && !need_flip &&
gst_video_colorimetry_is_equivalent (&in_info->colorimetry,
GST_VIDEO_INFO_COMP_DEPTH (in_info, 0),
&out_info->colorimetry, GST_VIDEO_INFO_COMP_DEPTH (out_info, 0))) {
self->same_caps = TRUE;
g_mutex_unlock (&self->lock);
return TRUE;