[xiph-commits] r14503 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Wed Feb 13 14:08:19 PST 2008


Author: jm
Date: 2008-02-13 14:08:18 -0800 (Wed, 13 Feb 2008)
New Revision: 14503

Modified:
   trunk/speex/libspeex/mdf.c
Log:
Thorvald Natvig: Fix for the fixed-point scaling of impulse response query


Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c	2008-02-13 21:50:25 UTC (rev 14502)
+++ trunk/speex/libspeex/mdf.c	2008-02-13 22:08:18 UTC (rev 14503)
@@ -1180,13 +1180,13 @@
          {
 #ifdef FIXED_POINT
             for (i=0;i<N;i++)
-               st->wtmp2[i] = EXTRACT16(PSHR32(st->W[j*N+i],16));
+               st->wtmp2[i] = EXTRACT16(PSHR32(st->W[j*N+i],16+NORMALIZE_SCALEDOWN));
             spx_ifft(st->fft_table, st->wtmp2, st->wtmp);
 #else
             spx_ifft(st->fft_table, &st->W[j*N], st->wtmp);
 #endif
             for(i=0;i<n;i++)
-               filt[j*n+i] = PSHR32(MULT16_16(32767,st->wtmp[i]), WEIGHT_SHIFT);
+               filt[j*n+i] = PSHR32(MULT16_16(32767,st->wtmp[i]), WEIGHT_SHIFT-NORMALIZE_SCALEDOWN);
          }
       }
          break;



More information about the commits mailing list