aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-02-28 13:29:19 +0100
committerAndreas Rheinhardt <andreas.rheinhardt@outlook.com>2024-03-02 02:54:11 +0100
commit88b3b09afa5ef00dfc89a5904614bd51de65c21b (patch)
treeb81c1c704ac810f4a68b7661ddb0c39eb0283311 /libavcodec/aacenc.c
parent6c693da690d2618b36c801f0b10607a4f68eaad6 (diff)
downloadffmpeg-88b3b09afa5ef00dfc89a5904614bd51de65c21b.tar.gz
avcodec/aacenc: Move initializing DSP out of aacenc.c
Otherwise aacenc.o gets pulled in by the aacencdsp checkasm test and it in turn pulls the rest of lavc in. Besides being bad size-wise this also has the downside that it pulls in avpriv_(cga|vga16)_font from libavutil which are marked as being imported from another library when building libavcodec as a DLL and this breaks checkasm because it links both lavc and lavu statically. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index bce4e039dc..3f99188be4 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -1381,7 +1381,11 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
ff_lpc_init(&s->lpc, 2*avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON);
s->random_state = 0x1f2e3d4c;
- ff_aac_dsp_init(s);
+ ff_aacenc_dsp_init(&s->aacdsp);
+
+#if HAVE_MIPSDSP
+ ff_aac_coder_init_mips(s);
+#endif
ff_af_queue_init(avctx, &s->afq);
@@ -1435,18 +1439,3 @@ const FFCodec ff_aac_encoder = {
AV_SAMPLE_FMT_NONE },
.p.priv_class = &aacenc_class,
};
-
-void ff_aac_dsp_init(AACEncContext *s){
- s->abs_pow34 = abs_pow34_v;
- s->quant_bands = quantize_bands;
-
-#if ARCH_RISCV
- ff_aac_dsp_init_riscv(s);
-#elif ARCH_X86
- ff_aac_dsp_init_x86(s);
-#endif
-
-#if HAVE_MIPSDSP
- ff_aac_coder_init_mips(s);
-#endif
-}