[FFmpeg-devel] [PATCH 2/4] lavc: add standalone cached bitstream reader
Andreas Rheinhardt
andreas.rheinhardt at outlook.com
Fri Jun 24 13:18:25 EEST 2022
Anton Khirnov:
> +/**
> + * Return n bits from the buffer, n has to be in the 0-32 range.
> + */
> +static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned int n)
> +{
> + if (!n)
> + return 0;
> +
> + if (n > bc->bits_left) {
> + refill_32(bc);
> + if (bc->bits_left < 32)
> + bc->bits_left = n;
This branch should be under #if !UNCHECKED_BITSTREAM_READER.
> + }
> +
> + return get_val(bc, n);
> +}
> +
More information about the ffmpeg-devel
mailing list