ref: 47e905dce7289244e614b72425fc2bcba37f40dc
parent: b417d8392e20acdc0f613a0a3f64bad83e47ea95
author: Jean-Marc Valin <[email protected]>
date: Thu Jan 27 13:05:47 EST 2011
Making anti-collapse a bit more conservative again The energy memory can be lowered (not increased) during a transient
--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -1424,6 +1424,9 @@
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 @@
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;