summaryrefslogtreecommitdiff
path: root/libavcodec/h264_slice.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-06-07 17:11:17 +0200
committerDiego Biurrun <diego@biurrun.de>2017-06-08 21:20:18 +0200
commitf9e7a2f95a7194a8736cc1416a03a1a0155a3e9f (patch)
tree838be3f83c9fe4cc5a4be77cc51bc38bac134120 /libavcodec/h264_slice.c
parent831cfe10b40414915fe7b6088158421fe02e2b2d (diff)
dxva: add support for new dxva2 and d3d11 hwaccel APIs
This also adds support to avconv (which is trivial due to the new hwaccel API being generic enough). The new decoder setup code in dxva2.c is 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 'libavcodec/h264_slice.c')
-rw-r--r--libavcodec/h264_slice.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 95e366605c..c9f1dbb86f 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -717,7 +717,7 @@ static void init_scan_tables(H264Context *h)
static enum AVPixelFormat get_pixel_format(H264Context *h)
{
#define HWACCEL_MAX (CONFIG_H264_DXVA2_HWACCEL + \
- CONFIG_H264_D3D11VA_HWACCEL + \
+ (CONFIG_H264_D3D11VA_HWACCEL * 2) + \
CONFIG_H264_VAAPI_HWACCEL + \
(CONFIG_H264_VDA_HWACCEL * 2) + \
CONFIG_H264_VDPAU_HWACCEL)
@@ -769,6 +769,7 @@ static enum AVPixelFormat get_pixel_format(H264Context *h)
#endif
#if CONFIG_H264_D3D11VA_HWACCEL
*fmt++ = AV_PIX_FMT_D3D11VA_VLD;
+ *fmt++ = AV_PIX_FMT_D3D11;
#endif
#if CONFIG_H264_VAAPI_HWACCEL
*fmt++ = AV_PIX_FMT_VAAPI;