radeonsi: add PIPE_FORMAT_P010 for HEVC Main10 profile to encode param

The format can be queried through the encode entrypoint

Signed-off-by: Leo Liu <leo.liu@amd.com>
Reviewed-by: James Zhu <James.Zhu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11201>
This commit is contained in:
Leo Liu
2021-06-05 17:03:32 -04:00
parent 6b7ff241f4
commit 8ddba3b5ea
+4 -1
View File
@@ -538,7 +538,10 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil
else
return (sscreen->info.family < CHIP_TONGA) ? 1152 : 2304;
case PIPE_VIDEO_CAP_PREFERED_FORMAT:
return PIPE_FORMAT_NV12;
if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
return PIPE_FORMAT_P010;
else
return PIPE_FORMAT_NV12;
case PIPE_VIDEO_CAP_PREFERS_INTERLACED:
return false;
case PIPE_VIDEO_CAP_SUPPORTS_INTERLACED: