[Speex-dev] Speex inner_prod()

Jerry Trantow jtrantow at ieee.org
Fri Feb 3 09:27:07 PST 2006

I am overriding the inner product routine in ltp.c.  To test my replacement,
I threw some test vectors at it.  I understand the loss of resolution caused
by the shift.  I also see a FIXED_POINT danger with the summation of four
mults overflowing the 32 bit before the shift.  

I can fix this by accumulating each term into a long, but if the code scales
the x[],y[] vectors to avoid this problem I could use parallel 16x16

You can see this problem with the following test case.

for (i=0;i<40;i++)
sum0=inner_prod(x, y, 40);

Jerry J. Trantow
Applied Signal Processing, Inc.
jtrantow at ieee.org

More information about the Speex-dev mailing list