[xiph-commits] r8882 - trunk/speex/libspeex
jm at motherfish-iii.xiph.org
jm at motherfish-iii.xiph.org
Tue Feb 8 20:10:51 PST 2005
Author: jm
Date: 2005-02-08 20:10:50 -0800 (Tue, 08 Feb 2005)
New Revision: 8882
Modified:
trunk/speex/libspeex/filters.c
Log:
Cleared the last float ops from the comb filter
Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c 2005-02-09 03:56:13 UTC (rev 8881)
+++ trunk/speex/libspeex/filters.c 2005-02-09 04:10:50 UTC (rev 8882)
@@ -488,7 +488,16 @@
exc_energy+=((float)exc[i])*exc[i];*/
/*Some gain adjustment if pitch is too high or if unvoiced*/
+#ifdef FIXED_POINT
{
+ spx_word16_t g = gain_3tap_to_1tap(pitch_gain)+gain_3tap_to_1tap(mem->last_pitch_gain);
+ if (g > 166)
+ comb_gain = MULT16_16_Q15(DIV32_16(SHL(165,15),g), comb_gain);
+ if (g < 64)
+ comb_gain = MULT16_16_Q15(SHL(g, 9), comb_gain);
+ }
+#else
+ {
float g=0;
g = GAIN_SCALING_1*.5*(gain_3tap_to_1tap(pitch_gain)+gain_3tap_to_1tap(mem->last_pitch_gain));
if (g>1.3)
@@ -496,6 +505,7 @@
if (g<.5)
comb_gain*=2.*g;
}
+#endif
step = DIV32(COMB_STEP, nsf);
fact=0;
More information about the commits
mailing list