summaryrefslogtreecommitdiff
path: root/libavcodec/aacdec_fixed.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-11-22 20:09:02 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@gmail.com>2020-12-08 17:51:48 +0100
commitfc5d22abe40e0ab5b603b69752288565c92de670 (patch)
tree90a5aea0789ca5532b4bcb2528f5f7840052b032 /libavcodec/aacdec_fixed.c
parent8c9404b8d27b8f2c187709d5c4fa51e75c918a0b (diff)
downloadffmpeg-fc5d22abe40e0ab5b603b69752288565c92de670.tar.gz
avcodec/aacdec, aactab: Move kbd tables to their only user
The floating point kbd tables for 120 and 960 samples are only used by the floating point decoder whereas the fixed point kbd tables for 128 and 1024 samples are only used by the fixed point AAC decoder. So move these tables to their only users. This ensures that they are not accidentally used somewhere else without ensuring that initializing these tables stays thread-safe (as it is now because the only place from where they are initialized is guarded by an AVOnce). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@gmail.com>
Diffstat (limited to 'libavcodec/aacdec_fixed.c')
-rw-r--r--libavcodec/aacdec_fixed.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index daaf765e0c..4d82b7b1aa 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -86,6 +86,9 @@
#include <math.h>
#include <string.h>
+DECLARE_ALIGNED(32, static int, AAC_KBD_RENAME(kbd_long_1024))[1024];
+DECLARE_ALIGNED(32, static int, AAC_KBD_RENAME(kbd_short_128))[128];
+
static av_always_inline void reset_predict_state(PredictorState *ps)
{
ps->r0.mant = 0;