Commit 801778bc authored by Michael Niedermayer's avatar Michael Niedermayer

replace if(x>>b) by if(x>C) as shifts are slow on some cpus and i have my...

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 ...

Originally committed as revision 7776 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent d62a0c1e
...@@ -184,11 +184,11 @@ int lzo1x_decode(void *out, int *outlen, void *in, int *inlen) { ...@@ -184,11 +184,11 @@ int lzo1x_decode(void *out, int *outlen, void *in, int *inlen) {
} }
while (!c.error) { while (!c.error) {
int cnt, back; int cnt, back;
if (x >> 4) { if (x > 15) {
if (x >> 6) { if (x > 63) {
cnt = (x >> 5) - 1; cnt = (x >> 5) - 1;
back = (GETB(c) << 3) + ((x >> 2) & 7) + 1; back = (GETB(c) << 3) + ((x >> 2) & 7) + 1;
} else if (x >> 5) { } else if (x > 31) {
cnt = get_len(&c, x, 31); cnt = get_len(&c, x, 31);
x = GETB(c); x = GETB(c);
back = (GETB(c) << 6) + (x >> 2) + 1; back = (GETB(c) << 6) + (x >> 2) + 1;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment