[FFmpeg-devel] [PATCH] Use skip_bits_long for large constant skips

Siarhei Siamashka siarhei.siamashka
Wed May 13 10:40:47 CEST 2009

On Wed, May 13, 2009 at 11:19 AM, Reimar D?ffinger  wrote:
> On Wed, May 13, 2009 at 03:11:02AM -0400, David Conrad wrote:
>> I'm not sure what the largest amount skip_bits is guaranteed to
>> handle; I noticed a lot of 24 and 32 bit skip_bits that I didn't
>> change (they don't seem to break on arm at least.)
> The same as read_bits I think, so probably 17 bits?

Requirements are different for different bitstream readers. But if
"one size that fits them all" approach is taken, that would be 17

For A32_BITSTREAM_READER, this limit is higher, and that's about the
only advantage it has (IIRC it is/was only faster for ffmp3 on ARM,
but slower for the majority of other codecs).
If these skips are in the performance critical path, then
get_bits/skip_bits logic could be tweaked to take advantage of every
bitstream reader.

The default ALT_BITSTREAM_READER has no limitation for skipping bits.

More information about the ffmpeg-devel mailing list