[Flac-dev] negative LPC shift

Miroslav Lichvar lichvarm at phoenix.inf.upol.cz
Sat Nov 18 14:02:19 PST 2006


>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) uses
always '>>' operator and this operator shifts only to right.
(int)x >> -1 is the same as (int)x >> 31.

-- 
Miroslav Lichvar


More information about the Flac-dev mailing list