jpeg2000: Fix compute precedence error in lut_gain index
[ffmpeg.git] / libavcodec / jpeg2000.c
index cd6f58de0e0ef3ce2a59a0e348bef27d83251043..b1236993ac207d2d267ab3b48c83b6b2811e0932 100644 (file)
@@ -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;