mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-23 18:14:06 +00:00
[LMCS] Fix a bug where floor_log2 function is used with 0 value
This commit is contained in:
parent
9231ed4869
commit
5aa04035d8
|
@ -1301,7 +1301,7 @@ void kvz_construct_reshaper_lmcs(lmcs_aps* aps)
|
|||
maxAbsDeltaCW = absDeltaCW;
|
||||
}
|
||||
}
|
||||
aps->m_sliceReshapeInfo.maxNbitsNeededDeltaCW = MAX(1, 1 + kvz_math_floor_log2(maxAbsDeltaCW));
|
||||
aps->m_sliceReshapeInfo.maxNbitsNeededDeltaCW = (maxAbsDeltaCW == 0) ? 1 : MAX(1, 1 + kvz_math_floor_log2(maxAbsDeltaCW));
|
||||
|
||||
histLenth = aps->m_initCW;
|
||||
log2HistLenth = kvz_math_floor_log2(histLenth);
|
||||
|
|
Loading…
Reference in a new issue