[flac-dev] Supporting 32 bit data
lvqcl
lvqcl.mail at gmail.com
Thu Oct 1 09:14:28 PDT 2015
Erik de Castro Lopo wrote:
> a request for support of 32 bit audio data. The request has been around
> since 2008.
>
> Thoughts?
As far as I understand: FLAC tries to predict an input signal,
calculates the difference between real and predicted signal (=residual).
Currently libFLAC stores residual signal as 32-bit signed int. And there
are the following comments in stream_encoder.c:
1) bps + FLAC__MAX_EXTRA_RESIDUAL_BPS is the maximum assumed size
of the average residual magnitude
2) abs(INT_MIN) is undefined, but if the residual is INT_MIN we have bigger problems
So it seems that current libFLAC algorithms require 36 bits for residual
signal if an input signal is 32 bit.
Of course, it's possible to allow only verbatim and constant subframes
for signals with bps > 28(?). Not sure that it's a good solution.
More information about the flac-dev
mailing list