1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2025-01-13 21:28:01 +02:00

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>
This commit is contained in:
sunyuechi 2023-12-01 04:21:53 +08:00 committed by Rémi Denis-Courmont
parent 272d0c164d
commit e880a97e7c
2 changed files with 15 additions and 10 deletions

View File

@ -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
}

View File

@ -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);