summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-06 16:54:29 -0400
committerJean-Marc Valin <jmvalin@jmvalin.ca>2016-06-06 17:54:05 -0400
commit46b03492fc22632feb9e9504a803f499c938e69c (patch)
treef9c12e3bd3d9d4f3ccd243cea99fa4b3fa328f26
parent81bf13c307730944e530dc2ba4ffbfa5813aa432 (diff)
downloadopus-exp_hybrid_tune2.tar.gz
Don't use too much temporal resolution on hybrid frames at low rateexp_hybrid_tune2
Otherwise, we risk having "temporal holes" in the HF that anti-collapse can't always fill in.
-rw-r--r--celt/celt_encoder.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c
index e8eff5cf..85b31996 100644
--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1772,6 +1772,13 @@ int celt_encode_with_ec(CELTEncoder * OPUS_RESTRICT st, const opus_val16 * pcm,
tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, &tf_sum, tf_estimate, tf_chan);
for (i=effEnd;i<end;i++)
tf_res[i] = tf_res[effEnd-1];
+ } else if (hybrid && effectiveBytes<15)
+ {
+ /* For low bitrate hybrid, we force temporal resolution to 5 ms rather than 2.5 ms. */
+ tf_sum = 0;
+ for (i=0;i<end;i++)
+ tf_res[i] = 0;
+ tf_select=isTransient;
} else {
tf_sum = 0;
for (i=0;i<end;i++)