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

Michael Smith msmith at xiph.org
Sat Sep 23 09:59:53 PDT 2000

msmith      00/09/23 09:59:53

  Modified:    lib      Tag: branch_jackoggsvorbis scales.h
  Since we're now using floats, -9e40 is -INF. Increase this to -9e38, which is small
  enough to work, and big enough that it has no effect on results (this sort of case
  is only reached for values of 0, which are later converted back to 0 by fromdB(), so
  it makes no difference in the end.

Revision  Changes    Path
No                   revision

No                   revision +3 -3      vorbis/lib/scales.h

Index: scales.h
RCS file: /usr/local/cvsroot/vorbis/lib/scales.h,v
retrieving revision
retrieving revision
diff -u -r1.5.6.1 -r1.
--- scales.h	2000/09/02 05:19:25
+++ scales.h	2000/09/23 16:59:53
@@ -12,7 +12,7 @@
  function: linear scale -> dB, Bark and Mel scales
- last mod: $Id: scales.h,v 2000/09/02 05:19:25 xiphmont Exp $
+ last mod: $Id: scales.h,v 2000/09/23 16:59:53 msmith Exp $
@@ -23,8 +23,8 @@
 /* 20log10(x) */
 #define DYNAMIC_RANGE_dB 200.
-#define todB(x)   ((x)==0?-9.e40:log(fabs(x))*8.6858896)
-#define todB_nn(x)   ((x)==0?-9.e40:log(x)*8.6858896)
+#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 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