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-07 18:11:17 +0300
committerDiego Biurrun <diego@biurrun.de>2017-06-08 22:20:18 +0300
commitf9e7a2f95a7194a8736cc1416a03a1a0155a3e9f (patch)
tree838be3f83c9fe4cc5a4be77cc51bc38bac134120 /libavcodec/dxva2_vc1.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/dxva2_vc1.c')
-rw-r--r--libavcodec/dxva2_vc1.c44
1 files changed, 44 insertions, 0 deletions
diff --git a/libavcodec/dxva2_vc1.c b/libavcodec/dxva2_vc1.c
index b63580ed2e..22d3d299b6 100644
--- a/libavcodec/dxva2_vc1.c
+++ b/libavcodec/dxva2_vc1.c
@@ -323,10 +323,13 @@ AVHWAccel ff_wmv3_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_WMV3,
.pix_fmt = AV_PIX_FMT_DXVA2_VLD,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
.decode_slice = dxva2_vc1_decode_slice,
.end_frame = dxva2_vc1_end_frame,
.frame_priv_data_size = sizeof(struct dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
};
#endif
@@ -336,10 +339,13 @@ AVHWAccel ff_vc1_dxva2_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VC1,
.pix_fmt = AV_PIX_FMT_DXVA2_VLD,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
.decode_slice = dxva2_vc1_decode_slice,
.end_frame = dxva2_vc1_end_frame,
.frame_priv_data_size = sizeof(struct dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
};
#endif
@@ -349,10 +355,29 @@ AVHWAccel ff_wmv3_d3d11va_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_WMV3,
.pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
.decode_slice = dxva2_vc1_decode_slice,
.end_frame = dxva2_vc1_end_frame,
.frame_priv_data_size = sizeof(struct dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
+};
+#endif
+
+#if CONFIG_WMV3_D3D11VA2_HWACCEL
+AVHWAccel ff_wmv3_d3d11va2_hwaccel = {
+ .name = "wmv3_d3d11va2",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_WMV3,
+ .pix_fmt = AV_PIX_FMT_D3D11,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
+ .start_frame = dxva2_vc1_start_frame,
+ .decode_slice = dxva2_vc1_decode_slice,
+ .end_frame = dxva2_vc1_end_frame,
+ .frame_priv_data_size = sizeof(struct dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
};
#endif
@@ -362,9 +387,28 @@ AVHWAccel ff_vc1_d3d11va_hwaccel = {
.type = AVMEDIA_TYPE_VIDEO,
.id = AV_CODEC_ID_VC1,
.pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
+ .start_frame = dxva2_vc1_start_frame,
+ .decode_slice = dxva2_vc1_decode_slice,
+ .end_frame = dxva2_vc1_end_frame,
+ .frame_priv_data_size = sizeof(struct dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
+};
+#endif
+
+#if CONFIG_VC1_D3D11VA2_HWACCEL
+AVHWAccel ff_vc1_d3d11va2_hwaccel = {
+ .name = "vc1_d3d11va2",
+ .type = AVMEDIA_TYPE_VIDEO,
+ .id = AV_CODEC_ID_VC1,
+ .pix_fmt = AV_PIX_FMT_D3D11,
+ .init = ff_dxva2_decode_init,
+ .uninit = ff_dxva2_decode_uninit,
.start_frame = dxva2_vc1_start_frame,
.decode_slice = dxva2_vc1_decode_slice,
.end_frame = dxva2_vc1_end_frame,
.frame_priv_data_size = sizeof(struct dxva2_picture_context),
+ .priv_data_size = sizeof(FFDXVASharedContext),
};
#endif