mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 00:58:05 +02:00
radeonsi/vcn: update luma and chroma size
This patch will adjust aligned_height to enc_alignment which is helping to address some corner cases like 4096x64/64x<>. Actually less dpb size causing PROTECTION_FAULT. This change is fixing the issue. Signed-off-by: SureshGuttula <suresh.guttula@amd.com> Reviewed-by: Boyuan Zhang Boyuan.Zhang@amd.com Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23448>
This commit is contained in:
parent
1359e806f2
commit
41d8837e89
1 changed files with 3 additions and 3 deletions
|
|
@ -696,15 +696,15 @@ static int setup_dpb(struct radeon_encoder *enc)
|
|||
uint32_t rec_alignment = is_h264 ? 16 : 64;
|
||||
uint32_t aligned_width = align(enc->base.width, rec_alignment);
|
||||
uint32_t aligned_height = align(enc->base.height, rec_alignment);
|
||||
uint32_t aligned_chroma_height = align(aligned_height / 2, rec_alignment);
|
||||
uint32_t pitch = align(aligned_width, enc->alignment);
|
||||
uint32_t num_reconstructed_pictures = enc->base.max_references + 1;
|
||||
uint32_t luma_size, chroma_size, offset;
|
||||
struct radeon_enc_pic *enc_pic = &enc->enc_pic;
|
||||
int i;
|
||||
uint32_t aligned_dpb_height = MAX2(256, aligned_height);
|
||||
|
||||
luma_size = align(pitch * aligned_height, enc->alignment);
|
||||
chroma_size = align(pitch * aligned_chroma_height, enc->alignment);
|
||||
luma_size = align(pitch * aligned_dpb_height , enc->alignment);
|
||||
chroma_size = align(luma_size / 2 , enc->alignment);
|
||||
if (enc_pic->bit_depth_luma_minus8 || enc_pic->bit_depth_chroma_minus8) {
|
||||
luma_size *= 2;
|
||||
chroma_size *= 2;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue