diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2007-03-22 00:52:49 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2007-03-22 00:52:49 +0000 |
commit | 50df67d3b517c88089613458d85e2154f99ecf78 (patch) | |
tree | 655dc459ab202503ac44128b019123fe8d4a6b9f /libavcodec/resample2.c | |
parent | 14f887efc61e95fc5b983dbb799ad9e0be50cfe2 (diff) | |
download | ffmpeg-50df67d3b517c88089613458d85e2154f99ecf78.tar.gz |
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
Diffstat (limited to 'libavcodec/resample2.c')
-rw-r--r-- | libavcodec/resample2.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/libavcodec/resample2.c b/libavcodec/resample2.c index ebda7e5a8b..70d8a1d956 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; } |