]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/jpeg2000.c
checkasm/vf_blend: Decrease iteration count
[ffmpeg] / libavcodec / jpeg2000.c
index c98840971f4eb33a7e2a5095737a2a9d878aa0f6..b5b2dbf220755750b56802893d882b503a274a01 100644 (file)
@@ -31,6 +31,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/mem.h"
 #include "avcodec.h"
+#include "internal.h"
 #include "jpeg2000.h"
 
 #define SHL(a, n) ((n) >= 0 ? (a) << (n) : (a) >> -(n))
@@ -221,7 +222,7 @@ static void init_band_stepsize(AVCodecContext *avctx,
          * R_b = R_I + log2 (gain_b )
          * see ISO/IEC 15444-1:2002 E.1.1 eqn. E-3 and E-4 */
         gain            = cbps;
-        band->f_stepsize  = pow(2.0, gain - qntsty->expn[gbandno]);
+        band->f_stepsize  = ff_exp2fi(gain - qntsty->expn[gbandno]);
         band->f_stepsize *= qntsty->mant[gbandno] / 2048.0 + 1.0;
         break;
     default: