Lines Matching defs:avctx

235 static void search_for_quantizers_anmr(AVCodecContext *avctx, AACEncContext *s,
395 static void search_for_quantizers_fast(AVCodecContext *avctx, AACEncContext *s,
400 int destbits = avctx->bit_rate * 1024.0 / avctx->sample_rate / avctx->ch_layout.nb_channels * (lambda / 120.f);
542 static void search_for_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
552 const float freq_mult = avctx->sample_rate*0.5f/wlen;
558 int refbits = avctx->bit_rate * 1024.0 / avctx->sample_rate
559 / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->ch_layout.nb_channels)
565 int frame_bit_rate = (avctx->flags & AV_CODEC_FLAG_QSCALE)
566 ? (refbits * rate_bandwidth_multiplier * avctx->sample_rate / 1024)
567 : (avctx->bit_rate / avctx->ch_layout.nb_channels);
571 if (avctx->cutoff > 0) {
572 bandwidth = avctx->cutoff;
574 bandwidth = FFMAX(3000, AAC_CUTOFF_FROM_BITRATE(frame_bit_rate, 1, avctx->sample_rate));
577 cutoff = bandwidth * 2 * wlen / avctx->sample_rate;
684 static void mark_pns(AACEncContext *s, AVCodecContext *avctx, SingleChannelElement *sce)
691 const float freq_mult = avctx->sample_rate*0.5f/wlen;
695 int refbits = avctx->bit_rate * 1024.0 / avctx->sample_rate
696 / ((avctx->flags & AV_CODEC_FLAG_QSCALE) ? 2.0f : avctx->ch_layout.nb_channels)
701 int frame_bit_rate = (avctx->flags & AV_CODEC_FLAG_QSCALE)
702 ? (refbits * rate_bandwidth_multiplier * avctx->sample_rate / 1024)
703 : (avctx->bit_rate / avctx->ch_layout.nb_channels);
707 if (avctx->cutoff > 0) {
708 bandwidth = avctx->cutoff;
710 bandwidth = FFMAX(3000, AAC_CUTOFF_FROM_BITRATE(frame_bit_rate, 1, avctx->sample_rate));
713 cutoff = bandwidth * 2 * wlen / avctx->sample_rate;