diff options
author | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-10-25 17:54:44 +0100 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@gmail.com> | 2020-12-08 17:51:45 +0100 |
commit | c82a559e6fcccf5a96a10602704329c57c84f471 (patch) | |
tree | 3f8eec22998834ae0276cbbae44c53ef86aade74 /libavcodec/vp8.h | |
parent | c055d8f0263ba051eedd93b357c9d9570df686d9 (diff) | |
download | ffmpeg-c82a559e6fcccf5a96a10602704329c57c84f471.tar.gz |
avcodec/clearvideo: Avoid code tables for initializing VLCs
The ClearVideo decoder uses VLC tables that are initialized at runtime
from static length, symbol and codes tables. Yet the code tables can be
omitted by subjecting all of these tables to the permutation that orders
the codes from left to right in the tree. After this is done, the codes
can be easily computed at runtime from the lengths and therefore
omitted. This saves about 10KB.
Only one minor complication is encountered when doing so: The tree
corresponding to the AC VLC codes is incomplete; but this can be
handled by adding an entry with negative length.
Furthermore, there are also VLCs that are only initialized with lengths
and codes tables with codes of type uint16_t. These have also been
switched to ff_init_vlc_from_lengths() as this means that one can
replace the uint16_t codes tables with uint8_t symbols tables.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/vp8.h')
0 files changed, 0 insertions, 0 deletions