[Flac-dev] negative LPC shift
xflac at yahoo.com
Mon Dec 11 11:41:41 PST 2006
--- Miroslav Lichvar <lichvarm at phoenix.inf.upol.cz> wrote:
> >From the FLAC format description:
> <5> Quantized linear predictor coefficient shift needed in bits
> (NOTE: this number is signed two's-complement).
> What happens when the shift is negative?
> Problem is that libFLAC decoder (and possibly all other decoders)
> always '>>' operator and this operator shifts only to right.
> (int)x >> -1 is the same as (int)x >> 31.
wow, how has that gone unnoticed for so long! :) I'll have to add
a note to the format docs about that.
in practice I don't think a filter kernel that would require
negative shift would even be chosen as good by the encoder, even
if properly applied. supporting negative shift at the time was
more insurance against my incomplete understanding of LPC
Yahoo! Music Unlimited
Access over 1 million songs.
More information about the Flac-dev