projects
/
platform
/
upstream
/
libaec.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5431e0e
)
replaces if statement in FLUSH with a little bit hack
author
Moritz Hanke
<hanke@dkrz.de>
Mon, 8 Sep 2014 13:29:03 +0000
(15:29 +0200)
committer
Mathis Rosenhauer
<rosenhauer@dkrz.de>
Fri, 24 Oct 2014 14:08:26 +0000
(16:08 +0200)
src/decode.c
patch
|
blob
|
history
diff --git
a/src/decode.c
b/src/decode.c
index
3b3e743
..
820772e
100644
(file)
--- a/
src/decode.c
+++ b/
src/decode.c
@@
-102,19
+102,13
@@
\
if (data < med) { \
if (half_d <= data - xmin) { \
- if (d & 1) \
- data -= half_d; \
- else \
- data += half_d; \
+ data += (d >> 1)^(~((d & 1) - 1)); \
} else { \
data = xmin + d; \
} \
} else { \
if (half_d <= xmax - data) { \
- if (d & 1) \
- data -= half_d; \
- else \
- data += half_d; \
+ data += (d >> 1)^(~((d & 1) - 1)); \
} else { \
data = xmax - d; \
} \