From: Benoit Steiner Date: Sun, 7 Jan 2001 05:41:50 +0000 (+0000) Subject: Optimisation de BinaryLog X-Git-Tag: 0.2.70~253 X-Git-Url: https://git.sesse.net/?a=commitdiff_plain;h=a87ecd5ccf649a656dc71e8c355b5f6372b5314e;p=vlc Optimisation de BinaryLog --- diff --git a/src/video_output/video_output.c b/src/video_output/video_output.c index a441ead96b..b8d56e4cee 100644 --- a/src/video_output/video_output.c +++ b/src/video_output/video_output.c @@ -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");