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-20 08:17:06 +0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2013-02-10 09:15:49 +0400
commit2a5f0565b8b037c0d32fc471544e7d32a9f010fe (patch)
tree38d97639bd418580cfc4a89bcc1ef08b83489cc7
parent48ac122141c317964fae2987eaea161c46538717 (diff)
Running transient_analysis() even for 2.5 ms frames
This means 2.5 ms frames can now use a higher bitrate for transients.
-rw-r--r--celt/celt_encoder.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index fd811360..1b5426a7 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1298,16 +1298,18 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
isTransient = 0;
shortBlocks = 0;
+ if (st->complexity >= 1)
+ {
+ isTransient = transient_analysis(in, N+st->overlap, CC,
+ &tf_estimate, &tf_chan);
+ }
if (LM>0 && ec_tell(enc)+3<=total_bits)
{
- if (st->complexity >= 1)
- {
- isTransient = transient_analysis(in, N+st->overlap, CC,
- &tf_estimate, &tf_chan);
- if (isTransient)
- shortBlocks = M;
- }
+ if (isTransient)
+ shortBlocks = M;
ec_enc_bit_logp(enc, isTransient, 3);
+ } else {
+ isTransient = 0;
}
ALLOC(freq, CC*N, celt_sig); /**< Interleaved signal MDCTs */