From 2f5257fd6978199995314658246edd94f5403f75 Mon Sep 17 00:00:00 2001 From: Seungha Yang Date: Mon, 2 Nov 2020 22:47:20 +0900 Subject: [PATCH] Revert "d3d11decoder: Use D3D11/DXGI standard colorimetry" This reverts commit a52fc6deeda203add520cb59ae0026d109ecda95. The change breaks H264/HEVC conformance bitstream tests Part-of: --- sys/d3d11/gstd3d11decoder.c | 40 +------------------------------------ 1 file changed, 1 insertion(+), 39 deletions(-) diff --git a/sys/d3d11/gstd3d11decoder.c b/sys/d3d11/gstd3d11decoder.c index 093b81ef31..28c3e6a50c 100644 --- a/sys/d3d11/gstd3d11decoder.c +++ b/sys/d3d11/gstd3d11decoder.c @@ -56,7 +56,6 @@ #include "gstd3d11bufferpool.h" #include "gstd3d11device.h" #include "gstd3d11colorconverter.h" -#include "gstd3d11format.h" #include GST_DEBUG_CATEGORY (d3d11_decoder_debug); @@ -1409,7 +1408,6 @@ gst_d3d11_decoder_negotiate (GstVideoDecoder * decoder, { GstCaps *peer_caps; GstVideoCodecState *state; - GstVideoInfo out_info; g_return_val_if_fail (GST_IS_VIDEO_DECODER (decoder), FALSE); g_return_val_if_fail (input_state != NULL, FALSE); @@ -1421,43 +1419,7 @@ gst_d3d11_decoder_negotiate (GstVideoDecoder * decoder, state = gst_video_decoder_set_output_state (decoder, format, width, height, input_state); - out_info = state->info; -#if (DXGI_HEADER_VERSION >= 4) - { - /* Supported DXGI colorspace by driver might be limited and - * decision criteria of default colorimetry doesn't look well fit - * with D3D11/DXGI colorspace preference. Apply our rule here */ - const GstDxgiColorSpace *colorspace; -#ifndef GST_DISABLE_GST_DEBUG - gchar *colorimetry; -#endif - - out_info.colorimetry = input_state->info.colorimetry; - colorspace = gst_d3d11_video_info_to_dxgi_color_space (&out_info); - -#ifndef GST_DISABLE_GST_DEBUG - colorimetry = gst_video_colorimetry_to_string (&out_info.colorimetry); - if (colorspace) { - GST_DEBUG_OBJECT (decoder, - "Use DXGI colorspace %d (input colorimetry %s)", - colorspace->dxgi_color_space_type, GST_STR_NULL (colorimetry)); - } else { - GST_WARNING_OBJECT (decoder, - "Cannot determin DXGI color space from input colorimetry %s", - GST_STR_NULL (colorimetry)); - } - g_free (colorimetry); -#endif - - if (colorspace) { - out_info.colorimetry.matrix = colorspace->matrix; - out_info.colorimetry.primaries = colorspace->primaries; - out_info.colorimetry.range = colorspace->range; - out_info.colorimetry.transfer = colorspace->transfer; - } - } -#endif - state->caps = gst_video_info_to_caps (&out_info); + state->caps = gst_video_info_to_caps (&state->info); if (*output_state) gst_video_codec_state_unref (*output_state);