diff options
author | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-07-10 21:50:50 +0200 |
---|---|---|
committer | Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com> | 2015-11-26 01:38:17 +0100 |
commit | ba944121e281e9e13ed8a32f28207355e878d47e (patch) | |
tree | 613c59d99376c0d2c59d89f0119e73ffd26460d1 /libavcodec/imc.c | |
parent | 6f024dfd539e4c88c1574bb2cea8a4c52ce02369 (diff) | |
download | ffmpeg-ba944121e281e9e13ed8a32f28207355e878d47e.tar.gz |
imc: use correct position for flcoeffs2 calculation
flcoeffs2[pos] should be the log2 of flcoeffs1[pos].
flcoeffs1[0] can be 0 here, thus flcoeffs2[pos] gets set to -inf,
causing problems further down.
This seems to have been copied from imc_decode_level_coefficients in
commit 4eb4bb3 without updating the position.
Reviewed-by: Michael Niedermayer <michaelni@gmx.at>
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
(cherry picked from commit 75fd5ce4c1c0b2d96d71c74b650cefaaef519d27)
Signed-off-by: Andreas Cadhalpun <Andreas.Cadhalpun@googlemail.com>
Diffstat (limited to 'libavcodec/imc.c')
-rw-r--r-- | libavcodec/imc.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavcodec/imc.c b/libavcodec/imc.c index 5122f558c4..00076c9a87 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -420,7 +420,7 @@ static void imc_decode_level_coefficients_raw(IMCContext *q, int *levlCoeffBuf, pos = q->coef0_pos; flcoeffs1[pos] = 20000.0 / pow (2, levlCoeffBuf[0] * 0.18945); // 0.18945 = log2(10) * 0.05703125 - flcoeffs2[pos] = log2f(flcoeffs1[0]); + flcoeffs2[pos] = log2f(flcoeffs1[pos]); tmp = flcoeffs1[pos]; tmp2 = flcoeffs2[pos]; |