[FFmpeg-devel] [PATCH 7/7] avcodec/webp: Use LE VLC table for LE bitstream reader

Paul B Mahol onemda at gmail.com
Mon Oct 12 12:48:26 EEST 2020


On Mon, Oct 12, 2020 at 10:12:17AM +0200, Andreas Rheinhardt wrote:
> The WebP format uses Huffman tables and the decoder therefore uses
> VLC tables. Given that WebP is a LE format, a LE bitreader is used;
> yet the VLC table is not created for a LE reader (the process used to
> create the tables puts the last bit to be read in the lowest bit) and
> therefore custom code for reading the VLCs that reverses the bits
> read is used instead of get_vlc2(). This commit changes this to use
> a table designed for LE bitreader which allows to use get_vlc2() directly.
> The necessary reversing of the codes is delegated to
> ff_init_vlc_sparse() (and is therefore only done during init and not
> when actually reading the VLCs).

lgtm


More information about the ffmpeg-devel mailing list