diff options
author | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-06-06 23:54:29 +0300 |
---|---|---|
committer | Jean-Marc Valin <jmvalin@jmvalin.ca> | 2016-07-16 00:51:45 +0300 |
commit | f1f7416304b43bda38267941f6e6cb7bc8cbff19 (patch) | |
tree | ccead5d60b295e98548855326400a6197fa9e8f6 | |
parent | 5e1d32b694ee001a697c13b6b8c3747acad07c72 (diff) |
Don't use too much temporal resolution on hybrid frames at low rate
Otherwise, we risk having "temporal holes" in the HF that anti-collapse
can't always fill in.
-rw-r--r-- | celt/celt_encoder.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/celt/celt_encoder.c b/celt/celt_encoder.c index 98cf4a88..29f67c94 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++) |