projects
/
openjpeg.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4b0bfbf
)
opj_j2k_update_rates(): grow tile size buffer for some situations
author
Even Rouault
<even.rouault@spatialys.com>
Thu, 17 Aug 2017 17:18:48 +0000
(19:18 +0200)
committer
Even Rouault
<even.rouault@spatialys.com>
Thu, 17 Aug 2017 17:18:48 +0000
(19:18 +0200)
src/lib/openjp2/j2k.c
patch
|
blob
|
history
diff --git
a/src/lib/openjp2/j2k.c
b/src/lib/openjp2/j2k.c
index fe40e29f18aea4d8ef0a5afa5f64882e65a7df9e..55ca5813d29c1d5af99ea83ae2d8bd105979986c 100644
(file)
--- a/
src/lib/openjp2/j2k.c
+++ b/
src/lib/openjp2/j2k.c
@@
-5171,6
+5171,10
@@
static OPJ_BOOL opj_j2k_update_rates(opj_j2k_t *p_j2k,
/* number of packets and number of code blocks in packets */
l_tile_size = (OPJ_UINT32)(l_tile_size * 1.4 / 8);
+ /* Arbitrary amount to make the following work: */
+ /* bin/test_tile_encoder 1 256 256 17 16 8 0 reversible_no_precinct.j2k 4 4 3 0 0 1 */
+ l_tile_size += 500;
+
l_tile_size += opj_j2k_get_specific_header_sizes(p_j2k);
p_j2k->m_specific_param.m_encoder.m_encoded_tile_size = l_tile_size;