[FFmpeg-cvslog] r21038 - trunk/libavcodec/resample2.c
michael
subversion
Wed Jan 6 23:40:52 CET 2010
Author: michael
Date: Wed Jan 6 23:40:52 2010
New Revision: 21038
Log:
Stop the approximation in bessel() once it does no longer improve.
Modified:
trunk/libavcodec/resample2.c
Modified: trunk/libavcodec/resample2.c
==============================================================================
--- trunk/libavcodec/resample2.c Wed Jan 6 22:51:20 2010 (r21037)
+++ trunk/libavcodec/resample2.c Wed Jan 6 23:40:52 2010 (r21038)
@@ -76,11 +76,13 @@ typedef struct AVResampleContext{
*/
static double bessel(double x){
double v=1;
+ double lastv=0;
double t=1;
int i;
x= x*x/4;
- for(i=1; i<50; i++){
+ for(i=1; v != lastv; i++){
+ lastv=v;
t *= x/(i*i);
v += t;
}
More information about the ffmpeg-cvslog
mailing list