Trying to prevent PVQ-level splits
We prevent as many as possible, but they can still occur if we manage to reach the LN limit
This commit is contained in:
parent
c803ee1959
commit
eb926680f6
1 changed files with 2 additions and 2 deletions
|
@ -457,7 +457,7 @@ void quant_band(const CELTMode *m, int i, celt_norm *X, celt_norm *Y, int N, int
|
||||||
|
|
||||||
split = stereo = Y != NULL;
|
split = stereo = Y != NULL;
|
||||||
|
|
||||||
if (b>(32<<BITRES) && !stereo && LM>0)
|
if (!stereo && LM>0 && !fits_in32(N, get_pulses(bits2pulses(m, m->bits[LM][i], N, b))))
|
||||||
{
|
{
|
||||||
N /= 2;
|
N /= 2;
|
||||||
Y = X+N;
|
Y = X+N;
|
||||||
|
@ -667,7 +667,7 @@ void unquant_band(const CELTMode *m, int i, celt_norm *X, celt_norm *Y, int N, i
|
||||||
|
|
||||||
split = stereo = Y != NULL;
|
split = stereo = Y != NULL;
|
||||||
|
|
||||||
if (b>(32<<BITRES) && !stereo && LM>0)
|
if (!stereo && LM>0 && !fits_in32(N, get_pulses(bits2pulses(m, m->bits[LM][i], N, b))))
|
||||||
{
|
{
|
||||||
N /= 2;
|
N /= 2;
|
||||||
Y = X+N;
|
Y = X+N;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue