]> git.sesse.net Git - ffmpeg/commit
avcodec/on2avc: Unify initializing quad and pair VLCs
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Sun, 18 Oct 2020 05:20:43 +0000 (07:20 +0200)
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>
Wed, 21 Oct 2020 05:47:55 +0000 (07:47 +0200)
commit26cc9db744be8d5057a28c81cebb670197ac5692
tree8f55c4dd9fd7d3f086f947b90325ff73f0393359
parentfba8890628ece8a4c7ca479ea86d4ec309557384
avcodec/on2avc: Unify initializing quad and pair VLCs

Up until now, quad VLCs are initialized with codes of type uint32_t,
pair VLCs with codes of type uint16_t. There were two separate loops in
the decoder's init function for each type of VLC. This commit unifies
this: The type of the codes are now passed in as void * and the actual
size of the codes is obtained from a table. This approach also allows to
use the smallest type for each VLC code table: some quad tables actually
fitted in uint16_t. This allows to remove about 7KB from the binary.

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