Commit b519321a authored by Moritz Hanke's avatar Moritz Hanke Committed by Mathis Rosenhauer

removes on loop in FLUSH

parent 67fd2195
...@@ -97,21 +97,14 @@ ...@@ -97,21 +97,14 @@
for (bp = state->flush_start; bp < flush_end; bp++) { \ for (bp = state->flush_start; bp < flush_end; bp++) { \
d = *bp; \ d = *bp; \
half_d = (d >> 1) + (d & 1); \ half_d = (d >> 1) + (d & 1); \
\
/*in this case: data >= med == data & med */ \ /*in this case: data >= med == data & med */ \
if (data & med) { \ uint32_t mask = (data & med)?xmax:0; \
/*in this case: xmax - data == xmax ^ data */ \ \
if (half_d <= (xmax ^ data)) { \ /*in this case: xmax - data == xmax ^ data */ \
data += (d >> 1)^(~((d & 1) - 1)); \ if (half_d <= (mask ^ data)) { \
} else { \ data += (d >> 1)^(~((d & 1) - 1)); \
data = xmax ^ d; \
} \
} else { \ } else { \
if (half_d <= data) { \ data = mask ^ d; \
data += (d >> 1)^(~((d & 1) - 1)); \
} else { \
data = d; \
} \
} \ } \
put_##KIND(strm, (uint32_t)data); \ put_##KIND(strm, (uint32_t)data); \
} \ } \
......
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