From 3b5dfeda81d0a55c65b3d1329bb8a6f44e0aa3ba Mon Sep 17 00:00:00 2001 From: Rose Hudson Date: Sun, 15 Jan 2023 12:20:07 +0000 Subject: [PATCH] radeonsi: report 0 block size for Polaris HEVC encoding makes encoded videos resemble the input again :) Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/7992 Fixes: c4482a3c1a9 ("radeonsi/vcn: enable multi-slice encoding") Reviewed-by: Ruijing Dong Part-of: (cherry picked from commit e8a60633daec2989df718d28e0baa873bb9b1d15) --- .pick_status.json | 2 +- src/gallium/drivers/radeonsi/si_get.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index 7821d0c87d4..9a87ace4367 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2191,7 +2191,7 @@ "description": "radeonsi: report 0 block size for Polaris HEVC encoding", "nominated": true, "nomination_type": 1, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": "c4482a3c1a973975eb27ac284a18bebca24f7876" }, diff --git a/src/gallium/drivers/radeonsi/si_get.c b/src/gallium/drivers/radeonsi/si_get.c index 7a362de3ce6..4c709d7223a 100644 --- a/src/gallium/drivers/radeonsi/si_get.c +++ b/src/gallium/drivers/radeonsi/si_get.c @@ -643,8 +643,9 @@ static int si_get_video_param(struct pipe_screen *screen, enum pipe_video_profil return 0; case PIPE_VIDEO_CAP_ENC_HEVC_BLOCK_SIZES: - if (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN || - profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10) { + if (sscreen->info.family >= CHIP_RAVEN && + (profile == PIPE_VIDEO_PROFILE_HEVC_MAIN || + profile == PIPE_VIDEO_PROFILE_HEVC_MAIN_10)) { union pipe_h265_enc_cap_block_sizes pipe_block_sizes; pipe_block_sizes.value = 0;