Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/FFmpeg/FFmpeg.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-06-06 19:51:07 +0300
committerDiego Biurrun <diego@biurrun.de>2017-06-08 21:55:36 +0300
commitfff90422d181744cd75dbf011687ee7095f02875 (patch)
treebaf3a67a4a273d268544cd9fdcbc6a38df44cc3f /libavutil/hwcontext.c
parented434be106a4615e0419b3ac7664220741afda2d (diff)
lavu: add new D3D11 pixfmt and hwcontext
To be used with the new d3d11 hwaccel decode API. With the new hwaccel API, we don't want surfaces to depend on the decoder (other than the required dimension and format). The old D3D11VA pixfmt uses ID3D11VideoDecoderOutputView pointers, which include the decoder configuration, and thus is incompatible with the new hwaccel API. This patch introduces AV_PIX_FMT_D3D11, which uses ID3D11Texture2D and an index. It's simpler and compatible with the new hwaccel API. The introduced hwcontext supports only the new pixfmt. Frame upload code untested. Significantly based on work by Steve Lhomme <robux4@gmail.com>, but with heavy changes/rewrites. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavutil/hwcontext.c')
-rw-r--r--libavutil/hwcontext.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libavutil/hwcontext.c b/libavutil/hwcontext.c
index 360b01205c..d82df56abf 100644
--- a/libavutil/hwcontext.c
+++ b/libavutil/hwcontext.c
@@ -32,6 +32,9 @@ static const HWContextType * const hw_table[] = {
#if CONFIG_CUDA
&ff_hwcontext_type_cuda,
#endif
+#if CONFIG_D3D11VA
+ &ff_hwcontext_type_d3d11va,
+#endif
#if CONFIG_DXVA2
&ff_hwcontext_type_dxva2,
#endif
@@ -50,6 +53,7 @@ static const HWContextType * const hw_table[] = {
const char *hw_type_names[] = {
[AV_HWDEVICE_TYPE_CUDA] = "cuda",
[AV_HWDEVICE_TYPE_DXVA2] = "dxva2",
+ [AV_HWDEVICE_TYPE_D3D11VA] = "d3d11va",
[AV_HWDEVICE_TYPE_QSV] = "qsv",
[AV_HWDEVICE_TYPE_VAAPI] = "vaapi",
[AV_HWDEVICE_TYPE_VDPAU] = "vdpau",