From: Michael Niedermayer Date: Thu, 22 Mar 2007 00:52:49 +0000 (+0000) Subject: optimize bessel function instead of trusting gcc to do trivial optimizations (as... X-Git-Tag: v0.5~9572 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=50df67d3b517c88089613458d85e2154f99ecf78;p=coroid%2Fffmpeg_saccubus.git optimize bessel function instead of trusting gcc to do trivial optimizations (as gcc doesnt ...) Originally committed as revision 8474 to svn://svn.ffmpeg.org/ffmpeg/trunk --- diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c index ebda7e5a8..70d8a1d95 100644 --- a/libavcodec/resample2.c +++ b/libavcodec/resample2.c @@ -71,9 +71,10 @@ static double bessel(double x){ double t=1; int i; + x= x*x/4; for(i=1; i<50; i++){ - t *= i; - v += pow(x*x/4, i)/(t*t); + t *= x/(i*i); + v += t; } return v; }