frontends/va: add PIPE_VIDEO_PROFILE_AV1_PROFILE2
Add PIPE_VIDEO_PROFILE_AV1_PROFILE2 and enable with VA_CHECK_VERSION(1, 23, 0) check Signed-off-by: David (Ming Qiang) Wu <David.Wu3@amd.com> Reviewed-by: David Rosca <david.rosca@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/32383>
This commit is contained in:
committed by
Marge Bot
parent
9c6d14d736
commit
389c77d127
@@ -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:
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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:
|
||||
|
||||
@@ -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
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user