diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-03 04:39:16 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2022-09-05 14:27:58 +0200 |
commit | 764cacfdb60faba00cee057c347c2168ac006814 (patch) | |
tree | 07492d31786e4612191b0df1989a63e6e6375ef0 /compat/dispatch_semaphore/semaphore.h | |
parent | 6b1a7fc8bd473aa4e644a64335eb93044647f96d (diff) | |
download | ffmpeg-764cacfdb60faba00cee057c347c2168ac006814.tar.gz |
avcodec/cfhddata: Avoid code tables
cfhddata.c initializes a RL VLC table via code tables and
corresponding tables for length, run and level. code and length
tables are used to initialize a VLC, no symbol table is used.
Afterwards the symbols of said VLC are just the indices of
the corresponding entries in the code and length table that
were used for initialization; they can therefore be used
to get the matching level and run entry and they are not used
for anything else. Therefore one can just permute these tables
without changing the resulting RL VLC tables.
This commit does just this. It permutes these tables so that
the code tables are ordered from left to right in the resulting
tree and then switches to ff_init_vlc_from_lengths(), which
allows to remove the codes table altogether.
Given that these tables are constructed on the stack, this
also reduces stack usage, potentially fixing part of #9399.
(The size of the tables on the stack decreases from 4752 to
2640.)
Reviewed-by: Paul B Mahol <onemda@gmail.com>
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'compat/dispatch_semaphore/semaphore.h')
0 files changed, 0 insertions, 0 deletions