[FFmpeg-cvslog] aacdec: deduplicate table initizalization
Lynne
git at videolan.org
Tue Apr 23 09:58:48 EEST 2024
ffmpeg | branch: master | Lynne <dev at lynne.ee> | Sat Mar 16 04:03:12 2024 +0100| [b7387ea00e8346022877f2f082ce2d2bc7a217e5] | committer: Lynne
aacdec: deduplicate table initizalization
All tables now initialized by aac/aacdec_fixed|float
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=b7387ea00e8346022877f2f082ce2d2bc7a217e5
---
libavcodec/aac/aacdec_fixed.c | 2 ++
libavcodec/aac/aacdec_float.c | 2 ++
libavcodec/aacdec.c | 5 -----
libavcodec/aacdec_fixed.c | 2 --
libavcodec/aacdec_template.c | 12 ------------
5 files changed, 4 insertions(+), 19 deletions(-)
diff --git a/libavcodec/aac/aacdec_fixed.c b/libavcodec/aac/aacdec_fixed.c
index a2ddc5aac2..08e9c3a03f 100644
--- a/libavcodec/aac/aacdec_fixed.c
+++ b/libavcodec/aac/aacdec_fixed.c
@@ -47,6 +47,8 @@ DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_short_120))[120];
static void init_tables_fixed_fn(void)
{
+ AAC_RENAME(ff_cbrt_tableinit)();
+
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024);
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128);
diff --git a/libavcodec/aac/aacdec_float.c b/libavcodec/aac/aacdec_float.c
index 355980d169..d1cc5ce929 100644
--- a/libavcodec/aac/aacdec_float.c
+++ b/libavcodec/aac/aacdec_float.c
@@ -47,6 +47,8 @@ DECLARE_ALIGNED(32, static float, aac_kbd_short_120)[120];
static void init_tables_float_fn(void)
{
+ AAC_RENAME(ff_cbrt_tableinit)();
+
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024);
AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128);
diff --git a/libavcodec/aacdec.c b/libavcodec/aacdec.c
index 9642c45015..13d53c6cfc 100644
--- a/libavcodec/aacdec.c
+++ b/libavcodec/aacdec.c
@@ -63,11 +63,6 @@
# include "mips/aacdec_mips.h"
#endif
-DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(sine_120))[120];
-DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(sine_960))[960];
-DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_long_960))[960];
-DECLARE_ALIGNED(32, static INTFLOAT, AAC_RENAME(aac_kbd_short_120))[120];
-
static av_always_inline void reset_predict_state(PredictorState *ps)
{
ps->r0 = 0.0f;
diff --git a/libavcodec/aacdec_fixed.c b/libavcodec/aacdec_fixed.c
index efc666a6ce..f1eb072103 100644
--- a/libavcodec/aacdec_fixed.c
+++ b/libavcodec/aacdec_fixed.c
@@ -64,8 +64,6 @@
#include "avcodec.h"
#include "codec_internal.h"
#include "get_bits.h"
-#include "kbdwin.h"
-#include "sinewin_fixed_tablegen.h"
#include "aac.h"
#include "aacdec.h"
diff --git a/libavcodec/aacdec_template.c b/libavcodec/aacdec_template.c
index 167e349b3e..c3ab1ed4c6 100644
--- a/libavcodec/aacdec_template.c
+++ b/libavcodec/aacdec_template.c
@@ -1110,22 +1110,10 @@ static av_cold void aac_static_table_init(void)
ff_aacdec_common_init_once();
- // window initialization
- AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_long_960), 4.0, 960);
- AAC_RENAME(ff_kbd_window_init)(AAC_RENAME(aac_kbd_short_120), 6.0, 120);
-
#if !USE_FIXED
- AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_960), 960);
- AAC_RENAME(ff_sine_window_init)(AAC_RENAME(sine_120), 120);
- AAC_RENAME(ff_init_ff_sine_windows)(9);
ff_aac_float_common_init();
#else
- AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_long_1024), 4.0, 1024);
- AAC_RENAME(ff_kbd_window_init)(AAC_RENAME2(aac_kbd_short_128), 6.0, 128);
- init_sine_windows_fixed();
#endif
-
- AAC_RENAME(ff_cbrt_tableinit)();
}
static AVOnce aac_table_init = AV_ONCE_INIT;
More information about the ffmpeg-cvslog
mailing list