diff --git a/src/gallium/auxiliary/util/u_video.h b/src/gallium/auxiliary/util/u_video.h index 116af07e375..5b1949d6107 100644 --- a/src/gallium/auxiliary/util/u_video.h +++ b/src/gallium/auxiliary/util/u_video.h @@ -84,6 +84,7 @@ u_reduce_video_profile(enum pipe_video_profile profile) return PIPE_VIDEO_FORMAT_VP9; case PIPE_VIDEO_PROFILE_AV1_MAIN: + case PIPE_VIDEO_PROFILE_AV1_PROFILE2: return PIPE_VIDEO_FORMAT_AV1; default: diff --git a/src/gallium/auxiliary/vl/vl_codec.c b/src/gallium/auxiliary/vl/vl_codec.c index b7876f6e645..7aa6b8f6834 100644 --- a/src/gallium/auxiliary/vl/vl_codec.c +++ b/src/gallium/auxiliary/vl/vl_codec.c @@ -32,8 +32,9 @@ bool vl_codec_supported(struct pipe_screen *screen, enum pipe_video_profile profile, bool encode) { - static_assert(PIPE_VIDEO_PROFILE_MAX == 26, "Update table below when adding new video profiles"); - if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN) { + static_assert(PIPE_VIDEO_PROFILE_MAX == 27, "Update table below when adding new video profiles"); + if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN || + profile == PIPE_VIDEO_PROFILE_AV1_PROFILE2) { if (encode) { if (!VIDEO_CODEC_AV1ENC) return false; diff --git a/src/gallium/frontends/va/config.c b/src/gallium/frontends/va/config.c index ceaee837569..aceafe8d7f9 100644 --- a/src/gallium/frontends/va/config.c +++ b/src/gallium/frontends/va/config.c @@ -53,7 +53,7 @@ vlVaQueryConfigProfiles(VADriverContextP ctx, VAProfile *profile_list, int *num_ *num_profiles = 0; pscreen = VL_VA_PSCREEN(ctx); - for (p = PIPE_VIDEO_PROFILE_MPEG2_SIMPLE; p <= PIPE_VIDEO_PROFILE_AV1_MAIN; ++p) { + for (p = PIPE_VIDEO_PROFILE_MPEG2_SIMPLE; p < PIPE_VIDEO_PROFILE_MAX; ++p) { if (u_reduce_video_profile(p) == PIPE_VIDEO_FORMAT_MPEG4 && !debug_get_option_mpeg4()) continue; diff --git a/src/gallium/frontends/va/va_private.h b/src/gallium/frontends/va/va_private.h index b39e77d677a..1453c02c197 100644 --- a/src/gallium/frontends/va/va_private.h +++ b/src/gallium/frontends/va/va_private.h @@ -265,6 +265,12 @@ PipeToProfile(enum pipe_video_profile profile) return VAProfileVP9Profile2; case PIPE_VIDEO_PROFILE_AV1_MAIN: return VAProfileAV1Profile0; + case PIPE_VIDEO_PROFILE_AV1_PROFILE2: +#if VA_CHECK_VERSION(1, 23, 0) + return VAProfileAV1Profile2; +#else + return VAProfileNone; +#endif case PIPE_VIDEO_PROFILE_MPEG4_AVC_EXTENDED: case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH422: case PIPE_VIDEO_PROFILE_MPEG4_AVC_HIGH444: @@ -320,6 +326,10 @@ ProfileToPipe(VAProfile profile) return PIPE_VIDEO_PROFILE_VP9_PROFILE2; case VAProfileAV1Profile0: return PIPE_VIDEO_PROFILE_AV1_MAIN; +#if VA_CHECK_VERSION(1, 23, 0) + case VAProfileAV1Profile2: + return PIPE_VIDEO_PROFILE_AV1_PROFILE2; +#endif case VAProfileNone: return PIPE_VIDEO_PROFILE_UNKNOWN; default: diff --git a/src/gallium/include/pipe/p_video_enums.h b/src/gallium/include/pipe/p_video_enums.h index a2fe00a4bbd..717877d99bc 100644 --- a/src/gallium/include/pipe/p_video_enums.h +++ b/src/gallium/include/pipe/p_video_enums.h @@ -73,6 +73,7 @@ enum pipe_video_profile PIPE_VIDEO_PROFILE_VP9_PROFILE0, PIPE_VIDEO_PROFILE_VP9_PROFILE2, PIPE_VIDEO_PROFILE_AV1_MAIN, + PIPE_VIDEO_PROFILE_AV1_PROFILE2, PIPE_VIDEO_PROFILE_MAX };