# HG changeset patch # User alexc # Date 1279080641 0 # Node ID e0bed2f0f9f947ee9d86c7f8df65cde22555e8c2 # Parent 25ac974ce96d09924b34409f205902bc059003cc aacenc: psy_3gpp_init(): Fix ath for the first line in each sfb. Fix the MDCT line to frequency calculation for the first line in each sfb. Use this value to calculate ATH. diff -r 25ac974ce96d -r e0bed2f0f9f9 aacpsy.c --- a/aacpsy.c Wed Jul 14 04:10:31 2010 +0000 +++ b/aacpsy.c Wed Jul 14 04:10:41 2010 +0000 @@ -138,7 +138,7 @@ } start = 0; for (g = 0; g < ctx->num_bands[j]; g++) { - minscale = ath(ctx->avctx->sample_rate * start / 1024.0, ATH_ADD); + minscale = ath(ctx->avctx->sample_rate * start / 1024.0 / 2.0, ATH_ADD); for (i = 1; i < ctx->bands[j][g]; i++) minscale = FFMIN(minscale, ath(ctx->avctx->sample_rate * (start + i) / 1024.0 / 2.0, ATH_ADD)); coeffs->ath[g] = minscale - minath;