[Flac-dev] Support for CAF in flac command-line?
Brian Willoughby
brianw at sounds.wa.com
Mon Mar 7 08:25:53 PST 2011
On Mar 6, 2011, at 01:22, Erik de Castro Lopo wrote:
> Brian Willoughby wrote:
>> Hopefully, libsndfile no longer uses the incorrect 0x7FFF (32767)
>> factor for float to 16-bit integer conversions, because that would
>> make it unacceptable for lossless file conversions.
>
> That is a statement of opinion rather than fact but I won't go into
> that here.
It is a statement of mathematical fact, not opinion.
Any conversion factor with more than exactly one significant bit is
lossy by definition. The coincidental fact that certain rounding and
truncation processes happen to recover the correct result under some
conditions does not disprove the basic mathematics.
All professional tools use conversion factors such as 0x8000 for
float-to-int and int-to-float because it has a single significant
bit, and thus this factor does not increase the bit depth of the
samples passing through.
There are a number of erroneous software tools out there in the wild
based on mistaken assumptions. One common misconception is that +1.0
is a valid value for two complement representations, which leads
people to synthesize test signals using the standard sin() and cos()
functions, but those are also flawed techniques.
Brian Willoughby
Sound Consulting
More information about the Flac-dev
mailing list