frontends/va: checking va version for av1enc support

need to ensure va version >= 1.16 to support av1enc.

Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24901>
This commit is contained in:
Ruijing Dong
2023-08-25 17:44:29 -04:00
committed by Marge Bot
parent 72f104791d
commit b39d328dcb

View File

@@ -77,6 +77,7 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
{
struct pipe_screen *pscreen;
enum pipe_video_profile p;
bool check_av1enc_support = false;
if (!ctx)
return VA_STATUS_ERROR_INVALID_CONTEXT;
@@ -98,6 +99,12 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
if (vl_codec_supported(pscreen, p, false))
entrypoint_list[(*num_entrypoints)++] = VAEntrypointVLD;
#if VA_CHECK_VERSION(1, 16, 0)
if (p == PIPE_VIDEO_PROFILE_AV1_MAIN)
check_av1enc_support = true;
#endif
if (p != PIPE_VIDEO_PROFILE_AV1_MAIN || check_av1enc_support == true)
if (vl_codec_supported(pscreen, p, true))
entrypoint_list[(*num_entrypoints)++] = VAEntrypointEncSlice;