From: Monty Date: Wed, 6 Mar 2002 04:07:58 +0000 (+0000) Subject: Rounding fix to the lookup version of toDB() X-Git-Tag: v1.3.3~805 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0fa973e107df364a8c477db0e59b390014d01779;p=platform%2Fupstream%2Flibvorbis.git Rounding fix to the lookup version of toDB() svn path=/trunk/vorbis/; revision=3124 --- diff --git a/lib/scales.h b/lib/scales.h index a4197d9..2d11298 100644 --- a/lib/scales.h +++ b/lib/scales.h @@ -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_LOOKUP[256]={ 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]); }