[FFmpeg-soc] [soc]: r3428 - aacenc/aacenc.c
kostya
subversion at mplayerhq.hu
Mon Aug 18 07:51:01 CEST 2008
Author: kostya
Date: Mon Aug 18 07:51:00 2008
New Revision: 3428
Log:
Pass scalefactor band sizes directly to psychoacoustic model
without storing them in encoder context.
Modified:
aacenc/aacenc.c
Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c (original)
+++ aacenc/aacenc.c Mon Aug 18 07:51:00 2008
@@ -189,10 +189,6 @@ typedef struct {
int16_t* samples; ///< saved preprocessed input
int samplerate_index; ///< MPEG-4 samplerate index
- const uint8_t *swb_sizes1024; ///< scalefactor band sizes for long frame
- int swb_num1024; ///< number of scalefactor bands for long frame
- const uint8_t *swb_sizes128; ///< scalefactor band sizes for short frame
- int swb_num128; ///< number of scalefactor bands for short frame
ChannelElement *cpe; ///< channel elements
AACPsyContext psy; ///< psychoacoustic model context
@@ -238,10 +234,6 @@ static av_cold int aac_encode_init(AVCod
return -1;
}
s->samplerate_index = i;
- s->swb_sizes1024 = swb_size_1024[i];
- s->swb_num1024 = ff_aac_num_swb_1024[i];
- s->swb_sizes128 = swb_size_128[i];
- s->swb_num128 = ff_aac_num_swb_128[i];
dsputil_init(&s->dsp, avctx);
ff_mdct_init(&s->mdct1024, 11, 0);
@@ -256,7 +248,7 @@ static av_cold int aac_encode_init(AVCod
s->cpe = av_mallocz(sizeof(ChannelElement) * aac_chan_configs[avctx->channels-1][0]);
if(ff_aac_psy_init(&s->psy, avctx, AAC_PSY_3GPP,
aac_chan_configs[avctx->channels-1][0], 0,
- s->swb_sizes1024, s->swb_num1024, s->swb_sizes128, s->swb_num128) < 0){
+ swb_size_1024[i], ff_aac_num_swb_1024[i], swb_size_128[i], ff_aac_num_swb_128[i]) < 0){
av_log(avctx, AV_LOG_ERROR, "Cannot initialize selected model.\n");
return -1;
}
More information about the FFmpeg-soc
mailing list