[Ffmpeg-cvslog] r7776 - trunk/libavcodec/lzo.c

michael subversion
Wed Jan 31 11:07:23 CET 2007


Author: michael
Date: Wed Jan 31 11:07:22 2007
New Revision: 7776

Modified:
   trunk/libavcodec/lzo.c

Log:
replace if(x>>b) by if(x>C) as shifts are slow on some cpus and i have my doubts that gcc can replace the shifts as x is signed, it could in theory but well its gcc ...


Modified: trunk/libavcodec/lzo.c
==============================================================================
--- trunk/libavcodec/lzo.c	(original)
+++ trunk/libavcodec/lzo.c	Wed Jan 31 11:07:22 2007
@@ -184,11 +184,11 @@
     }
     while (!c.error) {
         int cnt, back;
-        if (x >> 4) {
-            if (x >> 6) {
+        if (x > 15) {
+            if (x > 63) {
                 cnt = (x >> 5) - 1;
                 back = (GETB(c) << 3) + ((x >> 2) & 7) + 1;
-            } else if (x >> 5) {
+            } else if (x > 31) {
                 cnt = get_len(&c, x, 31);
                 x = GETB(c);
                 back = (GETB(c) << 6) + (x >> 2) + 1;




More information about the ffmpeg-cvslog mailing list