mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
[isp] Fix chroma width error when writing cu loc. Remove redundant IPS mode checks.
This commit is contained in:
parent
b53308f258
commit
39f30563c5
|
@ -1355,12 +1355,16 @@ void uvg_encode_coding_tree(
|
|||
const cu_array_t* used_array = tree_type != UVG_CHROMA_T ? frame->cu_array : frame->chroma_cu_array;
|
||||
const cu_info_t *cur_cu = uvg_cu_array_at_const(used_array, x, y);
|
||||
|
||||
const int cu_width = tree_type != UVG_CHROMA_T ? LCU_WIDTH >> depth : LCU_WIDTH_C >> depth;
|
||||
const int cu_height = cu_width; // TODO: height for non-square blocks
|
||||
const int width = LCU_WIDTH >> depth;
|
||||
const int height = width; // TODO: height for non-square blocks
|
||||
cu_loc_t cu_loc;
|
||||
uvg_cu_loc_ctor(&cu_loc, x, y, width, height);
|
||||
|
||||
const int cu_width = tree_type != UVG_CHROMA_T ? cu_loc.width : cu_loc.chroma_width;
|
||||
const int cu_height = tree_type != UVG_CHROMA_T ? cu_loc.height : cu_loc.chroma_height;
|
||||
const int half_cu = cu_width >> 1;
|
||||
|
||||
cu_loc_t cu_loc;
|
||||
uvg_cu_loc_ctor(&cu_loc, x, y, cu_width, cu_height);
|
||||
|
||||
|
||||
const cu_info_t *left_cu = NULL;
|
||||
if (x > 0) {
|
||||
|
|
|
@ -1695,7 +1695,7 @@ void uvg_intra_recon_cu(
|
|||
// ISP split is done horizontally or vertically depending on ISP mode, 2 or 4 times depending on block dimensions.
|
||||
// Small blocks are split only twice.
|
||||
int split_type = search_data->pred_cu.intra.isp_mode;
|
||||
int split_limit = split_type == ISP_MODE_NO_ISP ? 1 : uvg_get_isp_split_num(width, height, split_type);
|
||||
int split_limit = uvg_get_isp_split_num(width, height, split_type);
|
||||
|
||||
for (int i = 0; i < split_limit; ++i) {
|
||||
cu_loc_t loc;
|
||||
|
|
|
@ -387,7 +387,7 @@ double uvg_cu_rd_cost_luma(const encoder_state_t *const state,
|
|||
}
|
||||
else {
|
||||
int split_type = pred_cu->intra.isp_mode;
|
||||
int split_limit = split_type == ISP_MODE_NO_ISP ? 1 : uvg_get_isp_split_num(width, height, split_type);
|
||||
int split_limit = uvg_get_isp_split_num(width, height, split_type);
|
||||
|
||||
for (int i = 0; i < split_limit; ++i) {
|
||||
cu_loc_t loc;
|
||||
|
@ -626,7 +626,7 @@ static double cu_rd_cost_tr_split_accurate(
|
|||
}
|
||||
else {
|
||||
int split_type = pred_cu->intra.isp_mode;
|
||||
int split_limit = split_type == ISP_MODE_NO_ISP ? 1 : uvg_get_isp_split_num(width, height, split_type);
|
||||
int split_limit = uvg_get_isp_split_num(width, height, split_type);
|
||||
|
||||
for (int i = 0; i < split_limit; ++i) {
|
||||
cu_loc_t loc;
|
||||
|
|
Loading…
Reference in a new issue