mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-24 02:31:03 +00:00
Revert "d3d11decoder: Use D3D11/DXGI standard colorimetry"
This reverts commit a52fc6deed
.
The change breaks H264/HEVC conformance bitstream tests
Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1753>
This commit is contained in:
parent
4e4c26af4b
commit
2f5257fd69
1 changed files with 1 additions and 39 deletions
|
@ -56,7 +56,6 @@
|
|||
#include "gstd3d11bufferpool.h"
|
||||
#include "gstd3d11device.h"
|
||||
#include "gstd3d11colorconverter.h"
|
||||
#include "gstd3d11format.h"
|
||||
#include <string.h>
|
||||
|
||||
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);
|
||||
|
|
Loading…
Reference in a new issue