changeset 12160:e0bed2f0f9f9 libavcodec

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.
author alexc
date Wed, 14 Jul 2010 04:10:41 +0000
parents 25ac974ce96d
children d34f0f3ac678
files aacpsy.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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;