Improve doc of opj_tccp_info_t::cblkw and cblkh
[openjpeg.git] / src / lib / openjp2 / openjpeg.h
index 8b58050337385ef09406873379751100d1376a2d..9ae29a4f3a538baaed34a4fa04aa1357b675f447 100644 (file)
@@ -501,6 +501,7 @@ typedef struct opj_cparameters {
 } opj_cparameters_t;
 
 #define OPJ_DPARAMETERS_IGNORE_PCLR_CMAP_CDEF_FLAG  0x0001
+#define OPJ_DPARAMETERS_DUMP_FLAG 0x0002
 
 /**
  * Decompression parameters
@@ -564,7 +565,6 @@ typedef struct opj_dparameters {
     /* <<UniPG */
 
     unsigned int flags;
-    unsigned int dump_state; /* AFL test */
 
 } opj_dparameters_t;
 
@@ -867,13 +867,13 @@ typedef struct opj_tccp_info {
     OPJ_UINT32 csty;
     /** number of resolutions */
     OPJ_UINT32 numresolutions;
-    /** code-blocks width */
+    /** log2 of code-blocks width */
     OPJ_UINT32 cblkw;
-    /** code-blocks height */
+    /** log2 of code-blocks height */
     OPJ_UINT32 cblkh;
     /** code-block coding style */
     OPJ_UINT32 cblksty;
-    /** discrete wavelet transform identifier */
+    /** discrete wavelet transform identifier: 0 = 9-7 irreversible, 1 = 5-3 reversible */
     OPJ_UINT32 qmfbid;
     /** quantisation style */
     OPJ_UINT32 qntsty;
@@ -1094,6 +1094,27 @@ OPJ_API void OPJ_CALLCONV opj_image_destroy(opj_image_t *image);
 OPJ_API opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts,
         opj_image_cmptparm_t *cmptparms, OPJ_COLOR_SPACE clrspc);
 
+/**
+ * Allocator for opj_image_t->comps[].data
+ * To be paired with opj_image_data_free.
+ *
+ * @param   size    number of bytes to allocate
+ *
+ * @return  a new pointer if successful, NULL otherwise.
+ * @since 2.2.0
+*/
+OPJ_API void* OPJ_CALLCONV opj_image_data_alloc(OPJ_SIZE_T size);
+
+/**
+ * Destructor for opj_image_t->comps[].data
+ * To be paired with opj_image_data_alloc.
+ *
+ * @param   ptr    Pointer to free
+ *
+ * @since 2.2.0
+*/
+OPJ_API void OPJ_CALLCONV opj_image_data_free(void* ptr);
+
 /*
 ==========================================================
    stream functions definitions