You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/diracdec: Handle the 0 vlc case at the top of coeff_unpack_golomb()
decoding changes from 17 to 20 fps Reviewed-by; Rostislav Pehlivanov <atomnuker@gmail.com> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -491,6 +491,12 @@ static inline int coeff_unpack_golomb(GetBitContext *gb, int qfactor, int qoffse
|
|||||||
UPDATE_CACHE(re, gb);
|
UPDATE_CACHE(re, gb);
|
||||||
buf = GET_CACHE(re, gb);
|
buf = GET_CACHE(re, gb);
|
||||||
|
|
||||||
|
if (buf & 0x80000000) {
|
||||||
|
LAST_SKIP_BITS(re,gb,1);
|
||||||
|
CLOSE_READER(re, gb);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
if (buf & 0xAA800000) {
|
if (buf & 0xAA800000) {
|
||||||
buf >>= 32 - 8;
|
buf >>= 32 - 8;
|
||||||
SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
|
SKIP_BITS(re, gb, ff_interleaved_golomb_vlc_len[buf]);
|
||||||
@@ -516,12 +522,12 @@ static inline int coeff_unpack_golomb(GetBitContext *gb, int qfactor, int qoffse
|
|||||||
|
|
||||||
coeff = ret - 1;
|
coeff = ret - 1;
|
||||||
}
|
}
|
||||||
if (coeff) {
|
|
||||||
coeff = (coeff * qfactor + qoffset) >> 2;
|
coeff = (coeff * qfactor + qoffset) >> 2;
|
||||||
sign = SHOW_SBITS(re, gb, 1);
|
sign = SHOW_SBITS(re, gb, 1);
|
||||||
LAST_SKIP_BITS(re, gb, 1);
|
LAST_SKIP_BITS(re, gb, 1);
|
||||||
coeff = (coeff ^ sign) - sign;
|
coeff = (coeff ^ sign) - sign;
|
||||||
}
|
|
||||||
CLOSE_READER(re, gb);
|
CLOSE_READER(re, gb);
|
||||||
return coeff;
|
return coeff;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user