diff options
author | sunyuechi <sunyuechi@iscas.ac.cn> | 2023-12-01 04:21:53 +0800 |
---|---|---|
committer | Rémi Denis-Courmont <remi@remlab.net> | 2023-12-11 18:42:04 +0200 |
commit | e880a97e7c4669493e336470dda133246371f2f1 (patch) | |
tree | dc05ba88b1bc1d11c4aa856e15742a088d785a53 /libavcodec | |
parent | 272d0c164d990cafc52a43bbceb1fc0445a2d22c (diff) | |
download | ffmpeg-e880a97e7c4669493e336470dda133246371f2f1.tar.gz |
lvac/aacenc: add ff_aac_dsp_init
This is for clarity and use in testing, consistent with other parts of the code.
Signed-off-by: Rémi Denis-Courmont <remi@remlab.net>
Diffstat (limited to 'libavcodec')
-rw-r--r-- | libavcodec/aacenc.c | 24 | ||||
-rw-r--r-- | libavcodec/aacenc.h | 1 |
2 files changed, 15 insertions, 10 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c index 5e6a255a8f..082c9d100e 100644 --- a/libavcodec/aacenc.c +++ b/libavcodec/aacenc.c @@ -1381,16 +1381,7 @@ 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; - s->abs_pow34 = abs_pow34_v; - s->quant_bands = quantize_bands; - -#if ARCH_X86 - ff_aac_dsp_init_x86(s); -#endif - -#if HAVE_MIPSDSP - ff_aac_coder_init_mips(s); -#endif + ff_aac_dsp_init(s); ff_af_queue_init(avctx, &s->afq); @@ -1444,3 +1435,16 @@ 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_X86 + ff_aac_dsp_init_x86(s); +#endif + +#if HAVE_MIPSDSP + ff_aac_coder_init_mips(s); +#endif +} diff --git a/libavcodec/aacenc.h b/libavcodec/aacenc.h index b030c652ae..09dd8639be 100644 --- a/libavcodec/aacenc.h +++ b/libavcodec/aacenc.h @@ -154,6 +154,7 @@ typedef struct AACEncContext { } buffer; } AACEncContext; +void ff_aac_dsp_init(AACEncContext *s); void ff_aac_dsp_init_x86(AACEncContext *s); void ff_aac_coder_init_mips(AACEncContext *c); void ff_quantize_band_cost_cache_init(struct AACEncContext *s); |