[Ffmpeg-cvslog] r8474 - trunk/libavcodec/resample2.c

michael subversion
Thu Mar 22 01:52:49 CET 2007


Author: michael
Date: Thu Mar 22 01:52:49 2007
New Revision: 8474

Modified:
   trunk/libavcodec/resample2.c

Log:
optimize bessel function instead of trusting gcc to do trivial optimizations (as gcc doesnt ...)


Modified: trunk/libavcodec/resample2.c
==============================================================================
--- trunk/libavcodec/resample2.c	(original)
+++ trunk/libavcodec/resample2.c	Thu Mar 22 01:52:49 2007
@@ -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;
 }




More information about the ffmpeg-cvslog mailing list