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

Ralph Giles giles at xiph.org
Fri Dec 17 13:16:49 PST 2004


On Fri, Dec 17, 2004 at 09:55:39AM +0530, nagaraja.sreerama at wipro.com wrote:

> (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))

Ah, it is pointed out to me that the second atan arg is 1.58 or 1.85. 
Sorry.

I don't know, though I imagine following the code would be safer. Monty, 
do you have a preference?

 -r


More information about the Vorbis-dev mailing list