[FFmpeg-devel] LIBMPEG2_BITSTREAM_READER vs. golomb.h

Loren Merritt lorenm
Mon Jul 14 03:02:38 CEST 2008


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.

--Loren Merritt



More information about the ffmpeg-devel mailing list