diff options
author | ManojGuptaBonda <mbonda-at-nvidia.com@ffmpeg.org> | 2022-05-16 18:45:58 +0530 |
---|---|---|
committer | Philip Langdale <philipl@overt.org> | 2022-06-25 09:05:58 +0800 |
commit | a44fba0b5b3b4090f9238751736198ddd1f0f1d5 (patch) | |
tree | c598835ac4288f495be4f4d864fa5e1d67b0551a /libavcodec/av1dec.c | |
parent | cf30b538e522703924ce3ef68ddfbd557a29d93f (diff) | |
download | ffmpeg-a44fba0b5b3b4090f9238751736198ddd1f0f1d5.tar.gz |
AV1 VDPAU hwaccel Decode support
Support for VDPAU accelerated AV1 decoding was added with libvdpau-1.5.
Support for the same in ffmpeg is added with this patch. Profiles
related to VDPAU AV1 can be found in latest vdpau.h present in
libvdpau-1.5.
Add AV1 VDPAU to list of hwaccels and supported formats
Added file vdpau_av1.c and Modified configure to add VDPAU AV1 support.
Mapped AV1 profiles to VDPAU AV1 profiles. Populated the codec specific
params that need to be passed to VDPAU.
Signed-off-by: Philip Langdale <philipl@overt.org>
Diffstat (limited to 'libavcodec/av1dec.c')
-rw-r--r-- | libavcodec/av1dec.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c index 1c09b1d6d6..dd83373dd6 100644 --- a/libavcodec/av1dec.c +++ b/libavcodec/av1dec.c @@ -441,7 +441,8 @@ static int get_pixel_format(AVCodecContext *avctx) #define HWACCEL_MAX (CONFIG_AV1_DXVA2_HWACCEL + \ CONFIG_AV1_D3D11VA_HWACCEL * 2 + \ CONFIG_AV1_NVDEC_HWACCEL + \ - CONFIG_AV1_VAAPI_HWACCEL) + CONFIG_AV1_VAAPI_HWACCEL + \ + CONFIG_AV1_VDPAU_HWACCEL) enum AVPixelFormat pix_fmts[HWACCEL_MAX + 2], *fmtp = pix_fmts; if (seq->seq_profile == 2 && seq->color_config.high_bitdepth) @@ -519,6 +520,9 @@ static int get_pixel_format(AVCodecContext *avctx) #if CONFIG_AV1_VAAPI_HWACCEL *fmtp++ = AV_PIX_FMT_VAAPI; #endif +#if CONFIG_AV1_VDPAU_HWACCEL + *fmtp++ = AV_PIX_FMT_VDPAU; +#endif break; case AV_PIX_FMT_YUV420P10: #if CONFIG_AV1_DXVA2_HWACCEL @@ -534,6 +538,9 @@ static int get_pixel_format(AVCodecContext *avctx) #if CONFIG_AV1_VAAPI_HWACCEL *fmtp++ = AV_PIX_FMT_VAAPI; #endif +#if CONFIG_AV1_VDPAU_HWACCEL + *fmtp++ = AV_PIX_FMT_VDPAU; +#endif break; case AV_PIX_FMT_GRAY8: #if CONFIG_AV1_NVDEC_HWACCEL @@ -1271,6 +1278,10 @@ const FFCodec ff_av1_decoder = { #if CONFIG_AV1_VAAPI_HWACCEL HWACCEL_VAAPI(av1), #endif +#if CONFIG_AV1_VDPAU_HWACCEL + HWACCEL_VDPAU(av1), +#endif + NULL }, }; |