Making anti-collapse a bit more conservative again
The energy memory can be lowered (not increased) during a transient
This commit is contained in:
parent
b417d8392e
commit
47e905dce7
1 changed files with 6 additions and 0 deletions
|
@ -1424,6 +1424,9 @@ int celt_encode_with_ec_float(CELTEncoder * restrict st, const celt_sig * pcm, i
|
|||
oldLogE2[i] = oldLogE[i];
|
||||
for (i=0;i<C*st->mode->nbEBands;i++)
|
||||
oldLogE[i] = oldBandE[i];
|
||||
} else {
|
||||
for (i=0;i<C*st->mode->nbEBands;i++)
|
||||
oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]);
|
||||
}
|
||||
if (isTransient)
|
||||
st->consec_transient++;
|
||||
|
@ -2245,6 +2248,9 @@ int celt_decode_with_ec_float(CELTDecoder * restrict st, const unsigned char *da
|
|||
oldLogE[i] = oldBandE[i];
|
||||
for (i=0;i<C*st->mode->nbEBands;i++)
|
||||
backgroundLogE[i] = MIN16(backgroundLogE[i] + M*QCONST16(0.001f,DB_SHIFT), oldBandE[i]);
|
||||
} else {
|
||||
for (i=0;i<C*st->mode->nbEBands;i++)
|
||||
oldLogE[i] = MIN16(oldLogE[i], oldBandE[i]);
|
||||
}
|
||||
st->rng = dec->rng;
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue