shithub: opus

Download patch

ref: 7780d4a6b16822498723235c7e34d9c0f62809fb
parent: 1484591656533c36b67615f7dd89e82c467b5f14
author: Jean-Marc Valin <[email protected]>
date: Wed Jun 8 11:19:03 EDT 2016

Retuning the tf_analysis() lambda

Increasing the value at low rate seems to help a bit.

--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1758,15 +1758,7 @@
    if (effectiveBytes>=15*C && !hybrid && st->complexity>=2 && !st->lfe)
    {
       int lambda;
-      if (effectiveBytes<40)
-         lambda = 12;
-      else if (effectiveBytes<60)
-         lambda = 6;
-      else if (effectiveBytes<100)
-         lambda = 4;
-      else
-         lambda = 3;
-      lambda*=2;
+      lambda = IMAX(5, 1280/effectiveBytes + 2);
       tf_select = tf_analysis(mode, effEnd, isTransient, tf_res, lambda, X, N, LM, tf_estimate, tf_chan);
       for (i=effEnd;i<end;i++)
          tf_res[i] = tf_res[effEnd-1];