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:
9af9772
)
replaces subtraction with XOR in FLUSH
author
Moritz Hanke
<hanke@dkrz.de>
Tue, 9 Sep 2014 14:56:05 +0000
(16:56 +0200)
committer
Mathis Rosenhauer
<rosenhauer@dkrz.de>
Fri, 24 Oct 2014 14:08:27 +0000
(16:08 +0200)
src/decode.c
patch
|
blob
|
history
diff --git
a/src/decode.c
b/src/decode.c
index
a8c0afc
..
22487fd
100644
(file)
--- a/
src/decode.c
+++ b/
src/decode.c
@@
-105,10
+105,11
@@
data = d; \
} \
} else { \
- if (half_d <= xmax - data) { \
+ /*in this case (xmax - data == xmax ^ data)*/ \
+ if (half_d <= (xmax ^ data)) { \
data += (d >> 1)^(~((d & 1) - 1)); \
} else { \
- data = xmax
-
d; \
+ data = xmax
^
d; \
} \
} \
put_##KIND(strm, (uint32_t)data); \