Good catch by John Ridges
authorJean-Marc Valin <jean-marc.valin@octasic.com>
Tue, 16 Nov 2010 15:55:38 +0000 (10:55 -0500)
committerJean-Marc Valin <jean-marc.valin@octasic.com>
Tue, 16 Nov 2010 15:55:38 +0000 (10:55 -0500)
libcelt/pitch.c

index bff5c70..e7d2e6a 100644 (file)
@@ -112,7 +112,7 @@ void pitch_downsample(celt_sig * restrict x[], celt_word16 * restrict x_lp, int
    if (C==2)
    {
       for (i=1;i<len>>1;i++)
-      x_lp[i] = SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), SIG_SHIFT+2);
+         x_lp[i] += SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), SIG_SHIFT+2);
       x_lp[0] += SHR32(HALF32(HALF32(x[1][1])+x[1][0]), SIG_SHIFT+2);
       *xmem += x[1][end-1];
    }