X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=libavcodec%2Fjpeg2000.c;h=b5b2dbf220755750b56802893d882b503a274a01;hb=5236cf871818e0df256c18aecd3abfe88b428027;hp=c98840971f4eb33a7e2a5095737a2a9d878aa0f6;hpb=4a2058bf4e75a657e207cb6ae76b3959fe9b0588;p=ffmpeg diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c index c98840971f4..b5b2dbf2207 100644 --- a/libavcodec/jpeg2000.c +++ b/libavcodec/jpeg2000.c @@ -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: