aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/adpcm_data.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-07 04:12:13 +0200
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2021-05-12 06:00:14 +0200
commitb43e946b71e144a4ce5e83cd18e5a07155edb26f (patch)
treedf26ccfbe9cbe32a334db8cd50bc8acdddfcde00 /libavcodec/adpcm_data.c
parent65462185721e3686e27f22e952485ffc4ebd6f97 (diff)
downloadffmpeg-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/adpcm_data.c')
0 files changed, 0 insertions, 0 deletions