comparison aacenc.c @ 12443:e824bd360c35 libavcodec

aacenc: Write tag.elem_id early.
author alexc
date Mon, 30 Aug 2010 23:52:03 +0000
parents a3aca8bcbaf4
children 2350457a3777
comparison
equal deleted inserted replaced
12442:94b578d0af10 12443:e824bd360c35
559 for (i = 0; i < chan_map[0]; i++) { 559 for (i = 0; i < chan_map[0]; i++) {
560 FFPsyWindowInfo* wi = windows + start_ch; 560 FFPsyWindowInfo* wi = windows + start_ch;
561 tag = chan_map[i+1]; 561 tag = chan_map[i+1];
562 chans = tag == TYPE_CPE ? 2 : 1; 562 chans = tag == TYPE_CPE ? 2 : 1;
563 cpe = &s->cpe[i]; 563 cpe = &s->cpe[i];
564 put_bits(&s->pb, 3, tag);
565 put_bits(&s->pb, 4, chan_el_counter[tag]++);
564 for (j = 0; j < chans; j++) { 566 for (j = 0; j < chans; j++) {
565 s->cur_channel = start_ch + j; 567 s->cur_channel = start_ch + j;
566 ff_psy_set_band_info(&s->psy, s->cur_channel, cpe->ch[j].coeffs, &wi[j]); 568 ff_psy_set_band_info(&s->psy, s->cur_channel, cpe->ch[j].coeffs, &wi[j]);
567 s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda); 569 s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda);
568 } 570 }
581 } 583 }
582 s->cur_channel = start_ch; 584 s->cur_channel = start_ch;
583 if (cpe->common_window && s->coder->search_for_ms) 585 if (cpe->common_window && s->coder->search_for_ms)
584 s->coder->search_for_ms(s, cpe, s->lambda); 586 s->coder->search_for_ms(s, cpe, s->lambda);
585 adjust_frame_information(s, cpe, chans); 587 adjust_frame_information(s, cpe, chans);
586 put_bits(&s->pb, 3, tag);
587 put_bits(&s->pb, 4, chan_el_counter[tag]++);
588 if (chans == 2) { 588 if (chans == 2) {
589 put_bits(&s->pb, 1, cpe->common_window); 589 put_bits(&s->pb, 1, cpe->common_window);
590 if (cpe->common_window) { 590 if (cpe->common_window) {
591 put_ics_info(s, &cpe->ch[0].ics); 591 put_ics_info(s, &cpe->ch[0].ics);
592 encode_ms_info(&s->pb, cpe); 592 encode_ms_info(&s->pb, cpe);