diff options
author | Alex Converse <alex.converse@gmail.com> | 2010-05-14 20:49:11 +0400 |
---|---|---|
committer | Alex Converse <alex.converse@gmail.com> | 2010-05-14 20:49:11 +0400 |
commit | 31184aac87ba9d55cd36924f094c479d1bf50022 (patch) | |
tree | 44baf076dc70c6961b995328054bc5f4299ac855 /libavcodec/aacenc.c | |
parent | eb0a4d32222fedf8022d602b0fd0907e07b54330 (diff) |
aacenc: Fix psy logic.
Set band info before determining scalefactors. Use the look ahead for
windowing decision.
Originally committed as revision 23132 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r-- | libavcodec/aacenc.c | 2 |
1 files changed, 1 insertions, 1 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; |