Commit 909e8870 authored by michael's avatar michael

Stop the approximation in bessel() once it does no longer improve.


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@21038 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 703efb5b
...@@ -76,11 +76,13 @@ typedef struct AVResampleContext{ ...@@ -76,11 +76,13 @@ typedef struct AVResampleContext{
*/ */
static double bessel(double x){ static double bessel(double x){
double v=1; double v=1;
double lastv=0;
double t=1; double t=1;
int i; int i;
x= x*x/4; x= x*x/4;
for(i=1; i<50; i++){ for(i=1; v != lastv; i++){
lastv=v;
t *= x/(i*i); t *= x/(i*i);
v += t; v += t;
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment