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

jm at svn.xiph.org jm at svn.xiph.org
Thu Apr 13 17:11:53 PDT 2006


Author: jm
Date: 2006-04-13 17:11:50 -0700 (Thu, 13 Apr 2006)
New Revision: 11135

Modified:
   trunk/speex/libspeex/filters.c
Log:
minor tweak


Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2006-04-13 22:30:53 UTC (rev 11134)
+++ trunk/speex/libspeex/filters.c	2006-04-14 00:11:50 UTC (rev 11135)
@@ -789,12 +789,8 @@
    
    if (old_ener > new_ener)
       old_ener = new_ener;
-
-   if (new_ener<1)
-      new_ener=1;
-   if (old_ener<1)
-      old_ener=1;
-   ngain = DIV32_16(SUB32(SHL32(old_ener,15),1),new_ener);
+   ngain = DIV32_16(SHL32(EXTEND32(old_ener),15),ADD16(1,new_ener));
+   
    for (i=0;i<nsf;i++)
       new_exc[i] = MULT16_16_Q15(ngain, new_exc[i]);
 }



More information about the commits mailing list