radeonsi: Fix reporting support for AV1 Profile2
This reported support for Profile2 on all VCNs that support Profile0
and reported no supported formats if Profile2 was not supported.
Instead, we should not advertise the Profile2 at all if not supported.
Fixes: e359b3c525 ("radeonsi/vcn: support 12bit YUV420 AV1 decoding")
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/33092>
This commit is contained in:
@@ -556,6 +556,8 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
|
||||
case PIPE_VIDEO_FORMAT_VP9:
|
||||
return sscreen->info.vcn_ip_version >= VCN_1_0_0;
|
||||
case PIPE_VIDEO_FORMAT_AV1:
|
||||
if (profile == PIPE_VIDEO_PROFILE_AV1_PROFILE2)
|
||||
return sscreen->info.vcn_ip_version >= VCN_5_0_0 || sscreen->info.vcn_ip_version == VCN_4_0_0;
|
||||
return sscreen->info.vcn_ip_version >= VCN_3_0_0 && sscreen->info.vcn_ip_version != VCN_3_0_33;
|
||||
default:
|
||||
return false;
|
||||
@@ -699,12 +701,9 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for
|
||||
return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016) ||
|
||||
(format == PIPE_FORMAT_NV12);
|
||||
|
||||
if (profile == PIPE_VIDEO_PROFILE_AV1_PROFILE2 && entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM) {
|
||||
if (sscreen->info.vcn_ip_version < VCN_5_0_0 && sscreen->info.vcn_ip_version != VCN_4_0_0)
|
||||
return false;
|
||||
if (profile == PIPE_VIDEO_PROFILE_AV1_PROFILE2 && entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM)
|
||||
return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016) ||
|
||||
(format == PIPE_FORMAT_P012) || (format == PIPE_FORMAT_NV12);
|
||||
}
|
||||
|
||||
/* JPEG supports YUV400 and YUV444 */
|
||||
if (profile == PIPE_VIDEO_PROFILE_JPEG_BASELINE) {
|
||||
|
||||
Reference in New Issue
Block a user