Quoting Andreas Rheinhardt (2022-06-23 20:56:00)
> Anton Khirnov:
> > + */
> > +static inline uint32_t bitstream_read(BitstreamContext *bc, unsigned int n)
> > +{
> > +if (!n)
> > +return 0;
>
> This makes this function a get_bitsz equivalent. Why is there no
> get_bits() equivalent fo
Quoting Andreas Rheinhardt (2022-06-24 14:30:58)
> Anton Khirnov:
> > From: Alexandra Hájková
> >
> > The cached bitstream reader was originally written by Alexandra Hájková
> > for Libav, with significant input from Kostya Shishkov and Luca Barbato.
> > It was then committed to FFmpeg in ca079b0
Anton Khirnov:
> From: Alexandra Hájková
>
> The cached bitstream reader was originally written by Alexandra Hájková
> for Libav, with significant input from Kostya Shishkov and Luca Barbato.
> It was then committed to FFmpeg in ca079b09549, by merging it with the
> implementation of the current
Andreas Rheinhardt:
> Anton Khirnov:
>> +/* Unwind the cache so a refill_32 can fill it again. */
>> +static inline void bitstream_unwind(BitstreamContext *bc)
>> +{
>> +int unwind = 4;
>> +int unwind_bits = unwind * 8;
>
> I'm surprised that you used signed types here.
>
>> +
>> +if
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->
Anton Khirnov:
> From: Alexandra Hájková
>
> The cached bitstream reader was originally written by Alexandra Hájková
> for Libav, with significant input from Kostya Shishkov and Luca Barbato.
> It was then committed to FFmpeg in ca079b09549, by merging it with the
> implementation of the current
From: Alexandra Hájková
The cached bitstream reader was originally written by Alexandra Hájková
for Libav, with significant input from Kostya Shishkov and Luca Barbato.
It was then committed to FFmpeg in ca079b09549, by merging it with the
implementation of the current bitstream reader.
This mer