mirror of https://git.ffmpeg.org/ffmpeg.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
This commit is contained in:
parent
14f887efc6
commit
50df67d3b5
|
@ -71,9 +71,10 @@ static double bessel(double x){
|
||||||
double t=1;
|
double t=1;
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
|
x= x*x/4;
|
||||||
for(i=1; i<50; i++){
|
for(i=1; i<50; i++){
|
||||||
t *= i;
|
t *= x/(i*i);
|
||||||
v += pow(x*x/4, i)/(t*t);
|
v += t;
|
||||||
}
|
}
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue