typedef struct opj_jp2_comps {
int depth;
int sgnd;
- int bpcc;
+ OPJ_UINT32 bpcc;
} opj_jp2_comps_t;
/**
JP2 Box
*/
typedef struct opj_jp2_box {
- OPJ_INT32 length;
- OPJ_INT32 type;
+ OPJ_UINT32 length;
+ OPJ_UINT32 type;
OPJ_INT32 init_pos;
} opj_jp2_box_t;
@return Returns a decoded image if successful, returns NULL otherwise
*/
opj_image_t* opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info);
+
+/**
+ * Decode an image from a JPEG-2000 file stream
+ * @param jp2 JP2 decompressor handle
+ * @param cio Input buffer stream
+ * @param cstr_info Codestream information structure if required, NULL otherwise
+ * @return Returns a decoded image if successful, returns NULL otherwise
+*/
+opj_bool opj_jp2_decode_v2( opj_jp2_v2_t *jp2,
+ struct opj_stream_private *cio,
+ opj_image_t* p_image,
+ struct opj_event_mgr * p_manager);
+
+
/**
Creates a JP2 compression structure
@param cinfo Codec context info
*/
opj_bool jp2_read_header( struct opj_stream_private *p_stream,
opj_jp2_v2_t *jp2,
- opj_file_info_t * p_file_info,
+ opj_image_t * p_img_header,
struct opj_event_mgr * p_manager
);
struct opj_event_mgr * p_manager
);
+
+/**
+ * Dump some elements from the JP2 decompression structure .
+ *
+ *@param p_jp2 the jp2 codec.
+ *@param flag flag to describe what elments are dump.
+ *@param out_stream output stream where dump the elements.
+ *
+*/
+void jp2_dump (opj_jp2_v2_t* p_jp2, OPJ_INT32 flag, FILE* out_stream);
+
+/**
+ * Get the codestream info from a JPEG2000 codec.
+ *
+ *@param p_jp2 jp2 codec.
+ *
+ *@return the codestream information extract from the jpg2000 codec
+ */
+opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_v2_t* p_jp2);
+
+/**
+ * Get the codestream index from a JPEG2000 codec.
+ *
+ *@param p_jp2 jp2 codec.
+ *
+ *@return the codestream index extract from the jpg2000 codec
+ */
+opj_codestream_index_t* jp2_get_cstr_index(opj_jp2_v2_t* p_jp2);
+
/*@}*/
/*@}*/