]> git.sesse.net Git - vlc/commitdiff
Optimisation de BinaryLog
authorBenoit Steiner <benny@videolan.org>
Sun, 7 Jan 2001 05:41:50 +0000 (05:41 +0000)
committerBenoit Steiner <benny@videolan.org>
Sun, 7 Jan 2001 05:41:50 +0000 (05:41 +0000)
src/video_output/video_output.c

index a441ead96bcc25f7c146875c758fcccb046de11f..b8d56e4ceed84ca422857dcc1873037e6d5ad798 100644 (file)
@@ -860,27 +860,12 @@ static int BinaryLog(u32 i)
 {
     int i_log;
 
-    i_log = 0;
-    if (i & 0xffff0000)
-    {
-        i_log = 16;
-    }
-    if (i & 0xff00ff00)
-    {
-        i_log += 8;
-    }
-    if (i & 0xf0f0f0f0)
-    {
-        i_log += 4;
-    }
-    if (i & 0xcccccccc)
-    {
-        i_log += 2;
-    }
-    if (i & 0xaaaaaaaa)
-    {
-        i_log++;
-    }
+    i_log = 16 & (i & 0xffff0000);
+    i_log += 8 & (i & 0xff00ff00);
+    i_log += 4 & (i & 0xf0f0f0f0);
+    i_log += 2 & (i & 0xcccccccc);
+    i_log += 1 & (i & 0xaaaaaaaa);
+
     if (i != ((u32)1 << i_log))
     {
         intf_DbgMsg("internal error: binary log overflow");