projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
24eca79
)
[trunk] rework code to avoid a warning. this also remove a division and prefer bit...
author
Mathieu Malaterre
<mathieu.malaterre@gmail.com>
Mon, 3 Mar 2014 16:02:16 +0000
(16:02 +0000)
committer
Mathieu Malaterre
<mathieu.malaterre@gmail.com>
Mon, 3 Mar 2014 16:02:16 +0000
(16:02 +0000)
src/lib/openjp2/t2.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/t2.c
b/src/lib/openjp2/t2.c
index 6aee8c724c2831df037993f8b27c2c13fa950bf6..0bda8be0767ba299d51c07823c3deb241829cfc7 100644
(file)
--- a/
src/lib/openjp2/t2.c
+++ b/
src/lib/openjp2/t2.c
@@
-547,8
+547,13
@@
OPJ_BOOL opj_t2_encode_packet( OPJ_UINT32 tileno,
c[1] = 145;
c[2] = 0;
c[3] = 4;
+#if 0
c[4] = (tile->packno % 65536) / 256;
c[5] = (tile->packno % 65536) % 256;
+#else
+ c[4] = (tile->packno >> 8) & 0xff; /* packno is uint32_t */
+ c[5] = tile->packno & 0xff;
+#endif
c += 6;
length -= 6;
}