summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/tcd.h
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@gmail.com>2014-11-03 14:51:41 +0000
committerAntonin Descampe <antonin@gmail.com>2014-11-03 14:51:41 +0000
commitc3629e37a206ec8a60da6c00dbc04bf4a28b2868 (patch)
tree1c61032428dee8ad7362e1ad38decaaca5a85545 /src/lib/openjp2/tcd.h
parentcf5153c518045027f286e08af36809237a76a7df (diff)
[trunk] significantly reduces memory for single tile RGB encoding (fixes
issue 375)
Diffstat (limited to 'src/lib/openjp2/tcd.h')
-rw-r--r--src/lib/openjp2/tcd.h25
1 files changed, 17 insertions, 8 deletions
diff --git a/src/lib/openjp2/tcd.h b/src/lib/openjp2/tcd.h
index 360923b1..bcd5135b 100644
--- a/src/lib/openjp2/tcd.h
+++ b/src/lib/openjp2/tcd.h
@@ -155,14 +155,16 @@ FIXME DOC
*/
typedef struct opj_tcd_tilecomp
{
- OPJ_INT32 x0, y0, x1, y1; /* dimension of component : left upper corner (x0, y0) right low corner (x1,y1) */
- OPJ_UINT32 numresolutions; /* number of resolutions level */
- OPJ_UINT32 minimum_num_resolutions; /* number of resolutions level to decode (at max)*/
- opj_tcd_resolution_t *resolutions; /* resolutions information */
- OPJ_UINT32 resolutions_size; /* size of data for resolutions (in bytes) */
- OPJ_INT32 *data; /* data of the component */
- OPJ_UINT32 data_size; /* size of the data of the component */
- OPJ_INT32 numpix; /* add fixed_quality */
+ OPJ_INT32 x0, y0, x1, y1; /* dimension of component : left upper corner (x0, y0) right low corner (x1,y1) */
+ OPJ_UINT32 numresolutions; /* number of resolutions level */
+ OPJ_UINT32 minimum_num_resolutions; /* number of resolutions level to decode (at max)*/
+ opj_tcd_resolution_t *resolutions; /* resolutions information */
+ OPJ_UINT32 resolutions_size; /* size of data for resolutions (in bytes) */
+ OPJ_INT32 *data; /* data of the component */
+ OPJ_BOOL ownsData; /* if true, then need to free after usage, otherwise do not free */
+ OPJ_UINT32 data_size_needed; /* we may either need to allocate this amount of data, or re-use image data and ignore this value */
+ OPJ_UINT32 data_size; /* size of the data of the component */
+ OPJ_INT32 numpix; /* add fixed_quality */
} opj_tcd_tilecomp_t;
@@ -346,6 +348,13 @@ OPJ_BOOL opj_tcd_copy_tile_data (opj_tcd_t *p_tcd,
OPJ_BYTE * p_src,
OPJ_UINT32 p_src_length );
+/**
+ * Allocates tile component data
+ *
+ *
+ */
+OPJ_BOOL opj_alloc_tile_component_data(opj_tcd_tilecomp_t *l_tilec);
+
/* ----------------------------------------------------------------------- */
/*@}*/