Re: Double precision
Ove Karlsen <[email protected]>
| Newsgroups | gmane.comp.audio.mp3.lame |
|---|---|
| Message-ID | <[email protected]> |
On 6/30/2013 10:10 PM, Gabriel Bouvigne wrote: > 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). > Well the reason I raise the topic, is mainly one of principle. I think there is a small benefit, and that we can afford. Also see my post on not needing a filter and bitrates etc. I think it would be a good contemporary refresh of the encoder. Not that I am going to be snapping any whip here. I actually DID a search and replace of some floats, and managed to compile atleast the encoder. And first impression is that it does sound a bit more natural. That is typical for EQ´s aswell, etc. I always use double, and find floats to give a bit quantized sound, unless one is doing very little processing, no IIRs etc. Anyway it was just a suggestion, and most playback equipment will not benefit much. Peace Be With You! -- Ove Karlsen, www.ovekarlsen.com ------------------------------------------------------------------------------ This SF.net email is sponsored by Windows: Build for Windows Store. http://p.sf.net/sfu/windows-dev2dev