mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 15:20:10 +01:00
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:
parent
72f104791d
commit
b39d328dcb
1 changed files with 9 additions and 2 deletions
|
|
@ -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,8 +99,14 @@ vlVaQueryConfigEntrypoints(VADriverContextP ctx, VAProfile profile,
|
|||
if (vl_codec_supported(pscreen, p, false))
|
||||
entrypoint_list[(*num_entrypoints)++] = VAEntrypointVLD;
|
||||
|
||||
if (vl_codec_supported(pscreen, p, true))
|
||||
entrypoint_list[(*num_entrypoints)++] = VAEntrypointEncSlice;
|
||||
#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;
|
||||
|
||||
if (*num_entrypoints == 0)
|
||||
return VA_STATUS_ERROR_UNSUPPORTED_PROFILE;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue