[FFmpeg-devel] [PATCH] avcodec/av1_vaapi: Enable AV1Profile2 VAAPI support.
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Mon Aug 5 13:18:25 EEST 2024
David (Ming Qiang) Wu via ffmpeg-devel:
> AV1Profile2 VAAPI is supported and tested on AMD VCN5.
>
> Signed-off-by: David (Ming Qiang) Wu <David.Wu3 at amd.com>
> ---
> libavcodec/av1dec.c | 3 +++
> libavcodec/vaapi_decode.c | 3 +++
> 2 files changed, 6 insertions(+)
>
> diff --git a/libavcodec/av1dec.c b/libavcodec/av1dec.c
> index 1d5b9ef4f4..77f63661a0 100644
> --- a/libavcodec/av1dec.c
> +++ b/libavcodec/av1dec.c
> @@ -599,6 +599,9 @@ static int get_pixel_format(AVCodecContext *avctx)
> case AV_PIX_FMT_YUV420P12:
> #if CONFIG_AV1_VULKAN_HWACCEL
> *fmtp++ = AV_PIX_FMT_VULKAN;
> +#endif
> +#if CONFIG_AV1_VAAPI_HWACCEL
> + *fmtp++ = AV_PIX_FMT_VAAPI;
> #endif
> break;
> case AV_PIX_FMT_YUV422P:
> diff --git a/libavcodec/vaapi_decode.c b/libavcodec/vaapi_decode.c
> index a59194340f..a077e47326 100644
> --- a/libavcodec/vaapi_decode.c
> +++ b/libavcodec/vaapi_decode.c
> @@ -448,6 +448,9 @@ static const struct {
> MAP(AV1, AV1_MAIN, AV1Profile0),
> MAP(AV1, AV1_HIGH, AV1Profile1),
> #endif
> +#if VA_CHECK_VERSION(1, 23, 0)
> + MAP(AV1, AV1_PROFESSIONAL, AV1Profile2),
> +#endif
>
> #undef MAP
> };
What happens if the #if condition is false? Does the AV1 decoders
get_format callback then advertise support for a pixel format that is
actually unsupported?
- Andreas
More information about the ffmpeg-devel
mailing list