radeonsi: Add NV12 support for AV1
authorSonny Jiang <sonny.jiang@amd.com>
Thu, 2 Mar 2023 18:26:30 +0000 (12:26 -0600)
committerMarge Bot <emma+marge@anholt.net>
Mon, 6 Mar 2023 16:10:40 +0000 (16:10 +0000)
8bit av1 decoding cannot use NV12 output, which is caused by missing NV12 RT format.
It's a regression caused by commit [0504a3b0].
Fixes: 0504a3b0  ("radeonsi: correctly declare YUV420_10 RT Format support for AV1")
Cc: mesa-stable
Signed-off-by: Sonny Jiang <sonny.jiang@amd.com>
Reviewed-by: David Wu <David.Wu3@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21697>

src/gallium/drivers/radeonsi/si_get.c

index 8c7c8a7..3ac326a 100644 (file)
@@ -874,8 +874,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);
+   if (profile == PIPE_VIDEO_PROFILE_AV1_MAIN && entrypoint == PIPE_VIDEO_ENTRYPOINT_BITSTREAM)
+      return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016) ||
+             (format == PIPE_FORMAT_NV12);
 
    /* JPEG supports YUV400 and YUV444 */
    if (profile == PIPE_VIDEO_PROFILE_JPEG_BASELINE) {