[FFmpeg-devel] [PATCH] lavc/vaapi_hevc: Add support for Main Intra & Main 10 Intra

Mark Thompson sw at jkqxz.net
Mon Apr 1 23:11:36 EEST 2024


On 28/03/2024 02:07, Xiang, Haihao wrote:
> From: Haihao Xiang <haihao.xiang at intel.com>
> 
> Both Main Intra and Main 10 Intra are Rext, we may use Main and Main 10
> instead for decoding. This patch fixes the error below:
> 
> [hevc @ 0x55a771b80a00] No support for codec hevc profile 4.
> [hevc @ 0x55a771b80a00] Failed setup for format vaapi: hwaccel
> initialisation returned error.
> 
> Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
> ---
>   libavcodec/vaapi_hevc.c | 7 +++++++
>   1 file changed, 7 insertions(+)
> 
> diff --git a/libavcodec/vaapi_hevc.c b/libavcodec/vaapi_hevc.c
> index 3bdd2dd1b8..83b94d1a55 100644
> --- a/libavcodec/vaapi_hevc.c
> +++ b/libavcodec/vaapi_hevc.c
> @@ -612,6 +612,13 @@ VAProfile ff_vaapi_parse_hevc_rext_scc_profile(AVCodecContext *avctx)
>           av_log(avctx, AV_LOG_VERBOSE, "HEVC profile %s is found.\n", profile->name);
>       }
>   
> +#if VA_CHECK_VERSION(0, 37, 0)
> +    if (!strcmp(profile->name, "Main Intra"))
> +        return VAProfileHEVCMain;
> +    else if (!strcmp(profile->name, "Main 10 Intra"))
> +        return VAProfileHEVCMain10;
> +#endif
> +
>   #if VA_CHECK_VERSION(1, 2, 0)
>       if (!strcmp(profile->name, "Main 12") ||
>           !strcmp(profile->name, "Main 12 Intra"))

What if high_precision_offsets_enabled_flag is set?

(That doesn't matter for the VAAPI encoder setting the profile because we always have it as zero.)

Thanks,

- Mark


More information about the ffmpeg-devel mailing list