Re: Double precision

Gabriel Bouvigne <[email protected]>
Newsgroups gmane.comp.audio.mp3.lame
Message-ID <[email protected]>
Le 22/06/2013 16:47, Thomas Orgis a écrit :
> It would be interesting to see if raised internal precision has any
> effect at all with 16 bit input. Disclaimer: I didn't work on LAME code
> myself, so don't know details on how the filters are implemented.

Using double instead of float has some effect, for sure, as the 
resulting file will be different. The question is then to know if this 
has any audible effect or not.

Changing compilation options, using assembly or not, or compiling for a 
different architecture (x86 vs x86_64) all have some impact on the 
resulting bitstream.

I actually asked about the reverse question (changing from double to 
float) in 2004:
http://osdir.com/ml/audio.mp3.lame/2004-05/msg00052.html

...so I suspect that I might actually be the one who changed the default 
to float latter on (that was a long time ago, so I'm not sure anymore).

Advantages of using floats over double were then :
* ability to use the vector unit (SSE) instead of FPU, even for 
processors which did not featured SSE2 instructions
* faster binary
* ability to use some SSE assembly/intrinsics (not sure if it's still 
there nowadays)

Even nowadays, with proper use of SSE you can crush twice as many floats 
as you could process double.
I'd even think that float over double might enable to get some 
significant speed boosts through proper use of SSE or GPGPU. 
Unfortunately, we don't have much SSE code in Lame, so this advantage is 
still mostly theoretical.

Regarding the quality difference, I suspect that double instead of float 
would only make a negligeable difference, which would be significantly 
less important that other changes (like improving our resampling filter, 
as an example).

-- 
Gabriel Bouvigne
www.mp3-tech.org
personal page: http://gabriel.mp3-tech.org


------------------------------------------------------------------------------
This SF.net email is sponsored by Windows:

Build for Windows Store.

http://p.sf.net/sfu/windows-dev2dev
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.