diff options
author | Wu Jianhua <toqsxw@outlook.com> | 2023-12-05 14:46:44 +0800 |
---|---|---|
committer | Haihao Xiang <haihao.xiang@intel.com> | 2023-12-21 16:15:23 +0800 |
commit | 349ce30e4ea3ded1e776270976d291d2adec608d (patch) | |
tree | fa26217b10e857ac39ee6447b86b1e3c84e8f50f /libavcodec/hwconfig.h | |
parent | 142f727b9ca21c95414536074e3f89c687271dd4 (diff) | |
download | ffmpeg-349ce30e4ea3ded1e776270976d291d2adec608d.tar.gz |
avcodec: add D3D12VA hardware accelerated H264 decoding
The implementation is based on:
https://learn.microsoft.com/en-us/windows/win32/medfound/direct3d-12-video-overview
With the Direct3D 12 video decoding support, we can render or process
the decoded images by the pixel shaders or compute shaders directly
without the extra copy overhead, which is beneficial especially if you
are trying to render or post-process a 4K or 8K video.
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/hwconfig.h')
-rw-r--r-- | libavcodec/hwconfig.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/libavcodec/hwconfig.h b/libavcodec/hwconfig.h index e164722a94..ee29ca631d 100644 --- a/libavcodec/hwconfig.h +++ b/libavcodec/hwconfig.h @@ -77,6 +77,8 @@ void ff_hwaccel_uninit(AVCodecContext *avctx); HW_CONFIG_HWACCEL(1, 1, 1, VULKAN, VULKAN, ff_ ## codec ## _vulkan_hwaccel) #define HWACCEL_D3D11VA(codec) \ HW_CONFIG_HWACCEL(0, 0, 1, D3D11VA_VLD, NONE, ff_ ## codec ## _d3d11va_hwaccel) +#define HWACCEL_D3D12VA(codec) \ + HW_CONFIG_HWACCEL(1, 1, 0, D3D12, D3D12VA, ff_ ## codec ## _d3d12va_hwaccel) #define HW_CONFIG_ENCODER(device, frames, ad_hoc, format, device_type_) \ &(const AVCodecHWConfigInternal) { \ |