shithub: opus

Download patch

ref: cdcb2f7d2bde62759cc14cc40efd8f304218008e
parent: e04e86e0e7067bfc895dc71e0c74c00b312071c5
author: Jean-Marc Valin <jmvalin@jmvalin.ca>
date: Thu Feb 15 09:58:53 EST 2018

Disabling weak transients and 5ms resolution on voiced frames

--- a/celt/celt_encoder.c
+++ b/celt/celt_encoder.c
@@ -1687,7 +1687,7 @@
       /* Reduces the likelihood of energy instability on fricatives at low bitrate
          in hybrid mode. It seems like we still want to have real transients on vowels
          though (small SILK quantization offset value). */
-      int allow_weak_transients = hybrid && effectiveBytes<15 && st->silk_info.offset >= 100;
+      int allow_weak_transients = hybrid && effectiveBytes<15 && st->silk_info.signalType != 2;
       isTransient = transient_analysis(in, N+overlap, CC,
             &tf_estimate, &tf_chan, allow_weak_transients, &weak_transient);
    }
@@ -1886,7 +1886,7 @@
       for (i=0;i<end;i++)
          tf_res[i] = 1;
       tf_select=0;
-   } else if (hybrid && effectiveBytes<15)
+   } else if (hybrid && effectiveBytes<15 && st->silk_info.signalType != 2)
    {
       /* For low bitrate hybrid, we force temporal resolution to 5 ms rather than 2.5 ms. */
       for (i=0;i<end;i++)