radeonsi: use PIPE_FORMAT_P010 for 10-bit VP9 decoding
authorThong Thai <thong.thai@amd.com>
Fri, 10 Jul 2020 18:03:26 +0000 (14:03 -0400)
committerMarge Bot <eric+marge@anholt.net>
Thu, 16 Jul 2020 17:52:20 +0000 (17:52 +0000)
Signed-off-by: Thong Thai <thong.thai@amd.com>
Reviewed-by: Leo Liu <leoliu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5848>

src/gallium/drivers/radeonsi/si_get.c

index 29f71c9776ea65d7c4681e9fcff6378179e2ddd1..bed2061070ac0f60c46c7a269487707435f26bc8 100644 (file)
@@ -649,7 +649,7 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
       if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
          return PIPE_FORMAT_P010;
       else if (profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2)
-         return PIPE_FORMAT_P016;
+         return PIPE_FORMAT_P010;
       else
          return PIPE_FORMAT_NV12;
 
@@ -710,7 +710,7 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen, enum pipe_for
 
    /* Vp9 profile 2 supports 10 bit decoding using P016 */
    if (profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2)
-      return format == PIPE_FORMAT_P016;
+      return (format == PIPE_FORMAT_P010) || (format == PIPE_FORMAT_P016);
 
    /* we can only handle this one with UVD */
    if (profile != PIPE_VIDEO_PROFILE_UNKNOWN)