mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 09:18:04 +02:00
radeonsi/vcn: Fix calculating QP map region dimensions
It needs to be aligned to block size otherwise it would skip last
row/column on resolutions like 1080p.
Cc: mesa-stable
Reviewed-by: Ruijing Dong <ruijing.dong@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37143>
(cherry picked from commit 8eb84f8854)
This commit is contained in:
parent
09043aba63
commit
c6aed295dc
2 changed files with 5 additions and 5 deletions
|
|
@ -6334,7 +6334,7 @@
|
|||
"description": "radeonsi/vcn: Fix calculating QP map region dimensions",
|
||||
"nominated": true,
|
||||
"nomination_type": 1,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
|
|
|||
|
|
@ -206,10 +206,10 @@ static void radeon_vcn_enc_get_roi_param(struct radeon_encoder *enc,
|
|||
} else
|
||||
map->qp_delta = region->qp_value;
|
||||
|
||||
map->x_in_unit = CLAMP((region->x / block_length), 0, width_in_block - 1);
|
||||
map->y_in_unit = CLAMP((region->y / block_length), 0, height_in_block - 1);
|
||||
map->width_in_unit = CLAMP((region->width / block_length), 0, width_in_block);
|
||||
map->height_in_unit = CLAMP((region->height / block_length), 0, width_in_block);
|
||||
map->x_in_unit = MIN2(DIV_ROUND_UP(region->x, block_length), width_in_block - 1);
|
||||
map->y_in_unit = MIN2(DIV_ROUND_UP(region->y, block_length), height_in_block - 1);
|
||||
map->width_in_unit = MIN2(DIV_ROUND_UP(region->width, block_length), width_in_block);
|
||||
map->height_in_unit = MIN2(DIV_ROUND_UP(region->height, block_length), width_in_block);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue