[FFmpeg-cvslog] jpeg2000: Fix compute precedence error in lut_gain index

Michael Niedermayer git at videolan.org
Wed Jul 3 15:13:12 CEST 2013


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Mon Jul  1 10:01:17 2013 +0200| [4cbd5ed11b0161a6a192174934b241e0cc0599a9] | committer: Luca Barbato

jpeg2000: Fix compute precedence error in lut_gain index

Signed-off-by: Luca Barbato <lu_zero at gentoo.org>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=4cbd5ed11b0161a6a192174934b241e0cc0599a9
---

 libavcodec/jpeg2000.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c
index cd6f58d..b123699 100644
--- a/libavcodec/jpeg2000.c
+++ b/libavcodec/jpeg2000.c
@@ -285,7 +285,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
             case JPEG2000_QSTY_NONE:
                 /* TODO: to verify. No quantization in this case */
                 numbps = cbps +
-                         lut_gain[codsty->transform][bandno + reslevelno > 0];
+                         lut_gain[codsty->transform][bandno + (reslevelno > 0)];
                 band->stepsize = (float)SHL(2048 + qntsty->mant[gbandno],
                                             2 + numbps - qntsty->expn[gbandno]);
                 break;



More information about the ffmpeg-cvslog mailing list