Commit fd735e4b authored by Michael Niedermayer's avatar Michael Niedermayer

simplify

Originally committed as revision 8890 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent e300ab4e
......@@ -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;
}
}
......
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