This commit is contained in:
Joose Sainio 2024-01-04 13:46:19 +02:00
parent e5e32d67f4
commit cdc9b4960d
3 changed files with 4 additions and 4 deletions

View file

@ -1516,7 +1516,7 @@ static double search_cu(
chroma_loc, chroma_loc,
tree_type); tree_type);
} else { } else {
assert(cur_cu->cr_lfnst_idx == 0 && "If we don't have separate tree chroma lfnst index must be 0"); // assert(cur_cu->cr_lfnst_idx == 0 && "If we don't have separate tree chroma lfnst index must be 0");
} }
// Set isp split cbfs here // Set isp split cbfs here

View file

@ -1481,7 +1481,7 @@ int8_t uvg_search_intra_chroma_rdo(
} }
} }
else { else {
lfnst_modes_to_check[0] = 0; lfnst_modes_to_check[0] = chroma_data->pred_cu.lfnst_idx;
lfnst_modes_to_check[1] = -1; lfnst_modes_to_check[1] = -1;
lfnst_modes_to_check[2] = -1; lfnst_modes_to_check[2] = -1;
} }

View file

@ -669,7 +669,7 @@ void uvg_chroma_transform_search(
&u_coeff_cost, &u_coeff_cost,
&v_coeff_cost); &v_coeff_cost);
pred_cu->joint_cb_cr = old_jccr; pred_cu->joint_cb_cr = old_jccr;
if (pred_cu->cr_lfnst_idx != 0 && !u_has_coeffs && !v_has_coeffs) goto reset_cabac; if (pred_cu->cr_lfnst_idx != 0 && !u_has_coeffs && !v_has_coeffs && tree_type == UVG_CHROMA_T) goto reset_cabac;
if(pred_cu->type == CU_INTRA && transforms[i] != CHROMA_TS && tree_type == UVG_CHROMA_T) { if(pred_cu->type == CU_INTRA && transforms[i] != CHROMA_TS && tree_type == UVG_CHROMA_T) {
bool constraints[2] = { false, false }; bool constraints[2] = { false, false };
@ -677,7 +677,7 @@ void uvg_chroma_transform_search(
if(!is_jccr) { if(!is_jccr) {
uvg_derive_lfnst_constraints(pred_cu, constraints, v_quant_coeff, width, height, NULL, COLOR_V); uvg_derive_lfnst_constraints(pred_cu, constraints, v_quant_coeff, width, height, NULL, COLOR_V);
} }
if (!constraints[1] && (u_has_coeffs || v_has_coeffs) && pred_cu->cr_lfnst_idx != 0) goto reset_cabac; if (!constraints[1] && (u_has_coeffs || v_has_coeffs) && pred_cu->cr_lfnst_idx != 0 && tree_type == UVG_CHROMA_T) goto reset_cabac;
} }
if (is_jccr && !u_has_coeffs) goto reset_cabac; if (is_jccr && !u_has_coeffs) goto reset_cabac;