mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
[isp] Add lfnst asserts. Fix error in MTS search. Fix chroma lfnst index when no coefficients present.
This commit is contained in:
parent
b9822398a0
commit
85f6b00394
|
@ -230,6 +230,12 @@ static bool encode_lfnst_idx(
|
|||
return true;
|
||||
}
|
||||
else {
|
||||
if(depth != 4 || color == COLOR_Y) {
|
||||
assert(pred_cu->lfnst_idx == 0);
|
||||
}
|
||||
if(depth == 4 && color != COLOR_Y) {
|
||||
assert(pred_cu->cr_lfnst_idx == 0);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -343,9 +343,7 @@ static double search_intra_trdepth(
|
|||
|
||||
const int max_tb_size = TR_MAX_WIDTH;
|
||||
// LFNST search params
|
||||
int max_lfnst_idx = width > max_tb_size || height > max_tb_size ?
|
||||
0 :
|
||||
2;
|
||||
int max_lfnst_idx = width > max_tb_size || height > max_tb_size ? 0 : 2;
|
||||
if(pred_cu->intra.mip_flag && (width < 16 || height < 16)) {
|
||||
max_lfnst_idx = 0;
|
||||
}
|
||||
|
@ -379,8 +377,8 @@ static double search_intra_trdepth(
|
|||
pred_cu->mts_last_scan_pos = 0;
|
||||
pred_cu->violates_mts_coeff_constraint = 0;
|
||||
|
||||
if ((trafo == MTS_SKIP && width > (1 << state->encoder_control->cfg.trskip_max_size))
|
||||
|| !state->encoder_control->cfg.trskip_enable) {
|
||||
if (trafo == MTS_SKIP && (width > (1 << state->encoder_control->cfg.trskip_max_size)
|
||||
|| !state->encoder_control->cfg.trskip_enable)) {
|
||||
continue;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -580,6 +580,7 @@ void uvg_chroma_transform_search(
|
|||
&u_has_coeffs,
|
||||
&v_has_coeffs,
|
||||
pred_cu->cr_lfnst_idx);
|
||||
if(pred_cu->cr_lfnst_idx !=0 && !u_has_coeffs && !v_has_coeffs) continue;
|
||||
|
||||
if(pred_cu->type == CU_INTRA && transforms[i] != CHROMA_TS && (depth == 4 || tree_type == UVG_CHROMA_T)) {
|
||||
bool constraints[2] = { false, false };
|
||||
|
|
Loading…
Reference in a new issue