radeonsi: use PIPE_FORMAT_P010 for 10-bit VP9 decoding

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>
This commit is contained in:
Thong Thai 2020-07-10 14:03:26 -04:00 committed by Marge Bot
parent b85ef04324
commit 045711dc1c

View 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)