X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fdxva2_h264.c;h=de0885058ad2feabb8a54ce35e8a011b004f52b2;hb=f9e7a2f95a7194a8736cc1416a03a1a0155a3e9f;hp=f58a45807ff3f55a471d14237262a7f270251e9c;hpb=831cfe10b40414915fe7b6088158421fe02e2b2d;p=ffmpeg diff --git a/libavcodec/dxva2_h264.c b/libavcodec/dxva2_h264.c index f58a45807ff..de0885058ad 100644 --- a/libavcodec/dxva2_h264.c +++ b/libavcodec/dxva2_h264.c @@ -518,10 +518,13 @@ AVHWAccel ff_h264_dxva2_hwaccel = { .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_H264, .pix_fmt = AV_PIX_FMT_DXVA2_VLD, + .init = ff_dxva2_decode_init, + .uninit = ff_dxva2_decode_uninit, .start_frame = dxva2_h264_start_frame, .decode_slice = dxva2_h264_decode_slice, .end_frame = dxva2_h264_end_frame, .frame_priv_data_size = sizeof(struct dxva2_picture_context), + .priv_data_size = sizeof(FFDXVASharedContext), }; #endif @@ -531,9 +534,28 @@ AVHWAccel ff_h264_d3d11va_hwaccel = { .type = AVMEDIA_TYPE_VIDEO, .id = AV_CODEC_ID_H264, .pix_fmt = AV_PIX_FMT_D3D11VA_VLD, + .init = ff_dxva2_decode_init, + .uninit = ff_dxva2_decode_uninit, .start_frame = dxva2_h264_start_frame, .decode_slice = dxva2_h264_decode_slice, .end_frame = dxva2_h264_end_frame, .frame_priv_data_size = sizeof(struct dxva2_picture_context), + .priv_data_size = sizeof(FFDXVASharedContext), +}; +#endif + +#if CONFIG_H264_D3D11VA2_HWACCEL +AVHWAccel ff_h264_d3d11va2_hwaccel = { + .name = "h264_d3d11va2", + .type = AVMEDIA_TYPE_VIDEO, + .id = AV_CODEC_ID_H264, + .pix_fmt = AV_PIX_FMT_D3D11, + .init = ff_dxva2_decode_init, + .uninit = ff_dxva2_decode_uninit, + .start_frame = dxva2_h264_start_frame, + .decode_slice = dxva2_h264_decode_slice, + .end_frame = dxva2_h264_end_frame, + .frame_priv_data_size = sizeof(struct dxva2_picture_context), + .priv_data_size = sizeof(FFDXVASharedContext), }; #endif