summaryrefslogtreecommitdiffstats
path: root/libavcodec/aacpsy.c
diff options
context:
space:
mode:
authorAndreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>2015-04-21 18:43:55 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-04-22 01:18:14 +0200
commitca9849eecdf7db91d652c698018a5b096d8b78c7 (patch)
treea299dd7e870d72286a7a34659afeaccfbd9607e6 /libavcodec/aacpsy.c
parent0703c44692d1ebd7c530c6f46beae8e4ecafaaa3 (diff)
downloadffmpeg-streaming-ca9849eecdf7db91d652c698018a5b096d8b78c7.zip
ffmpeg-streaming-ca9849eecdf7db91d652c698018a5b096d8b78c7.tar.gz
aacpsy: correct calculation of minath in psy_3gpp_init
The minimum of the ath(x, ATH_ADD) function depends on ATH_ADD. This patch uses the first order approximation to determine it. For ATH_ADD = 4 this results in the value at 3407.06812 (-5.24241638) not the one at 3410 (-5.24237967). Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> Approved-by: Claudio Freire <klaussfreire@gmail.com> Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
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 7205ee3..49ff3fe 100644
--- a/libavcodec/aacpsy.c
+++ b/libavcodec/aacpsy.c
@@ -313,7 +313,7 @@ static av_cold int psy_3gpp_init(FFPsyContext *ctx) {
ctx->bitres.size = 6144 - pctx->frame_bits;
ctx->bitres.size -= ctx->bitres.size % 8;
pctx->fill_level = ctx->bitres.size;
- minath = ath(3410, ATH_ADD);
+ minath = ath(3410 - 0.733 * ATH_ADD, ATH_ADD);
for (j = 0; j < 2; j++) {
AacPsyCoeffs *coeffs = pctx->psy_coef[j];
const uint8_t *band_sizes = ctx->bands[j];
OpenPOWER on IntegriCloud