summaryrefslogtreecommitdiff
path: root/libavcodec/mpegaudiodata.h
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-18 02:19:53 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 17:51:47 +0100
commited33bbe678730ef1ffde77f20eb4c6afb7a6902c (patch)
treea46f589b105fca7f4290023d17474e12e98ad01e /libavcodec/mpegaudiodata.h
parent12e941df89aa0e2aa8c6b90bfef9d4127ae7063c (diff)
avcodec/mpegaudiodec: Hardcode tables to save space
The csa_tables (which always consist of 32 entries of four byte each, but the type depends upon whether the decoder is fixed or floating-point) are currently initialized once during decoder initialization; yet it turns out that this is actually no benefit: The code used to initialize these tables takes up 153 (fixed point) and 122 (floating point) bytes when compiled with GCC 9.3 with -O3 on x64, so it is better to just hardcode these tables. Essentially the same applies to the is_tables: They have a size of 128B each and the code to initialize them occupies 149 (fixed point) resp. 140 (floating point) bytes. So hardcode them, too. To make the origin of the tables clear, references to the code used to create them have been added. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/mpegaudiodata.h')
-rw-r--r--libavcodec/mpegaudiodata.h3
1 files changed, 0 insertions, 3 deletions
diff --git a/libavcodec/mpegaudiodata.h b/libavcodec/mpegaudiodata.h
index ec969353f3..01b1f88cd0 100644
--- a/libavcodec/mpegaudiodata.h
+++ b/libavcodec/mpegaudiodata.h
@@ -65,9 +65,6 @@ extern uint16_t ff_scale_factor_modshift[64];
extern const uint8_t ff_mpa_pretab[2][22];
-/* table for alias reduction (XXX: store it as integer !) */
-extern const float ff_ci_table[8];
-
/* Initialize tables shared between the fixed and
* floating point MPEG audio decoders. */
void ff_mpegaudiodec_common_init_static(void);