mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-24 13:56:33 +02:00
aacenc: create and initialize an LTP context
This commit only creates and initializes an LTP context which is needed for upcoming commits (TNS). Signed-off-by: Rostislav Pehlivanov <atomnuker@gmail.com>
This commit is contained in:
parent
23e786be61
commit
b47a1e5c5f
@ -676,6 +676,7 @@ static av_cold int aac_encode_end(AVCodecContext *avctx)
|
||||
ff_mdct_end(&s->mdct1024);
|
||||
ff_mdct_end(&s->mdct128);
|
||||
ff_psy_end(&s->psy);
|
||||
ff_lpc_end(&s->lpc);
|
||||
if (s->psypp)
|
||||
ff_psy_preprocess_end(s->psypp);
|
||||
av_freep(&s->buffer.samples);
|
||||
@ -775,6 +776,7 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
|
||||
goto fail;
|
||||
s->psypp = ff_psy_preprocess_init(avctx);
|
||||
s->coder = &ff_aac_coders[s->options.aac_coder];
|
||||
ff_lpc_init(&s->lpc, avctx->frame_size, TNS_MAX_ORDER, FF_LPC_TYPE_LEVINSON);
|
||||
|
||||
if (HAVE_MIPSDSPR1)
|
||||
ff_aac_coder_init_mips(s);
|
||||
|
@ -30,6 +30,8 @@
|
||||
#include "audio_frame_queue.h"
|
||||
#include "psymodel.h"
|
||||
|
||||
#include "lpc.h"
|
||||
|
||||
typedef enum AACCoder {
|
||||
AAC_CODER_FAAC = 0,
|
||||
AAC_CODER_ANMR,
|
||||
@ -75,6 +77,7 @@ typedef struct AACEncContext {
|
||||
AVFloatDSPContext *fdsp;
|
||||
float *planar_samples[6]; ///< saved preprocessed input
|
||||
|
||||
LPCContext lpc; ///< used by TNS
|
||||
int samplerate_index; ///< MPEG-4 samplerate index
|
||||
int channels; ///< channel count
|
||||
const uint8_t *chan_map; ///< channel configuration map
|
||||
|
Loading…
x
Reference in New Issue
Block a user