summaryrefslogtreecommitdiff
path: root/src/lib/openjp2/j2k.h
diff options
context:
space:
mode:
authorAntonin Descampe <antonin@descampe.net>2017-09-26 18:30:20 -0300
committerGitHub <noreply@github.com>2017-09-26 18:30:20 -0300
commitd45ccb048bb2166c5d975f4e1b8acaf8ba3d198d (patch)
treebbf4b49da38487923abc0cbf6565cf6504921e36 /src/lib/openjp2/j2k.h
parent3f0de88c7bf4e56826987aa7d3edb5acdd4399f2 (diff)
parente17bbde9066600528ab523adee69d9c9c33ba157 (diff)
Merge pull request #1022 from rouault/partial_component_decoding
Add capability to decode only a subset of all components of an image.
Diffstat (limited to 'src/lib/openjp2/j2k.h')
-rw-r--r--src/lib/openjp2/j2k.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/lib/openjp2/j2k.h b/src/lib/openjp2/j2k.h
index d975419e..5d393c98 100644
--- a/src/lib/openjp2/j2k.h
+++ b/src/lib/openjp2/j2k.h
@@ -482,6 +482,10 @@ typedef struct opj_j2k_dec {
* SOD reader function. FIXME NOT USED for the moment
*/
OPJ_BOOL m_last_tile_part;
+
+ OPJ_UINT32 m_numcomps_to_decode;
+ OPJ_UINT32 *m_comps_indices_to_decode;
+
/** to tell that a tile can be decoded. */
OPJ_BITFIELD m_can_decode : 1;
OPJ_BITFIELD m_discard_tiles : 1;
@@ -707,6 +711,21 @@ OPJ_BOOL opj_j2k_read_tile_header(opj_j2k_t * p_j2k,
opj_event_mgr_t * p_manager);
+/** Sets the indices of the components to decode.
+ *
+ * @param p_j2k the jpeg2000 codec.
+ * @param numcomps Number of components to decode.
+ * @param comps_indices Array of num_compts indices (numbering starting at 0)
+ * corresponding to the components to decode.
+ * @param p_manager Event manager
+ *
+ * @return OPJ_TRUE in case of success.
+ */
+OPJ_BOOL opj_j2k_set_decoded_components(opj_j2k_t *p_j2k,
+ OPJ_UINT32 numcomps,
+ const OPJ_UINT32* comps_indices,
+ opj_event_mgr_t * p_manager);
+
/**
* Sets the given area to be decoded. This function should be called right after opj_read_header and before any tile header reading.
*