[xiph-cvs] cvs commit: vorbis/lib scales.h

Monty xiphmont at xiph.org
Mon Nov 6 16:15:09 PST 2000



xiphmont    00/11/06 16:15:09

  Modified:    lib      scales.h
  Log:
  No reason for todB(0) to be a value as large as 9e-38; use something a
  bit more reasonable to prevent overflows on platforms that care more
  about them.
  
  Monty

Revision  Changes    Path
1.8       +3 -3      vorbis/lib/scales.h

Index: scales.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/scales.h,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- scales.h	2000/11/06 00:07:02	1.7
+++ scales.h	2000/11/07 00:15:08	1.8
@@ -12,7 +12,7 @@
  ********************************************************************
 
  function: linear scale -> dB, Bark and Mel scales
- last mod: $Id: scales.h,v 1.7 2000/11/06 00:07:02 xiphmont Exp $
+ last mod: $Id: scales.h,v 1.8 2000/11/07 00:15:08 xiphmont Exp $
 
  ********************************************************************/
 
@@ -23,8 +23,8 @@
 
 /* 20log10(x) */
 #define DYNAMIC_RANGE_dB 200.
-#define todB(x)   ((x)==0?-9.e38:log(fabs(x))*8.6858896)
-#define todB_nn(x)   ((x)==0?-9.e38:log(x)*8.6858896)
+#define todB(x)   ((x)==0?-9.e20:log(fabs(x))*8.6858896)
+#define todB_nn(x)   ((x)==0?-400:log(x)*8.6858896)
 #define fromdB(x) (exp((x)*.11512925))
 
 

--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list