]> git.sesse.net Git - ffmpeg/commit
avcodec/rv10: Reduce the size of the tables used to initialize VLCs
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 27 Oct 2020 19:36:32 +0000 (20:36 +0100)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Tue, 8 Dec 2020 16:51:45 +0000 (17:51 +0100)
commite730b1558367614ef396df596425a462a56739df
tree5943f961fa1054707a9153ae463ff112320a2324
parent7eef70a001b210146a817a732a63e1451699a99e
avcodec/rv10: Reduce the size of the tables used to initialize VLCs

This can be achieved by switching to ff_init_vlc_from_lengths() which
allows to replace two uint16_t tables for codes with uint8_t tables for
the symbols by permuting the tables so that the codes are ordered from
left to right in the tree in which case they can be easily computed from
the lengths at runtime.

And after doing so, it became apparent that the tables for the symbols
are actually the same for luma and chroma, so that one can even omit one
of them.

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