[FFmpeg-cvslog] r8890 - trunk/libavutil/internal.h

michael subversion
Fri May 4 23:22:43 CEST 2007


Author: michael
Date: Fri May  4 23:22:43 2007
New Revision: 8890

Log:
simplify


Modified:
   trunk/libavutil/internal.h

Modified: trunk/libavutil/internal.h
==============================================================================
--- trunk/libavutil/internal.h	(original)
+++ trunk/libavutil/internal.h	Fri May  4 23:22:43 2007
@@ -190,14 +190,13 @@ static inline int ff_sqrt(int a)
 {
     int ret=0;
     int s;
-    int ret_sq=0;
 
     if(a<128) return ff_sqrt_tab[a];
 
     for(s=15; s>=0; s--){
-        int b= ret_sq + (1<<(s*2)) + (ret<<s)*2;
+        int b= (1<<(s*2)) + (ret<<s)*2;
         if(b<=a){
-            ret_sq=b;
+            a-=b;
             ret+= 1<<s;
         }
     }




More information about the ffmpeg-cvslog mailing list