Transient detection fix for the case where a transient occurs during the overlap
authorJean-Marc Valin <jean-marc.valin@octasic.com>
Fri, 15 Oct 2010 18:17:13 +0000 (14:17 -0400)
committerJean-Marc Valin <jean-marc.valin@octasic.com>
Fri, 15 Oct 2010 18:17:13 +0000 (14:17 -0400)
libcelt/celt.c

index a7ae0c2..fc67db5 100644 (file)
@@ -260,7 +260,7 @@ static int transient_analysis(const celt_word32 * restrict in, int len, int C,
    if (len>360+overlap)
    {
       *frame_max = 0;
-      for (i=len-360-overlap;i<len;i++)
+      for (i=len-360-overlap;i<len-overlap;i++)
          *frame_max = MAX32(*frame_max, ABS32(tmp[i]));
    }
    RESTORE_STACK;