Re: [FFmpeg-devel] [PATCH] imc: use correct position for flcoeffs2 calculation
On 10.07.2015 23:16, Michael Niedermayer wrote: > On Fri, Jul 10, 2015 at 09:59:32PM +0200, Andreas Cadhalpun wrote: >> 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. >> >> Signed-off-by: Andreas Cadhalpun >> --- >> libavcodec/imc.c | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) > > patch looks correct, Pushed. Best regards, Andreas ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
Re: [FFmpeg-devel] [PATCH] imc: use correct position for flcoeffs2 calculation
On Fri, Jul 10, 2015 at 09:59:32PM +0200, Andreas Cadhalpun wrote: > 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. > > Signed-off-by: Andreas Cadhalpun > --- > libavcodec/imc.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) patch looks correct, thanks [...] -- Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB Complexity theory is the science of finding the exact solution to an approximation. Benchmarking OTOH is finding an approximation of the exact signature.asc Description: Digital signature ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel
[FFmpeg-devel] [PATCH] 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. Signed-off-by: Andreas Cadhalpun --- libavcodec/imc.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/imc.c b/libavcodec/imc.c index b062b21..e15ac9c 100644 --- a/libavcodec/imc.c +++ b/libavcodec/imc.c @@ -426,7 +426,7 @@ static void imc_decode_level_coefficients_raw(IMCContext *q, int *levlCoeffBuf, pos = q->coef0_pos; flcoeffs1[pos] = 2.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]; -- 2.1.4 ___ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel