]> git.sesse.net Git - ffmpeg/commit
avcodec/imc: Make Huffman tables smaller
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 25 Oct 2020 14:35:00 +0000 (15:35 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 8 Dec 2020 16:51:45 +0000 (17:51 +0100)
commit200e8e80aa3405d811023547b6b116f6400e37ac
treeb3eb53a32ba0dac75d7be8bb75cf157acd768b52
parentb0094be719652948650e724cdb828ec63b95569f
avcodec/imc: Make Huffman tables smaller

The IMC decoder uses Huffman tables which are created at runtime from
length tables of type uint8_t and code tables of type uint16_t together
with an implicit symbols table (i.e. symbol[i] == i). This commit
changes this: All three tables are subjected to the same permutation to
order the codes from left to right in the tree; afterwards the codes can
be omitted because they are easily computable at runtime from the
lengths, whereas the symbols need to be explicitly coded now. But said
symbols fit into an uint8_t, so one saves space.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
libavcodec/imc.c
libavcodec/imcdata.h