j2k/jpeg2000: fix typo in lut_gain index
authorMichael Niedermayer <michaelni@gmx.at>
Tue, 28 May 2013 17:51:24 +0000 (19:51 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Tue, 28 May 2013 20:16:14 +0000 (22:16 +0200)
no testcase

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavcodec/j2k.c
libavcodec/jpeg2000.c

index 7da05a8..96fe259 100644 (file)
@@ -262,7 +262,7 @@ int ff_j2k_init_component(Jpeg2000Component *comp,
             case JPEG2000_QSTY_SI:
                 /*TODO: Compute formula to implement. */
                 numbps = cbps +
-                         lut_gain[codsty->transform][bandno + reslevelno > 0];
+                         lut_gain[codsty->transform][bandno + (reslevelno > 0)];
                 stepsize = SHL(2048 + qntsty->mant[gbandno],
                                             2 + numbps - qntsty->expn[gbandno]);
                 break;
index c5fc35d..626a157 100644 (file)
@@ -272,7 +272,7 @@ int ff_jpeg2000_init_component(Jpeg2000Component *comp,
             case JPEG2000_QSTY_SI:
                 /*TODO: Compute formula to implement. */
                 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;