[Vorbis-dev] Qyery on bark equation in floor0 code

Michael Smith msmith at xiph.org
Sun Dec 19 16:26:32 PST 2004


On Friday 17 December 2004 15:25, nagaraja.sreerama at wipro.com wrote:
> Hi All,
> I need some clarifications regarding the mismatch I found in the code
> and the specification.
>
> (a) In the specification, the bark(x) equation is given as:
>
> bark(x) = 13.1 atan(.00074x) + 2.24 atan(.0000000158(x^2)) + .0001x
>
> whereas in the code it is given as:
>
> #define toBARK(n)
> (13.1f*atan(.00074f*(n))+2.24f*atan((n)*(n)*1.85e-8f)+1e-4f*(n))
>
> Which one of these is the proper one ?

The one from the code is what is in wide use - it also matches more closely 
with the commonly quoted references for this scale. 

I'm pretty sure this is a typo in the spec - I'll wait to see if Monty replies 
before changing it, though. Thanks for picking up on it!

Mike



More information about the Vorbis-dev mailing list