summaryrefslogtreecommitdiff
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorNathan Caldwell <saintdev@gmail.com>2011-05-18 23:14:59 -0600
committerAlex Converse <alex.converse@gmail.com>2011-06-29 14:28:53 -0700
commit01344fe409da286cd377f9af610eb4c4888687ec (patch)
tree7dd36feca29f22bcfff6d6a73f7d90f30f7abe97 /libavcodec/aacenc.c
parent0bc01cc9fe83fe676690fd200e7d74cdab595f15 (diff)
aacenc: Implement dummy channel group analysis that just calls the single channel analysis for each channel.
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 1df16ade27..385c6aa994 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -564,14 +564,17 @@ static int aac_encode_frame(AVCodecContext *avctx,
memset(chan_el_counter, 0, sizeof(chan_el_counter));
for (i = 0; i < s->chan_map[0]; i++) {
FFPsyWindowInfo* wi = windows + start_ch;
+ const float *coeffs[2];
tag = s->chan_map[i+1];
chans = tag == TYPE_CPE ? 2 : 1;
cpe = &s->cpe[i];
put_bits(&s->pb, 3, tag);
put_bits(&s->pb, 4, chan_el_counter[tag]++);
+ for (ch = 0; ch < chans; ch++)
+ coeffs[ch] = cpe->ch[ch].coeffs;
+ s->psy.model->analyze_group(&s->psy, start_ch, coeffs, wi);
for (ch = 0; ch < chans; ch++) {
s->cur_channel = start_ch * 2 + ch;
- s->psy.model->analyze(&s->psy, start_ch + ch, cpe->ch[ch].coeffs, &wi[ch]);
s->coder->search_for_quantizers(avctx, s, &cpe->ch[ch], s->lambda);
}
cpe->common_window = 0;