[CELT-dev] Possible bug in "pitch_downsample"

John Ridges
Tue, 16 Nov 2010 14:26:08 -0000

Hi Jean-Marc,

I could be way off base here, but it seems to me that line 115 in
pitch.c in the function "pitch_downsample":

       x_lp[i] =
SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), SIG_SHIFT+2);

should actually be:

       x_lp[i] +=
SHR32(HALF32(HALF32(x[1][(2*i-1)]+x[1][(2*i+1)])+x[1][2*i]), SIG_SHIFT+2);

Sorry if I'm totally misreading things and just wasting your time.

Cheers,

John Ridges