summaryrefslogtreecommitdiff
path: root/third_party/libopenjpeg20/j2k.h
diff options
context:
space:
mode:
authorNicolas Pena <npm@chromium.org>2017-10-23 10:30:46 -0400
committerChromium commit bot <commit-bot@chromium.org>2017-10-23 22:40:23 +0000
commit826480cf599f61fe0366ab2bd5803dd53c9d0562 (patch)
treed42bca4255a2ecf484b8498b08c6132dbcffe86a /third_party/libopenjpeg20/j2k.h
parentebdba614b9683ddd1d50e8960639bc54c9d4bb7a (diff)
downloadpdfium-826480cf599f61fe0366ab2bd5803dd53c9d0562.tar.xz
Upgrade LibopenJPEG to 2.3chromium/3249
Bug: Change-Id: I4c968a4e5f41037d80e5dc64a1297cd2cbda31b1 Reviewed-on: https://pdfium-review.googlesource.com/16350 Reviewed-by: dsinclair <dsinclair@chromium.org> Commit-Queue: Nicolás Peña Moreno <npm@chromium.org>
Diffstat (limited to 'third_party/libopenjpeg20/j2k.h')
-rw-r--r--third_party/libopenjpeg20/j2k.h25
1 files changed, 23 insertions, 2 deletions
diff --git a/third_party/libopenjpeg20/j2k.h b/third_party/libopenjpeg20/j2k.h
index d61c96dba3..5d393c9813 100644
--- a/third_party/libopenjpeg20/j2k.h
+++ b/third_party/libopenjpeg20/j2k.h
@@ -107,6 +107,8 @@ The functions in J2K.C have for goal to read/write the several parts of the code
#endif /* USE_JPSEC */
/* <<UniPG */
+#define J2K_MAX_POCS 32 /**< Maximum number of POCs */
+
/* ----------------------------------------------------------------------- */
/**
@@ -251,7 +253,7 @@ typedef struct opj_tcp {
/** number of progression order changes */
OPJ_UINT32 numpocs;
/** progression order changes */
- opj_poc_t pocs[32];
+ opj_poc_t pocs[J2K_MAX_POCS];
/** number of ppt markers (reserved size) */
OPJ_UINT32 ppt_markers_count;
@@ -480,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;
@@ -617,7 +623,7 @@ OPJ_BOOL opj_j2k_setup_encoder(opj_j2k_t *p_j2k,
/**
Converts an enum type progression order to string type
*/
-char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order);
+const char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order);
/* ----------------------------------------------------------------------- */
/*@}*/
@@ -705,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.
*