diff options
author | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-07 04:12:13 +0200 |
---|---|---|
committer | Andreas Rheinhardt <andreas.rheinhardt@outlook.com> | 2021-05-12 06:00:14 +0200 |
commit | b43e946b71e144a4ce5e83cd18e5a07155edb26f (patch) | |
tree | df26ccfbe9cbe32a334db8cd50bc8acdddfcde00 /libavcodec/mvcdec.c | |
parent | 65462185721e3686e27f22e952485ffc4ebd6f97 (diff) | |
download | ffmpeg-b43e946b71e144a4ce5e83cd18e5a07155edb26f.tar.gz |
avcodec/mqc: Hardcode tables to save space
mqc currently initializes three arrays at runtime; each of them
has 2 * 47 elements, one is uint16_t, two are uint8_t, so that their
combined size is 8 * 47. The source data for these initializations
is contained in an array of 47 elements of size six. Said array is
only used in order to initialize the other arrays, so the savings
are just 2 * 47B. Yet this is dwarfed by the size of the code for
performing the initializations: It is 109B (GCC 10.2, x64, -O3 albeit
in an av_cold function); this does not even include the size of the
code in the callers. So just hardcode these tables.
This also fixes a data race, because the encoder always initialized
these tables during init, although they might already be used at the
same time by already running encoder/decoder instances.
Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/mvcdec.c')
0 files changed, 0 insertions, 0 deletions