[FFmpeg-soc] [soc]: r3218 - in aacenc: aacenc.c aacpsy.c
kostya
subversion at mplayerhq.hu
Wed Aug 13 15:38:27 CEST 2008
Author: kostya
Date: Wed Aug 13 15:38:27 2008
New Revision: 3218
Log:
If no preprocessing is specified, just copy input data
Modified:
aacenc/aacenc.c
aacenc/aacpsy.c
Modified: aacenc/aacenc.c
==============================================================================
--- aacenc/aacenc.c (original)
+++ aacenc/aacenc.c Wed Aug 13 15:38:27 2008
@@ -670,6 +670,9 @@ static int aac_encode_frame(AVCodecConte
if(s->last_frame)
return 0;
if(data){
+ if((s->psy.flags & PSY_MODEL_NO_PREPROC) == PSY_MODEL_NO_PREPROC){
+ memcpy(s->samples + 1024 * avctx->channels, data, 1024 * avctx->channels * sizeof(s->samples[0]));
+ }else{
start_ch = 0;
samples2 = s->samples + 1024 * avctx->channels;
for(i = 0; i < chan_map[0]; i++){
@@ -678,6 +681,7 @@ static int aac_encode_frame(AVCodecConte
ff_aac_psy_preprocess(&s->psy, (uint16_t*)data + start_ch, samples2 + start_ch, i, tag);
start_ch += chans;
}
+ }
}
if(!avctx->frame_number){
memmove(s->samples, s->samples + 1024 * avctx->channels, 1024 * avctx->channels * sizeof(s->samples[0]));
Modified: aacenc/aacpsy.c
==============================================================================
--- aacenc/aacpsy.c (original)
+++ aacenc/aacpsy.c Wed Aug 13 15:38:27 2008
@@ -939,7 +939,7 @@ void ff_aac_psy_preprocess(AACPsyContext
int i, ch;
float t[2];
- if(chans == 1 || (ctx->flags & PSY_MODEL_NO_PREPROC) == PSY_MODEL_NO_PREPROC){
+ if(chans == 1){
for(ch = 0; ch < chans; ch++){
for(i = 0; i < 1024; i++){
dest[i * chstride + ch] = audio[i * chstride + ch];
More information about the FFmpeg-soc
mailing list