summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/t1.h
diff options
context:
space:
mode:
authorEven Rouault <even.rouault@spatialys.com>2017-07-06 19:34:21 +0200
committerEven Rouault <even.rouault@spatialys.com>2017-08-07 18:32:52 +0200
commit92114694a48638e86c07e4adf11b78878045c8a9 (patch)
tree2d6210b5bd12c7e1b1494be1e9dee99dcb4461f1 /src/lib/openjp2/t1.h
parentca34d13e76a588a00171e57690c1deeaf068723a (diff)
Slight improvement in management of code block chunks
Instead of having the chunk array at the segment level, we can move it down to the codeblock itself since segments are filled in sequential order. Limit the number of memory allocation, and decrease slightly the memory usage. On MAPA_005.jp2 n4: 1871312549 (heap allocation functions) malloc/new/new[], --alloc-fns, etc. n1: 1610689344 0x4E781E7: opj_aligned_malloc (opj_malloc.c:61) n1: 1610689344 0x4E71D1B: opj_alloc_tile_component_data (tcd.c:676) n1: 1610689344 0x4E726CF: opj_tcd_init_decode_tile (tcd.c:816) n1: 1610689344 0x4E4BE39: opj_j2k_read_tile_header (j2k.c:8617) n1: 1610689344 0x4E4C902: opj_j2k_decode_tiles (j2k.c:10348) n1: 1610689344 0x4E4E3CE: opj_j2k_decode (j2k.c:7846) n1: 1610689344 0x4E53002: opj_jp2_decode (jp2.c:1564) n0: 1610689344 0x40374E: main (opj_decompress.c:1459) n1: 219232541 0x4E4BC50: opj_j2k_read_tile_header (j2k.c:4683) n1: 219232541 0x4E4C902: opj_j2k_decode_tiles (j2k.c:10348) n1: 219232541 0x4E4E3CE: opj_j2k_decode (j2k.c:7846) n1: 219232541 0x4E53002: opj_jp2_decode (jp2.c:1564) n0: 219232541 0x40374E: main (opj_decompress.c:1459) n1: 23893200 0x4E72735: opj_tcd_init_decode_tile (tcd.c:1225) n1: 23893200 0x4E4BE39: opj_j2k_read_tile_header (j2k.c:8617) n1: 23893200 0x4E4C902: opj_j2k_decode_tiles (j2k.c:10348) n1: 23893200 0x4E4E3CE: opj_j2k_decode (j2k.c:7846) n1: 23893200 0x4E53002: opj_jp2_decode (jp2.c:1564) n0: 23893200 0x40374E: main (opj_decompress.c:1459) n0: 17497464 in 52 places, all below massif's threshold (1.00%)
Diffstat (limited to 'src/lib/openjp2/t1.h')
-rw-r--r--src/lib/openjp2/t1.h10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/lib/openjp2/t1.h b/src/lib/openjp2/t1.h
index da8b0c80..5aa6a07b 100644
--- a/src/lib/openjp2/t1.h
+++ b/src/lib/openjp2/t1.h
@@ -202,10 +202,12 @@ typedef struct opj_t1 {
OPJ_BOOL encoder;
/* Thre 3 variables below are only used by the decoder */
- OPJ_BOOL mustuse_segdatabuffer; /* set to TRUE in multithreaded context */
- OPJ_BYTE
- *segdatabuffer; /* Temporary buffer to concatenate all chunks of a segment */
- OPJ_UINT32 segdatabuffersize; /* Maximum size available in segdatabuffer */
+ /* set to TRUE in multithreaded context */
+ OPJ_BOOL mustuse_cblkdatabuffer;
+ /* Temporary buffer to concatenate all chunks of a codebock */
+ OPJ_BYTE *cblkdatabuffer;
+ /* Maximum size available in cblkdatabuffer */
+ OPJ_UINT32 cblkdatabuffersize;
} opj_t1_t;
/** @name Exported functions */