[Flac-dev] floating point
Didier Dambrin
didid at skynet.be
Fri Aug 7 07:42:16 PDT 2009
Hi,
I've tried to find info about unofficial 32bit float support in FLAC, and found several conversations.
Most of them were talking about a 24bit limit, but from the manual I guess that this limitation is gone, as it supports up to 32bit integer.
So my question is, what would be the best way, or what is a common way to FLAC-encode floating point audio?
The first idea is obvious, we have a 32bit float, FLAC supports 32bit integer, and it's lossless. So I'd just make it encode 32bit float, it's lossless afterall.
2 problems, first I would suspect it wouldn't encode very well, since the data wouldn't be "audio" anymore, right? It would be like trying to FLAC-encode random data.
So I tried FLACing white noise, and comp ratio was pretty poor, confirming this. Interestingly, it still did a better job than ZIP!
The second problem would be that no other tool would read them correctly anyway.
The second idea is to truncate & use it as a lossy encoder, which can be "audibly lossless" anyway. But what's a common practice here?
I would be tempted to leave 1 bit of headroom above 0dB, or maybe 2 bits. Normalizing before encoding could be an option, but the gain would then have to be inserted in a tag.
& finally, what bit depth? 24? 25, 26? 32?
I know there's no right answer, just asking if there are common practices.
Thanks.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/flac-dev/attachments/20090807/9269a2e3/attachment.htm
More information about the Flac-dev
mailing list