aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/av1dec.c
diff options
context:
space:
mode:
authorWu Jianhua <toqsxw@outlook.com>2023-12-05 14:46:47 +0800
committerHaihao Xiang <haihao.xiang@intel.com>2023-12-21 16:15:23 +0800
commitb16fd96c5f847a2b96ffd2fb268dcbb69dbc78a3 (patch)
tree4837f0421a9ff1101eccbf7ffdaaedf172bd9627 /libavcodec/av1dec.c
parent326288c70ac374918d629c819d7d13b5e5caefd3 (diff)
downloadffmpeg-b16fd96c5f847a2b96ffd2fb268dcbb69dbc78a3.tar.gz
avcodec: add D3D12VA hardware accelerated AV1 decoding
The command below is how to enable d3d12va: ffmpeg -hwaccel d3d12va -i input.mp4 output.mp4 Signed-off-by: Wu Jianhua <toqsxw@outlook.com> Signed-off-by: Tong Wu <tong1.wu@intel.com>
Diffstat (limited to 'libavcodec/av1dec.c')
-rw-r--r--libavcodec/av1dec.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
index 4dcde234c6..7ffa7821e9 100644
--- a/libavcodec/av1dec.c
+++ b/libavcodec/av1dec.c
@@ -511,6 +511,7 @@ static int get_pixel_format(AVCodecContext *avctx)
enum AVPixelFormat pix_fmt = get_sw_pixel_format(avctx, seq);
#define HWACCEL_MAX (CONFIG_AV1_DXVA2_HWACCEL + \
CONFIG_AV1_D3D11VA_HWACCEL * 2 + \
+ CONFIG_AV1_D3D12VA_HWACCEL + \
CONFIG_AV1_NVDEC_HWACCEL + \
CONFIG_AV1_VAAPI_HWACCEL + \
CONFIG_AV1_VDPAU_HWACCEL + \
@@ -529,6 +530,9 @@ static int get_pixel_format(AVCodecContext *avctx)
*fmtp++ = AV_PIX_FMT_D3D11VA_VLD;
*fmtp++ = AV_PIX_FMT_D3D11;
#endif
+#if CONFIG_AV1_D3D12VA_HWACCEL
+ *fmtp++ = AV_PIX_FMT_D3D12;
+#endif
#if CONFIG_AV1_NVDEC_HWACCEL
*fmtp++ = AV_PIX_FMT_CUDA;
#endif
@@ -550,6 +554,9 @@ static int get_pixel_format(AVCodecContext *avctx)
*fmtp++ = AV_PIX_FMT_D3D11VA_VLD;
*fmtp++ = AV_PIX_FMT_D3D11;
#endif
+#if CONFIG_AV1_D3D12VA_HWACCEL
+ *fmtp++ = AV_PIX_FMT_D3D12;
+#endif
#if CONFIG_AV1_NVDEC_HWACCEL
*fmtp++ = AV_PIX_FMT_CUDA;
#endif
@@ -1507,6 +1514,9 @@ const FFCodec ff_av1_decoder = {
#if CONFIG_AV1_D3D11VA2_HWACCEL
HWACCEL_D3D11VA2(av1),
#endif
+#if CONFIG_AV1_D3D12VA_HWACCEL
+ HWACCEL_D3D12VA(av1),
+#endif
#if CONFIG_AV1_NVDEC_HWACCEL
HWACCEL_NVDEC(av1),
#endif