removed stupid code in transient_analysis()
authorJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 1 Jun 2010 01:35:40 +0000 (21:35 -0400)
committerJean-Marc Valin <jean-marc.valin@usherbrooke.ca>
Tue, 1 Jun 2010 01:36:46 +0000 (21:36 -0400)
libcelt/celt.c

index 559720b..dcc0596 100644 (file)
@@ -302,9 +302,8 @@ static int transient_analysis(const celt_word32 * restrict in, int len, int C,
       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 @@ static int transient_analysis(const celt_word32 * restrict in, int len, int C,
    *frame_max = begin[len-overlap];
 
    RESTORE_STACK;
-   return ratio > 20;
+   return ratio > 4;
 }
 
 /** Apply window and compute the MDCT for all sub-frames and