mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-19 21:36:54 +00:00
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>
This commit is contained in:
parent
8fca37d5f8
commit
75fd5ce4c1
@ -426,7 +426,7 @@ static void imc_decode_level_coefficients_raw(IMCContext *q, int *levlCoeffBuf,
|
|||||||
|
|
||||||
pos = q->coef0_pos;
|
pos = q->coef0_pos;
|
||||||
flcoeffs1[pos] = 20000.0 / pow (2, levlCoeffBuf[0] * 0.18945); // 0.18945 = log2(10) * 0.05703125
|
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];
|
tmp = flcoeffs1[pos];
|
||||||
tmp2 = flcoeffs2[pos];
|
tmp2 = flcoeffs2[pos];
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user