summaryrefslogtreecommitdiff
path: root/libavcodec/dxva2_vp9.c
diff options
context:
space:
mode:
authorwm4 <nfxjfg@googlemail.com>2017-06-07 17:11:17 +0200
committerwm4 <nfxjfg@googlemail.com>2017-06-27 18:05:02 +0200
commit70143a3954e1c4412efb2bf1a3a818adea2d3abf (patch)
tree24c14db2eac2c52a929cb18bcb11086f41c91147 /libavcodec/dxva2_vp9.c
parent5659f7404731415c7e1cfdf4d8b0afeb6b1132de (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. Merges Libav commit f9e7a2f95a7194a8736cc1416a03a1a0155a3e9f. Also adds untested VP9 support. The check for DXVA2 COBJs is removed. Just update your MinGW to something newer than a 5 year old release. Signed-off-by: Diego Biurrun <diego@biurrun.de>
Diffstat (limited to 'libavcodec/dxva2_vp9.c')
-rw-r--r--libavcodec/dxva2_vp9.c22
1 files changed, 22 insertions, 0 deletions
diff --git a/libavcodec/dxva2_vp9.c b/libavcodec/dxva2_vp9.c
index df098dc406..6d87fdd9f2 100644
--- a/libavcodec/dxva2_vp9.c
+++ b/libavcodec/dxva2_vp9.c
@@ -314,10 +314,13 @@ AVHWAccel ff_vp9_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VP9,
.pix_fmt = AV_PIX_FMT_DXVA2_VLD,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vp9_start_frame,
.decode_slice = dxva2_vp9_decode_slice,
.end_frame = dxva2_vp9_end_frame,
.frame_priv_data_size = sizeof(struct vp9_dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
};
#endif
@@ -327,9 +330,28 @@ AVHWAccel ff_vp9_d3d11va_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VP9,
.pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vp9_start_frame,
.decode_slice = dxva2_vp9_decode_slice,
.end_frame = dxva2_vp9_end_frame,
.frame_priv_data_size = sizeof(struct vp9_dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
+};
+#endif
+
+#if CONFIG_VP9_D3D11VA2_HWACCEL
+AVHWAccel ff_vp9_d3d11va2_hwaccel = {
+ .name = "vp9_d3d11va2",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_VP9,
+ .pix_fmt = AV_PIX_FMT_D3D11,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
+ .start_frame = dxva2_vp9_start_frame,
+ .decode_slice = dxva2_vp9_decode_slice,
+ .end_frame = dxva2_vp9_end_frame,
+ .frame_priv_data_size = sizeof(struct vp9_dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
};
#endif