From 50df67d3b517c88089613458d85e2154f99ecf78 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Thu, 22 Mar 2007 00:52:49 +0000 Subject: [PATCH] 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 --- libavcodec/resample2.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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; } -- 2.11.0