summaryrefslogtreecommitdiff
path: root/sys
diff options
context:
space:
mode:
authorSeungha Yang <seungha@centricular.com>2021-03-02 20:45:22 +0900
committerSeungha Yang <seungha@centricular.com>2021-03-02 23:10:46 +0900
commit98929c8157af65de782f90c91d12c312cfd83e44 (patch)
tree267ef5324f216a280ae6f03bf21523882b39ac90 /sys
parenta4c613047721bc15622057e6822487ce187986a4 (diff)
downloadgstreamer-plugins-bad-98929c8157af65de782f90c91d12c312cfd83e44.tar.gz
d3d11decoder: Always use render-target bind flag for downstream pool
To convert decoded texture into other format, downstream would use video processor instead of shader. In order for downstream to be able to use video processor even if we copied decoded texture into downstream pool, we should set this bind flag. Otherwise, downstream would keep switching video processor and shader to convert format which would result in inconsistent image quality. Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/2051>
Diffstat (limited to 'sys')
-rw-r--r--sys/d3d11/gstd3d11decoder.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/d3d11/gstd3d11decoder.c b/sys/d3d11/gstd3d11decoder.c
index ac128ff92..a89c80a4b 100644
--- a/sys/d3d11/gstd3d11decoder.c
+++ b/sys/d3d11/gstd3d11decoder.c
@@ -1641,11 +1641,11 @@ gst_d3d11_decoder_decide_allocation (GstVideoDecoder * decoder,
return FALSE;
}
- if (codec == GST_D3D11_CODEC_VP9) {
- /* Needs render target bind flag so that it can be used for
- * output of shader pipeline if internal resizing is required */
- d3d11_params->desc[0].BindFlags |= D3D11_BIND_RENDER_TARGET;
- }
+ /* Needs render target bind flag so that it can be used for
+ * output of shader pipeline if internal resizing is required.
+ * Also, downstream can keep using video processor even if we copy
+ * some decoded textures into downstream buffer */
+ d3d11_params->desc[0].BindFlags |= D3D11_BIND_RENDER_TARGET;
gst_buffer_pool_config_set_d3d11_allocation_params (config, d3d11_params);
gst_d3d11_allocation_params_free (d3d11_params);