[xiph-commits] r11281 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Wed Apr 26 05:41:22 PDT 2006
Author: jm
Date: 2006-04-26 05:41:18 -0700 (Wed, 26 Apr 2006)
New Revision: 11281
Modified:
trunk/speex/libspeex/filters.c
Log:
enhancer fixed-point work
Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c 2006-04-26 01:15:34 UTC (rev 11280)
+++ trunk/speex/libspeex/filters.c 2006-04-26 12:41:18 UTC (rev 11281)
@@ -777,19 +777,20 @@
if (comb_gain>0)
{
#ifdef FIXED_POINT
- c1 = (MULT16_16_Q15(QCONST16(.4,15),comb_gain)+QCONST16(.07,15))/32768.;
+ c1 = (MULT16_16_Q15(QCONST16(.4,15),comb_gain)+QCONST16(.07,15));
+ c2 = .5+1.72*(c1/32768.-.07);
#else
c1 = .4*comb_gain+.07;
+ c2 = .5+1.72*(c1-.07);
#endif
- c2 = .5+1.72*(c1-.07);
} else
{
c1=c2=0;
}
- g1 = (1-c2*pgain1*pgain1);
+ g1 = 32768.*(1-c2*pgain1*pgain1);
if (g1<c1)
g1 = c1;
- g2 = (1-c2*pgain2*pgain2);
+ g2 = 32768.*(1-c2*pgain2*pgain2);
if (g2<c1)
g2 = c1;
g1 = c1/g1;
More information about the commits
mailing list