summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libavcodec/aacenc.c2
-rw-r--r--libavcodec/aacpsy.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 938df344bb..d979be5de1 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -562,6 +562,7 @@ static int aac_encode_frame(AVCodecContext *avctx,
cpe = &s->cpe[i];
for (j = 0; j < chans; j++) {
s->cur_channel = start_ch + j;
+ ff_psy_set_band_info(&s->psy, s->cur_channel, cpe->ch[j].coeffs, &wi[j]);
s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda);
}
cpe->common_window = 0;
@@ -592,7 +593,6 @@ static int aac_encode_frame(AVCodecContext *avctx,
}
for (j = 0; j < chans; j++) {
s->cur_channel = start_ch + j;
- ff_psy_set_band_info(&s->psy, s->cur_channel, cpe->ch[j].coeffs, &wi[j]);
encode_individual_channel(avctx, s, &cpe->ch[j], cpe->common_window);
}
start_ch += chans;
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 53dac3dbfd..4d0c738765 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -195,7 +195,7 @@ static FFPsyWindowInfo psy_3gpp_window(FFPsyContext *ctx,
int attack_n = 0;
for (i = 0; i < 8; i++) {
for (j = 0; j < 128; j++) {
- v = iir_filter(audio[(i*128+j)*ctx->avctx->channels], pch->iir_state);
+ v = iir_filter(la[(i*128+j)*ctx->avctx->channels], pch->iir_state);
sum += v*v;
}
s[i] = sum;