[FFmpeg-cvslog] r24231 - trunk/libavcodec/aacpsy.c

alexc subversion
Wed Jul 14 06:10:42 CEST 2010


Author: alexc
Date: Wed Jul 14 06:10:41 2010
New Revision: 24231

Log:
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.

Modified:
   trunk/libavcodec/aacpsy.c

Modified: trunk/libavcodec/aacpsy.c
==============================================================================
--- trunk/libavcodec/aacpsy.c	Wed Jul 14 06:10:31 2010	(r24230)
+++ trunk/libavcodec/aacpsy.c	Wed Jul 14 06:10:41 2010	(r24231)
@@ -138,7 +138,7 @@ static av_cold int psy_3gpp_init(FFPsyCo
         }
         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;



More information about the ffmpeg-cvslog mailing list