It may be entirely possible to optimize further by exploiting the fact that it is always an integer exponent. However, care must be taken since the base itself is not an integer, i.e a naive repeated squaring or similar such algorithm may be inaccurate.
Range information can only be obtained by knowledge of the spec, so the low hanging pow->powf is done. Signed-off-by: Ganesh Ajjanagadde <gajjanaga...@gmail.com> --- libavcodec/jpeg2000.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavcodec/jpeg2000.c b/libavcodec/jpeg2000.c index afd0966..d90c605 100644 --- a/libavcodec/jpeg2000.c +++ b/libavcodec/jpeg2000.c @@ -257,7 +257,7 @@ static void init_band_stepsize(AVCodecContext *avctx, break; } if (codsty->transform == FF_DWT97) { - band->f_stepsize *= pow(F_LFTG_K, 2*(codsty->nreslevels2decode - reslevelno) + lband - 2); + band->f_stepsize *= powf(F_LFTG_K, 2*(codsty->nreslevels2decode - reslevelno) + lband - 2); } } -- 2.6.3 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org http://ffmpeg.org/mailman/listinfo/ffmpeg-devel