[xiph-cvs] cvs commit: vorbis/lib scales.h
Monty
xiphmont at xiph.org
Tue Mar 5 20:07:59 PST 2002
xiphmont 02/03/05 20:07:59
Modified: lib scales.h
Log:
Rounding fix to the lookup version of toDB()
Revision Changes Path
1.19 +2 -2 vorbis/lib/scales.h
Index: scales.h
===================================================================
RCS file: /usr/local/cvsroot/vorbis/lib/scales.h,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- scales.h 2001/12/22 05:17:11 1.18
+++ scales.h 2002/03/06 04:07:58 1.19
@@ -11,7 +11,7 @@
********************************************************************
function: linear scale -> dB, Bark and Mel scales
- last mod: $Id: scales.h,v 1.18 2001/12/22 05:17:11 segher Exp $
+ last mod: $Id: scales.h,v 1.19 2002/03/06 04:07:58 xiphmont Exp $
********************************************************************/
@@ -92,7 +92,7 @@
static float todB(const float *x){
ogg_int32_t *i=(ogg_int32_t *)x;
- ogg_int32_t temp=((*i&0x7fffffff)-0x33cfffff)>>20;
+ ogg_int32_t temp=((*i&0x7fffffff)-0x33c7ffff)>>20;
if(temp<0)return -400.f;
return(todB_LOOKUP[temp]);
}
<p><p><p>--- >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