mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
radeonsi/vcn: vcn5 av1 decoding context buffer fix
In VCN5, the AV1 context buffer has changed to a bigger
one than VCN4. It fixed an AV1 decoding issue on VCN5.
Cc: mesa-stable
Reviewed-by: Leo Liu <leo.liu@amd.com>
Signed-off-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/36208>
(cherry picked from commit 32a2012975)
This commit is contained in:
parent
ec77210538
commit
7e564fd963
2 changed files with 22 additions and 12 deletions
|
|
@ -5474,7 +5474,7 @@
|
|||
"description": "radeonsi/vcn: vcn5 av1 decoding context buffer fix",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -32,19 +32,29 @@ ac_vcn_dec_calc_ctx_size_av1(unsigned av1_version)
|
|||
int sdb_pitch_128x128 = align(32 * num_128x128_CTB_8k, 256) * 2;
|
||||
int sdb_lf_size_ctb_64x64 = sdb_pitch_64x64 * (align(1728, 64) / 64);
|
||||
int sdb_lf_size_ctb_128x128 = sdb_pitch_128x128 * (align(3008, 64) / 64);
|
||||
int sdb_superres_size_ctb_64x64 = sdb_pitch_64x64 * (align(3232, 64) / 64);
|
||||
int sdb_superres_size_ctb_128x128 = sdb_pitch_128x128 * (align(6208, 64) / 64);
|
||||
int sdb_output_size_ctb_64x64 = sdb_pitch_64x64 * (align(1312, 64) / 64);
|
||||
int sdb_output_size_ctb_128x128 = sdb_pitch_128x128 * (align(2336, 64) / 64);
|
||||
int sdb_fg_avg_luma_size_ctb_64x64 = sdb_pitch_64x64 * (align(384, 64) / 64);
|
||||
int sdb_fg_avg_luma_size_ctb_128x128 = sdb_pitch_128x128 * (align(640, 64) / 64);
|
||||
|
||||
ctx_size += (MAX2(sdb_lf_size_ctb_64x64, sdb_lf_size_ctb_128x128) +
|
||||
MAX2(sdb_superres_size_ctb_64x64, sdb_superres_size_ctb_128x128) +
|
||||
MAX2(sdb_output_size_ctb_64x64, sdb_output_size_ctb_128x128) +
|
||||
MAX2(sdb_fg_avg_luma_size_ctb_64x64, sdb_fg_avg_luma_size_ctb_128x128)) *
|
||||
if (av1_version == RDECODE_AV1_VER_2) {
|
||||
int aligned_height_in_64x64_blk = align(4352, 64) / 64;
|
||||
int aligned_superres_total_pixels = align((78 + 2) * 3 * 32, 256);
|
||||
int sdb_superres_size_ctb = aligned_height_in_64x64_blk * aligned_superres_total_pixels;
|
||||
ctx_size += (MAX2(sdb_lf_size_ctb_64x64, sdb_lf_size_ctb_128x128) + sdb_superres_size_ctb) *
|
||||
2 +
|
||||
68 * 512;
|
||||
68 * 512;
|
||||
} else {
|
||||
int sdb_superres_size_ctb_64x64 = sdb_pitch_64x64 * (align(3232, 64) / 64);
|
||||
int sdb_superres_size_ctb_128x128 = sdb_pitch_128x128 * (align(6208, 64) / 64);
|
||||
int sdb_output_size_ctb_64x64 = sdb_pitch_64x64 * (align(1312, 64) / 64);
|
||||
int sdb_output_size_ctb_128x128 = sdb_pitch_128x128 * (align(2336, 64) / 64);
|
||||
int sdb_fg_avg_luma_size_ctb_64x64 = sdb_pitch_64x64 * (align(384, 64) / 64);
|
||||
int sdb_fg_avg_luma_size_ctb_128x128 = sdb_pitch_128x128 * (align(640, 64) / 64);
|
||||
|
||||
ctx_size += (MAX2(sdb_lf_size_ctb_64x64, sdb_lf_size_ctb_128x128) +
|
||||
MAX2(sdb_superres_size_ctb_64x64, sdb_superres_size_ctb_128x128) +
|
||||
MAX2(sdb_output_size_ctb_64x64, sdb_output_size_ctb_128x128) +
|
||||
MAX2(sdb_fg_avg_luma_size_ctb_64x64, sdb_fg_avg_luma_size_ctb_128x128)) *
|
||||
2 +
|
||||
68 * 512;
|
||||
}
|
||||
|
||||
return ctx_size;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue