shithub: opus

Download patch

ref: 816f89356900199bc688a9d2033dfd00f6e815c8
parent: 4f0de0ba6a0b8edb6f386f948ab51bf1df209283
author: Jean-Marc Valin <[email protected]>
date: Mon May 31 17:35:40 EDT 2010

removed stupid code in transient_analysis()

--- a/libcelt/celt.c
+++ b/libcelt/celt.c
@@ -302,9 +302,8 @@
       ratio = 0;
    if (ratio > 1000)
       ratio = 1000;
-   ratio *= ratio;
 
-   if (ratio > 2048)
+   if (ratio > 45)
       *transient_shift = 3;
    else
       *transient_shift = 0;
@@ -313,7 +312,7 @@
    *frame_max = begin[len-overlap];
 
    RESTORE_STACK;
-   return ratio > 20;
+   return ratio > 4;
 }
 
 /** Apply window and compute the MDCT for all sub-frames and