Skip to content
Snippets Groups Projects
Commit 342d654c authored by Gregory Maxwell's avatar Gregory Maxwell Committed by Jean-Marc Valin
Browse files

As of commit 44203907 all celt bands N>1 are even, including custom modes. In...

As of commit 44203907 all celt bands N>1 are even, including custom modes. In light of this, remove some pointless tests.
parent b23a6ca5
No related branches found
No related tags found
No related merge requests found
...@@ -751,16 +751,13 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c ...@@ -751,16 +751,13 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i]; cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i];
if (!stereo && LM != -1 && b > cache[cache[0]]+12 && N>2) if (!stereo && LM != -1 && b > cache[cache[0]]+12 && N>2)
{ {
if (LM>0 || (N&1)==0) N >>= 1;
{ Y = X+N;
N >>= 1; split = 1;
Y = X+N; LM -= 1;
split = 1; if (B==1)
LM -= 1; fill = (fill&1)|(fill<<1);
if (B==1) B = (B+1)>>1;
fill = (fill&1)|(fill<<1);
B = (B+1)>>1;
}
} }
if (split) if (split)
......
...@@ -165,9 +165,9 @@ void compute_pulse_cache(CELTMode *m, int LM) ...@@ -165,9 +165,9 @@ void compute_pulse_cache(CELTMode *m, int LM)
int qb; int qb;
int k; int k;
LM0 = 0; LM0 = 0;
/* Even-sized bands bigger than N=2 can be split one more /* Even-sized bands bigger than N=2 can be split one more time.
time. */ As of commit 44203907 all bands >1 are even, including custom modes.*/
if (N0 > 2 && !(N0&1)) if (N0 > 2)
{ {
N0>>=1; N0>>=1;
LM0--; LM0--;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment