mirror of
https://github.com/xiph/opus.git
synced 2025-06-03 09:07:42 +00:00
As of commit 44203907
all celt bands N>1 are even, including custom modes. In light of this, remove some pointless tests.
This commit is contained in:
parent
b23a6ca5cf
commit
342d654c26
2 changed files with 10 additions and 13 deletions
|
@ -750,8 +750,6 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
|
|||
/* If we need 1.5 more bit than we can produce, split the band in two. */
|
||||
cache = m->cache.bits + m->cache.index[(LM+1)*m->nbEBands+i];
|
||||
if (!stereo && LM != -1 && b > cache[cache[0]]+12 && N>2)
|
||||
{
|
||||
if (LM>0 || (N&1)==0)
|
||||
{
|
||||
N >>= 1;
|
||||
Y = X+N;
|
||||
|
@ -761,7 +759,6 @@ static unsigned quant_band(int encode, const CELTMode *m, int i, celt_norm *X, c
|
|||
fill = (fill&1)|(fill<<1);
|
||||
B = (B+1)>>1;
|
||||
}
|
||||
}
|
||||
|
||||
if (split)
|
||||
{
|
||||
|
|
|
@ -165,9 +165,9 @@ void compute_pulse_cache(CELTMode *m, int LM)
|
|||
int qb;
|
||||
int k;
|
||||
LM0 = 0;
|
||||
/* Even-sized bands bigger than N=2 can be split one more
|
||||
time. */
|
||||
if (N0 > 2 && !(N0&1))
|
||||
/* Even-sized bands bigger than N=2 can be split one more time.
|
||||
As of commit 44203907 all bands >1 are even, including custom modes.*/
|
||||
if (N0 > 2)
|
||||
{
|
||||
N0>>=1;
|
||||
LM0--;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue