Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.xiph.org/xiph/opus.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2012-11-07 10:14:29 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2012-11-07 18:03:43 +0400
commit5055cf8c1329dee30d5c633060fb872b53d7f40a (patch)
treea334721b26f356f2bc611424b3232041f68cec40 /celt/celt.c
parent06bab45fb4d604e15017152209e99141a9b1955e (diff)
Removes the need for lowband_scratch in quant_all_bands()
Diffstat (limited to 'celt/celt.c')
-rw-r--r--celt/celt.c22
1 files changed, 11 insertions, 11 deletions
diff --git a/celt/celt.c b/celt/celt.c
index 8c0014ce..1c8b65f6 100644
--- a/celt/celt.c
+++ b/celt/celt.c
@@ -2839,17 +2839,6 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
return frame_size/st->downsample;
}
- ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */
-
- c=0; do
- for (i=0;i<M*eBands[st->start];i++)
- X[c*N+i] = 0;
- while (++c<C);
- c=0; do
- for (i=M*eBands[effEnd];i<N;i++)
- X[c*N+i] = 0;
- while (++c<C);
-
if (dec == NULL)
{
ec_dec_init(&_dec,(unsigned char*)data,len);
@@ -2979,6 +2968,17 @@ int celt_decode_with_ec(CELTDecoder * OPUS_RESTRICT st, const unsigned char *dat
/* Decode fixed codebook */
ALLOC(collapse_masks, C*nbEBands, unsigned char);
+ ALLOC(X, C*N, celt_norm); /**< Interleaved normalised MDCTs */
+
+ c=0; do
+ for (i=0;i<M*eBands[st->start];i++)
+ X[c*N+i] = 0;
+ while (++c<C);
+ c=0; do
+ for (i=M*eBands[effEnd];i<N;i++)
+ X[c*N+i] = 0;
+ while (++c<C);
+
quant_all_bands(0, mode, st->start, st->end, X, C==2 ? X+N : NULL, collapse_masks,
NULL, pulses, shortBlocks, spread_decision, dual_stereo, intensity, tf_res,
len*(8<<BITRES)-anti_collapse_rsv, balance, dec, LM, codedBands, &st->rng);