# HG changeset patch # User alexc # Date 1247548943 0 # Node ID a79d7debe4316bea847e105f92a7d91a5836486d # Parent 4b3abcad06286348350b2ae78ae85969da2e7e20 Use cutoff frequency to adjust bandwidth in the generic psymodel preprocess. diff -r 4b3abcad0628 -r a79d7debe431 psymodel.c --- a/psymodel.c Mon Jul 13 01:59:48 2009 +0000 +++ b/psymodel.c Tue Jul 14 05:22:23 2009 +0000 @@ -84,7 +84,9 @@ ctx = av_mallocz(sizeof(FFPsyPreprocessContext)); ctx->avctx = avctx; - if (avctx->flags & CODEC_FLAG_QSCALE) + if (avctx->cutoff > 0) + cutoff_coeff = 2.0 * avctx->cutoff / avctx->sample_rate; + else if (avctx->flags & CODEC_FLAG_QSCALE) cutoff_coeff = 1.0f / av_clip(1 + avctx->global_quality / FF_QUALITY_SCALE, 1, 8); else cutoff_coeff = avctx->bit_rate / (4.0f * avctx->sample_rate * avctx->channels);