changeset 4441:fdb91110889b libavcodec

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 ...
author michael
date Wed, 31 Jan 2007 10:07:22 +0000
parents b80ad08b0f68
children b514c50250f6
files lzo.c
diffstat 1 files changed, 3 insertions(+), 3 deletions(-) [+]
line wrap: on
line diff
--- a/lzo.c	Wed Jan 31 09:37:02 2007 +0000
+++ b/lzo.c	Wed Jan 31 10:07:22 2007 +0000
@@ -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;