From 1a8bf37dbaa461d410c101d1be302a67b4927035 Mon Sep 17 00:00:00 2001 From: Jean-Marc Valin Date: Wed, 16 Mar 2011 22:03:15 -0400 Subject: Taking into account the start and end bands in CNG --- libcelt/celt.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libcelt/celt.c b/libcelt/celt.c index a0ac059..b6711ae 100644 --- a/libcelt/celt.c +++ b/libcelt/celt.c @@ -1988,6 +1988,11 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p VARDECL(celt_norm, X); VARDECL(celt_ener, bandE); celt_uint32 seed; + int effEnd; + + effEnd = st->end; + if (effEnd > st->mode->effEBands) + effEnd = st->mode->effEBands; ALLOC(freq, C*N, celt_sig); /**< Interleaved signal MDCTs */ ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */ @@ -1998,6 +2003,8 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p seed = st->rng; for (c=0;cmode->eBands[st->start]<mode->effEBands;i++) { int j; @@ -2012,11 +2019,24 @@ static void celt_decode_lost(CELTDecoder * restrict st, celt_word16 * restrict p } renormalise_vector(X+boffs, blen, Q15ONE); } + for (i=(st->mode->eBands[st->end]<rng = seed; denormalise_bands(st->mode, X, freq, bandE, st->mode->effEBands, C, 1<mode->eBands[st->start]<mode->eBands[effEnd]<downsample!=1) + bound = IMIN(bound, N/st->downsample); + for (i=bound;imode, 0, freq, out_syn, overlap_mem, C, LM); plc = 0; } else if (st->loss_count == 0) -- cgit v1.2.3