shithub: opus

Download patch

ref: 3a56c9e1c67e4af4748484bfb35ed207f200748e
parent: eafd8a7f1772ebb8b8608c0ce2e21afd0f971e0a
author: Jean-Marc Valin <[email protected]>
date: Sun Jan 23 06:34:55 EST 2011

prefilter/postfilter now forced off in Opus hybrid mode

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -966,7 +966,7 @@
       pf_threshold = MAX16(pf_threshold, QCONST16(.2f,15));
       if (gain1<pf_threshold)
       {
-         if(tell+15<=total_bits)
+         if(st->start==0 && tell+17<=total_bits)
             ec_enc_bit_logp(enc, 0, 1);
          gain1 = 0;
          pf_on = 0;
@@ -997,7 +997,7 @@
       }
       /*printf("%d %f\n", pitch_index, gain1);*/
 #else /* ENABLE_POSTFILTER */
-      if(tell+17<=total_bits)
+      if(st->start==0 && tell+17<=total_bits)
          ec_enc_bit_logp(enc, 0, 1);
       pf_on = 0;
 #endif /* ENABLE_POSTFILTER */
@@ -2018,7 +2018,7 @@
    postfilter_gain = 0;
    postfilter_pitch = 0;
    postfilter_tapset = 0;
-   if (tell+17 <= total_bits)
+   if (st->start==0 && tell+17 <= total_bits)
    {
       if(ec_dec_bit_logp(dec, 1))
       {