[FFmpeg-devel] [PATCH 2/4] lavc: add standalone cached bitstream reader

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Fri Jun 24 15:30:58 EEST 2022


Anton Khirnov:
> From: Alexandra Hájková <alexandra.khirnova at gmail.com>
> 
> 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 merge makes the code of get_bits.h significantly harder to read,
> since it now contains two different bitstream readers interleaved with
>  #ifdefs. Additionally, the code was committed without proper authorship
> attribution.
> 
> This commit re-adds the cached bitstream reader as a standalone header,
> as it was originally developed. It will be made useful in following
> commits.
> 
> Integration by Anton Khirnov.
> 
> Signed-off-by: Anton Khirnov <anton at khirnov.net>
> ---

One thing I wanted to tell in all my previous mails, but forgot: The
bitstream prefix is way too long. Why not use just e.g. bits? The only
function whose name starts with "bits_" is bits_to_store in
lavc/sonic.c, so clashes are not an issue.

- Andreas


More information about the ffmpeg-devel mailing list