Fix NORM_ALIASING_HACK
We need to move the history out of the way before we write to the shape array X, or else we get corruption of the audio. Signed-off-by: Jean-Marc Valin <jmvalin@amazon.com>
This commit is contained in:
parent
e4a74ddeb9
commit
c9d5bea13e
1 changed files with 4 additions and 5 deletions
|
@ -557,6 +557,10 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
|
||||||
#else
|
#else
|
||||||
ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */
|
ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */
|
||||||
#endif
|
#endif
|
||||||
|
c=0; do {
|
||||||
|
OPUS_MOVE(decode_mem[c], decode_mem[c]+N,
|
||||||
|
DECODE_BUFFER_SIZE-N+(overlap>>1));
|
||||||
|
} while (++c<C);
|
||||||
|
|
||||||
/* Energy decay */
|
/* Energy decay */
|
||||||
decay = loss_duration==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT);
|
decay = loss_duration==0 ? QCONST16(1.5f, DB_SHIFT) : QCONST16(.5f, DB_SHIFT);
|
||||||
|
@ -585,11 +589,6 @@ static void celt_decode_lost(CELTDecoder * OPUS_RESTRICT st, int N, int LM)
|
||||||
}
|
}
|
||||||
st->rng = seed;
|
st->rng = seed;
|
||||||
|
|
||||||
c=0; do {
|
|
||||||
OPUS_MOVE(decode_mem[c], decode_mem[c]+N,
|
|
||||||
DECODE_BUFFER_SIZE-N+(overlap>>1));
|
|
||||||
} while (++c<C);
|
|
||||||
|
|
||||||
celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, C, C, 0, LM, st->downsample, 0, st->arch);
|
celt_synthesis(mode, X, out_syn, oldBandE, start, effEnd, C, C, 0, LM, st->downsample, 0, st->arch);
|
||||||
} else {
|
} else {
|
||||||
int exc_length;
|
int exc_length;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue