]> git.sesse.net Git - vlc/commitdiff
Hum, ouais bon ben euhh, j'avais fume, donc je repare mes conneries et je
authorBenoit Steiner <benny@videolan.org>
Sun, 7 Jan 2001 06:40:29 +0000 (06:40 +0000)
committerBenoit Steiner <benny@videolan.org>
Sun, 7 Jan 2001 06:40:29 +0000 (06:40 +0000)
vais me coucher.

src/video_output/video_output.c

index b8d56e4ceed84ca422857dcc1873037e6d5ad798..10f1c756a88a49c92e63e7a2a3ab142d4e9b95c2 100644 (file)
@@ -858,13 +858,28 @@ void vout_Pixel2RGB( vout_thread_t *p_vout, u32 i_pixel, int *pi_red, int *pi_gr
  *****************************************************************************/
 static int BinaryLog(u32 i)
 {
-    int i_log;
+    int i_log = 0;
 
-    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 & 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 += 1;
+    }
 
     if (i != ((u32)1 << i_log))
     {