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

nagaraja.sreerama at wipro.com nagaraja.sreerama at wipro.com
Thu Dec 16 20:25:39 PST 2004


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 ?

(b) Also, we are planning to implement a fixed point code for the Vorbis
decoder. And as usual the obvious criteria is the compliance and how
accurately this fixed point code should generate the output that matches
mathematically the floating code implementation. Specifically I feel
that the tremor code implements the linear approximation depending on
some specific baud scales (0, 100, 200, 301, 405, 516 etc...). I have a
feeling that this leads to some inaccuracy in the results compared to
the floating point code. Is this acceptable ? What is the basis for
acceptance say the algorithm should mathematically match the
specification ?

Can somebody throw light on this ?

Best regards,
nags..




Confidentiality Notice

The information contained in this electronic message and any attachments to this message are intended
for the exclusive use of the addressee(s) and may contain confidential or privileged information. If
you are not the intended recipient, please notify the sender at Wipro or Mailadmin at wipro.com immediately
and destroy all copies of this message and any attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/vorbis-dev/attachments/20041217/d8dcac94/attachment.html


More information about the Vorbis-dev mailing list