aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/psymodel.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-07-29 19:49:22 +0200
committerMichael Niedermayer <michaelni@gmx.at>2012-07-29 22:02:46 +0200
commit72dabdfc58064fcb249f26fc7afca2221f18a832 (patch)
treee37f5b9b18ecfd3181c19d2ad43b13ecaab6c0bc /libavcodec/psymodel.c
parent981d97f69789bdbf7a0cb325a70befeaeeb4d9e3 (diff)
downloadffmpeg-72dabdfc58064fcb249f26fc7afca2221f18a832.tar.gz
aacenc: new default cutoff
Improves subjective quality Formula and testing by: kamedo2 <fujisakihir90@yahoo.co.jp> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/psymodel.c')
-rw-r--r--libavcodec/psymodel.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/libavcodec/psymodel.c b/libavcodec/psymodel.c
index a17aecc422..bdd2509f35 100644
--- a/libavcodec/psymodel.c
+++ b/libavcodec/psymodel.c
@@ -100,6 +100,9 @@ av_cold struct FFPsyPreprocessContext* ff_psy_preprocess_init(AVCodecContext *av
if (avctx->cutoff > 0)
cutoff_coeff = 2.0 * avctx->cutoff / avctx->sample_rate;
+ if (!cutoff_coeff && avctx->codec_id == CODEC_ID_AAC)
+ cutoff_coeff = 2.0 * AAC_CUTOFF(avctx) / avctx->sample_rate;
+
if (cutoff_coeff)
ctx->fcoeffs = ff_iir_filter_init_coeffs(avctx, FF_FILTER_TYPE_BUTTERWORTH,
FF_FILTER_MODE_LOWPASS, FILT_ORDER,