[trunk] add libopenjpeg-jpwl.pc.in. fix output when --disable-shared or --disable...
[openjpeg.git] / libopenjpeg / jp2.h
index b0a60086582d8f259506aafda9004b25d8a31a46..58cd51c3e7431180c1f65150202af5d880440fb2 100644 (file)
@@ -145,7 +145,7 @@ JP2 component
 typedef struct opj_jp2_comps {
   int depth;             
   int sgnd;               
-  int bpcc;
+  OPJ_UINT32 bpcc;
 } opj_jp2_comps_t;
 
 /**
@@ -221,8 +221,8 @@ opj_jp2_v2_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;
 
@@ -285,6 +285,20 @@ Decode an image from a JPEG-2000 file stream
 @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
@@ -334,8 +348,7 @@ opj_bool jp2_end_decompress(opj_jp2_v2_t *jp2, struct opj_stream_private *cio, s
  */
 opj_bool jp2_read_header(      struct opj_stream_private *p_stream,
                                                        opj_jp2_v2_t *jp2,
-                                                       opj_image_header_t ** p_image_header,
-                                                       struct opj_codestream_info** p_cstr_info,
+                                                       opj_image_t * p_img_header,
                                                        struct opj_event_mgr * p_manager
                                                        );
 
@@ -408,6 +421,35 @@ opj_bool jp2_set_decode_area(
                        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);
+
 /*@}*/
 
 /*@}*/