d3d11convert: Add support for conversion using ID3D11VideoProcessor
authorSeungha Yang <seungha@centricular.com>
Fri, 23 Oct 2020 17:47:22 +0000 (02:47 +0900)
committerSeungha Yang <seungha@centricular.com>
Sat, 24 Oct 2020 15:38:44 +0000 (00:38 +0900)
commit969ab3e664e437e9caa4878405e0e07c43cbe08a
treed7e4558b9953577397ba7eceda3b9e6f09d9cbad
parent484d510558092859554d8f841ff10b5866d8553a
d3d11convert: Add support for conversion using ID3D11VideoProcessor

Output texture of d3d11 decoder cannot have the bind flag
D3D11_BIND_SHADER_RESOURCE (meaning that it cannot be used for shader
input resource). So d3d11convert (and it's subclasses) was copying
texture into another internal texture to use d3d11 shader.
It's obviously overhead and we can avoid texture copy for
colorspace conversion or resizing via ID3D11VideoProcessor
as it supports decoder output texture.
This commit would be a visible optimization for d3d11 decoder with
d3d11compositor use case because we can avoid texture copy per frame.

Part-of: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1718>
sys/d3d11/gstd3d11colorconvert.c
sys/d3d11/gstd3d11videoprocessor.c
sys/d3d11/gstd3d11videoprocessor.h