summaryrefslogtreecommitdiff
path: root/libavcodec/aacpsy.c
diff options
context:
space:
mode:
authorAlex Converse <alex.converse@gmail.com>2010-07-14 04:10:41 +0000
committerAlex Converse <alex.converse@gmail.com>2010-07-14 04:10:41 +0000
commitd7194e3b73f94692319292fa070294ba592349e1 (patch)
treef46f472e2ef27de15782711548ecc8db26ec6dc8 /libavcodec/aacpsy.c
parent886385afd626c03099aa9ef7725d2a09c82aa196 (diff)
downloadffmpeg-d7194e3b73f94692319292fa070294ba592349e1.tar.gz
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. Originally committed as revision 24231 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/aacpsy.c')
-rw-r--r--libavcodec/aacpsy.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/aacpsy.c b/libavcodec/aacpsy.c
index 7a2a37f4ae..78f4f08823 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -138,7 +138,7 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) {
}
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;