[FFmpeg-devel] LIBMPEG2_BITSTREAM_READER vs. golomb.h
Mon Jul 14 21:30:10 CEST 2008
On Mon, 14 Jul 2008, M?ns Rullg?rd wrote:
> Loren Merritt <lorenm at u.washington.edu> writes:
>> On Mon, 14 Jul 2008, M?ns Rullg?rd wrote:
>>> To avoid future mishaps, I was thinking of adding a preprocessor check
>>> to golomb.h (I'm too lazy to try to make it work). What exactly is
>>> the requirement here? The code seems to assume 32 bits are available,
>>> even though ALT_BITSTREAM_READER only promises 25 bits. Clearly,
>>> those 25 bits are sufficient for actual data. Briefly looking at the
>>> H.264 spec, I can't find any mention of a maximum length for
>>> exp-golomb codes. Did I miss something, or is there really no limit?
>> The standard doesn't specify a bit limit as such, but the largest
>> syntax element that's golomb coded is mvd=+/-4095.75 which is 29 bits.
> Does that mean our reader would fail, if such a long golomb code were
Yes. I simply haven't ever seen a stream with such long mvs.
More information about the ffmpeg-devel