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

jm at svn.xiph.org jm at svn.xiph.org
Sat Jun 16 06:51:31 PDT 2007


Author: jm
Date: 2007-06-16 06:51:30 -0700 (Sat, 16 Jun 2007)
New Revision: 13135

Modified:
   trunk/speex/libspeex/vorbis_psy.h
Log:
Fixed a rare crash using vorbis-psy


Modified: trunk/speex/libspeex/vorbis_psy.h
===================================================================
--- trunk/speex/libspeex/vorbis_psy.h	2007-06-16 02:40:46 UTC (rev 13134)
+++ trunk/speex/libspeex/vorbis_psy.h	2007-06-16 13:51:30 UTC (rev 13135)
@@ -39,7 +39,7 @@
 #define NOISE_COMPAND_LEVELS 40
 
 
-#define todB(x)   ((x)==0?-400.f:log((x)*(x))*4.34294480f)
+#define todB(x)   ((x)>1e-13?log((x)*(x))*4.34294480f:-30)
 #define fromdB(x) (exp((x)*.11512925f))  
 
 /* The bark scale equations are approximations, since the original



More information about the commits mailing list