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

jm at svn.xiph.org jm at svn.xiph.org
Thu Aug 31 07:33:26 PDT 2006


Author: jm
Date: 2006-08-31 07:33:24 -0700 (Thu, 31 Aug 2006)
New Revision: 11824

Modified:
   trunk/speex/libspeex/mdf.c
Log:
Tuning for low-energy echo.


Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c	2006-08-31 14:19:47 UTC (rev 11823)
+++ trunk/speex/libspeex/mdf.c	2006-08-31 14:33:24 UTC (rev 11824)
@@ -635,7 +635,7 @@
    /* Compute a bunch of correlations */
    Sey = mdf_inner_prod(st->e+st->frame_size, st->y+st->frame_size, st->frame_size);
    See = mdf_inner_prod(st->e+st->frame_size, st->e+st->frame_size, st->frame_size);
-   See = ADD32(See, SHR32(EXTEND32(10000),6));
+   See = ADD32(See, SHR32(MULT16_16(N, 100),6));
    Syy = mdf_inner_prod(st->y+st->frame_size, st->y+st->frame_size, st->frame_size);
    Sxx = mdf_inner_prod(st->x+st->frame_size, st->x+st->frame_size, st->frame_size);
 
@@ -764,7 +764,7 @@
          /*st->power_1[i] = adapt_rate*r/(e*(1+st->power[i]));*/
          st->power_1[i] = FLOAT_SHL(FLOAT_DIV32_FLOAT(r,FLOAT_MUL32U(e,st->power[i]+10)),WEIGHT_SHIFT+16);
       }
-   } else {
+   } else if (Sxx > SHR32(MULT16_16(N, 1000),6)) {
       /* Temporary adaption rate if filter is not yet adapted enough */
       spx_word16_t adapt_rate=0;
 



More information about the commits mailing list