mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 18:18:06 +02:00
radeonsi: add 10-bit HEVC encode support for VCN2.0 devices
Signed-off-by: Thong Thai <thong.thai@amd.com> Reviewed-by: Leo Liu <leo.liu@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4033>
This commit is contained in:
parent
2ba272135a
commit
8ab31808fd
1 changed files with 9 additions and 6 deletions
|
|
@ -560,12 +560,14 @@ static int si_get_video_param(struct pipe_screen *screen,
|
|||
if (entrypoint == PIPE_VIDEO_ENTRYPOINT_ENCODE) {
|
||||
switch (param) {
|
||||
case PIPE_VIDEO_CAP_SUPPORTED:
|
||||
return (codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
|
||||
(si_vce_is_fw_version_supported(sscreen) ||
|
||||
sscreen->info.family >= CHIP_RAVEN)) ||
|
||||
return ((codec == PIPE_VIDEO_FORMAT_MPEG4_AVC &&
|
||||
(sscreen->info.family >= CHIP_RAVEN ||
|
||||
si_vce_is_fw_version_supported(sscreen))) ||
|
||||
(profile == PIPE_VIDEO_PROFILE_HEVC_MAIN &&
|
||||
(sscreen->info.family >= CHIP_RAVEN ||
|
||||
si_radeon_uvd_enc_supported(sscreen)));
|
||||
si_radeon_uvd_enc_supported(sscreen))) ||
|
||||
(profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10 &&
|
||||
sscreen->info.family >= CHIP_RENOIR));
|
||||
case PIPE_VIDEO_CAP_NPOT_TEXTURES:
|
||||
return 1;
|
||||
case PIPE_VIDEO_CAP_MAX_WIDTH:
|
||||
|
|
@ -710,10 +712,11 @@ static bool si_vid_is_format_supported(struct pipe_screen *screen,
|
|||
enum pipe_video_profile profile,
|
||||
enum pipe_video_entrypoint entrypoint)
|
||||
{
|
||||
/* HEVC 10 bit decoding should use P016 instead of NV12 if possible */
|
||||
/* HEVC 10 bit decoding should use P010 instead of NV12 if possible */
|
||||
if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)
|
||||
return (format == PIPE_FORMAT_NV12) ||
|
||||
(format == PIPE_FORMAT_P016);
|
||||
(format == PIPE_FORMAT_P010) ||
|
||||
(format == PIPE_FORMAT_P016);
|
||||
|
||||
/* Vp9 profile 2 supports 10 bit decoding using P016 */
|
||||
if (profile == PIPE_VIDEO_PROFILE_VP9_PROFILE2)
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue