summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPhilip Langdale <philipl@overt.org>2023-01-23 18:36:26 +0800
committerMarge Bot <emma+marge@anholt.net>2023-01-25 16:15:25 +0000
commit0504a3b079223ea243fa479701967ae3ead12a40 (patch)
tree3716583d78bcce9900cec9824d545456011ecd0a /src
parent3eb646efd0d7f05ca5b8c8016d154e90392c70fd (diff)
radeonsi: correctly declare YUV420_10 RT Format support for AV1
This appears to have been an oversight. AV1 Main profile requires support for both 8bit and 10bit, and so we should always declare support for the YUV420_10 RT Format. This support then cascades into supporting the appropriate surface formats and meets expectations of vaapi clients (especially ffmpeg based) on how to detect support for these formats. Note that the commit [0b02db3007] was also made with the intention of fixing this problem, but it does so in a non-idiomatic way. With that change, there is still no declared YUV420_10 RT Format, and instead the P010 surface format is reported under the YUV420 RT Format. This is not going to work with all vaapi clients. I recommend that this commit be reverted. Signed-off-by: Philip Langdale <philipl@overt.org> Reviewed-by: Ruijing Dong <ruijing.dong@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/20870>
Diffstat (limited to 'src')
-rw-r--r--src/gallium/drivers/radeonsi/si_get.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c
index aee9b7477f2..3b7ee97731b 100644
--- a/src/gallium/drivers/radeonsi/si_get.c
+++ b/src/gallium/drivers/radeonsi/si_get.c
@@ -854,6 +854,9 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for
if (profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2)
return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016);
+ if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN)
+ return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016);
+
/* JPEG supports YUV400 and YUV444 */
if (profile == PIPE_VIDEO_PROFILE_JPEG_BASELINE) {
switch (format) {