Commit Graph

5 Commits

Author SHA1 Message Date
Timo Rothenpieler 6fb6170776 hwcontext_d3d11va: add missing stdint.h include
This caused checkheaders to fail on cygwin on this file.
2017-11-17 23:27:43 +01:00
Hendrik Leppkes 15b00aea41 hwcontext_d3d11va: use correct license header 2017-06-28 00:19:55 +02:00
wm4 289d387330 hwcontext_d3d11va: add option to enable debug mode
Basically copied from VLC (LGPL):

http://git.videolan.org/?p=vlc.git;a=blob;f=modules/video_output/win32/direct3d11.c;h=e9fcb83dcabfe778f26e63d19f218caf06a7c3ae;hb=HEAD#l1482
http://git.videolan.org/?p=vlc.git;a=blob;f=modules/codec/avcodec/d3d11va.c;h=85e7d25caebc059a9770da2ef4bb8fe90816d76d;hb=HEAD#l599

Merges Libav commit cfc9e7c94e.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-06-27 18:05:02 +02:00
wm4 8d7fdba7b8 dxva: support DXGI_FORMAT_420_OPAQUE decoding
Some devices (some phones, apparently) will support only this opaque
format. Of course this won't work with CLI, because copying data
directly is not supported.

Automatic frame allocation (setting AVCodecContext.hw_device_ctx) does
not support this mode, even if it's the only supported mode. But since
opaque surfaces are generally less useful, that's probably ok.

Merges Libav commit 5030e3856c.

Signed-off-by: Luca Barbato <lu_zero@gentoo.org>
2017-06-27 18:05:02 +02:00
wm4 3303511f33 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.

Merges Libav commit fff90422d1.

Signed-off-by: Diego Biurrun <diego@biurrun.de>
2017-06-27 18:05:02 +02:00