~ubuntu-branches/ubuntu/quantal/ffmpeg/quantal

« back to all changes in this revision

Viewing changes to libavcodec/aacenc.c

  • Committer: Bazaar Package Importer
  • Author(s): Reinhard Tartler
  • Date: 2010-06-16 12:53:24 UTC
  • mfrom: (1.1.13 upstream)
  • Revision ID: james.westby@ubuntu.com-20100616125324-kbhhjn7012ufc79t
Tags: 4:0.6-1ubuntu1
* merge from debian/experimental. remaining changes:
  - don't disable encoders
  - don't build against libfaad, libdirac and libopenjpeg (all in universe)
* new upstream release
  - internal vorbis encoder is disabled. LP: #585330
  - includes native AMR-NB decoder, LP: #93849
  - api-example is fixed: LP: #557319

Show diffs side-by-side

added added

removed removed

Lines of Context:
174
174
        av_log(avctx, AV_LOG_ERROR, "Unsupported profile %d\n", avctx->profile);
175
175
        return -1;
176
176
    }
 
177
    if (1024.0 * avctx->bit_rate / avctx->sample_rate > 6144 * avctx->channels) {
 
178
        av_log(avctx, AV_LOG_ERROR, "Too many bits per frame requested\n");
 
179
        return -1;
 
180
    }
177
181
    s->samplerate_index = i;
178
182
 
179
183
    dsputil_init(&s->dsp, avctx);
557
561
            chans    = tag == TYPE_CPE ? 2 : 1;
558
562
            cpe      = &s->cpe[i];
559
563
            for (j = 0; j < chans; j++) {
 
564
                s->cur_channel = start_ch + j;
560
565
                s->coder->search_for_quantizers(avctx, s, &cpe->ch[j], s->lambda);
561
566
            }
562
567
            cpe->common_window = 0;
572
577
                    }
573
578
                }
574
579
            }
 
580
            s->cur_channel = start_ch;
575
581
            if (cpe->common_window && s->coder->search_for_ms)
576
582
                s->coder->search_for_ms(s, cpe, s->lambda);
577
583
            adjust_frame_information(s, cpe, chans);
639
645
    aac_encode_init,
640
646
    aac_encode_frame,
641
647
    aac_encode_end,
642
 
    .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY,
 
648
    .capabilities = CODEC_CAP_SMALL_LAST_FRAME | CODEC_CAP_DELAY | CODEC_CAP_EXPERIMENTAL,
643
649
    .sample_fmts = (const enum SampleFormat[]){SAMPLE_FMT_S16,SAMPLE_FMT_NONE},
644
650
    .long_name = NULL_IF_CONFIG_SMALL("Advanced Audio Coding"),
645
651
};