anv/video: fix to set slice block size correctly for h265 decoding.

Fixes dEQP-VK.video.encode.h265.resolution_change_dpb_layered_src_video_layout

Signed-off-by: Hyunjun Ko <zzoon@igalia.com>
Acked-by: Lionel Landwerlin <lionel.g.landwerlin@intel.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37412>
This commit is contained in:
Hyunjun Ko
2025-09-10 15:17:04 +02:00
committed by Marge Bot
parent 84802cf325
commit b7129a2085

View File

@@ -2375,8 +2375,8 @@ anv_h265_encode_video(struct anv_cmd_buffer *cmd, const VkVideoEncodeInfoKHR *en
}
anv_batch_emit(&cmd->batch, GENX(VDENC_WALKER_STATE), vdenc_walker) {
uint32_t slice_block_rows = DIV_ROUND_UP(src_img->vk.extent.height, ANV_MAX_H265_CTB_SIZE);
uint32_t slice_block_cols = DIV_ROUND_UP(src_img->vk.extent.width, ANV_MAX_H265_CTB_SIZE);
uint32_t slice_block_rows = DIV_ROUND_UP(height_in_pix, ANV_MAX_H265_CTB_SIZE);
uint32_t slice_block_cols = DIV_ROUND_UP(width_in_pix, ANV_MAX_H265_CTB_SIZE);
uint32_t num_ctu_in_slice = slice_block_cols * slice_block_rows;
vdenc_walker.MBLCUStartYPosition = slice_header->slice_segment_address % ctb_w;