shithub: opus

Download patch

ref: 8229f07d3bfbef53f1d89cfd371b4deed6f92227
parent: 92d2492bfdbea8267faf0e6a6fbba09a5ffa7b1c
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Mon Jun 6 12:54:29 EDT 2016

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.

--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1772,6 +1772,13 @@
       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++)