Skips comb filter overlap when the parameters didn't change.
authorJean-Marc Valin <jmvalin@jmvalin.ca>
Fri, 31 Jan 2014 20:38:27 +0000 (15:38 -0500)
committerJean-Marc Valin <jmvalin@jmvalin.ca>
Fri, 31 Jan 2014 20:38:27 +0000 (15:38 -0500)
celt/celt.c

index b67c2d3..7e47ea4 100644 (file)
@@ -199,6 +199,9 @@ void comb_filter(opus_val32 *y, opus_val32 *x, int T0, int T1, int N,
    x2 = x[-T1  ];
    x3 = x[-T1-1];
    x4 = x[-T1-2];
+   /* If the filter didn't change, we don't need the overlap */
+   if (g0==g1 && T0==T1 && tapset0==tapset1)
+      overlap=0;
    for (i=0;i<overlap;i++)
    {
       opus_val16 f;