shithub: opus

Download patch

ref: cd84e3d0f405016b3a68658e04ec53280b90d6c6
parent: 428a77d6bddab3ea10e31de4b054430c137c8117
author: Jean-Marc Valin <[email protected]>
date: Thu Dec 16 17:29:35 EST 2010

Re-enabling post-filter on 2.5 ms frames

Also, now forcing MS stereo for 2.5 frames because the current
analysis isn't reliable.

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -822,7 +822,7 @@
       } while (++c<C);
 
 #ifdef ENABLE_POSTFILTER
-      if (LM != 0 && nbAvailableBytes>10*C)
+      if (nbAvailableBytes>12*C)
       {
          VARDECL(celt_word16, pitch_buf);
          ALLOC(pitch_buf, (COMBFILTER_MAXPERIOD+N)>>1, celt_word16);
@@ -1084,7 +1084,11 @@
 
    if (C==2)
    {
-      dual_stereo = stereo_analysis(st->mode, X, st->mode->nbEBands, LM, C, N);
+      /* Always use MS for 2.5 ms frames until we can do a better analysis */
+      if (LM==0)
+         dual_stereo = 0;
+      else
+         dual_stereo = stereo_analysis(st->mode, X, st->mode->nbEBands, LM, C, N);
       ec_enc_bit_prob(enc, dual_stereo, 32768);
    }
    if (C==2)