diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-09-11 23:34:51 -0400 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2013-09-11 23:34:51 -0400 |
commit | 54bddf0f1a83f37cfeb8519627beaa2422a86418 (patch) | |
tree | 350e6fce45212e14a2eac52294649173d0577b5f | |
parent | 978e4cb507b1fdb90d62e2b15537ebd56087b542 (diff) | |
download | opus-54bddf0f1a83f37cfeb8519627beaa2422a86418.tar.gz |
Surround analysis should now work for non-20ms frame sizes.
Not well tested.
-rw-r--r-- | src/opus_multistream_encoder.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/opus_multistream_encoder.c b/src/opus_multistream_encoder.c index 985a8413..3065b6f7 100644 --- a/src/opus_multistream_encoder.c +++ b/src/opus_multistream_encoder.c @@ -222,8 +222,7 @@ void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *b { int c; int i; - /* FIXME: pass LM properly */ - int LM=3; + int LM; int pos[8] = {0}; int upsample; int frame_size; @@ -237,6 +236,10 @@ void surround_analysis(const CELTMode *celt_mode, const void *pcm, opus_val16 *b upsample = resampling_factor(rate); frame_size = len*upsample; + for (LM=0;LM<=celt_mode->maxLM;LM++) + if (celt_mode->shortMdctSize<<LM==frame_size) + break; + ALLOC(in, frame_size+overlap, opus_val32); ALLOC(x, len, opus_val16); ALLOC(freq, frame_size, opus_val32); |