]> granicus.if.org Git - openjpeg/commitdiff
[trunk] move opj_bool to OPJ_BOOL to follow the other type
authorMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 15 Nov 2012 13:13:36 +0000 (13:13 +0000)
committerMickael Savinaud <savmickael@users.noreply.github.com>
Thu, 15 Nov 2012 13:13:36 +0000 (13:13 +0000)
30 files changed:
src/lib/openjp2/bio.c
src/lib/openjp2/bio.h
src/lib/openjp2/cio.c
src/lib/openjp2/cio.h
src/lib/openjp2/dwt.c
src/lib/openjp2/dwt.h
src/lib/openjp2/event.c
src/lib/openjp2/event.h
src/lib/openjp2/function_list.c
src/lib/openjp2/function_list.h
src/lib/openjp2/invert.c
src/lib/openjp2/invert.h
src/lib/openjp2/j2k.c
src/lib/openjp2/j2k.h
src/lib/openjp2/jp2.c
src/lib/openjp2/jp2.h
src/lib/openjp2/mct.c
src/lib/openjp2/mct.h
src/lib/openjp2/mqc.c
src/lib/openjp2/mqc.h
src/lib/openjp2/openjpeg.c
src/lib/openjp2/openjpeg.h
src/lib/openjp2/pi.c
src/lib/openjp2/pi.h
src/lib/openjp2/t1.c
src/lib/openjp2/t1.h
src/lib/openjp2/t2.c
src/lib/openjp2/t2.h
src/lib/openjp2/tcd.c
src/lib/openjp2/tcd.h

index f4694069fba4e13991b0239f6ff738c56b771dc4..797e01e1a4c2a649801059bef073042797d388d2 100644 (file)
@@ -54,13 +54,13 @@ Write a byte
 @param bio BIO handle
 @return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise
 */
-static opj_bool opj_bio_byteout(opj_bio_t *bio);
+static OPJ_BOOL opj_bio_byteout(opj_bio_t *bio);
 /**
 Read a byte
 @param bio BIO handle
 @return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise
 */
-static opj_bool opj_bio_bytein(opj_bio_t *bio);
+static OPJ_BOOL opj_bio_bytein(opj_bio_t *bio);
 
 /*@}*/
 
@@ -72,7 +72,7 @@ static opj_bool opj_bio_bytein(opj_bio_t *bio);
 ==========================================================
 */
 
-opj_bool opj_bio_byteout(opj_bio_t *bio) {
+OPJ_BOOL opj_bio_byteout(opj_bio_t *bio) {
        bio->buf = (bio->buf << 8) & 0xffff;
        bio->ct = bio->buf == 0xff00 ? 7 : 8;
        if (bio->bp >= bio->end) {
@@ -82,7 +82,7 @@ opj_bool opj_bio_byteout(opj_bio_t *bio) {
        return OPJ_TRUE;
 }
 
-opj_bool opj_bio_bytein(opj_bio_t *bio) {
+OPJ_BOOL opj_bio_bytein(opj_bio_t *bio) {
        bio->buf = (bio->buf << 8) & 0xffff;
        bio->ct = bio->buf == 0xff00 ? 7 : 8;
        if (bio->bp >= bio->end) {
@@ -162,7 +162,7 @@ OPJ_UINT32 opj_bio_read(opj_bio_t *bio, OPJ_UINT32 n) {
        return v;
 }
 
-opj_bool opj_bio_flush(opj_bio_t *bio) {
+OPJ_BOOL opj_bio_flush(opj_bio_t *bio) {
        bio->ct = 0;
        if (! opj_bio_byteout(bio)) {
                return OPJ_FALSE;
@@ -176,7 +176,7 @@ opj_bool opj_bio_flush(opj_bio_t *bio) {
        return OPJ_TRUE;
 }
 
-opj_bool opj_bio_inalign(opj_bio_t *bio) {
+OPJ_BOOL opj_bio_inalign(opj_bio_t *bio) {
        bio->ct = 0;
        if ((bio->buf & 0xff) == 0xff) {
                if (! opj_bio_bytein(bio)) {
index a69299b9dd439a261981f6002bb19f65bee4067d..b4dd7fa3454acfa4467e4c7832f82343182516b0 100644 (file)
@@ -112,13 +112,13 @@ Flush bits
 @param bio BIO handle
 @return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise
 */
-opj_bool opj_bio_flush(opj_bio_t *bio);
+OPJ_BOOL opj_bio_flush(opj_bio_t *bio);
 /**
 Passes the ending bits (coming from flushing)
 @param bio BIO handle
 @return Returns OPJ_TRUE if successful, returns OPJ_FALSE otherwise
 */
-opj_bool opj_bio_inalign(opj_bio_t *bio);
+OPJ_BOOL opj_bio_inalign(opj_bio_t *bio);
 /* ----------------------------------------------------------------------- */
 /*@}*/
 
index 9d3c388088e237cb8e14893ee4a07b5469ae9d8e..9f93f841e901efa415991820bed0bc3eaac35884 100644 (file)
@@ -140,7 +140,7 @@ void opj_read_float_LE(const OPJ_BYTE * p_buffer, OPJ_FLOAT32 * p_value)
        }
 }
 
-opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size,opj_bool l_is_input)
+opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size,OPJ_BOOL l_is_input)
 {
        opj_stream_private_t * l_stream = 00;
        l_stream = (opj_stream_private_t*) opj_malloc(sizeof(opj_stream_private_t));
@@ -177,7 +177,7 @@ opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size,opj_bool l
        return (opj_stream_t *) l_stream;
 }
 
-opj_stream_t* OPJ_CALLCONV opj_stream_default_create(opj_bool l_is_input)
+opj_stream_t* OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL l_is_input)
 {
        return opj_stream_create(OPJ_J2K_STREAM_CHUNK_SIZE,l_is_input);
 }
@@ -403,7 +403,7 @@ OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,
 
 }
 
-opj_bool opj_stream_flush (opj_stream_private_t * p_stream, opj_event_mgr_t * p_event_mgr)
+OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, opj_event_mgr_t * p_event_mgr)
 {
        /* the number of bytes written on the media. */
        OPJ_SIZE_T l_current_write_nb_bytes = 0;
@@ -488,7 +488,7 @@ OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz
 
 OPJ_OFF_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr)
 {
-       opj_bool l_is_written = 0;
+       OPJ_BOOL l_is_written = 0;
        OPJ_OFF_T l_current_skip_nb_bytes = 0;
        OPJ_OFF_T l_skip_nb_bytes = 0;
 
@@ -547,7 +547,7 @@ OPJ_OFF_T opj_stream_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, op
        return p_stream->m_opj_skip(p_stream,p_size,p_event_mgr);
 }
 
-opj_bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr)
+OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr)
 {
        OPJ_ARG_NOT_USED(p_event_mgr);
        p_stream->m_current_data = p_stream->m_stored_data;
@@ -567,7 +567,7 @@ opj_bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size
        return OPJ_TRUE;
 }
 
-opj_bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr)
+OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, opj_event_mgr_t * p_event_mgr)
 {
        if (! opj_stream_flush(p_stream,p_event_mgr)) {
                p_stream->m_status |= opj_stream_e_error;
@@ -588,13 +588,13 @@ opj_bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz
        return OPJ_TRUE;
 }
 
-opj_bool opj_stream_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr)
+OPJ_BOOL opj_stream_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr)
 {
        assert(p_size >= 0);
        return p_stream->m_opj_seek(p_stream,p_size,p_event_mgr);
 }
 
-opj_bool opj_stream_has_seek (const opj_stream_private_t * p_stream)
+OPJ_BOOL opj_stream_has_seek (const opj_stream_private_t * p_stream)
 {
        return p_stream->m_seek_fn != opj_stream_default_seek;
 }
@@ -622,7 +622,7 @@ OPJ_OFF_T opj_stream_default_skip (OPJ_OFF_T p_nb_bytes, void * p_user_data)
        return (OPJ_OFF_T) -1;
 }
 
-opj_bool opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data)
+OPJ_BOOL opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data)
 {
        OPJ_ARG_NOT_USED(p_nb_bytes);
        OPJ_ARG_NOT_USED(p_user_data);
index ca218cefe1e0b2ae892dda789e5a6ad4f3a61024..81f6fcfab829e8fd29cdaa1907bbbd8099eafafb 100644 (file)
@@ -128,7 +128,7 @@ typedef struct opj_stream_private
     /**
     * FIXME DOC.
     */
-       opj_bool (* m_opj_seek) (struct opj_stream_private * , OPJ_OFF_T , struct opj_event_mgr *);
+       OPJ_BOOL (* m_opj_seek) (struct opj_stream_private * , OPJ_OFF_T , struct opj_event_mgr *);
 
        /**
         * number of bytes containing in the buffer.
@@ -274,7 +274,7 @@ OPJ_SIZE_T opj_stream_write_data (opj_stream_private_t * p_stream,const OPJ_BYTE
  * @param              p_event_mgr     the user event manager to be notified of special events.
  * @return             true if the data could be flushed, false else.
  */
-opj_bool opj_stream_flush (opj_stream_private_t * p_stream, struct opj_event_mgr * p_event_mgr);
+OPJ_BOOL opj_stream_flush (opj_stream_private_t * p_stream, struct opj_event_mgr * p_event_mgr);
 
 /**
  * Skips a number of bytes from the stream.
@@ -329,7 +329,7 @@ OPJ_OFF_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz
  * @param              p_event_mgr     the user event manager to be notified of special events.
  * @return             OPJ_TRUE if success, or OPJ_FALSE if an error occured.
  */
-opj_bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
+OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
 
 /**
  * Skips a number of bytes from the stream.
@@ -338,7 +338,7 @@ opj_bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size
  * @param              p_event_mgr     the user event manager to be notified of special events.
  * @return             the number of bytes skipped, or -1 if an error occured.
  */
-opj_bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
+OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
 
 /**
  * Seeks a number of bytes from the stream.
@@ -347,12 +347,12 @@ opj_bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_siz
  * @param              p_event_mgr     the user event manager to be notified of special events.
  * @return             true if the stream is seekable.
  */
-opj_bool opj_stream_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
+OPJ_BOOL opj_stream_seek (opj_stream_private_t * p_stream, OPJ_OFF_T p_size, struct opj_event_mgr * p_event_mgr);
 
 /**
  * Tells if the given stream is seekable.
  */
-opj_bool opj_stream_has_seek (const opj_stream_private_t * p_stream);
+OPJ_BOOL opj_stream_has_seek (const opj_stream_private_t * p_stream);
 
 /**
  * FIXME DOC.
@@ -372,7 +372,7 @@ OPJ_OFF_T opj_stream_default_skip (OPJ_OFF_T p_nb_bytes, void * p_user_data);
 /**
  * FIXME DOC.
  */
-opj_bool opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data);
+OPJ_BOOL opj_stream_default_seek (OPJ_OFF_T p_nb_bytes, void * p_user_data);
 
 /* ----------------------------------------------------------------------- */
 /*@}*/
index 1a3d3f718b44e4fa2c192e18cc4b968fc9c4ba80..161a01a35302db70f01485a524bd2ecc6a475732 100644 (file)
@@ -118,9 +118,9 @@ static void opj_dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_st
 /**
 Inverse wavelet transform in 2-D.
 */
-static opj_bool opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 i, DWT1DFN fn);
+static OPJ_BOOL opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 i, DWT1DFN fn);
 
-static opj_bool opj_dwt_encode_procedure(      opj_tcd_tilecomp_t * tilec,
+static OPJ_BOOL opj_dwt_encode_procedure(      opj_tcd_tilecomp_t * tilec,
                                                                                    void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) );
 
 static OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i);
@@ -379,7 +379,7 @@ void opj_dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsize_
 /* <summary>                            */
 /* Forward 5-3 wavelet transform in 2-D. */
 /* </summary>                           */
-INLINE opj_bool opj_dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) )
+INLINE OPJ_BOOL opj_dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) )
 {
        OPJ_INT32 i, j, k;
        OPJ_INT32 *a = 00;
@@ -460,7 +460,7 @@ INLINE opj_bool opj_dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_fun
 
 /* Forward 5-3 wavelet transform in 2-D. */
 /* </summary>                           */
-opj_bool opj_dwt_encode(opj_tcd_tilecomp_t * tilec)
+OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t * tilec)
 {
        return opj_dwt_encode_procedure(tilec,opj_dwt_encode_1);
 }
@@ -468,7 +468,7 @@ opj_bool opj_dwt_encode(opj_tcd_tilecomp_t * tilec)
 /* <summary>                            */
 /* Inverse 5-3 wavelet transform in 2-D. */
 /* </summary>                           */
-opj_bool opj_dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres) {
+OPJ_BOOL opj_dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres) {
        return opj_dwt_decode_tile(tilec, numres, &opj_dwt_decode_1);
 }
 
@@ -494,7 +494,7 @@ OPJ_FLOAT64 opj_dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient) {
 /* <summary>                             */
 /* Forward 9-7 wavelet transform in 2-D. */
 /* </summary>                            */
-opj_bool opj_dwt_encode_real(opj_tcd_tilecomp_t * tilec)
+OPJ_BOOL opj_dwt_encode_real(opj_tcd_tilecomp_t * tilec)
 {
        return opj_dwt_encode_procedure(tilec,opj_dwt_encode_1_real);
 }
@@ -554,7 +554,7 @@ OPJ_UINT32 opj_dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i
 /* <summary>                            */
 /* Inverse wavelet transform in 2-D.     */
 /* </summary>                           */
-opj_bool opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1DFN dwt_1D) {
+OPJ_BOOL opj_dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1DFN dwt_1D) {
        dwt_t h;
        dwt_t v;
 
@@ -826,7 +826,7 @@ void opj_v4dwt_decode(v4dwt_t* restrict dwt)
 /* <summary>                             */
 /* Inverse 9-7 wavelet transform in 2-D. */
 /* </summary>                            */
-opj_bool opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres)
+OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres)
 {
        v4dwt_t h;
        v4dwt_t v;
index 43349a768903be50f769b74b6abe7e69cc7be937..fae3726585b6fde4a5f21c70bae51c337be2a0ae 100644 (file)
@@ -52,7 +52,7 @@ Forward 5-3 wavelet tranform in 2-D.
 Apply a reversible DWT transform to a component of an image.
 @param tilec Tile component information (current tile)
 */
-opj_bool opj_dwt_encode(opj_tcd_tilecomp_t * tilec);
+OPJ_BOOL opj_dwt_encode(opj_tcd_tilecomp_t * tilec);
 
 /**
 Inverse 5-3 wavelet tranform in 2-D.
@@ -60,7 +60,7 @@ Apply a reversible inverse DWT transform to a component of an image.
 @param tilec Tile component information (current tile)
 @param numres Number of resolution levels to decode
 */
-opj_bool opj_dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres);
+OPJ_BOOL opj_dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres);
 
 /**
 Get the gain of a subband for the reversible 5-3 DWT.
@@ -80,14 +80,14 @@ Forward 9-7 wavelet transform in 2-D.
 Apply an irreversible DWT transform to a component of an image.
 @param tilec Tile component information (current tile)
 */
-opj_bool opj_dwt_encode_real(opj_tcd_tilecomp_t * tilec);
+OPJ_BOOL opj_dwt_encode_real(opj_tcd_tilecomp_t * tilec);
 /**
 Inverse 9-7 wavelet transform in 2-D. 
 Apply an irreversible inverse DWT transform to a component of an image.
 @param tilec Tile component information (current tile)
 @param numres Number of resolution levels to decode
 */
-opj_bool opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres);
+OPJ_BOOL opj_dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres);
 
 /**
 Get the gain of a subband for the irreversible 9-7 DWT.
index 04d37cf185f6c5090e35fa638d768241992c646c..27b8b7128119876c8cb2293a7f2e3ce940e193fe 100644 (file)
@@ -76,7 +76,7 @@ static void opj_default_callback (const char *msg, void *client_data)
 
 
 /* ----------------------------------------------------------------------- */
-opj_bool opj_event_msg(opj_event_mgr_t* p_event_mgr, int event_type, const char *fmt, ...) {
+OPJ_BOOL opj_event_msg(opj_event_mgr_t* p_event_mgr, int event_type, const char *fmt, ...) {
 #define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
        opj_msg_callback msg_handler = 00;
        void * l_data = 00;
index 39d980d6ddb90962744d01a5f26c7efd139b30cf..9b2a657ed72dbdb271f036ca2c68654e9073d3f2 100644 (file)
@@ -80,7 +80,7 @@ typedef struct opj_event_mgr
  *
  * @return Returns true if successful, returns false otherwise
  */
-opj_bool opj_event_msg(opj_event_mgr_t* event_mgr, int event_type, const char *fmt, ...);
+OPJ_BOOL opj_event_msg(opj_event_mgr_t* event_mgr, int event_type, const char *fmt, ...);
 /* ----------------------------------------------------------------------- */
 
 /**
index 4c6ec8d6e0091890e1cbc99e10cbf4335afe7c60..bf8c0bb60de6d1aa5c0f3e7f326d643298584629 100644 (file)
@@ -67,7 +67,7 @@ void  opj_procedure_list_destroy(opj_procedure_list_t * p_list)
         opj_free(p_list);
 }
 
-opj_bool opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure)
+OPJ_BOOL opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure)
 {
         if (p_validation_list->m_nb_max_procedures == p_validation_list->m_nb_procedures)
         {
index 1c0553d60b8eb60b57a4bffa07af63936b94cba8..ffb75a0f7bdfad7033def65f80f9812871accab5 100644 (file)
@@ -90,7 +90,7 @@ void  opj_procedure_list_destroy(opj_procedure_list_t * p_list);
  *
  * @return     OPJ_TRUE if the procedure could be added.
  */
-opj_bool opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure);
+OPJ_BOOL opj_procedure_list_add_procedure (opj_procedure_list_t * p_validation_list, opj_procedure p_procedure);
 
 /**
  * Gets the number of validation procedures.
index b05fabd4f82abf37c0c0bbb8248408d81f8614d0..5e2d66142e9e3773daa5be4547edde309b906670 100644 (file)
@@ -29,7 +29,7 @@
 /** 
  * LUP decomposition
  */
-static opj_bool opj_lupDecompose(OPJ_FLOAT32 * matrix,
+static OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,
                                  OPJ_UINT32 * permutations, 
                                  OPJ_FLOAT32 * p_swap_area,
                                  OPJ_UINT32 nb_compo);
@@ -62,7 +62,7 @@ static void opj_lupInvert ( OPJ_FLOAT32 * pSrcMatrix,
 /**
  * Matrix inversion.
  */
-opj_bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,
+OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,
                                 OPJ_FLOAT32 * pDestMatrix, 
                                 OPJ_UINT32 nb_compo)
 {
@@ -98,7 +98,7 @@ opj_bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,
    Local functions
 ==========================================================
 */
-opj_bool opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, 
+OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, 
                           OPJ_FLOAT32 * p_swap_area,
                           OPJ_UINT32 nb_compo) 
 {
index 665a4d166b5a71297063e77db37e95b63b591d12..2193fc194a04b2f782655c8cd2a520f2e22f17dc 100644 (file)
@@ -48,7 +48,7 @@ The function in INVERT.H compute a matrix inversion with a LUP method
  * @param n size of the matrix
  * @return OPJ_TRUE if the inversion is successful, OPJ_FALSE if the matrix is singular.
  */
-opj_bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,
+OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,
                                 OPJ_FLOAT32 * pDestMatrix, 
                                 OPJ_UINT32 nb_compo);
 /* ----------------------------------------------------------------------- */
index f90e6eb972f9425996b2fa21db4e35569c4d7d1d..a63466a82e0640263151ba50a79ad772a3db6891 100644 (file)
@@ -49,7 +49,7 @@ static void opj_j2k_setup_header_reading (opj_j2k_t *p_j2k);
 /**
  * The read header procedure.
  */
-static opj_bool opj_j2k_read_header_procedure(  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_header_procedure(  opj_j2k_t *p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager);
 
@@ -62,7 +62,7 @@ static opj_bool opj_j2k_read_header_procedure(  opj_j2k_t *p_j2k,
  *
  * @return true if the parameters are correct.
  */
-static opj_bool opj_j2k_encoding_validation (   opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_encoding_validation (   opj_j2k_t * p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager );
 
@@ -75,7 +75,7 @@ static opj_bool opj_j2k_encoding_validation (   opj_j2k_t * p_j2k,
  *
  * @return true if the parameters are correct.
  */
-static opj_bool opj_j2k_decoding_validation (   opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_decoding_validation (   opj_j2k_t * p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager );
 
@@ -106,20 +106,20 @@ static void opj_j2k_setup_end_compress (opj_j2k_t *p_j2k);
  *
  * @return true if the parameters are correct.
  */
-static opj_bool opj_j2k_mct_validation (opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_mct_validation (opj_j2k_t * p_j2k,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager );
 
 /**
  * Builds the tcd decoder to use to decode tile.
  */
-static opj_bool opj_j2k_build_decoder ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_build_decoder ( opj_j2k_t * p_j2k,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager );
 /**
  * Builds the tcd encoder to use to encode tile.
  */
-static opj_bool opj_j2k_build_encoder ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_build_encoder ( opj_j2k_t * p_j2k,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager );
 
@@ -130,7 +130,7 @@ static opj_bool opj_j2k_build_encoder ( opj_j2k_t * p_j2k,
  * @param       p_j2k                           J2K codec.
  * @param       p_manager                   the user event manager.
 */
-static opj_bool opj_j2k_create_tcd(     opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_create_tcd(     opj_j2k_t *p_j2k,
                                                                     opj_stream_private_t *p_stream,
                                                                     opj_event_mgr_t * p_manager );
 
@@ -144,7 +144,7 @@ static opj_bool opj_j2k_create_tcd(     opj_j2k_t *p_j2k,
  *
  * @return      true                            if all the procedures were successfully executed.
  */
-static opj_bool opj_j2k_exec (  opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_exec (  opj_j2k_t * p_j2k,
                             opj_procedure_list_t * p_procedure_list,
                             opj_stream_private_t *p_stream,
                             opj_event_mgr_t * p_manager);
@@ -156,7 +156,7 @@ static opj_bool opj_j2k_exec (  opj_j2k_t * p_j2k,
  * @param       p_j2k                           J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_update_rates(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_update_rates(   opj_j2k_t *p_j2k,
                                                                             opj_stream_private_t *p_stream,
                                                                             opj_event_mgr_t * p_manager );
 
@@ -164,14 +164,14 @@ static opj_bool opj_j2k_update_rates(   opj_j2k_t *p_j2k,
  * Copies the decoding tile parameters onto all the tile parameters.
  * Creates also the tile decoder.
  */
-static opj_bool opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2k,
                                                             opj_stream_private_t *p_stream,
                                                             opj_event_mgr_t * p_manager );
 
 /**
  * Destroys the memory associated with the decoding of headers.
  */
-static opj_bool opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager );
 
@@ -217,7 +217,7 @@ static void opj_j2k_cp_destroy (opj_cp_t *p_cp);
  *
  * @return FIXME DOC
 */
-static opj_bool opj_j2k_write_SPCod_SPCoc(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_SPCod_SPCoc(      opj_j2k_t *p_j2k,
                                                                                     OPJ_UINT32 p_tile_no,
                                                                                     OPJ_UINT32 p_comp_no,
                                                                                     OPJ_BYTE * p_data,
@@ -245,7 +245,7 @@ static OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size (opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the COM marker.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_read_SPCod_SPCoc(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_SPCod_SPCoc(   opj_j2k_t *p_j2k,
                                             OPJ_UINT32 compno,
                                             OPJ_BYTE * p_header_data,
                                             OPJ_UINT32 * p_header_size,
@@ -275,7 +275,7 @@ static OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size (  opj_j2k_t *p_j2k,
  * @param       p_manager               the user event manager.
  *
 */
-static opj_bool opj_j2k_write_SQcd_SQcc(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_SQcd_SQcc(opj_j2k_t *p_j2k,
                                                                             OPJ_UINT32 p_tile_no,
                                                                             OPJ_UINT32 p_comp_no,
                                                                             OPJ_BYTE * p_data,
@@ -297,7 +297,7 @@ static void opj_j2k_update_tlm ( opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size)
  * @param       p_manager       the user event manager.
  *
 */
-static opj_bool opj_j2k_read_SQcd_SQcc( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_SQcd_SQcc( opj_j2k_t *p_j2k,
                                         OPJ_UINT32 compno,
                                         OPJ_BYTE * p_header_data,
                                         OPJ_UINT32 * p_header_size,
@@ -320,20 +320,20 @@ static void opj_j2k_copy_tile_quantization_parameters( opj_j2k_t *p_j2k );
 /**
  * Reads the tiles.
  */
-static opj_bool opj_j2k_decode_tiles (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_decode_tiles (  opj_j2k_t *p_j2k,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager);
 
-static opj_bool opj_j2k_pre_write_tile ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_pre_write_tile ( opj_j2k_t * p_j2k,
                                                                              OPJ_UINT32 p_tile_index,
                                                                              opj_stream_private_t *p_stream,
                                                                              opj_event_mgr_t * p_manager );
 
-static opj_bool opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image);
+static OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image);
 
 static void opj_j2k_get_tile_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data);
 
-static opj_bool opj_j2k_post_write_tile (opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_post_write_tile (opj_j2k_t * p_j2k,
                                                                              OPJ_BYTE * p_data,
                                                                              OPJ_UINT32 p_data_size,
                                                                              opj_stream_private_t *p_stream,
@@ -345,14 +345,14 @@ static opj_bool opj_j2k_post_write_tile (opj_j2k_t * p_j2k,
  */
 static void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k);
 
-static opj_bool opj_j2k_write_first_tile_part(  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_first_tile_part(  opj_j2k_t *p_j2k,
                                                                                             OPJ_BYTE * p_data,
                                                                                             OPJ_UINT32 * p_data_written,
                                                                                             OPJ_UINT32 p_total_data_size,
                                                                                             opj_stream_private_t *p_stream,
                                                                                             struct opj_event_mgr * p_manager );
 
-static opj_bool opj_j2k_write_all_tile_parts(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_all_tile_parts(   opj_j2k_t *p_j2k,
                                                                                             OPJ_BYTE * p_data,
                                                                                             OPJ_UINT32 * p_data_written,
                                                                                             OPJ_UINT32 p_total_data_size,
@@ -366,11 +366,11 @@ static opj_bool opj_j2k_write_all_tile_parts(   opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_get_end_header( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_get_end_header( opj_j2k_t *p_j2k,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager );
 
-static opj_bool opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k);
+static OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k);
 
 /*
  * -----------------------------------------------------------------------
@@ -385,7 +385,7 @@ static opj_bool opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k);
  * @param       p_j2k                   J2K codec.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_write_soc(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_soc(      opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                             opj_event_mgr_t * p_manager );
 
@@ -395,7 +395,7 @@ static opj_bool opj_j2k_write_soc(      opj_j2k_t *p_j2k,
  * @param       p_stream        XXX needs data
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_read_soc(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_soc(   opj_j2k_t *p_j2k,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -406,7 +406,7 @@ static opj_bool opj_j2k_read_soc(   opj_j2k_t *p_j2k,
  * @param       p_stream        the stream to write data to.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_write_siz(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_siz(      opj_j2k_t *p_j2k,
                                                                 opj_stream_private_t *p_stream,
                                                                 opj_event_mgr_t * p_manager );
 
@@ -417,7 +417,7 @@ static opj_bool opj_j2k_write_siz(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the SIZ marker.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k,
                                  OPJ_BYTE * p_header_data,
                                  OPJ_UINT32 p_header_size,
                                  opj_event_mgr_t * p_manager);
@@ -429,7 +429,7 @@ static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_write_com(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_com(      opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -440,7 +440,7 @@ static opj_bool opj_j2k_write_com(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the COM marker.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_read_com (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_com (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -451,7 +451,7 @@ static opj_bool opj_j2k_read_com (  opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_write_cod(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_cod(      opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -462,7 +462,7 @@ static opj_bool opj_j2k_write_cod(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the COD marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_cod (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_cod (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager);
@@ -475,7 +475,7 @@ static opj_bool opj_j2k_read_cod (  opj_j2k_t *p_j2k,
  * @param       p_stream    the stream to write data to.
  * @param       p_manager   the user event manager.
 */
-static opj_bool opj_j2k_write_coc(  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_coc(  opj_j2k_t *p_j2k,
                                                                 OPJ_UINT32 p_comp_no,
                                                                 opj_stream_private_t *p_stream,
                                                                 opj_event_mgr_t * p_manager );
@@ -508,7 +508,7 @@ static OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k);
  * @param       p_header_size   the size of the data contained in the COC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_coc (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_coc (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -520,7 +520,7 @@ static opj_bool opj_j2k_read_coc (  opj_j2k_t *p_j2k,
  * @param       p_stream                the stream to write data to.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_qcd(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_qcd(      opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -531,7 +531,7 @@ static opj_bool opj_j2k_write_qcd(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the QCD marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_qcd (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_qcd (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -543,7 +543,7 @@ static opj_bool opj_j2k_read_qcd (  opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_qcc(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_qcc(      opj_j2k_t *p_j2k,
                                                                         OPJ_UINT32 p_comp_no,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
@@ -575,7 +575,7 @@ static OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k);
  * @param       p_header_size   the size of the data contained in the QCC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_qcc(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_qcc(   opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager);
@@ -586,7 +586,7 @@ static opj_bool opj_j2k_read_qcc(   opj_j2k_t *p_j2k,
  * @param       p_j2k                           J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_poc(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_poc(      opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 /**
@@ -614,7 +614,7 @@ static OPJ_UINT32 opj_j2k_get_max_poc_size(opj_j2k_t *p_j2k);
  * @param       p_header_size   the size of the data contained in the POC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_poc (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_poc (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -639,7 +639,7 @@ static OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k);
  * @param       p_header_size   the size of the data contained in the TLM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_crg (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_crg (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -651,7 +651,7 @@ static opj_bool opj_j2k_read_crg (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the TLM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager);
@@ -663,7 +663,7 @@ static opj_bool opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_updated_tlm(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_updated_tlm(      opj_j2k_t *p_j2k,
                                             opj_stream_private_t *p_stream,
                                             opj_event_mgr_t * p_manager );
 
@@ -675,7 +675,7 @@ static opj_bool opj_j2k_write_updated_tlm(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the TLM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_plm (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_plm (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager);
@@ -687,7 +687,7 @@ static opj_bool opj_j2k_read_plm (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the PLT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_plt (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_plt (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -701,7 +701,7 @@ static opj_bool opj_j2k_read_plt (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the POC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool j2k_read_ppm_v2 (
+static OPJ_BOOL j2k_read_ppm_v2 (
                                                 opj_j2k_t *p_j2k,
                                                 OPJ_BYTE * p_header_data,
                                                 OPJ_UINT32 p_header_size,
@@ -709,7 +709,7 @@ static opj_bool j2k_read_ppm_v2 (
                                         );
 #endif
 
-static opj_bool j2k_read_ppm_v3 (
+static OPJ_BOOL j2k_read_ppm_v3 (
                                                 opj_j2k_t *p_j2k,
                                                 OPJ_BYTE * p_header_data,
                                                 OPJ_UINT32 p_header_size,
@@ -723,7 +723,7 @@ static opj_bool j2k_read_ppm_v3 (
  * @param       p_header_size   the size of the data contained in the PPT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_ppt (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_ppt (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -734,7 +734,7 @@ static opj_bool opj_j2k_read_ppt (  opj_j2k_t *p_j2k,
  * @param       p_j2k                           J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_tlm(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_tlm(      opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -747,7 +747,7 @@ static opj_bool opj_j2k_write_tlm(      opj_j2k_t *p_j2k,
  * @param       p_stream         the stream to write data to.
  * @param       p_manager        the user event manager.
 */
-static opj_bool opj_j2k_write_sot(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_sot(      opj_j2k_t *p_j2k,
                                                                         OPJ_BYTE * p_data,
                                                                         OPJ_UINT32 * p_data_written,
                                                                         const opj_stream_private_t *p_stream,
@@ -761,7 +761,7 @@ static opj_bool opj_j2k_write_sot(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the PPT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_sot (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_sot (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -776,7 +776,7 @@ static opj_bool opj_j2k_read_sot (  opj_j2k_t *p_j2k,
  * @param       p_stream            the stream to write data to.
  * @param       p_manager           the user event manager.
 */
-static opj_bool opj_j2k_write_sod(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_sod(      opj_j2k_t *p_j2k,
                                                                         opj_tcd_t * p_tile_coder,
                                                                         OPJ_BYTE * p_data,
                                                                         OPJ_UINT32 * p_data_written,
@@ -791,7 +791,7 @@ static opj_bool opj_j2k_write_sod(      opj_j2k_t *p_j2k,
  * @param       p_stream                FIXME DOC
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_sod(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_sod(   opj_j2k_t *p_j2k,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -814,7 +814,7 @@ void opj_j2k_update_tlm (opj_j2k_t * p_j2k, OPJ_UINT32 p_tile_part_size )
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_rgn(  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_rgn(  opj_j2k_t *p_j2k,
                                     OPJ_UINT32 p_tile_no,
                                     OPJ_UINT32 p_comp_no,
                                     OPJ_UINT32 nb_comps,
@@ -829,7 +829,7 @@ static opj_bool opj_j2k_write_rgn(  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the POC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_rgn (opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_rgn (opj_j2k_t *p_j2k,
                                   OPJ_BYTE * p_header_data,
                                   OPJ_UINT32 p_header_size,
                                   opj_event_mgr_t * p_manager );
@@ -841,7 +841,7 @@ static opj_bool opj_j2k_read_rgn (opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_eoc(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_eoc(      opj_j2k_t *p_j2k,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -852,7 +852,7 @@ static opj_bool opj_j2k_write_eoc(      opj_j2k_t *p_j2k,
  * @param       p_stream                FIXME DOC
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_eoc (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_eoc (      opj_j2k_t *p_j2k,
                                                                 opj_stream_private_t *p_stream,
                                                                 opj_event_mgr_t * p_manager );
 
@@ -863,7 +863,7 @@ static opj_bool opj_j2k_read_eoc (      opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_write_mct_data_group(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mct_data_group(   opj_j2k_t *p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager );
 
@@ -874,7 +874,7 @@ static opj_bool opj_j2k_write_mct_data_group(   opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_init_info(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_init_info(      opj_j2k_t *p_j2k,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -885,7 +885,7 @@ Add main header marker information
 @param pos          byte offset of marker segment
 @param len          length of marker segment
  */
-static opj_bool opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) ;
+static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len) ;
 /**
 Add tile header marker information
 @param tileno       tile index number
@@ -894,7 +894,7 @@ Add tile header marker information
 @param pos          byte offset of marker segment
 @param len          length of marker segment
  */
-static opj_bool opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len);
+static OPJ_BOOL opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len);
 
 /**
  * Reads an unknown marker
@@ -906,7 +906,7 @@ static opj_bool opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *
  *
  * @return      true                    if the marker could be deduced.
 */
-static opj_bool opj_j2k_read_unk( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_unk( opj_j2k_t *p_j2k,
                                   opj_stream_private_t *p_stream,
                                   OPJ_UINT32 *output_marker,
                                   opj_event_mgr_t * p_manager );
@@ -919,7 +919,7 @@ static opj_bool opj_j2k_read_unk( opj_j2k_t *p_j2k,
  * @param       p_stream        the stream to write data to.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_write_mct_record(       opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mct_record(       opj_j2k_t *p_j2k,
                                                                                     opj_mct_data_t * p_mct_record,
                                             opj_stream_private_t *p_stream,
                                             opj_event_mgr_t * p_manager );
@@ -932,7 +932,7 @@ static opj_bool opj_j2k_write_mct_record(       opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the MCT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_mct (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_mct (      opj_j2k_t *p_j2k,
                                                                     OPJ_BYTE * p_header_data,
                                                                     OPJ_UINT32 p_header_size,
                                                                     opj_event_mgr_t * p_manager );
@@ -945,7 +945,7 @@ static opj_bool opj_j2k_read_mct (      opj_j2k_t *p_j2k,
  * @param       p_stream                the stream to write data to.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_mcc_record(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mcc_record(   opj_j2k_t *p_j2k,
                                             opj_simple_mcc_decorrelation_data_t * p_mcc_record,
                                             opj_stream_private_t *p_stream,
                                             opj_event_mgr_t * p_manager );
@@ -958,7 +958,7 @@ static opj_bool opj_j2k_write_mcc_record(   opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the MCC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_mcc (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_mcc (      opj_j2k_t *p_j2k,
                                                                     OPJ_BYTE * p_header_data,
                                                                     OPJ_UINT32 p_header_size,
                                                                     opj_event_mgr_t * p_manager );
@@ -970,7 +970,7 @@ static opj_bool opj_j2k_read_mcc (      opj_j2k_t *p_j2k,
  * @param       p_j2k                           J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_mco(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_mco(      opj_j2k_t *p_j2k,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -982,12 +982,12 @@ static opj_bool opj_j2k_write_mco(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the MCO marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_mco (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_mco (      opj_j2k_t *p_j2k,
                                                                     OPJ_BYTE * p_header_data,
                                                                     OPJ_UINT32 p_header_size,
                                                                     opj_event_mgr_t * p_manager );
 
-static opj_bool opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index);
+static OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index);
 
 static void  opj_j2k_read_int16_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem);
 static void  opj_j2k_read_int32_to_float (const void * p_src_data, void * p_dest_data, OPJ_UINT32 p_nb_elem);
@@ -1011,7 +1011,7 @@ static void  opj_j2k_write_float_to_float64 (const void * p_src_data, void * p_d
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_end_encoding(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_end_encoding(   opj_j2k_t *p_j2k,
                                                                             opj_stream_private_t *p_stream,
                                                                             opj_event_mgr_t * p_manager );
 
@@ -1022,7 +1022,7 @@ static opj_bool opj_j2k_end_encoding(   opj_j2k_t *p_j2k,
  * @param       p_j2k                           J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_cbd(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_cbd(      opj_j2k_t *p_j2k,
                                                                     opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -1033,7 +1033,7 @@ static opj_bool opj_j2k_write_cbd(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the CBD marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_cbd (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_cbd (      opj_j2k_t *p_j2k,
                                                                 OPJ_BYTE * p_header_data,
                                                                 OPJ_UINT32 p_header_size,
                                                                 opj_event_mgr_t * p_manager);
@@ -1045,7 +1045,7 @@ static opj_bool opj_j2k_read_cbd (      opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_image_components( opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_image_components( opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -1056,7 +1056,7 @@ static opj_bool opj_j2k_write_image_components( opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_regions(  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_regions(  opj_j2k_t *p_j2k,
                                                                         opj_stream_private_t *p_stream,
                                                                         opj_event_mgr_t * p_manager );
 
@@ -1067,7 +1067,7 @@ static opj_bool opj_j2k_write_regions(  opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_write_epc(      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_write_epc(      opj_j2k_t *p_j2k,
                                                                     opj_stream_private_t *p_stream,
                                                                     opj_event_mgr_t * p_manager );
 
@@ -1084,7 +1084,7 @@ static opj_bool opj_j2k_write_epc(      opj_j2k_t *p_j2k,
  *
  * @return      true if the pocs are valid.
  */
-static opj_bool opj_j2k_check_poc_val(  const opj_poc_t *p_pocs,
+static OPJ_BOOL opj_j2k_check_poc_val(  const opj_poc_t *p_pocs,
                                                                             OPJ_UINT32 p_nb_pocs,
                                                                             OPJ_UINT32 p_nb_resolutions,
                                                                             OPJ_UINT32 numcomps,
@@ -1114,7 +1114,7 @@ static OPJ_UINT32 opj_j2k_get_num_tp( opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32
  *
  * @return true if the function was successful, false else.
  */
-static opj_bool opj_j2k_calculate_tp(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_calculate_tp(   opj_j2k_t *p_j2k,
                                                                             opj_cp_t *cp,
                                                                             OPJ_UINT32 * p_nb_tiles,
                                                                             opj_image_t *image,
@@ -1193,7 +1193,7 @@ typedef struct opj_dec_memory_marker_handler
         /** value of the state when the marker can appear */
         OPJ_UINT32 states;
         /** action linked to the marker */
-        opj_bool (*handler) (   opj_j2k_t *p_j2k,
+        OPJ_BOOL (*handler) (   opj_j2k_t *p_j2k,
                             OPJ_BYTE * p_header_data,
                             OPJ_UINT32 p_header_size,
                             opj_event_mgr_t * p_manager );
@@ -1439,7 +1439,7 @@ char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order){
         return po->str_prog;
 }
 
-opj_bool opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
+OPJ_BOOL opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
                                                         OPJ_UINT32 p_nb_pocs,
                                                         OPJ_UINT32 p_nb_resolutions,
                                                         OPJ_UINT32 p_num_comps,
@@ -1452,7 +1452,7 @@ opj_bool opj_j2k_check_poc_val( const opj_poc_t *p_pocs,
         OPJ_UINT32 step_c = 1;
         OPJ_UINT32 step_r = p_num_comps * step_c;
         OPJ_UINT32 step_l = p_nb_resolutions * step_r;
-        opj_bool loss = OPJ_FALSE;
+        OPJ_BOOL loss = OPJ_FALSE;
         OPJ_UINT32 layno0 = 0;
 
         packet_array = (OPJ_UINT32*) opj_calloc(step_l * p_num_layers, sizeof(OPJ_UINT32));
@@ -1601,7 +1601,7 @@ OPJ_UINT32 opj_j2k_get_num_tp(opj_cp_t *cp, OPJ_UINT32 pino, OPJ_UINT32 tileno)
         return tpnum;
 }
 
-opj_bool opj_j2k_calculate_tp(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_calculate_tp(  opj_j2k_t *p_j2k,
                                                         opj_cp_t *cp,
                                                         OPJ_UINT32 * p_nb_tiles,
                                                         opj_image_t *image,
@@ -1679,7 +1679,7 @@ opj_bool opj_j2k_calculate_tp(  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_soc(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_soc(     opj_j2k_t *p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                     opj_event_mgr_t * p_manager )
 {
@@ -1704,7 +1704,7 @@ opj_bool opj_j2k_write_soc(     opj_j2k_t *p_j2k,
 #ifdef USE_JPWL
         /* update markers struct */
 /*
-        opj_bool res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOC, p_stream_tell(p_stream) - 2, 2);
+        OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOC, p_stream_tell(p_stream) - 2, 2);
 */
   assert( 0 && "TODO" );
 #endif /* USE_JPWL */
@@ -1719,7 +1719,7 @@ opj_bool opj_j2k_write_soc(     opj_j2k_t *p_j2k,
  * @param       p_stream        FIXME DOC
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_read_soc(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_soc(   opj_j2k_t *p_j2k,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager
                                     )
@@ -1757,7 +1757,7 @@ static opj_bool opj_j2k_read_soc(   opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_siz(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_siz(     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager )
 {
@@ -1859,7 +1859,7 @@ opj_bool opj_j2k_write_siz(     opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the SIZ marker.
  * @param       p_manager       the user event manager.
 */
-static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_siz(opj_j2k_t *p_j2k,
                                  OPJ_BYTE * p_header_data,
                                  OPJ_UINT32 p_header_size,
                                  opj_event_mgr_t * p_manager
@@ -2164,7 +2164,7 @@ static opj_bool opj_j2k_read_siz(opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_com(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_com(     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager
                             )
@@ -2223,7 +2223,7 @@ opj_bool opj_j2k_write_com(     opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the COM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_com (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_com (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -2238,7 +2238,7 @@ static opj_bool opj_j2k_read_com (  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_cod(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_cod(     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager )
 {
@@ -2316,7 +2316,7 @@ opj_bool opj_j2k_write_cod(     opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the COD marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_cod (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_cod (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -2401,7 +2401,7 @@ static opj_bool opj_j2k_read_cod (  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_coc( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_coc( opj_j2k_t *p_j2k,
                                                 OPJ_UINT32 p_comp_no,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager )
@@ -2519,7 +2519,7 @@ OPJ_UINT32 opj_j2k_get_max_coc_size(opj_j2k_t *p_j2k)
  * @param       p_header_size   the size of the data contained in the COC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_coc (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_coc (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -2573,7 +2573,7 @@ static opj_bool opj_j2k_read_coc (  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_qcd(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_qcd(     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager
                             )
@@ -2636,7 +2636,7 @@ opj_bool opj_j2k_write_qcd(     opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the QCD marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_qcd (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_qcd (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -2663,7 +2663,7 @@ static opj_bool opj_j2k_read_qcd (  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_qcc(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_qcc(     opj_j2k_t *p_j2k,
                                                 OPJ_UINT32 p_comp_no,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager
@@ -2762,7 +2762,7 @@ OPJ_UINT32 opj_j2k_get_max_qcc_size (opj_j2k_t *p_j2k)
  * @param       p_header_size   the size of the data contained in the QCC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_qcc(   opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_qcc(   opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -2835,7 +2835,7 @@ static opj_bool opj_j2k_read_qcc(   opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_poc(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_poc(     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager
                             )
@@ -3032,7 +3032,7 @@ OPJ_UINT32 opj_j2k_get_specific_header_sizes(opj_j2k_t *p_j2k)
  * @param       p_header_size   the size of the data contained in the POC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_poc (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_poc (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -3113,7 +3113,7 @@ static opj_bool opj_j2k_read_poc (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the TLM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_crg (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_crg (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -3153,7 +3153,7 @@ static opj_bool opj_j2k_read_crg (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the TLM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -3209,7 +3209,7 @@ static opj_bool opj_j2k_read_tlm (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the TLM marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_plm (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_plm (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -3279,7 +3279,7 @@ static opj_bool opj_j2k_read_plm (  opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the PLT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_plt (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_plt (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -3324,7 +3324,7 @@ static opj_bool opj_j2k_read_plt (  opj_j2k_t *p_j2k,
 }
 
 #if 0
-opj_bool j2k_read_ppm_v2 (
+OPJ_BOOL j2k_read_ppm_v2 (
                                                 opj_j2k_t *p_j2k,
                                                 OPJ_BYTE * p_header_data,
                                                 OPJ_UINT32 p_header_size,
@@ -3426,7 +3426,7 @@ opj_bool j2k_read_ppm_v2 (
 }
 #endif
 
-opj_bool j2k_read_ppm_v3 (
+OPJ_BOOL j2k_read_ppm_v3 (
                                                 opj_j2k_t *p_j2k,
                                                 OPJ_BYTE * p_header_data,
                                                 OPJ_UINT32 p_header_size,
@@ -3653,7 +3653,7 @@ opj_bool j2k_read_ppm_v3 (
  * @param       p_header_size   the size of the data contained in the PPT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_ppt (  opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_ppt (  opj_j2k_t *p_j2k,
                                     OPJ_BYTE * p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -3728,7 +3728,7 @@ static opj_bool opj_j2k_read_ppt (  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_tlm(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_tlm(     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager
                             )
@@ -3782,7 +3782,7 @@ opj_bool opj_j2k_write_tlm(     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_sot(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_sot(     opj_j2k_t *p_j2k,
                                                         OPJ_BYTE * p_data,
                                                         OPJ_UINT32 * p_data_written,
                                                         const opj_stream_private_t *p_stream,
@@ -3816,7 +3816,7 @@ opj_bool opj_j2k_write_sot(     opj_j2k_t *p_j2k,
 #ifdef USE_JPWL
         /* update markers struct */
 /*
-        opj_bool res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOT, p_j2k->sot_start, len + 2);
+        OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOT, p_j2k->sot_start, len + 2);
 */
   assert( 0 && "TODO" );
 #endif /* USE_JPWL */
@@ -3826,7 +3826,7 @@ opj_bool opj_j2k_write_sot(     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_sot ( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_sot ( opj_j2k_t *p_j2k,
                             OPJ_BYTE * p_header_data,
                             OPJ_UINT32 p_header_size,
                             opj_event_mgr_t * p_manager )
@@ -4072,7 +4072,7 @@ opj_bool opj_j2k_read_sot ( opj_j2k_t *p_j2k,
                 return OPJ_TRUE;
         }
 
-opj_bool opj_j2k_write_sod(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_sod(     opj_j2k_t *p_j2k,
                                                         opj_tcd_t * p_tile_coder,
                                                         OPJ_BYTE * p_data,
                                                         OPJ_UINT32 * p_data_written,
@@ -4119,7 +4119,7 @@ opj_bool opj_j2k_write_sod(     opj_j2k_t *p_j2k,
                 /* UniPG>> */
 #ifdef USE_JPWL
                 /* update markers struct */
-                /*opj_bool res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOD, p_j2k->sod_start, 2);
+                /*OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_SOD, p_j2k->sod_start, 2);
 */
   assert( 0 && "TODO" );
 #endif /* USE_JPWL */
@@ -4146,7 +4146,7 @@ opj_bool opj_j2k_write_sod(     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_sod (opj_j2k_t *p_j2k,
                            opj_stream_private_t *p_stream,
                                                    opj_event_mgr_t * p_manager
                            )
@@ -4156,7 +4156,7 @@ opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
         OPJ_BYTE ** l_current_data = 00;
         opj_tcp_t * l_tcp = 00;
         OPJ_UINT32 * l_tile_len = 00;
-        opj_bool l_sot_length_pb_detected = OPJ_FALSE;
+        OPJ_BOOL l_sot_length_pb_detected = OPJ_FALSE;
 
         /* preconditions */
         assert(p_j2k != 00);
@@ -4261,7 +4261,7 @@ opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
opj_bool opj_j2k_write_rgn(opj_j2k_t *p_j2k,
OPJ_BOOL opj_j2k_write_rgn(opj_j2k_t *p_j2k,
                             OPJ_UINT32 p_tile_no,
                             OPJ_UINT32 p_comp_no,
                             OPJ_UINT32 nb_comps,
@@ -4318,7 +4318,7 @@ opj_bool opj_j2k_read_sod (opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_eoc(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_eoc(     opj_j2k_t *p_j2k,
                             opj_stream_private_t *p_stream,
                             opj_event_mgr_t * p_manager
                             )
@@ -4334,7 +4334,7 @@ opj_bool opj_j2k_write_eoc(     opj_j2k_t *p_j2k,
 #ifdef USE_JPWL
         /* update markers struct */
         /*
-        opj_bool res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_EOC, p_stream_tell(p_stream) - 2, 2);
+        OPJ_BOOL res = j2k_add_marker(p_j2k->cstr_info, J2K_MS_EOC, p_stream_tell(p_stream) - 2, 2);
 */
 #endif /* USE_JPWL */
 
@@ -4357,7 +4357,7 @@ opj_bool opj_j2k_write_eoc(     opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the POC marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_rgn (opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_rgn (opj_j2k_t *p_j2k,
                                   OPJ_BYTE * p_header_data,
                                   OPJ_UINT32 p_header_size,
                                   opj_event_mgr_t * p_manager
@@ -4431,7 +4431,7 @@ OPJ_FLOAT32 opj_j2k_get_default_stride (opj_tcp_t * p_tcp)
     return 0;
 }
 
-opj_bool opj_j2k_update_rates(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_update_rates(  opj_j2k_t *p_j2k,
                                                             opj_stream_private_t *p_stream,
                                                             opj_event_mgr_t * p_manager )
 {
@@ -4593,7 +4593,7 @@ opj_bool opj_j2k_update_rates(  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_eoc (     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_eoc (     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager )
 {
@@ -4601,7 +4601,7 @@ opj_bool opj_j2k_read_eoc (     opj_j2k_t *p_j2k,
         opj_tcd_t * l_tcd = 00;
         OPJ_UINT32 l_nb_tiles;
         opj_tcp_t * l_tcp = 00;
-        opj_bool l_success;
+        OPJ_BOOL l_success;
 
         /* preconditions */
         assert(p_j2k != 00);
@@ -4642,7 +4642,7 @@ opj_bool opj_j2k_read_eoc (     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_get_end_header(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_get_end_header(opj_j2k_t *p_j2k,
                                                         struct opj_stream_private *p_stream,
                                                         struct opj_event_mgr * p_manager )
 {
@@ -4656,7 +4656,7 @@ opj_bool opj_j2k_get_end_header(opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_mct_data_group(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_mct_data_group(  opj_j2k_t *p_j2k,
                                                                         struct opj_stream_private *p_stream,
                                                                         struct opj_event_mgr * p_manager )
 {
@@ -4704,7 +4704,7 @@ opj_bool opj_j2k_write_mct_data_group(  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_image_components(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_image_components(opj_j2k_t *p_j2k,
                                                                         struct opj_stream_private *p_stream,
                                                                         struct opj_event_mgr * p_manager )
 {
@@ -4729,7 +4729,7 @@ opj_bool opj_j2k_write_image_components(opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_regions( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_regions( opj_j2k_t *p_j2k,
                                                         struct opj_stream_private *p_stream,
                                                         struct opj_event_mgr * p_manager )
 {
@@ -4757,7 +4757,7 @@ opj_bool opj_j2k_write_regions( opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_epc(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_epc(     opj_j2k_t *p_j2k,
                                                 struct opj_stream_private *p_stream,
                                                 struct opj_event_mgr * p_manager )
 {
@@ -4795,7 +4795,7 @@ opj_bool opj_j2k_write_epc(     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_unk (     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_unk (     opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         OPJ_UINT32 *output_marker,
                                                         opj_event_mgr_t * p_manager
@@ -4836,7 +4836,7 @@ opj_bool opj_j2k_read_unk (     opj_j2k_t *p_j2k,
                                         /* Add the marker to the codestream index*/
                                         if (l_marker_handler->id != J2K_MS_SOT)
                                         {
-                                                opj_bool res = opj_j2k_add_mhmarker(p_j2k->cstr_index, J2K_MS_UNK,
+                                                OPJ_BOOL res = opj_j2k_add_mhmarker(p_j2k->cstr_index, J2K_MS_UNK,
                                                                 (OPJ_UINT32) opj_stream_tell(p_stream) - l_size_unk,
                                                                 l_size_unk);
                                                 if (res == OPJ_FALSE) {
@@ -4857,7 +4857,7 @@ opj_bool opj_j2k_read_unk (     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_mct_record(      opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_mct_record(      opj_j2k_t *p_j2k,
                                                                 opj_mct_data_t * p_mct_record,
                                                                 struct opj_stream_private *p_stream,
                                                                 struct opj_event_mgr * p_manager )
@@ -4923,7 +4923,7 @@ opj_bool opj_j2k_write_mct_record(      opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the MCT marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_mct (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_mct (      opj_j2k_t *p_j2k,
                                                                     OPJ_BYTE * p_header_data,
                                                                     OPJ_UINT32 p_header_size,
                                                                     opj_event_mgr_t * p_manager
@@ -5029,7 +5029,7 @@ static opj_bool opj_j2k_read_mct (      opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_mcc_record(      opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_mcc_record(      opj_j2k_t *p_j2k,
                                                                 struct opj_simple_mcc_decorrelation_data * p_mcc_record,
                                                                 struct opj_stream_private *p_stream,
                                                                 struct opj_event_mgr * p_manager )
@@ -5132,7 +5132,7 @@ opj_bool opj_j2k_write_mcc_record(      opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_mcc (     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_mcc (     opj_j2k_t *p_j2k,
                                                 OPJ_BYTE * p_header_data,
                                                 OPJ_UINT32 p_header_size,
                                                 opj_event_mgr_t * p_manager )
@@ -5347,7 +5347,7 @@ opj_bool opj_j2k_read_mcc (     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_mco(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_mco(     opj_j2k_t *p_j2k,
                                                 struct opj_stream_private *p_stream,
                                                 struct opj_event_mgr * p_manager
                                   )
@@ -5413,7 +5413,7 @@ opj_bool opj_j2k_write_mco(     opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the MCO marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_mco (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_mco (      opj_j2k_t *p_j2k,
                                                                     OPJ_BYTE * p_header_data,
                                                                     OPJ_UINT32 p_header_size,
                                                                     opj_event_mgr_t * p_manager
@@ -5477,7 +5477,7 @@ static opj_bool opj_j2k_read_mco (      opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index)
+OPJ_BOOL opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_index)
 {
         OPJ_UINT32 i;
         opj_simple_mcc_decorrelation_data_t * l_mcc_record;
@@ -5559,7 +5559,7 @@ opj_bool opj_j2k_add_mct(opj_tcp_t * p_tcp, opj_image_t * p_image, OPJ_UINT32 p_
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_cbd( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_cbd( opj_j2k_t *p_j2k,
                                                 struct opj_stream_private *p_stream,
                                                 struct opj_event_mgr * p_manager )
 {
@@ -5624,7 +5624,7 @@ opj_bool opj_j2k_write_cbd( opj_j2k_t *p_j2k,
  * @param       p_header_size   the size of the data contained in the CBD marker.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_read_cbd (      opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_read_cbd (      opj_j2k_t *p_j2k,
                                                                 OPJ_BYTE * p_header_data,
                                                                 OPJ_UINT32 p_header_size,
                                                                 opj_event_mgr_t * p_manager
@@ -6033,7 +6033,7 @@ void opj_j2k_setup_encoder(     opj_j2k_t *p_j2k,
         }
 }
 
-static opj_bool opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
+static OPJ_BOOL opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
 {
         assert(cstr_index != 00);
 
@@ -6061,7 +6061,7 @@ static opj_bool opj_j2k_add_mhmarker(opj_codestream_index_t *cstr_index, OPJ_UIN
         return OPJ_TRUE;
 }
 
-static opj_bool opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
+static OPJ_BOOL opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *cstr_index, OPJ_UINT32 type, OPJ_OFF_T pos, OPJ_UINT32 len)
 {
         assert(cstr_index != 00);
         assert(cstr_index->tile_index != 00);
@@ -6106,7 +6106,7 @@ static opj_bool opj_j2k_add_tlmarker(OPJ_UINT32 tileno, opj_codestream_index_t *
  * -----------------------------------------------------------------------
  */
 
-opj_bool opj_j2k_end_decompress(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *p_j2k,
                                 opj_stream_private_t *p_stream,
                                 opj_event_mgr_t * p_manager
                                 )
@@ -6117,7 +6117,7 @@ opj_bool opj_j2k_end_decompress(opj_j2k_t *p_j2k,
     return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_header(   opj_stream_private_t *p_stream,
+OPJ_BOOL opj_j2k_read_header(   opj_stream_private_t *p_stream,
                                                             opj_j2k_t* p_j2k,
                                                             opj_image_t** p_image,
                                                             opj_event_mgr_t* p_manager )
@@ -6192,11 +6192,11 @@ void opj_j2k_setup_decoding_validation (opj_j2k_t *p_j2k)
 
 }
 
-opj_bool opj_j2k_mct_validation (       opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_mct_validation (       opj_j2k_t * p_j2k,
                                                                 opj_stream_private_t *p_stream,
                                                                 opj_event_mgr_t * p_manager )
 {
-        opj_bool l_is_valid = OPJ_TRUE;
+        OPJ_BOOL l_is_valid = OPJ_TRUE;
         OPJ_UINT32 i,j;
 
         /* preconditions */
@@ -6225,7 +6225,7 @@ opj_bool opj_j2k_mct_validation (       opj_j2k_t * p_j2k,
         return l_is_valid;
 }
 
-opj_bool opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image)
+OPJ_BOOL opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image)
 {
         OPJ_UINT32 i;
         OPJ_UINT32 l_indix = 1;
@@ -6378,7 +6378,7 @@ opj_bool opj_j2k_setup_mct_encoding(opj_tcp_t * p_tcp, opj_image_t * p_image)
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_build_decoder (opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_build_decoder (opj_j2k_t * p_j2k,
                                                             opj_stream_private_t *p_stream,
                                                             opj_event_mgr_t * p_manager )
 {
@@ -6390,7 +6390,7 @@ opj_bool opj_j2k_build_decoder (opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_build_encoder (opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_build_encoder (opj_j2k_t * p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager )
 {
@@ -6402,11 +6402,11 @@ opj_bool opj_j2k_build_encoder (opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_encoding_validation (  opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_encoding_validation (  opj_j2k_t * p_j2k,
                                                                             opj_stream_private_t *p_stream,
                                                                             opj_event_mgr_t * p_manager )
 {
-        opj_bool l_is_valid = OPJ_TRUE;
+        OPJ_BOOL l_is_valid = OPJ_TRUE;
 
         /* preconditions */
         assert(p_j2k != 00);
@@ -6437,12 +6437,12 @@ opj_bool opj_j2k_encoding_validation (  opj_j2k_t * p_j2k,
         return l_is_valid;
 }
 
-opj_bool opj_j2k_decoding_validation (  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_decoding_validation (  opj_j2k_t *p_j2k,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager
                                         )
 {
-        opj_bool l_is_valid = OPJ_TRUE;
+        OPJ_BOOL l_is_valid = OPJ_TRUE;
 
         /* preconditions*/
         assert(p_j2k != 00);
@@ -6467,7 +6467,7 @@ opj_bool opj_j2k_decoding_validation (  opj_j2k_t *p_j2k,
         return l_is_valid;
 }
 
-opj_bool opj_j2k_read_header_procedure( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_header_procedure( opj_j2k_t *p_j2k,
                                                                             opj_stream_private_t *p_stream,
                                                                             opj_event_mgr_t * p_manager)
 {
@@ -6596,13 +6596,13 @@ opj_bool opj_j2k_read_header_procedure( opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_exec ( opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_exec ( opj_j2k_t * p_j2k,
                                         opj_procedure_list_t * p_procedure_list,
                                         opj_stream_private_t *p_stream,
                                         opj_event_mgr_t * p_manager )
 {
-        opj_bool (** l_procedure) (opj_j2k_t * ,opj_stream_private_t *,opj_event_mgr_t *) = 00;
-        opj_bool l_result = OPJ_TRUE;
+        OPJ_BOOL (** l_procedure) (opj_j2k_t * ,opj_stream_private_t *,opj_event_mgr_t *) = 00;
+        OPJ_BOOL l_result = OPJ_TRUE;
         OPJ_UINT32 l_nb_proc, i;
 
         /* preconditions*/
@@ -6612,7 +6612,7 @@ opj_bool opj_j2k_exec ( opj_j2k_t * p_j2k,
         assert(p_manager != 00);
 
         l_nb_proc = opj_procedure_list_get_nb_procedures(p_procedure_list);
-        l_procedure = (opj_bool (**) (opj_j2k_t * ,opj_stream_private_t *,opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list);
+        l_procedure = (OPJ_BOOL (**) (opj_j2k_t * ,opj_stream_private_t *,opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list);
 
         for     (i=0;i<l_nb_proc;++i) {
                 l_result = l_result && ((*l_procedure) (p_j2k,p_stream,p_manager));
@@ -6625,7 +6625,7 @@ opj_bool opj_j2k_exec ( opj_j2k_t * p_j2k,
 }
 
 /* FIXME DOC*/
-static opj_bool opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_copy_default_tcp_and_create_tcd (       opj_j2k_t * p_j2k,
                                                             opj_stream_private_t *p_stream,
                                                             opj_event_mgr_t * p_manager
                                                             )
@@ -6970,13 +6970,13 @@ void opj_j2k_cp_destroy (opj_cp_t *p_cp)
         }
 }
 
-opj_bool opj_j2k_read_tile_header(      opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_read_tile_header(      opj_j2k_t * p_j2k,
                                                                     OPJ_UINT32 * p_tile_index,
                                                                     OPJ_UINT32 * p_data_size,
                                                                     OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
                                                                     OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
                                                                     OPJ_UINT32 * p_nb_comps,
-                                                                    opj_bool * p_go_on,
+                                                                    OPJ_BOOL * p_go_on,
                                                                     opj_stream_private_t *p_stream,
                                                                     opj_event_mgr_t * p_manager )
 {
@@ -7182,7 +7182,7 @@ opj_bool opj_j2k_read_tile_header(      opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_decode_tile (  opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_decode_tile (  opj_j2k_t * p_j2k,
                                                         OPJ_UINT32 p_tile_index,
                                                         OPJ_BYTE * p_data,
                                                         OPJ_UINT32 p_data_size,
@@ -7254,7 +7254,7 @@ opj_bool opj_j2k_decode_tile (  opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image)
+OPJ_BOOL opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_image_t* p_output_image)
 {
         OPJ_UINT32 i,j,k = 0;
         OPJ_UINT32 l_width_src,l_height_src;
@@ -7512,7 +7512,7 @@ opj_bool opj_j2k_update_image_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data, opj_im
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_set_decode_area(       opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_set_decode_area(       opj_j2k_t *p_j2k,
                                                                     opj_image_t* p_image,
                                                                     OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
                                                                     OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
@@ -7773,7 +7773,7 @@ OPJ_UINT32 opj_j2k_get_SPCod_SPCoc_size (       opj_j2k_t *p_j2k,
         }
 }
 
-opj_bool opj_j2k_write_SPCod_SPCoc(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_SPCod_SPCoc(     opj_j2k_t *p_j2k,
                                                                     OPJ_UINT32 p_tile_no,
                                                                     OPJ_UINT32 p_comp_no,
                                                                     OPJ_BYTE * p_data,
@@ -7839,7 +7839,7 @@ opj_bool opj_j2k_write_SPCod_SPCoc(     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_SPCod_SPCoc(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_SPCod_SPCoc(  opj_j2k_t *p_j2k,
                                                                 OPJ_UINT32 compno,
                                                                 OPJ_BYTE * p_header_data,
                                                                 OPJ_UINT32 * p_header_size,
@@ -8009,7 +8009,7 @@ OPJ_UINT32 opj_j2k_get_SQcd_SQcc_size ( opj_j2k_t *p_j2k,
         }
 }
 
-opj_bool opj_j2k_write_SQcd_SQcc(       opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_SQcd_SQcc(       opj_j2k_t *p_j2k,
                                                                 OPJ_UINT32 p_tile_no,
                                                                 OPJ_UINT32 p_comp_no,
                                                                 OPJ_BYTE * p_data,
@@ -8082,7 +8082,7 @@ opj_bool opj_j2k_write_SQcd_SQcc(       opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_read_SQcd_SQcc(opj_j2k_t *p_j2k,
                                                             OPJ_UINT32 p_comp_no,
                                                             OPJ_BYTE* p_header_data,
                                                             OPJ_UINT32 * p_header_size,
@@ -8398,7 +8398,7 @@ void opj_j2k_dump_MH_info(opj_j2k_t* p_j2k, FILE* out_stream)
 
 }
 
-void j2k_dump_image_header(opj_image_t* img_header, opj_bool dev_dump_flag, FILE* out_stream)
+void j2k_dump_image_header(opj_image_t* img_header, OPJ_BOOL dev_dump_flag, FILE* out_stream)
 {
         char tab[2];
 
@@ -8427,7 +8427,7 @@ void j2k_dump_image_header(opj_image_t* img_header, opj_bool dev_dump_flag, FILE
         fprintf(out_stream, "}\n");
 }
 
-void j2k_dump_image_comp_header(opj_image_comp_t* comp_header, opj_bool dev_dump_flag, FILE* out_stream)
+void j2k_dump_image_comp_header(opj_image_comp_t* comp_header, OPJ_BOOL dev_dump_flag, FILE* out_stream)
 {
         char tab[3];
 
@@ -8626,7 +8626,7 @@ opj_codestream_index_t* j2k_get_cstr_index(opj_j2k_t* p_j2k)
         return l_cstr_index;
 }
 
-opj_bool opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
+OPJ_BOOL opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
 {
         OPJ_UINT32 it_tile=0;
 
@@ -8647,11 +8647,11 @@ opj_bool opj_j2k_allocate_tile_element_cstr_index(opj_j2k_t *p_j2k)
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_decode_tiles ( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_decode_tiles ( opj_j2k_t *p_j2k,
                                                             opj_stream_private_t *p_stream,
                                                             opj_event_mgr_t * p_manager)
 {
-        opj_bool l_go_on = OPJ_TRUE;
+        OPJ_BOOL l_go_on = OPJ_TRUE;
         OPJ_UINT32 l_current_tile_no;
         OPJ_UINT32 l_data_size,l_max_data_size;
         OPJ_INT32 l_tile_x0,l_tile_y0,l_tile_x1,l_tile_y1;
@@ -8729,11 +8729,11 @@ static void opj_j2k_setup_decoding (opj_j2k_t *p_j2k)
 /*
  * Read and decode one tile.
  */
-static opj_bool opj_j2k_decode_one_tile (       opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_decode_one_tile (       opj_j2k_t *p_j2k,
                                                                             opj_stream_private_t *p_stream,
                                                                             opj_event_mgr_t * p_manager)
 {
-        opj_bool l_go_on = OPJ_TRUE;
+        OPJ_BOOL l_go_on = OPJ_TRUE;
         OPJ_UINT32 l_current_tile_no;
         OPJ_UINT32 l_tile_no_to_dec;
         OPJ_UINT32 l_data_size,l_max_data_size;
@@ -8857,7 +8857,7 @@ static void opj_j2k_setup_decoding_tile (opj_j2k_t *p_j2k)
 
 }
 
-opj_bool opj_j2k_decode(opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_decode(opj_j2k_t * p_j2k,
                                                 opj_stream_private_t * p_stream,
                                                 opj_image_t * p_image,
                                                 opj_event_mgr_t * p_manager)
@@ -8893,7 +8893,7 @@ opj_bool opj_j2k_decode(opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_get_tile(      opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_get_tile(      opj_j2k_t *p_j2k,
                                                     opj_stream_private_t *p_stream,
                                                     opj_image_t* p_image,
                                                     opj_event_mgr_t * p_manager,
@@ -8987,7 +8987,7 @@ opj_bool opj_j2k_get_tile(      opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k,
                                                OPJ_UINT32 res_factor,
                                                opj_event_mgr_t * p_manager)
 {
@@ -9016,7 +9016,7 @@ opj_bool opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k,
         return OPJ_FALSE;
 }
 
-opj_bool opj_j2k_encode_v2(     opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_encode_v2(     opj_j2k_t * p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager )
 {
@@ -9067,7 +9067,7 @@ opj_bool opj_j2k_encode_v2(     opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_end_compress(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_end_compress(  opj_j2k_t *p_j2k,
                                                         opj_stream_private_t *p_stream,
                                                         opj_event_mgr_t * p_manager)
 {
@@ -9082,7 +9082,7 @@ opj_bool opj_j2k_end_compress(  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_start_compress(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_start_compress(opj_j2k_t *p_j2k,
                                                             opj_stream_private_t *p_stream,
                                                             opj_image_t * p_image,
                                                             opj_event_mgr_t * p_manager)
@@ -9126,7 +9126,7 @@ opj_bool opj_j2k_start_compress(opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_pre_write_tile (       opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_pre_write_tile (       opj_j2k_t * p_j2k,
                                                                 OPJ_UINT32 p_tile_index,
                                                                 opj_stream_private_t *p_stream,
                                                                 opj_event_mgr_t * p_manager )
@@ -9254,7 +9254,7 @@ void opj_j2k_get_tile_data (opj_tcd_t * p_tcd, OPJ_BYTE * p_data)
         }
 }
 
-opj_bool opj_j2k_post_write_tile (      opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_post_write_tile (      opj_j2k_t * p_j2k,
                                                                 OPJ_BYTE * p_data,
                                                                 OPJ_UINT32 p_data_size,
                                                                 opj_stream_private_t *p_stream,
@@ -9375,7 +9375,7 @@ void opj_j2k_setup_header_writing (opj_j2k_t *p_j2k)
         opj_procedure_list_add_procedure(p_j2k->m_procedure_list,(opj_procedure)opj_j2k_update_rates);
 }
 
-opj_bool opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
                                                                         OPJ_BYTE * p_data,
                                                                         OPJ_UINT32 * p_data_written,
                                                                         OPJ_UINT32 p_total_data_size,
@@ -9454,7 +9454,7 @@ opj_bool opj_j2k_write_first_tile_part (opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_all_tile_parts(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_all_tile_parts(  opj_j2k_t *p_j2k,
                                                                         OPJ_BYTE * p_data,
                                                                         OPJ_UINT32 * p_data_written,
                                                                         OPJ_UINT32 p_total_data_size,
@@ -9563,7 +9563,7 @@ opj_bool opj_j2k_write_all_tile_parts(  opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k,
                                                                     struct opj_stream_private *p_stream,
                                                                     struct opj_event_mgr * p_manager )
 {
@@ -9594,7 +9594,7 @@ opj_bool opj_j2k_write_updated_tlm( opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_end_encoding(  opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_end_encoding(  opj_j2k_t *p_j2k,
                                                         struct opj_stream_private *p_stream,
                                                         struct opj_event_mgr * p_manager )
 {
@@ -9625,7 +9625,7 @@ opj_bool opj_j2k_end_encoding(  opj_j2k_t *p_j2k,
 /**
  * Destroys the memory associated with the decoding of headers.
  */
-static opj_bool opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k,
+static OPJ_BOOL opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k,
                                                 opj_stream_private_t *p_stream,
                                                 opj_event_mgr_t * p_manager
                                                 )
@@ -9645,7 +9645,7 @@ static opj_bool opj_j2k_destroy_header_memory ( opj_j2k_t * p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_init_info(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_init_info(     opj_j2k_t *p_j2k,
                                                 struct opj_stream_private *p_stream,
                                                 struct opj_event_mgr * p_manager )
 {
@@ -9706,7 +9706,7 @@ opj_bool opj_j2k_init_info(     opj_j2k_t *p_j2k,
  * @param       p_j2k                   J2K codec.
  * @param       p_manager               the user event manager.
 */
-static opj_bool opj_j2k_create_tcd(     opj_j2k_t *p_j2k,
+static OPJ_BOOL opj_j2k_create_tcd(     opj_j2k_t *p_j2k,
                                                                     opj_stream_private_t *p_stream,
                                                                     opj_event_mgr_t * p_manager
                                     )
@@ -9732,7 +9732,7 @@ static opj_bool opj_j2k_create_tcd(     opj_j2k_t *p_j2k,
         return OPJ_TRUE;
 }
 
-opj_bool opj_j2k_write_tile (opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_write_tile (opj_j2k_t * p_j2k,
                                                  OPJ_UINT32 p_tile_index,
                                                  OPJ_BYTE * p_data,
                                                  OPJ_UINT32 p_data_size,
index 0087dc1d44125f746c18f61e4fb0d24ba5b9e0b1..70abd0752350cb680b2d619c95eef4d4393e27c2 100644 (file)
@@ -384,15 +384,15 @@ typedef struct opj_cp
 /* UniPG>> */
 #ifdef USE_JPWL
        /** enables writing of EPC in MH, thus activating JPWL */
-       opj_bool epc_on;
+       OPJ_BOOL epc_on;
        /** enables writing of EPB, in case of activated JPWL */
-       opj_bool epb_on;
+       OPJ_BOOL epb_on;
        /** enables writing of ESD, in case of activated JPWL */
-       opj_bool esd_on;
+       OPJ_BOOL esd_on;
        /** enables writing of informative techniques of ESD, in case of activated JPWL */
-       opj_bool info_on;
+       OPJ_BOOL info_on;
        /** enables writing of RED, in case of activated JPWL */
-       opj_bool red_on;
+       OPJ_BOOL red_on;
        /** error protection method for MH (0,1,16,32,37-128) */
        int hprot_MH;
        /** tile number of header protection specification (>=0) */
@@ -418,7 +418,7 @@ typedef struct opj_cp
        /** sensitivity methods for TPHs (-1,0-7) */
        int sens_TPH[JPWL_MAX_NO_TILESPECS];
        /** enables JPWL correction at the decoder */
-       opj_bool correct;
+       OPJ_BOOL correct;
        /** expected number of components at the decoder */
        int exp_comps;
        /** maximum number of tiles at the decoder */
@@ -469,7 +469,7 @@ typedef struct opj_j2k_dec
         * It is useful in the case of PSot is equal to zero. The sot length will be compute in the
         * SOD reader function. FIXME NOT USED for the moment
         */
-       opj_bool   m_last_tile_part;
+       OPJ_BOOL   m_last_tile_part;
        /** to tell that a tile can be decoded. */
        OPJ_UINT32 m_can_decode                 : 1;
        OPJ_UINT32 m_discard_tiles              : 1;
@@ -527,7 +527,7 @@ JPEG-2000 codestream reader/writer
 typedef struct opj_j2k
 {
        /* J2K codestream is decoded*/
-       opj_bool m_is_decoder;
+       OPJ_BOOL m_is_decoder;
 
        /* FIXME DOC*/
        union
@@ -606,7 +606,7 @@ char *opj_j2k_convert_progression_order(OPJ_PROG_ORDER prg_order);
  * Ends the decompression procedures and possibiliy add data to be read after the
  * codestream.
  */
-opj_bool opj_j2k_end_decompress(opj_j2k_t *j2k,
+OPJ_BOOL opj_j2k_end_decompress(opj_j2k_t *j2k,
                                 opj_stream_private_t *p_stream,
                                 opj_event_mgr_t * p_manager);
 
@@ -620,7 +620,7 @@ opj_bool opj_j2k_end_decompress(opj_j2k_t *j2k,
  *
  * @return true if the box is valid.
  */
-opj_bool opj_j2k_read_header(  opj_stream_private_t *p_stream,
+OPJ_BOOL opj_j2k_read_header(  opj_stream_private_t *p_stream,
                                 opj_j2k_t* p_j2k,
                                 opj_image_t** p_image,
                                 opj_event_mgr_t* p_manager );
@@ -649,7 +649,7 @@ void j2k_destroy_cstr_index (opj_codestream_index_t *p_cstr_ind);
  * @param      p_stream                        the stream to write data to.
  * @param      p_manager       the user event manager.
  */
-opj_bool opj_j2k_decode_tile (  opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_decode_tile (  opj_j2k_t * p_j2k,
                                 OPJ_UINT32 p_tile_index,
                                 OPJ_BYTE * p_data,
                                 OPJ_UINT32 p_data_size,
@@ -670,7 +670,7 @@ opj_bool opj_j2k_decode_tile (  opj_j2k_t * p_j2k,
  * @param      p_stream                        the stream to write data to.
  * @param      p_manager       the user event manager.
  */
-opj_bool opj_j2k_read_tile_header ( opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_read_tile_header ( opj_j2k_t * p_j2k,
                                     OPJ_UINT32 * p_tile_index,
                                     OPJ_UINT32 * p_data_size,
                                     OPJ_INT32 * p_tile_x0,
@@ -678,7 +678,7 @@ opj_bool opj_j2k_read_tile_header ( opj_j2k_t * p_j2k,
                                     OPJ_INT32 * p_tile_x1,
                                     OPJ_INT32 * p_tile_y1,
                                     OPJ_UINT32 * p_nb_comps,
-                                    opj_bool * p_go_on,
+                                    OPJ_BOOL * p_go_on,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -696,7 +696,7 @@ opj_bool opj_j2k_read_tile_header ( opj_j2k_t * p_j2k,
  *
  * @return     true                    if the area could be set.
  */
-opj_bool opj_j2k_set_decode_area(      opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_set_decode_area(      opj_j2k_t *p_j2k,
                                                                    opj_image_t* p_image,
                                                                    OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
                                                                    OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
@@ -729,7 +729,7 @@ void j2k_dump (opj_j2k_t* p_j2k, OPJ_INT32 flag, FILE* out_stream);
  *@param dev_dump_flag         flag to describe if we are in the case of this function is use outside j2k_dump function
  *@param out_stream                    output stream where dump the elements.
  */
-void j2k_dump_image_header(opj_image_t* image, opj_bool dev_dump_flag, FILE* out_stream);
+void j2k_dump_image_header(opj_image_t* image, OPJ_BOOL dev_dump_flag, FILE* out_stream);
 
 /**
  * Dump a component image header structure.
@@ -738,7 +738,7 @@ void j2k_dump_image_header(opj_image_t* image, opj_bool dev_dump_flag, FILE* out
  *@param dev_dump_flag         flag to describe if we are in the case of this function is use outside j2k_dump function
  *@param out_stream                    output stream where dump the elements.
  */
-void j2k_dump_image_comp_header(opj_image_comp_t* comp, opj_bool dev_dump_flag, FILE* out_stream);
+void j2k_dump_image_comp_header(opj_image_comp_t* comp, OPJ_BOOL dev_dump_flag, FILE* out_stream);
 
 /**
  * Get the codestream info from a JPEG2000 codec.
@@ -766,19 +766,19 @@ opj_codestream_index_t* j2k_get_cstr_index(opj_j2k_t* p_j2k);
  * @param p_manager FIXME DOC
  * @return FIXME DOC
 */
-opj_bool opj_j2k_decode(opj_j2k_t *j2k,
+OPJ_BOOL opj_j2k_decode(opj_j2k_t *j2k,
                         opj_stream_private_t *p_stream,
                         opj_image_t *p_image,
                         opj_event_mgr_t *p_manager);
 
 
-opj_bool opj_j2k_get_tile(     opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_get_tile(     opj_j2k_t *p_j2k,
                                                opj_stream_private_t *p_stream,
                                                opj_image_t* p_image,
                                                opj_event_mgr_t * p_manager,
                                                    OPJ_UINT32 tile_index );
 
-opj_bool opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k, 
+OPJ_BOOL opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k, 
                                                OPJ_UINT32 res_factor,
                                                opj_event_mgr_t * p_manager);
 
@@ -792,7 +792,7 @@ opj_bool opj_j2k_set_decoded_resolution_factor(opj_j2k_t *p_j2k,
  * @param      p_stream                        the stream to write data to.
  * @param      p_manager       the user event manager.
  */
-opj_bool opj_j2k_write_tile (  opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_write_tile (  opj_j2k_t * p_j2k,
                                                            OPJ_UINT32 p_tile_index,
                                                            OPJ_BYTE * p_data,
                                                            OPJ_UINT32 p_data_size,
@@ -802,7 +802,7 @@ opj_bool opj_j2k_write_tile (       opj_j2k_t * p_j2k,
 /**
  * Encodes an image into a JPEG-2000 codestream
  */
-opj_bool opj_j2k_encode_v2(    opj_j2k_t * p_j2k,
+OPJ_BOOL opj_j2k_encode_v2(    opj_j2k_t * p_j2k,
                                                opj_stream_private_t *cio,
                                                opj_event_mgr_t * p_manager );
 
@@ -816,7 +816,7 @@ opj_bool opj_j2k_encode_v2( opj_j2k_t * p_j2k,
  *
  * @return true if the codec is valid.
  */
-opj_bool opj_j2k_start_compress(opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_start_compress(opj_j2k_t *p_j2k,
                                                            opj_stream_private_t *p_stream,
                                                            opj_image_t * p_image,
                                                            opj_event_mgr_t * p_manager);
@@ -825,11 +825,11 @@ opj_bool opj_j2k_start_compress(opj_j2k_t *p_j2k,
  * Ends the compression procedures and possibiliy add data to be read after the
  * codestream.
  */
-opj_bool opj_j2k_end_compress(         opj_j2k_t *p_j2k,
+OPJ_BOOL opj_j2k_end_compress(         opj_j2k_t *p_j2k,
                                                            opj_stream_private_t *cio,
                                                            opj_event_mgr_t * p_manager);
 
-opj_bool opj_j2k_setup_mct_encoding (opj_tcp_t * p_tcp, opj_image_t * p_image);
+OPJ_BOOL opj_j2k_setup_mct_encoding (opj_tcp_t * p_tcp, opj_image_t * p_image);
 
 
 #endif /* __J2K_H */
index 2f84565118919e30e5327da1eb7fee0427f902a0..730d7f9d49fd48c0ecd5cb10ff026b2dc7815d38 100644 (file)
@@ -51,7 +51,7 @@
  *
  * @return     true if the image header is valid, false else.
  */
-static opj_bool opj_jp2_read_ihdr(  opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_ihdr(  opj_jp2_t *jp2,
                                     OPJ_BYTE *p_image_header_data,
                                     OPJ_UINT32 p_image_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -88,12 +88,12 @@ static OPJ_BYTE * opj_jp2_write_bpcc(       opj_jp2_t *jp2,
  *
  * @return     true if the bpc header is valid, fale else.
  */
-static opj_bool opj_jp2_read_bpcc(  opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_bpcc(  opj_jp2_t *jp2,
                                     OPJ_BYTE * p_bpc_header_data,
                                     OPJ_UINT32 p_bpc_header_size,
                                     opj_event_mgr_t * p_manager );
 
-static opj_bool opj_jp2_read_cdef(     opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_read_cdef(     opj_jp2_t * jp2,
                                     OPJ_BYTE * p_cdef_header_data,
                                                                        OPJ_UINT32 p_cdef_header_size,
                                                                        opj_event_mgr_t * p_manager );
@@ -120,7 +120,7 @@ static OPJ_BYTE * opj_jp2_write_colr(   opj_jp2_t *jp2,
  *
  * @return     true if writing was successful.
  */
-static opj_bool opj_jp2_write_ftyp(    opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_ftyp(    opj_jp2_t *jp2,
                                                                        opj_stream_private_t *cio,
                                                                        opj_event_mgr_t * p_manager );
 
@@ -134,12 +134,12 @@ static opj_bool opj_jp2_write_ftyp(       opj_jp2_t *jp2,
  *
  * @return true if the FTYP box is valid.
  */
-static opj_bool opj_jp2_read_ftyp(     opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_ftyp(     opj_jp2_t *jp2,
                                                                        OPJ_BYTE * p_header_data,
                                                                        OPJ_UINT32 p_header_size,
                                                                        opj_event_mgr_t * p_manager );
 
-opj_bool opj_jp2_skip_jp2c(    opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_skip_jp2c(    opj_jp2_t *jp2,
                                                    opj_stream_private_t *cio,
                                                    opj_event_mgr_t * p_manager );
 
@@ -153,7 +153,7 @@ opj_bool opj_jp2_skip_jp2c( opj_jp2_t *jp2,
  *
  * @return true if the JP2 Header box was successfully reconized.
 */
-static opj_bool opj_jp2_read_jp2h(  opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_jp2h(  opj_jp2_t *jp2,
                                     OPJ_BYTE *p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -167,7 +167,7 @@ static opj_bool opj_jp2_read_jp2h(  opj_jp2_t *jp2,
  *
  * @return true if writing was successful.
 */
-static opj_bool opj_jp2_write_jp2c(    opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_jp2c(    opj_jp2_t *jp2,
                                                                    opj_stream_private_t *cio,
                                                                    opj_event_mgr_t * p_manager );
 
@@ -178,7 +178,7 @@ static opj_bool opj_jp2_write_jp2c( opj_jp2_t *jp2,
  * @param      jp2                     the jpeg2000 file codec.
  * @param      p_manager       user event manager.
 */
-static opj_bool opj_jpip_write_iptr(   opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_write_iptr(   opj_jp2_t *jp2,
                                                                    opj_stream_private_t *cio,
                                                                    opj_event_mgr_t * p_manager );
 
@@ -188,7 +188,7 @@ static opj_bool opj_jpip_write_iptr(        opj_jp2_t *jp2,
  * @param      jp2                     the jpeg2000 file codec.
  * @param      p_manager       user event manager.
  */
-static opj_bool opj_jpip_write_cidx(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_write_cidx(opj_jp2_t *jp2,
   opj_stream_private_t *cio,
   opj_event_mgr_t * p_manager );
 
@@ -198,7 +198,7 @@ static opj_bool opj_jpip_write_cidx(opj_jp2_t *jp2,
  * @param      jp2                     the jpeg2000 file codec.
  * @param      p_manager       user event manager.
  */
-static opj_bool opj_jpip_write_fidx(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_write_fidx(opj_jp2_t *jp2,
   opj_stream_private_t *cio,
   opj_event_mgr_t * p_manager );
 #endif /* USE_JPIP */
@@ -213,7 +213,7 @@ static opj_bool opj_jpip_write_fidx(opj_jp2_t *jp2,
  *
  * @return true if the file signature box is valid.
  */
-static opj_bool opj_jp2_read_jp(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_jp(opj_jp2_t *jp2,
                                 OPJ_BYTE * p_header_data,
                                 OPJ_UINT32 p_header_size,
                                 opj_event_mgr_t * p_manager);
@@ -227,7 +227,7 @@ static opj_bool opj_jp2_read_jp(opj_jp2_t *jp2,
  *
  * @return true if writing was successful.
  */
-static opj_bool opj_jp2_write_jp(      opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_write_jp(      opj_jp2_t *jp2,
                                                    opj_stream_private_t *cio,
                                                        opj_event_mgr_t * p_manager );
 
@@ -250,7 +250,7 @@ static void opj_jp2_free_pclr(opj_jp2_color_t *color);
  *
  * @return Returns true if successful, returns false otherwise
 */
-static opj_bool opj_jp2_read_pclr(     opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_pclr(     opj_jp2_t *jp2,
                                     OPJ_BYTE * p_pclr_header_data,
                                     OPJ_UINT32 p_pclr_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -266,7 +266,7 @@ static opj_bool opj_jp2_read_pclr(  opj_jp2_t *jp2,
  * @return Returns true if successful, returns false otherwise
 */
 
-static opj_bool opj_jp2_read_cmap(     opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_read_cmap(     opj_jp2_t * jp2,
                                     OPJ_BYTE * p_cmap_header_data,
                                     OPJ_UINT32 p_cmap_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -281,7 +281,7 @@ static opj_bool opj_jp2_read_cmap(  opj_jp2_t * jp2,
  *
  * @return     true if the bpc header is valid, fale else.
 */
-static opj_bool opj_jp2_read_colr(  opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_colr(  opj_jp2_t *jp2,
                                     OPJ_BYTE * p_colr_header_data,
                                     OPJ_UINT32 p_colr_header_size,
                                     opj_event_mgr_t * p_manager );
@@ -311,7 +311,7 @@ static void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2);
  *
  * @return true if the box is valid.
  */
-static opj_bool opj_jp2_read_header_procedure(  opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_header_procedure(  opj_jp2_t *jp2,
                                                 opj_stream_private_t *stream,
                                                 opj_event_mgr_t * p_manager );
 
@@ -325,7 +325,7 @@ static opj_bool opj_jp2_read_header_procedure(  opj_jp2_t *jp2,
  *
  * @return     true                            if all the procedures were successfully executed.
  */
-static opj_bool opj_jp2_exec (  opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_exec (  opj_jp2_t * jp2,
                                 opj_procedure_list_t * p_procedure_list,
                                 opj_stream_private_t *stream,
                                 opj_event_mgr_t * p_manager );
@@ -340,7 +340,7 @@ static opj_bool opj_jp2_exec (  opj_jp2_t * jp2,
  *
  * @return     true if the box is reconized, false otherwise
 */
-static opj_bool opj_jp2_read_boxhdr(opj_jp2_box_t *box,
+static OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
                                     OPJ_UINT32 * p_number_bytes_read,
                                     opj_stream_private_t *cio,
                                     opj_event_mgr_t * p_manager);
@@ -356,7 +356,7 @@ static void opj_jp2_setup_encoding_validation (opj_jp2_t *jp2);
  */
 static void opj_jp2_setup_header_writing (opj_jp2_t *jp2);
 
-opj_bool opj_jp2_default_validation (  opj_jp2_t * jp2,
+OPJ_BOOL opj_jp2_default_validation (  opj_jp2_t * jp2,
                                         opj_stream_private_t *cio,
                                         opj_event_mgr_t * p_manager );
 
@@ -407,7 +407,7 @@ const opj_jp2_header_handler_t jp2_img_header [] =
  *
  * @return     true if the box is reconized, false otherwise
 */
-static opj_bool opj_jp2_read_boxhdr_char(   opj_jp2_box_t *box,
+static OPJ_BOOL opj_jp2_read_boxhdr_char(   opj_jp2_box_t *box,
                                             OPJ_BYTE * p_data,
                                             OPJ_UINT32 * p_number_bytes_read,
                                             OPJ_UINT32 p_box_max_size,
@@ -427,7 +427,7 @@ static void opj_jp2_setup_header_reading (opj_jp2_t *jp2);
 
 /* ----------------------------------------------------------------------- */
 
opj_bool opj_jp2_read_boxhdr(opj_jp2_box_t *box,
OPJ_BOOL opj_jp2_read_boxhdr(opj_jp2_box_t *box,
                                     OPJ_UINT32 * p_number_bytes_read,
                                     opj_stream_private_t *cio,
                                     opj_event_mgr_t * p_manager
@@ -499,7 +499,7 @@ static void jp2_write_url(opj_cio_t *cio, char *Idx_file) {
 }
 #endif
 
-opj_bool opj_jp2_read_ihdr( opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_read_ihdr( opj_jp2_t *jp2,
                             OPJ_BYTE *p_image_header_data,
                             OPJ_UINT32 p_image_header_size,
                             opj_event_mgr_t * p_manager )
@@ -636,7 +636,7 @@ OPJ_BYTE * opj_jp2_write_bpcc(      opj_jp2_t *jp2,
        return l_bpcc_data;
 }
 
-opj_bool opj_jp2_read_bpcc( opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_read_bpcc( opj_jp2_t *jp2,
                             OPJ_BYTE * p_bpc_header_data,
                             OPJ_UINT32 p_bpc_header_size,
                             opj_event_mgr_t * p_manager
@@ -811,7 +811,7 @@ void opj_jp2_apply_pclr(opj_image_t *image, opj_jp2_color_t *color)
 
 }/* apply_pclr() */
 
-opj_bool opj_jp2_read_pclr(    opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_read_pclr(    opj_jp2_t *jp2,
                             OPJ_BYTE * p_pclr_header_data,
                             OPJ_UINT32 p_pclr_header_size,
                             opj_event_mgr_t * p_manager
@@ -898,7 +898,7 @@ opj_bool opj_jp2_read_pclr( opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_read_cmap(    opj_jp2_t * jp2,
+OPJ_BOOL opj_jp2_read_cmap(    opj_jp2_t * jp2,
                             OPJ_BYTE * p_cmap_header_data,
                             OPJ_UINT32 p_cmap_header_size,
                             opj_event_mgr_t * p_manager
@@ -988,7 +988,7 @@ void opj_jp2_apply_cdef(opj_image_t *image, opj_jp2_color_t *color)
 
 }/* jp2_apply_cdef() */
 
-opj_bool opj_jp2_read_cdef(    opj_jp2_t * jp2,
+OPJ_BOOL opj_jp2_read_cdef(    opj_jp2_t * jp2,
                             OPJ_BYTE * p_cdef_header_data,
                                                        OPJ_UINT32 p_cdef_header_size,
                                                        opj_event_mgr_t * p_manager
@@ -1046,7 +1046,7 @@ opj_bool opj_jp2_read_cdef(       opj_jp2_t * jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_read_colr( opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_read_colr( opj_jp2_t *jp2,
                             OPJ_BYTE * p_colr_header_data,
                             OPJ_UINT32 p_colr_header_size,
                             opj_event_mgr_t * p_manager
@@ -1120,7 +1120,7 @@ opj_bool opj_jp2_read_colr( opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_decode(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2,
                         opj_stream_private_t *p_stream,
                         opj_image_t* p_image,
                         opj_event_mgr_t * p_manager)
@@ -1169,7 +1169,7 @@ opj_bool opj_jp2_decode(opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_write_jp2h(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2,
                             opj_stream_private_t *stream,
                             opj_event_mgr_t * p_manager
                             )
@@ -1180,7 +1180,7 @@ opj_bool opj_jp2_write_jp2h(opj_jp2_t *jp2,
        OPJ_INT32 i, l_nb_pass;
        /* size of data for super box*/
        OPJ_INT32 l_jp2h_size = 8;
-       opj_bool l_result = OPJ_TRUE;
+       OPJ_BOOL l_result = OPJ_TRUE;
 
        /* to store the data of the super box */
        OPJ_BYTE l_jp2h_data [8];
@@ -1267,14 +1267,14 @@ opj_bool opj_jp2_write_jp2h(opj_jp2_t *jp2,
        return l_result;
 }
 
-opj_bool opj_jp2_write_ftyp(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_write_ftyp(opj_jp2_t *jp2,
                                                        opj_stream_private_t *cio,
                                                        opj_event_mgr_t * p_manager )
 {
        OPJ_UINT32 i;
        OPJ_UINT32 l_ftyp_size = 16 + 4 * jp2->numcl;
        OPJ_BYTE * l_ftyp_data, * l_current_data_ptr;
-       opj_bool l_result;
+       OPJ_BOOL l_result;
 
        /* preconditions */
        assert(cio != 00);
@@ -1319,7 +1319,7 @@ opj_bool opj_jp2_write_ftyp(opj_jp2_t *jp2,
        return l_result;
 }
 
-opj_bool opj_jp2_write_jp2c(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_write_jp2c(opj_jp2_t *jp2,
                                                        opj_stream_private_t *cio,
                                                        opj_event_mgr_t * p_manager )
 {
@@ -1356,7 +1356,7 @@ opj_bool opj_jp2_write_jp2c(opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_write_jp(     opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_write_jp(     opj_jp2_t *jp2,
                                            opj_stream_private_t *cio,
                                                opj_event_mgr_t * p_manager )
 {
@@ -1491,14 +1491,14 @@ void opj_jp2_setup_encoder(     opj_jp2_t *jp2,
        jp2->jpip_on = parameters->jpip_on;
 }
 
-opj_bool opj_jp2_encode(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_encode(opj_jp2_t *jp2,
                                                opj_stream_private_t *stream,
                                                opj_event_mgr_t * p_manager)
 {
        return opj_j2k_encode_v2(jp2->j2k, stream, p_manager);
 }
 
-opj_bool opj_jp2_end_decompress(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_end_decompress(opj_jp2_t *jp2,
                                 opj_stream_private_t *cio,
                                 opj_event_mgr_t * p_manager
                                 )
@@ -1519,7 +1519,7 @@ opj_bool opj_jp2_end_decompress(opj_jp2_t *jp2,
        return opj_j2k_end_decompress(jp2->j2k, cio, p_manager);
 }
 
-opj_bool opj_jp2_end_compress( opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_end_compress( opj_jp2_t *jp2,
                                                            opj_stream_private_t *cio,
                                                            opj_event_mgr_t * p_manager
                                 )
@@ -1568,12 +1568,12 @@ void opj_jp2_setup_end_header_reading (opj_jp2_t *jp2)
        /* DEVELOPER CORNER, add your custom procedures */
 }
 
-opj_bool opj_jp2_default_validation (  opj_jp2_t * jp2,
+OPJ_BOOL opj_jp2_default_validation (  opj_jp2_t * jp2,
                                         opj_stream_private_t *cio,
                                         opj_event_mgr_t * p_manager
                                         )
 {
-       opj_bool l_is_valid = OPJ_TRUE;
+       OPJ_BOOL l_is_valid = OPJ_TRUE;
        OPJ_UINT32 i;
 
        /* preconditions */
@@ -1622,7 +1622,7 @@ opj_bool opj_jp2_default_validation (     opj_jp2_t * jp2,
        return l_is_valid;
 }
 
-opj_bool opj_jp2_read_header_procedure(  opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_read_header_procedure(  opj_jp2_t *jp2,
                                                 opj_stream_private_t *stream,
                                                 opj_event_mgr_t * p_manager
                                                 )
@@ -1719,15 +1719,15 @@ opj_bool opj_jp2_read_header_procedure(  opj_jp2_t *jp2,
  *
  * @return     true                            if all the procedures were successfully executed.
  */
-static opj_bool opj_jp2_exec (  opj_jp2_t * jp2,
+static OPJ_BOOL opj_jp2_exec (  opj_jp2_t * jp2,
                                 opj_procedure_list_t * p_procedure_list,
                                 opj_stream_private_t *stream,
                                 opj_event_mgr_t * p_manager
                                 )
 
 {
-       opj_bool (** l_procedure) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *) = 00;
-       opj_bool l_result = OPJ_TRUE;
+       OPJ_BOOL (** l_procedure) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *) = 00;
+       OPJ_BOOL l_result = OPJ_TRUE;
        OPJ_UINT32 l_nb_proc, i;
 
        /* preconditions */
@@ -1737,7 +1737,7 @@ static opj_bool opj_jp2_exec (  opj_jp2_t * jp2,
        assert(p_manager != 00);
 
        l_nb_proc = opj_procedure_list_get_nb_procedures(p_procedure_list);
-       l_procedure = (opj_bool (**) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list);
+       l_procedure = (OPJ_BOOL (**) (opj_jp2_t * jp2, opj_stream_private_t *, opj_event_mgr_t *)) opj_procedure_list_get_first_procedure(p_procedure_list);
 
        for     (i=0;i<l_nb_proc;++i) {
                l_result = l_result && (*l_procedure) (jp2,stream,p_manager);
@@ -1749,7 +1749,7 @@ static opj_bool opj_jp2_exec (  opj_jp2_t * jp2,
        return l_result;
 }
 
-opj_bool opj_jp2_start_compress(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_start_compress(opj_jp2_t *jp2,
                                 opj_stream_private_t *stream,
                                 opj_image_t * p_image,
                                 opj_event_mgr_t * p_manager
@@ -1821,7 +1821,7 @@ static const opj_jp2_header_handler_t * opj_jp2_img_find_handler (OPJ_UINT32 p_i
  *
  * @return true if the file signature box is valid.
  */
-static opj_bool opj_jp2_read_jp(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_jp(opj_jp2_t *jp2,
                                 OPJ_BYTE * p_header_data,
                                 OPJ_UINT32 p_header_size,
                                 opj_event_mgr_t * p_manager
@@ -1868,7 +1868,7 @@ static opj_bool opj_jp2_read_jp(opj_jp2_t *jp2,
  *
  * @return true if the FTYP box is valid.
  */
-static opj_bool opj_jp2_read_ftyp(     opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_ftyp(     opj_jp2_t *jp2,
                                                                        OPJ_BYTE * p_header_data,
                                                                        OPJ_UINT32 p_header_size,
                                                                        opj_event_mgr_t * p_manager
@@ -1928,7 +1928,7 @@ static opj_bool opj_jp2_read_ftyp(        opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_skip_jp2c(    opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_skip_jp2c(    opj_jp2_t *jp2,
                                                opj_stream_private_t *stream,
                                                opj_event_mgr_t * p_manager )
 {
@@ -1946,7 +1946,7 @@ opj_bool opj_jp2_skip_jp2c(       opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-static opj_bool opj_jpip_skip_iptr(    opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_skip_iptr(    opj_jp2_t *jp2,
   opj_stream_private_t *stream,
   opj_event_mgr_t * p_manager )
 {
@@ -1974,7 +1974,7 @@ static opj_bool opj_jpip_skip_iptr(       opj_jp2_t *jp2,
  *
  * @return true if the JP2 Header box was successfully reconized.
 */
-static opj_bool opj_jp2_read_jp2h(  opj_jp2_t *jp2,
+static OPJ_BOOL opj_jp2_read_jp2h(  opj_jp2_t *jp2,
                                     OPJ_BYTE *p_header_data,
                                     OPJ_UINT32 p_header_size,
                                     opj_event_mgr_t * p_manager
@@ -2032,7 +2032,7 @@ static opj_bool opj_jp2_read_jp2h(  opj_jp2_t *jp2,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_read_boxhdr_char(   opj_jp2_box_t *box,
+OPJ_BOOL opj_jp2_read_boxhdr_char(   opj_jp2_box_t *box,
                                      OPJ_BYTE * p_data,
                                      OPJ_UINT32 * p_number_bytes_read,
                                      OPJ_UINT32 p_box_max_size,
@@ -2099,7 +2099,7 @@ opj_bool opj_jp2_read_boxhdr_char(   opj_jp2_box_t *box,
        return OPJ_TRUE;
 }
 
-opj_bool opj_jp2_read_header(  opj_stream_private_t *p_stream,
+OPJ_BOOL opj_jp2_read_header(  opj_stream_private_t *p_stream,
                                 opj_jp2_t *jp2,
                                 opj_image_t ** p_image,
                                 opj_event_mgr_t * p_manager
@@ -2173,7 +2173,7 @@ void opj_jp2_setup_header_reading (opj_jp2_t *jp2)
        /* DEVELOPER CORNER, add your custom procedures */
 }
 
-opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
+OPJ_BOOL opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
                                     OPJ_UINT32 * p_tile_index,
                                     OPJ_UINT32 * p_data_size,
                                     OPJ_INT32 * p_tile_x0,
@@ -2181,7 +2181,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
                                     OPJ_INT32 * p_tile_x1,
                                     OPJ_INT32 * p_tile_y1,
                                     OPJ_UINT32 * p_nb_comps,
-                                    opj_bool * p_go_on,
+                                    OPJ_BOOL * p_go_on,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager
                                     )
@@ -2197,7 +2197,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
                                                                p_manager);
 }
 
-opj_bool opj_jp2_write_tile (  opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_write_tile (  opj_jp2_t *p_jp2,
                                                            OPJ_UINT32 p_tile_index,
                                                            OPJ_BYTE * p_data,
                                                            OPJ_UINT32 p_data_size,
@@ -2209,7 +2209,7 @@ opj_bool opj_jp2_write_tile (     opj_jp2_t *p_jp2,
        return opj_j2k_write_tile (p_jp2->j2k,p_tile_index,p_data,p_data_size,p_stream,p_manager);
 }
 
-opj_bool opj_jp2_decode_tile (  opj_jp2_t * p_jp2,
+OPJ_BOOL opj_jp2_decode_tile (  opj_jp2_t * p_jp2,
                                 OPJ_UINT32 p_tile_index,
                                 OPJ_BYTE * p_data,
                                 OPJ_UINT32 p_data_size,
@@ -2288,7 +2288,7 @@ void opj_jp2_destroy(opj_jp2_t *jp2)
        }
 }
 
-opj_bool opj_jp2_set_decode_area(      opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_set_decode_area(      opj_jp2_t *p_jp2,
                                                                    opj_image_t* p_image,
                                                                    OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
                                                                    OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
@@ -2298,7 +2298,7 @@ opj_bool opj_jp2_set_decode_area( opj_jp2_t *p_jp2,
        return opj_j2k_set_decode_area(p_jp2->j2k, p_image, p_start_x, p_start_y, p_end_x, p_end_y, p_manager);
 }
 
-opj_bool opj_jp2_get_tile(     opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_get_tile(     opj_jp2_t *p_jp2,
                             opj_stream_private_t *p_stream,
                             opj_image_t* p_image,
                             opj_event_mgr_t * p_manager,
@@ -2351,7 +2351,7 @@ opj_bool opj_jp2_get_tile(        opj_jp2_t *p_jp2,
 /* JP2 encoder interface                                             */
 /* ----------------------------------------------------------------------- */
 
-opj_jp2_t* opj_jp2_create(opj_bool p_is_decoder)
+opj_jp2_t* opj_jp2_create(OPJ_BOOL p_is_decoder)
 {
        opj_jp2_t *jp2 = (opj_jp2_t*)opj_malloc(sizeof(opj_jp2_t));
        if (jp2) {
@@ -2415,7 +2415,7 @@ opj_codestream_info_v2_t* jp2_get_cstr_info(opj_jp2_t* p_jp2)
        return j2k_get_cstr_info(p_jp2->j2k);
 }
 
-opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2,
                                                OPJ_UINT32 res_factor,
                                                opj_event_mgr_t * p_manager)
 {
@@ -2425,7 +2425,7 @@ opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2,
 /* JPIP specific */
 
 #ifdef USE_JPIP
-static opj_bool opj_jpip_write_iptr(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_write_iptr(opj_jp2_t *jp2,
   opj_stream_private_t *cio,
   opj_event_mgr_t * p_manager )
 {
@@ -2467,7 +2467,7 @@ static opj_bool opj_jpip_write_iptr(opj_jp2_t *jp2,
   return OPJ_TRUE;
 }
 
-static opj_bool opj_jpip_write_fidx(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_write_fidx(opj_jp2_t *jp2,
   opj_stream_private_t *cio,
   opj_event_mgr_t * p_manager )
 {
@@ -2499,7 +2499,7 @@ static opj_bool opj_jpip_write_fidx(opj_jp2_t *jp2,
   return OPJ_TRUE;
 }
 
-static opj_bool opj_jpip_write_cidx(opj_jp2_t *jp2,
+static OPJ_BOOL opj_jpip_write_cidx(opj_jp2_t *jp2,
   opj_stream_private_t *cio,
   opj_event_mgr_t * p_manager )
 {
index cc31a24a43881fbad21b1b6e984ca8a7f8cc79b7..0abf8e097e18485f8db75d073cbdb64ea306312b 100644 (file)
@@ -181,13 +181,13 @@ typedef struct opj_jp2
   */
     OPJ_OFF_T j2k_codestream_offset;
     OPJ_OFF_T jpip_iptr_offset;
-       opj_bool jpip_on;
+       OPJ_BOOL jpip_on;
   OPJ_UINT32 jp2_state;
   OPJ_UINT32 jp2_img_state;
 
   opj_jp2_color_t color;
     
-    opj_bool ignore_pclr_cmap_cdef;
+    OPJ_BOOL ignore_pclr_cmap_cdef;
 }
 opj_jp2_t;
 
@@ -205,7 +205,7 @@ typedef struct opj_jp2_header_handler
   /* marker value */
   OPJ_UINT32 id;
   /* action linked to the marker */
-  opj_bool (*handler) (     opj_jp2_t *jp2, 
+  OPJ_BOOL (*handler) (     opj_jp2_t *jp2, 
                             OPJ_BYTE *p_header_data, 
                             OPJ_UINT32 p_header_size, 
                             opj_event_mgr_t * p_manager);
@@ -237,7 +237,7 @@ opj_jp2_img_header_writer_handler_t;
  *
  * @return true if writing was successful.
 */
-opj_bool opj_jp2_write_jp2h(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_write_jp2h(opj_jp2_t *jp2,
                             opj_stream_private_t *stream,
                             opj_event_mgr_t * p_manager );
 
@@ -258,7 +258,7 @@ void opj_jp2_setup_decoder(opj_jp2_t *jp2, opj_dparameters_t *parameters);
  *
  * @return Returns a decoded image if successful, returns NULL otherwise
 */
-opj_bool opj_jp2_decode(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_decode(opj_jp2_t *jp2,
                         opj_stream_private_t *p_stream,
             opj_image_t* p_image,
             opj_event_mgr_t * p_manager);
@@ -284,7 +284,7 @@ Encode an image into a JPEG-2000 file stream
 @param p_manager  event manager
 @return Returns true if successful, returns false otherwise
 */
-opj_bool opj_jp2_encode(  opj_jp2_t *jp2, 
+OPJ_BOOL opj_jp2_encode(  opj_jp2_t *jp2, 
               opj_stream_private_t *stream, 
               opj_event_mgr_t * p_manager);
 
@@ -299,7 +299,7 @@ opj_bool opj_jp2_encode(  opj_jp2_t *jp2,
  *
  * @return true if the codec is valid.
  */
-opj_bool opj_jp2_start_compress(opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_start_compress(opj_jp2_t *jp2,
                                 opj_stream_private_t *stream,
                                 opj_image_t * p_image,
                                 opj_event_mgr_t * p_manager);
@@ -309,7 +309,7 @@ opj_bool opj_jp2_start_compress(opj_jp2_t *jp2,
  * Ends the compression procedures and possibiliy add data to be read after the
  * codestream.
  */
-opj_bool opj_jp2_end_compress(  opj_jp2_t *jp2,
+OPJ_BOOL opj_jp2_end_compress(  opj_jp2_t *jp2,
                   opj_stream_private_t *cio,
                   opj_event_mgr_t * p_manager);
 
@@ -319,7 +319,7 @@ opj_bool opj_jp2_end_compress(  opj_jp2_t *jp2,
  * Ends the decompression procedures and possibiliy add data to be read after the
  * codestream.
  */
-opj_bool opj_jp2_end_decompress(opj_jp2_t *jp2, 
+OPJ_BOOL opj_jp2_end_decompress(opj_jp2_t *jp2, 
                                 opj_stream_private_t *cio,
                                 opj_event_mgr_t * p_manager);
 
@@ -333,7 +333,7 @@ opj_bool opj_jp2_end_decompress(opj_jp2_t *jp2,
  *
  * @return true if the box is valid.
  */
-opj_bool opj_jp2_read_header(  opj_stream_private_t *p_stream,
+OPJ_BOOL opj_jp2_read_header(  opj_stream_private_t *p_stream,
                                 opj_jp2_t *jp2,
                                 opj_image_t ** p_image,
                                 opj_event_mgr_t * p_manager );
@@ -352,7 +352,7 @@ opj_bool opj_jp2_read_header(  opj_stream_private_t *p_stream,
  * @param  p_stream      the stream to write data to.
  * @param  p_manager     the user event manager.
  */
-opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
+OPJ_BOOL opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
                                     OPJ_UINT32 * p_tile_index,
                                     OPJ_UINT32 * p_data_size,
                                     OPJ_INT32 * p_tile_x0,
@@ -360,7 +360,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
                                     OPJ_INT32 * p_tile_x1,
                                     OPJ_INT32 * p_tile_y1,
                                     OPJ_UINT32 * p_nb_comps,
-                                    opj_bool * p_go_on,
+                                    OPJ_BOOL * p_go_on,
                                     opj_stream_private_t *p_stream,
                                     opj_event_mgr_t * p_manager );
 
@@ -374,7 +374,7 @@ opj_bool opj_jp2_read_tile_header ( opj_jp2_t * p_jp2,
  * @param  p_stream      the stream to write data to.
  * @param  p_manager  the user event manager.
  */
-opj_bool opj_jp2_write_tile (  opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_write_tile (  opj_jp2_t *p_jp2,
                     OPJ_UINT32 p_tile_index,
                     OPJ_BYTE * p_data,
                     OPJ_UINT32 p_data_size,
@@ -392,7 +392,7 @@ opj_bool opj_jp2_write_tile (  opj_jp2_t *p_jp2,
  *
  * @return FIXME DOC
  */
-opj_bool opj_jp2_decode_tile (  opj_jp2_t * p_jp2,
+OPJ_BOOL opj_jp2_decode_tile (  opj_jp2_t * p_jp2,
                                 OPJ_UINT32 p_tile_index,
                                 OPJ_BYTE * p_data,
                                 OPJ_UINT32 p_data_size,
@@ -404,7 +404,7 @@ opj_bool opj_jp2_decode_tile (  opj_jp2_t * p_jp2,
  *
  * @return  an empty jpeg2000 file codec.
  */
-opj_jp2_t* opj_jp2_create (opj_bool p_is_decoder);
+opj_jp2_t* opj_jp2_create (OPJ_BOOL p_is_decoder);
 
 /**
 Destroy a JP2 decompressor handle
@@ -426,7 +426,7 @@ void opj_jp2_destroy(opj_jp2_t *jp2);
  *
  * @return  true      if the area could be set.
  */
-opj_bool opj_jp2_set_decode_area(  opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_set_decode_area(  opj_jp2_t *p_jp2,
                     opj_image_t* p_image,
                     OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
                     OPJ_INT32 p_end_x, OPJ_INT32 p_end_y,
@@ -435,7 +435,7 @@ opj_bool opj_jp2_set_decode_area(  opj_jp2_t *p_jp2,
  /**
  * 
  */
-opj_bool opj_jp2_get_tile(  opj_jp2_t *p_jp2,
+OPJ_BOOL opj_jp2_get_tile(  opj_jp2_t *p_jp2,
                             opj_stream_private_t *p_stream,
                             opj_image_t* p_image,
                             opj_event_mgr_t * p_manager,
@@ -445,7 +445,7 @@ opj_bool opj_jp2_get_tile(  opj_jp2_t *p_jp2,
 /**
  * 
  */
-opj_bool opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, 
+OPJ_BOOL opj_jp2_set_decoded_resolution_factor(opj_jp2_t *p_jp2, 
                                                OPJ_UINT32 res_factor, 
                                                opj_event_mgr_t * p_manager);
 
index 8a5c4afc9961acb644c735cf39a9e93ae06a3b05..8d3c59cef8b3bbf0aa37efb1de906c2b248224b9 100644 (file)
@@ -200,7 +200,7 @@ OPJ_FLOAT64 opj_mct_getnorm_real(OPJ_UINT32 compno) {
 }
 
 
-opj_bool opj_mct_encode_custom(
+OPJ_BOOL opj_mct_encode_custom(
                                           OPJ_BYTE * pCodingdata,
                                           OPJ_UINT32 n,
                                           OPJ_BYTE ** pData,
@@ -253,7 +253,7 @@ opj_bool opj_mct_encode_custom(
        return OPJ_TRUE;
 }
 
-opj_bool opj_mct_decode_custom(
+OPJ_BOOL opj_mct_decode_custom(
                                           OPJ_BYTE * pDecodingData,
                                           OPJ_UINT32 n,
                                           OPJ_BYTE ** pData,
index 3752d986a04cc2772d0ba90f871c834392434594..c5c3041fdeb651b220ddea3db7736ea858e96364 100644 (file)
@@ -100,7 +100,7 @@ FIXME DOC
 @param is_signed        tells if the data is signed
 @return OPJ_FALSE if function encounter a problem, OPJ_TRUE otherwise
 */
-opj_bool opj_mct_encode_custom(
+OPJ_BOOL opj_mct_encode_custom(
                                           OPJ_BYTE * p_coding_data,
                                           OPJ_UINT32 n,
                                           OPJ_BYTE ** p_data,
@@ -115,7 +115,7 @@ FIXME DOC
 @param isSigned         tells if the data is signed
 @return OPJ_FALSE if function encounter a problem, OPJ_TRUE otherwise
 */
-opj_bool opj_mct_decode_custom(
+OPJ_BOOL opj_mct_decode_custom(
                                           OPJ_BYTE * pDecodingData,
                                           OPJ_UINT32 n,
                                           OPJ_BYTE ** pData,
index 7e554bbcc88093ff0baae4ab56cc273bd57df0d3..2ab61c44e8d3bf25b2cbde61d5dc8c9aa75061b8 100644 (file)
@@ -508,7 +508,7 @@ void opj_mqc_segmark_enc(opj_mqc_t *mqc) {
        }
 }
 
-opj_bool opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len) {
+OPJ_BOOL opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len) {
        opj_mqc_setcurctx(mqc, 0);
        mqc->start = bp;
        mqc->end = bp + len;
index 0c9dc8c597ea85ff98364b667920e43d669a67b4..b75ef391205cc4ca65be367a54d93077eae129ee 100644 (file)
@@ -186,7 +186,7 @@ Initialize the decoder
 @param bp Pointer to the start of the buffer from which the bytes will be read
 @param len Length of the input buffer
 */
-opj_bool opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len);
+OPJ_BOOL opj_mqc_init_dec(opj_mqc_t *mqc, OPJ_BYTE *bp, OPJ_UINT32 len);
 /**
 Decode a symbol
 @param mqc MQC handle
index 14b304c3abb0bfcca2c4b2f02e1579acf7a4c711..20f3ca0e36a084ff8e7a57cb10803f69770fb840 100644 (file)
 typedef struct opj_decompression
 {
        /** Main header reading function handler*/
-       opj_bool (*opj_read_header) (   struct opj_stream_private * cio,
+       OPJ_BOOL (*opj_read_header) (   struct opj_stream_private * cio,
                                                                        void * p_codec,
                                                                        opj_image_t **p_image,
                                                                        struct opj_event_mgr * p_manager);
        /** Decoding function */
-       opj_bool (*opj_decode) (        void * p_codec,
+       OPJ_BOOL (*opj_decode) (        void * p_codec,
                                                                struct opj_stream_private *p_cio,
                                                                opj_image_t *p_image,
                                                                struct opj_event_mgr * p_manager);
        /** FIXME DOC */
-       opj_bool (*opj_read_tile_header)(       void * p_codec,
+       OPJ_BOOL (*opj_read_tile_header)(       void * p_codec,
                                                                                OPJ_UINT32 * p_tile_index,
                                                                                OPJ_UINT32* p_data_size,
                                                                                OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
                                                                                OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
                                                                                OPJ_UINT32 * p_nb_comps,
-                                                                               opj_bool * p_should_go_on,
+                                                                               OPJ_BOOL * p_should_go_on,
                                                                                struct opj_stream_private *p_cio,
                                                                                struct opj_event_mgr * p_manager);
        /** FIXME DOC */
-       opj_bool (*opj_decode_tile_data)(       void * p_codec,
+       OPJ_BOOL (*opj_decode_tile_data)(       void * p_codec,
                                                                                OPJ_UINT32 p_tile_index,
                                                                                OPJ_BYTE * p_data,
                                                                                OPJ_UINT32 p_data_size,
                                                                                struct opj_stream_private *p_cio,
                                                                                struct opj_event_mgr * p_manager);
        /** Reading function used after codestream if necessary */
-       opj_bool (* opj_end_decompress) (       void *p_codec,
+       OPJ_BOOL (* opj_end_decompress) (       void *p_codec,
                                                                                struct opj_stream_private *cio,
                                                                                struct opj_event_mgr * p_manager);
        /** Codec destroy function handler*/
@@ -72,21 +72,21 @@ typedef struct opj_decompression
        /** Setup decoder function handler */
        void (*opj_setup_decoder) (void * p_codec, opj_dparameters_t * p_param);
        /** Set decode area function handler */
-       opj_bool (*opj_set_decode_area) (       void * p_codec,
+       OPJ_BOOL (*opj_set_decode_area) (       void * p_codec,
                                                                                opj_image_t* p_image,
                                                                                OPJ_INT32 p_start_x, OPJ_INT32 p_end_x,
                                                                                OPJ_INT32 p_start_y, OPJ_INT32 p_end_y,
                                                                                struct opj_event_mgr * p_manager);
 
        /** Get tile function */
-       opj_bool (*opj_get_decoded_tile) (      void *p_codec,
+       OPJ_BOOL (*opj_get_decoded_tile) (      void *p_codec,
                                                                                opj_stream_private_t *p_cio,
                                                                                opj_image_t *p_image,
                                                                                struct opj_event_mgr * p_manager,
                                                                                OPJ_UINT32 tile_index);
 
        /** Set the decoded resolution factor */
-       opj_bool (*opj_set_decoded_resolution_factor) ( void * p_codec, 
+       OPJ_BOOL (*opj_set_decoded_resolution_factor) ( void * p_codec, 
                                                     OPJ_UINT32 res_factor, 
                                                     opj_event_mgr_t * p_manager);
 
@@ -97,23 +97,23 @@ typedef struct opj_decompression
  */
 typedef struct opj_compression
 {
-       opj_bool (* opj_start_compress) (       void *p_codec,
+       OPJ_BOOL (* opj_start_compress) (       void *p_codec,
                                                                                struct opj_stream_private *cio,
                                                                                struct opj_image * p_image,
                                                                                struct opj_event_mgr * p_manager);
 
-       opj_bool (* opj_encode) (       void * p_codec,
+       OPJ_BOOL (* opj_encode) (       void * p_codec,
                                                                struct opj_stream_private *p_cio,
                                                                struct opj_event_mgr * p_manager);
 
-       opj_bool (* opj_write_tile) (   void * p_codec,
+       OPJ_BOOL (* opj_write_tile) (   void * p_codec,
                                                                        OPJ_UINT32 p_tile_index,
                                                                        OPJ_BYTE * p_data,
                                                                        OPJ_UINT32 p_data_size,
                                                                        struct opj_stream_private * p_cio,
                                                                        struct opj_event_mgr * p_manager);
 
-       opj_bool (* opj_end_compress) ( void * p_codec,
+       OPJ_BOOL (* opj_end_compress) ( void * p_codec,
                                                                        struct opj_stream_private *p_cio,
                                                                        struct opj_event_mgr * p_manager);
 
@@ -142,7 +142,7 @@ typedef struct opj_codec_private
        /** Event handler */
        opj_event_mgr_t m_event_mgr;
        /** Flag to indicate if the codec is used to decode or encode*/
-       opj_bool is_decompressor;
+       OPJ_BOOL is_decompressor;
        void (*opj_dump_codec) (void * p_codec, OPJ_INT32 info_flag, FILE* output_stream);
        opj_codestream_info_v2_t* (*opj_get_codec_info)(void* p_codec);
        opj_codestream_index_t* (*opj_get_codec_index)(void* p_codec);
@@ -152,7 +152,7 @@ opj_codec_private_t;
 /* ---------------------------------------------------------------------- */
 /* Functions to set the message handlers */
 
-opj_bool OPJ_CALLCONV opj_set_info_handler(    opj_codec_t * p_codec, 
+OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(    opj_codec_t * p_codec, 
                                                                                        opj_msg_callback p_callback,
                                                                                        void * p_user_data)
 {
@@ -167,7 +167,7 @@ opj_bool OPJ_CALLCONV opj_set_info_handler( opj_codec_t * p_codec,
        return OPJ_TRUE;
 }
 
-opj_bool OPJ_CALLCONV opj_set_warning_handler( opj_codec_t * p_codec, 
+OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler( opj_codec_t * p_codec, 
                                                                                                opj_msg_callback p_callback,
                                                                                                void * p_user_data)
 {
@@ -182,7 +182,7 @@ opj_bool OPJ_CALLCONV opj_set_warning_handler(      opj_codec_t * p_codec,
        return OPJ_TRUE;
 }
 
-opj_bool OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, 
+OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, 
                                                                                        opj_msg_callback p_callback,
                                                                                        void * p_user_data)
 {
@@ -230,7 +230,7 @@ static OPJ_OFF_T opj_skip_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
        return p_nb_bytes;
 }
 
-static opj_bool opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
+static OPJ_BOOL opj_seek_from_file (OPJ_OFF_T p_nb_bytes, FILE * p_user_data)
 {
        if (OPJ_FSEEK(p_user_data,p_nb_bytes,SEEK_SET)) {
                return OPJ_FALSE;
@@ -293,17 +293,17 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
                        l_codec->opj_get_codec_index = (opj_codestream_index_t* (*) (void*) ) j2k_get_cstr_index;
 
                        l_codec->m_codec_data.m_decompression.opj_decode =
-                                       (opj_bool (*) ( void *,
+                                       (OPJ_BOOL (*) ( void *,
                                                                        struct opj_stream_private *,
                                                                        opj_image_t*, struct opj_event_mgr * )) opj_j2k_decode;
 
                        l_codec->m_codec_data.m_decompression.opj_end_decompress =
-                                       (opj_bool (*) ( void *,
+                                       (OPJ_BOOL (*) ( void *,
                                                                        struct opj_stream_private *,
                                                                        struct opj_event_mgr *)) opj_j2k_end_decompress;
 
                        l_codec->m_codec_data.m_decompression.opj_read_header =
-                                       (opj_bool (*) ( struct opj_stream_private *,
+                                       (OPJ_BOOL (*) ( struct opj_stream_private *,
                                                                        void *,
                                                                        opj_image_t **,
                                                                        struct opj_event_mgr * )) opj_j2k_read_header;
@@ -315,18 +315,18 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
                                        (void (*) (void * , opj_dparameters_t * )) opj_j2k_setup_decoder;
 
                        l_codec->m_codec_data.m_decompression.opj_read_tile_header =
-                                       (opj_bool (*) ( void *,
+                                       (OPJ_BOOL (*) ( void *,
                                                                        OPJ_UINT32*,
                                                                        OPJ_UINT32*,
                                                                        OPJ_INT32*, OPJ_INT32*,
                                                                        OPJ_INT32*, OPJ_INT32*,
                                                                        OPJ_UINT32*,
-                                                                       opj_bool*,
+                                                                       OPJ_BOOL*,
                                                                        struct opj_stream_private *,
                                                                        struct opj_event_mgr * )) opj_j2k_read_tile_header;
 
                        l_codec->m_codec_data.m_decompression.opj_decode_tile_data =
-                                       (opj_bool (*) ( void *, 
+                                       (OPJ_BOOL (*) ( void *, 
                                     OPJ_UINT32, 
                                     OPJ_BYTE*, 
                                     OPJ_UINT32, 
@@ -334,20 +334,20 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
                                     struct opj_event_mgr *)) opj_j2k_decode_tile;
 
                        l_codec->m_codec_data.m_decompression.opj_set_decode_area =
-                                       (opj_bool (*) ( void *, 
+                                       (OPJ_BOOL (*) ( void *, 
                                     opj_image_t*, 
                                     OPJ_INT32, OPJ_INT32, OPJ_INT32, OPJ_INT32, 
                                     struct opj_event_mgr *)) opj_j2k_set_decode_area;
 
                        l_codec->m_codec_data.m_decompression.opj_get_decoded_tile = 
-                    (opj_bool (*) ( void *p_codec,
+                    (OPJ_BOOL (*) ( void *p_codec,
                                                                    opj_stream_private_t *p_cio,
                                                                    opj_image_t *p_image,
                                                                    struct opj_event_mgr * p_manager,
                                                                    OPJ_UINT32 tile_index)) opj_j2k_get_tile;
 
                        l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor = 
-                    (opj_bool (*) ( void * p_codec,
+                    (OPJ_BOOL (*) ( void * p_codec,
                                                                        OPJ_UINT32 res_factor,
                                                                        struct opj_event_mgr * p_manager)) opj_j2k_set_decoded_resolution_factor;
 
@@ -369,24 +369,24 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
                        l_codec->opj_get_codec_index = (opj_codestream_index_t* (*) (void*) ) jp2_get_cstr_index;
 
                        l_codec->m_codec_data.m_decompression.opj_decode =
-                                       (opj_bool (*) ( void *,
+                                       (OPJ_BOOL (*) ( void *,
                                                                        struct opj_stream_private *,
                                                                        opj_image_t*,
                                                                        struct opj_event_mgr * )) opj_jp2_decode;
 
                        l_codec->m_codec_data.m_decompression.opj_end_decompress =  
-                    (opj_bool (*) ( void *,
+                    (OPJ_BOOL (*) ( void *,
                                     struct opj_stream_private *,
                                     struct opj_event_mgr *)) opj_jp2_end_decompress;
 
                        l_codec->m_codec_data.m_decompression.opj_read_header =  
-                    (opj_bool (*) ( struct opj_stream_private *,
+                    (OPJ_BOOL (*) ( struct opj_stream_private *,
                                                        void *,
                                                        opj_image_t **,
                                                        struct opj_event_mgr * )) opj_jp2_read_header;
 
                        l_codec->m_codec_data.m_decompression.opj_read_tile_header = 
-                    (opj_bool (*) ( void *,
+                    (OPJ_BOOL (*) ( void *,
                                                        OPJ_UINT32*,
                                                        OPJ_UINT32*,
                                                        OPJ_INT32*,
@@ -394,12 +394,12 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
                                                        OPJ_INT32 * ,
                                                        OPJ_INT32 * ,
                                                        OPJ_UINT32 * ,
-                                                       opj_bool *,
+                                                       OPJ_BOOL *,
                                                        struct opj_stream_private *,
                                                        struct opj_event_mgr * )) opj_jp2_read_tile_header;
 
                        l_codec->m_codec_data.m_decompression.opj_decode_tile_data = 
-                    (opj_bool (*) ( void *,
+                    (OPJ_BOOL (*) ( void *,
                                     OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32,
                                     struct opj_stream_private *,
                                     struct opj_event_mgr * )) opj_jp2_decode_tile;
@@ -410,20 +410,20 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
                     (void (*) (void * ,opj_dparameters_t * )) opj_jp2_setup_decoder;
 
                        l_codec->m_codec_data.m_decompression.opj_set_decode_area = 
-                    (opj_bool (*) ( void *,
+                    (OPJ_BOOL (*) ( void *,
                                     opj_image_t*, 
                                     OPJ_INT32,OPJ_INT32,OPJ_INT32,OPJ_INT32,
                                     struct opj_event_mgr * )) opj_jp2_set_decode_area;
 
                        l_codec->m_codec_data.m_decompression.opj_get_decoded_tile = 
-                    (opj_bool (*) ( void *p_codec,
+                    (OPJ_BOOL (*) ( void *p_codec,
                                                                        opj_stream_private_t *p_cio,
                                                                        opj_image_t *p_image,
                                                                        struct opj_event_mgr * p_manager,
                                                                        OPJ_UINT32 tile_index)) opj_jp2_get_tile;
 
                        l_codec->m_codec_data.m_decompression.opj_set_decoded_resolution_factor = 
-                    (opj_bool (*) ( void * p_codec,
+                    (OPJ_BOOL (*) ( void * p_codec,
                                                                OPJ_UINT32 res_factor,
                                                                opj_event_mgr_t * p_manager)) opj_jp2_set_decoded_resolution_factor;
 
@@ -466,7 +466,7 @@ void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *paramete
        }
 }
 
-opj_bool OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
                                         opj_dparameters_t *parameters 
                                                                                )
 {
@@ -486,7 +486,7 @@ opj_bool OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_read_header (        opj_stream_t *p_stream,
+OPJ_BOOL OPJ_CALLCONV opj_read_header (        opj_stream_t *p_stream,
                                                                                opj_codec_t *p_codec,
                                                                                opj_image_t **p_image )
 {
@@ -509,7 +509,7 @@ opj_bool OPJ_CALLCONV opj_read_header (     opj_stream_t *p_stream,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_decode(   opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_decode(   opj_codec_t *p_codec,
                                     opj_stream_t *p_stream,
                                     opj_image_t* p_image)
 {
@@ -530,7 +530,7 @@ opj_bool OPJ_CALLCONV opj_decode(   opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_set_decode_area(     opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(     opj_codec_t *p_codec,
                                                                                        opj_image_t* p_image,
                                                                                        OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
                                                                                        OPJ_INT32 p_end_x, OPJ_INT32 p_end_y
@@ -552,14 +552,14 @@ opj_bool OPJ_CALLCONV opj_set_decode_area(        opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_read_tile_header(    opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(    opj_codec_t *p_codec,
                                                                                        opj_stream_t * p_stream,
                                                                                        OPJ_UINT32 * p_tile_index,
                                                                                        OPJ_UINT32 * p_data_size,
                                                                                        OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
                                                                                        OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
                                                                                        OPJ_UINT32 * p_nb_comps,
-                                                                                       opj_bool * p_should_go_on)
+                                                                                       OPJ_BOOL * p_should_go_on)
 {
        if (p_codec && p_stream && p_data_size && p_tile_index) {
                opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
@@ -582,7 +582,7 @@ opj_bool OPJ_CALLCONV opj_read_tile_header( opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_decode_tile_data(    opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(    opj_codec_t *p_codec,
                                                                                        OPJ_UINT32 p_tile_index,
                                                                                        OPJ_BYTE * p_data,
                                                                                        OPJ_UINT32 p_data_size,
@@ -607,7 +607,7 @@ opj_bool OPJ_CALLCONV opj_decode_tile_data( opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_get_decoded_tile(    opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(    opj_codec_t *p_codec,
                                                                                        opj_stream_t *p_stream,
                                                                                        opj_image_t *p_image,
                                                                                        OPJ_UINT32 tile_index)
@@ -630,7 +630,7 @@ opj_bool OPJ_CALLCONV opj_get_decoded_tile( opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, 
+OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, 
                                                                                                                OPJ_UINT32 res_factor )
 {
        opj_codec_private_t * l_codec = (opj_codec_private_t *) p_codec;
@@ -663,20 +663,20 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
 
        switch(p_format) {
                case OPJ_CODEC_J2K:
-                       l_codec->m_codec_data.m_compression.opj_encode = (opj_bool (*) (void *,
+                       l_codec->m_codec_data.m_compression.opj_encode = (OPJ_BOOL (*) (void *,
                                                                                                                                                        struct opj_stream_private *,
                                                                                                                                                        struct opj_event_mgr * )) opj_j2k_encode_v2;
 
-                       l_codec->m_codec_data.m_compression.opj_end_compress = (opj_bool (*) (  void *,
+                       l_codec->m_codec_data.m_compression.opj_end_compress = (OPJ_BOOL (*) (  void *,
                                                                                                                                                                        struct opj_stream_private *,
                                                                                                                                                                        struct opj_event_mgr *)) opj_j2k_end_compress;
 
-                       l_codec->m_codec_data.m_compression.opj_start_compress = (opj_bool (*) (void *,
+                       l_codec->m_codec_data.m_compression.opj_start_compress = (OPJ_BOOL (*) (void *,
                                                                                                                                                                        struct opj_stream_private *,
                                                                                                                                                                        struct opj_image * ,
                                                                                                                                                                        struct opj_event_mgr *)) opj_j2k_start_compress;
 
-                       l_codec->m_codec_data.m_compression.opj_write_tile = (opj_bool (*) (void *,
+                       l_codec->m_codec_data.m_compression.opj_write_tile = (OPJ_BOOL (*) (void *,
                                                                                                                                                                OPJ_UINT32,
                                                                                                                                                                OPJ_BYTE*,
                                                                                                                                                                OPJ_UINT32,
@@ -700,20 +700,20 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
 
                case OPJ_CODEC_JP2:
                        /* get a JP2 decoder handle */
-                       l_codec->m_codec_data.m_compression.opj_encode = (opj_bool (*) (void *,
+                       l_codec->m_codec_data.m_compression.opj_encode = (OPJ_BOOL (*) (void *,
                                                                                                                                                        struct opj_stream_private *,
                                                                                                                                                        struct opj_event_mgr * )) opj_jp2_encode;
 
-                       l_codec->m_codec_data.m_compression.opj_end_compress = (opj_bool (*) (  void *,
+                       l_codec->m_codec_data.m_compression.opj_end_compress = (OPJ_BOOL (*) (  void *,
                                                                                                                                                                        struct opj_stream_private *,
                                                                                                                                                                        struct opj_event_mgr *)) opj_jp2_end_compress;
 
-                       l_codec->m_codec_data.m_compression.opj_start_compress = (opj_bool (*) (void *,
+                       l_codec->m_codec_data.m_compression.opj_start_compress = (OPJ_BOOL (*) (void *,
                                                                                                                                                                        struct opj_stream_private *,
                                                                                                                                                                        struct opj_image * ,
                                                                                                                                                                        struct opj_event_mgr *))  opj_jp2_start_compress;
 
-                       l_codec->m_codec_data.m_compression.opj_write_tile = (opj_bool (*) (void *,
+                       l_codec->m_codec_data.m_compression.opj_write_tile = (OPJ_BOOL (*) (void *,
                                                                                                                                                                OPJ_UINT32,
                                                                                                                                                                OPJ_BYTE*,
                                                                                                                                                                OPJ_UINT32,
@@ -804,7 +804,7 @@ void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *paramete
        }
 }
 
-opj_bool OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, 
+OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, 
                                                                                opj_cparameters_t *parameters, 
                                                                                opj_image_t *p_image)
 {
@@ -823,7 +823,7 @@ opj_bool OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_start_compress (     opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_start_compress (     opj_codec_t *p_codec,
                                                                                        opj_image_t * p_image,
                                                                                        opj_stream_t *p_stream)
 {
@@ -842,7 +842,7 @@ opj_bool OPJ_CALLCONV opj_start_compress (  opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream)
+OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream)
 {
        if (p_info && p_stream) {
                opj_codec_private_t * l_codec = (opj_codec_private_t *) p_info;
@@ -860,7 +860,7 @@ opj_bool OPJ_CALLCONV opj_encode(opj_codec_t *p_info, opj_stream_t *p_stream)
 
 }
 
-opj_bool OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec,
                                                                                opj_stream_t *p_stream)
 {
        if (p_codec && p_stream) {
@@ -877,7 +877,7 @@ opj_bool OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec,
 
 }
 
-opj_bool OPJ_CALLCONV opj_end_decompress (     opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_end_decompress (     opj_codec_t *p_codec,
                                                                                        opj_stream_t *p_stream)
 {
        if (p_codec && p_stream) {
@@ -896,7 +896,7 @@ opj_bool OPJ_CALLCONV opj_end_decompress (  opj_codec_t *p_codec,
        return OPJ_FALSE;
 }
 
-opj_bool OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
+OPJ_BOOL OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
                                   OPJ_FLOAT32 * pEncodingMatrix,
                                   OPJ_INT32 * p_dc_shift,OPJ_UINT32 pNbComp)
 {
@@ -922,7 +922,7 @@ opj_bool OPJ_CALLCONV opj_set_MCT(opj_cparameters_t *parameters,
        return OPJ_TRUE;
 }
 
-opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
+OPJ_BOOL OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
                                                                                OPJ_UINT32 p_tile_index,
                                                                                OPJ_BYTE * p_data,
                                                                                OPJ_UINT32 p_data_size,
@@ -1030,14 +1030,14 @@ void OPJ_CALLCONV opj_destroy_cstr_index(opj_codestream_index_t **p_cstr_index)
 }
 
 /* ---------------------------------------------------------------------- */
-opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE * p_file, opj_bool p_is_read_stream)
+opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE * p_file, OPJ_BOOL p_is_read_stream)
 {
        return opj_stream_create_file_stream(p_file,OPJ_J2K_STREAM_CHUNK_SIZE,p_is_read_stream);
 }
 
 opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (     FILE * p_file, 
                                                                                                                        OPJ_SIZE_T p_size, 
-                                                                                                                       opj_bool p_is_read_stream)
+                                                                                                                       OPJ_BOOL p_is_read_stream)
 {
        opj_stream_t* l_stream = 00;
 
index 060c9ad613f53aae631378c21520112633c041d2..6ef5f43004bc9167a060f28e463e1afacb858535 100644 (file)
@@ -79,7 +79,7 @@ defined with this macro as being exported.
 #endif /* OPJ_EXPORTS */
 #endif /* !OPJ_STATIC || !_WIN32 */
 
-typedef int opj_bool; /*FIXME it should be to follow the name of others OPJ_TYPE -> OPJ_BOOL*/
+typedef int OPJ_BOOL; /*FIXME it should be to follow the name of others OPJ_TYPE -> OPJ_BOOL*/
 #define OPJ_TRUE 1
 #define OPJ_FALSE 0
 
@@ -257,7 +257,7 @@ typedef struct opj_poc {
  * */
 typedef struct opj_cparameters {
        /** size of tile: tile_size_on = false (not in argument) or = true (in argument) */
-       opj_bool tile_size_on;
+       OPJ_BOOL tile_size_on;
        /** XTOsiz */
        int cp_tx0;
        /** YTOsiz */
@@ -339,7 +339,7 @@ typedef struct opj_cparameters {
        /**@name JPWL encoding parameters */
        /*@{*/
        /** enables writing of EPC in MH, thus activating JPWL */
-       opj_bool jpwl_epc_on;
+       OPJ_BOOL jpwl_epc_on;
        /** error protection method for MH (0,1,16,32,37-128) */
        int jpwl_hprot_MH;
        /** tile number of header protection specification (>=0) */
@@ -380,7 +380,7 @@ typedef struct opj_cparameters {
        /** MCT (multiple component transform) */
        char tcp_mct;
        /** Enable JPIP indexing*/
-       opj_bool jpip_on;
+       OPJ_BOOL jpip_on;
        /** Naive implementation of MCT restricted to a single reversible array based encoding without offset concerning all the components. */
        void * mct_data;
 } opj_cparameters_t;
@@ -427,7 +427,7 @@ typedef struct opj_dparameters {
        /** Decoding area bottom boundary */
        OPJ_UINT32 DA_y1;
        /** Verbose mode */
-       opj_bool m_verbose;
+       OPJ_BOOL m_verbose;
 
        /** tile number ot the decoded tile*/
        OPJ_UINT32 tile_index;
@@ -440,7 +440,7 @@ typedef struct opj_dparameters {
        /**@name JPWL decoding parameters */
        /*@{*/
        /** activates the JPWL correction capabilities */
-       opj_bool jpwl_correct;
+       OPJ_BOOL jpwl_correct;
        /** expected number of components */
        int jpwl_exp_comps;
        /** maximum number of tiles */
@@ -496,7 +496,7 @@ typedef OPJ_OFF_T (* opj_stream_skip_fn) (OPJ_OFF_T p_nb_bytes, void * p_user_da
  * Callback function prototype for seek function
  * FIXME DOC
  */
-typedef opj_bool (* opj_stream_seek_fn) (OPJ_OFF_T p_nb_bytes, void * p_user_data) ;
+typedef OPJ_BOOL (* opj_stream_seek_fn) (OPJ_OFF_T p_nb_bytes, void * p_user_data) ;
 
 /*
  * JPEG2000 Stream.
@@ -983,7 +983,7 @@ OPJ_API opj_image_t* OPJ_CALLCONV opj_image_tile_create(OPJ_UINT32 numcmpts, opj
  *
  * @return     a stream object.
 */
-OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_default_create(opj_bool p_is_input);
+OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL p_is_input);
 
 /**
  * Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
@@ -993,7 +993,7 @@ OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_default_create(opj_bool p_is_input
  *
  * @return     a stream object.
 */
-OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, opj_bool p_is_input);
+OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_input);
 
 /**
  * Destroys a stream created by opj_create_stream. This function does NOT close the abstract stream. If needed the user must
@@ -1052,7 +1052,7 @@ OPJ_API void OPJ_CALLCONV opj_stream_set_user_data_length(opj_stream_t* p_stream
  * @param p_file the file stream to operate on
  * @param p_is_read_stream whether the stream is a read stream (true) or not (false)
 */
-OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE * p_file, opj_bool p_is_read_stream);
+OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE * p_file, OPJ_BOOL p_is_read_stream);
 
 /**
  * FIXME DOC
@@ -1060,7 +1060,7 @@ OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_default_file_stream (FILE *
  * @param p_buffer_size    FIXME DOC
  * @param p_is_read_stream FIXME DOC
 */
-OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (FILE * p_file, OPJ_SIZE_T p_buffer_size, opj_bool p_is_read_stream);
+OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (FILE * p_file, OPJ_SIZE_T p_buffer_size, OPJ_BOOL p_is_read_stream);
 
 /* 
 ==========================================================
@@ -1073,7 +1073,7 @@ OPJ_API opj_stream_t* OPJ_CALLCONV opj_stream_create_file_stream (FILE * p_file,
  * @param p_callback    the callback function which will be used
  * @param p_user_data   FIXME DOC
 */
-OPJ_API opj_bool OPJ_CALLCONV opj_set_info_handler(opj_codec_t * p_codec, 
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_info_handler(opj_codec_t * p_codec, 
                                                    opj_msg_callback p_callback,
                                                    void * p_user_data);
 /**
@@ -1082,7 +1082,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_set_info_handler(opj_codec_t * p_codec,
  * @param p_callback    the callback function which will be used
  * @param p_user_data   FIXME DOC
 */
-OPJ_API opj_bool OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec,
                                                       opj_msg_callback p_callback,
                                                       void * p_user_data);
 /**
@@ -1091,7 +1091,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_set_warning_handler(opj_codec_t * p_codec,
  * @param p_callback    the callback function which will be used
  * @param p_user_data   FIXME DOC
 */
-OPJ_API opj_bool OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, 
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, 
                                                     opj_msg_callback p_callback,
                                                     void * p_user_data);
 
@@ -1121,7 +1121,7 @@ OPJ_API void OPJ_CALLCONV opj_destroy_codec(opj_codec_t * p_codec);
  * @param      p_codec                 the JPEG2000 codec to read.
  * @param      p_stream                the JPEG2000 stream.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_end_decompress (     opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_decompress (     opj_codec_t *p_codec,
                                                                                                        opj_stream_t *p_stream);
 
 
@@ -1140,7 +1140,7 @@ OPJ_API void OPJ_CALLCONV opj_set_default_decoder_parameters(opj_dparameters_t *
  *
  * @return true                        if the decoder is correctly set
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
                                                                                                opj_dparameters_t *parameters );
 
 /**
@@ -1152,7 +1152,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_setup_decoder(opj_codec_t *p_codec,
  *
  * @return true                                if the main header of the codestream and the JP2 header is correctly read.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_read_header (        opj_stream_t *p_stream,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_header (        opj_stream_t *p_stream,
                                                                                                opj_codec_t *p_codec,
                                                                                                opj_image_t **p_image);
 
@@ -1168,7 +1168,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_read_header (   opj_stream_t *p_stream,
  *
  * @return     true                    if the area could be set.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_set_decode_area(     opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decode_area(     opj_codec_t *p_codec,
                                                                                                        opj_image_t* p_image,
                                                                                                        OPJ_INT32 p_start_x, OPJ_INT32 p_start_y,
                                                                                                        OPJ_INT32 p_end_x, OPJ_INT32 p_end_y );
@@ -1180,7 +1180,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_set_decode_area(        opj_codec_t *p_codec,
  * @param p_image                      the decoded image
  * @return                                     true if success, otherwise false
  * */
-OPJ_API opj_bool OPJ_CALLCONV opj_decode(   opj_codec_t *p_decompressor,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode(   opj_codec_t *p_decompressor,
                                             opj_stream_t *p_stream,
                                             opj_image_t *p_image);
 
@@ -1193,7 +1193,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_decode(   opj_codec_t *p_decompressor,
  *
  * @return                                     true if success, otherwise false
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_get_decoded_tile(    opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_get_decoded_tile(    opj_codec_t *p_codec,
                                                                                                        opj_stream_t *p_stream,
                                                                                                        opj_image_t *p_image,
                                                                                                        OPJ_UINT32 tile_index);
@@ -1205,7 +1205,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_get_decoded_tile(       opj_codec_t *p_codec,
  *
  * @return                                     true if success, otherwise false
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, OPJ_UINT32 res_factor);
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_codec, OPJ_UINT32 res_factor);
 
 /**
  * Writes a tile with the given data.
@@ -1218,7 +1218,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_set_decoded_resolution_factor(opj_codec_t *p_c
  *
  * @return     true if the data could be written.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_write_tile ( opj_codec_t *p_codec,
                                                                                                OPJ_UINT32 p_tile_index,
                                                                                                OPJ_BYTE * p_data,
                                                                                                OPJ_UINT32 p_data_size,
@@ -1245,14 +1245,14 @@ OPJ_API opj_bool OPJ_CALLCONV opj_write_tile (  opj_codec_t *p_codec,
  * @return     true                    if the tile header could be decoded. In case the decoding should end, the returned value is still true.
  *                                                     returning false may be the result of a shortage of memory or an internal error.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_read_tile_header(    opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_read_tile_header(    opj_codec_t *p_codec,
                                                                                                opj_stream_t * p_stream,
                                                                                                OPJ_UINT32 * p_tile_index,
                                                                                                OPJ_UINT32 * p_data_size,
                                                                                                OPJ_INT32 * p_tile_x0, OPJ_INT32 * p_tile_y0,
                                                                                                OPJ_INT32 * p_tile_x1, OPJ_INT32 * p_tile_y1,
                                                                                                OPJ_UINT32 * p_nb_comps,
-                                                                                               opj_bool * p_should_go_on );
+                                                                                               OPJ_BOOL * p_should_go_on );
 
 /**
  * Reads a tile data. This function is compulsory and allows one to decode tile data. opj_read_tile_header should be called before.
@@ -1266,7 +1266,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_read_tile_header(       opj_codec_t *p_codec,
  *
  * @return     true                    if the data could be decoded.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_decode_tile_data(    opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_decode_tile_data(    opj_codec_t *p_codec,
                                                                                                        OPJ_UINT32 p_tile_index,
                                                                                                        OPJ_BYTE * p_data,
                                                                                                        OPJ_UINT32 p_data_size,
@@ -1310,19 +1310,19 @@ OPJ_API void OPJ_CALLCONV opj_set_default_encoder_parameters(opj_cparameters_t *
  * @param parameters   Compression parameters
  * @param image                Input filled image
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, 
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_setup_encoder(opj_codec_t *p_codec, 
                                                                                                opj_cparameters_t *parameters, 
                                                                                                opj_image_t *image);
 
 /**
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_start_compress (     opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_start_compress (     opj_codec_t *p_codec,
                                                                                                        opj_image_t * p_image,
                                                                                                        opj_stream_t *p_cio);
 
 /**
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec,
                                                                                                opj_stream_t *p_stream);
 
 /**
@@ -1332,7 +1332,7 @@ OPJ_API opj_bool OPJ_CALLCONV opj_end_compress (opj_codec_t *p_codec,
  *
  * @return                             Returns true if successful, returns false otherwise
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_encode(opj_codec_t *p_codec,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_encode(opj_codec_t *p_codec,
                                          opj_stream_t *p_stream);
 
 
@@ -1422,7 +1422,7 @@ OPJ_API opj_jp2_index_t* OPJ_CALLCONV opj_get_jp2_index(opj_codec_t *p_codec);
  *
  * @return     true if the parameters could be set.
  */
-OPJ_API opj_bool OPJ_CALLCONV opj_set_MCT( opj_cparameters_t *parameters,
+OPJ_API OPJ_BOOL OPJ_CALLCONV opj_set_MCT( opj_cparameters_t *parameters,
                                                   OPJ_FLOAT32 * pEncodingMatrix,
                                                   OPJ_INT32 * p_dc_shift,
                                                   OPJ_UINT32 pNbComp);
index e27d08ce3279dcf5cd00df88f378b785c81119cb..d0af76529e20e9ddbfb1bc79eb98bf5d96651dd3 100644 (file)
@@ -43,31 +43,31 @@ Get next packet in layer-resolution-component-precinct order.
 @param pi packet iterator to modify
 @return returns false if pi pointed to the last packet or else returns true
 */
-static opj_bool opj_pi_next_lrcp(opj_pi_iterator_t * pi);
+static OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi);
 /**
 Get next packet in resolution-layer-component-precinct order.
 @param pi packet iterator to modify
 @return returns false if pi pointed to the last packet or else returns true
 */
-static opj_bool opj_pi_next_rlcp(opj_pi_iterator_t * pi);
+static OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t * pi);
 /**
 Get next packet in resolution-precinct-component-layer order.
 @param pi packet iterator to modify
 @return returns false if pi pointed to the last packet or else returns true
 */
-static opj_bool opj_pi_next_rpcl(opj_pi_iterator_t * pi);
+static OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi);
 /**
 Get next packet in precinct-component-resolution-layer order.
 @param pi packet iterator to modify
 @return returns false if pi pointed to the last packet or else returns true
 */
-static opj_bool opj_pi_next_pcrl(opj_pi_iterator_t * pi);
+static OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi);
 /**
 Get next packet in component-precinct-resolution-layer order.
 @param pi packet iterator to modify
 @return returns false if pi pointed to the last packet or else returns true
 */
-static opj_bool opj_pi_next_cprl(opj_pi_iterator_t * pi);
+static OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi);
 
 /**
  * Updates the coding parameters if the encoding is used with Progression order changes and final (or cinema parameters are used).
@@ -208,7 +208,7 @@ static void opj_pi_update_decode_poc (  opj_pi_iterator_t * p_pi,
 /**
  * FIXME DOC
  */
-opj_bool opj_pi_check_next_level(      OPJ_INT32 pos,
+OPJ_BOOL opj_pi_check_next_level(      OPJ_INT32 pos,
                                                                opj_cp_t *cp,
                                                                OPJ_UINT32 tileno,
                                                                OPJ_UINT32 pino,
@@ -224,7 +224,7 @@ opj_bool opj_pi_check_next_level(   OPJ_INT32 pos,
 ==========================================================
 */
 
-opj_bool opj_pi_next_lrcp(opj_pi_iterator_t * pi) {
+OPJ_BOOL opj_pi_next_lrcp(opj_pi_iterator_t * pi) {
        opj_pi_comp_t *comp = NULL;
        opj_pi_resolution_t *res = NULL;
        OPJ_UINT32 index = 0;
@@ -264,7 +264,7 @@ LABEL_SKIP:;
        return OPJ_FALSE;
 }
 
-opj_bool opj_pi_next_rlcp(opj_pi_iterator_t * pi) {
+OPJ_BOOL opj_pi_next_rlcp(opj_pi_iterator_t * pi) {
        opj_pi_comp_t *comp = NULL;
        opj_pi_resolution_t *res = NULL;
        OPJ_UINT32 index = 0;
@@ -303,7 +303,7 @@ LABEL_SKIP:;
        return OPJ_FALSE;
 }
 
-opj_bool opj_pi_next_rpcl(opj_pi_iterator_t * pi) {
+OPJ_BOOL opj_pi_next_rpcl(opj_pi_iterator_t * pi) {
        opj_pi_comp_t *comp = NULL;
        opj_pi_resolution_t *res = NULL;
        OPJ_UINT32 index = 0;
@@ -386,7 +386,7 @@ LABEL_SKIP:;
        return OPJ_FALSE;
 }
 
-opj_bool opj_pi_next_pcrl(opj_pi_iterator_t * pi) {
+OPJ_BOOL opj_pi_next_pcrl(opj_pi_iterator_t * pi) {
        opj_pi_comp_t *comp = NULL;
        opj_pi_resolution_t *res = NULL;
        OPJ_UINT32 index = 0;
@@ -467,7 +467,7 @@ LABEL_SKIP:;
        return OPJ_FALSE;
 }
 
-opj_bool opj_pi_next_cprl(opj_pi_iterator_t * pi) {
+OPJ_BOOL opj_pi_next_cprl(opj_pi_iterator_t * pi) {
        opj_pi_comp_t *comp = NULL;
        opj_pi_resolution_t *res = NULL;
        OPJ_UINT32 index = 0;
@@ -1054,7 +1054,7 @@ void opj_pi_update_decode_not_poc (opj_pi_iterator_t * p_pi,
 
 
 
-opj_bool opj_pi_check_next_level(      OPJ_INT32 pos,
+OPJ_BOOL opj_pi_check_next_level(      OPJ_INT32 pos,
                                                                opj_cp_t *cp,
                                                                OPJ_UINT32 tileno,
                                                                OPJ_UINT32 pino,
@@ -1850,7 +1850,7 @@ void opj_pi_update_encoding_parameters(   const opj_image_t *p_image,
        }
 }
 
-opj_bool opj_pi_next(opj_pi_iterator_t * pi) {
+OPJ_BOOL opj_pi_next(opj_pi_iterator_t * pi) {
        switch (pi->poc.prg) {
                case OPJ_LRCP:
                        return opj_pi_next_lrcp(pi);
index 779d821e852327d9b2e502ee98e57c2204302da8..605ddbc75e856e010bec3f59a59b17a180f828ce 100644 (file)
@@ -86,7 +86,7 @@ typedef struct opj_pi_iterator {
   /** layer that identify the packet */
   OPJ_UINT32 layno;
   /** 0 if the first packet */
-  opj_bool first;
+  OPJ_BOOL first;
   /** progression order change information */
   opj_poc_t poc;
   /** number of components in the image */
@@ -173,7 +173,7 @@ Modify the packet iterator to point to the next packet
 @param pi Packet iterator to modify
 @return Returns false if pi pointed to the last packet or else returns true
 */
-opj_bool opj_pi_next(opj_pi_iterator_t * pi);
+OPJ_BOOL opj_pi_next(opj_pi_iterator_t * pi);
 /* ----------------------------------------------------------------------- */
 /*@}*/
 
index 09ae1cd835320ba147f8089c3911f0fb476edac0..1030729467cef653159769475e2b051de373fb94 100644 (file)
@@ -277,13 +277,13 @@ Decode 1 code-block
 @param roishift Region of interest shifting value
 @param cblksty Code-block style
 */
-static opj_bool opj_t1_decode_cblk( opj_t1_t *t1,
+static OPJ_BOOL opj_t1_decode_cblk( opj_t1_t *t1,
                                     opj_tcd_cblk_dec_t* cblk,
                                     OPJ_UINT32 orient,
                                     OPJ_UINT32 roishift,
                                     OPJ_UINT32 cblksty);
 
-opj_bool opj_t1_allocate_buffers(   opj_t1_t *t1,
+OPJ_BOOL opj_t1_allocate_buffers(   opj_t1_t *t1,
                                     OPJ_UINT32 w,
                                     OPJ_UINT32 h);
 
@@ -1148,7 +1148,7 @@ static OPJ_FLOAT64 opj_t1_getwmsedec(
        return wmsedec;
 }
 
-opj_bool opj_t1_allocate_buffers(
+OPJ_BOOL opj_t1_allocate_buffers(
                opj_t1_t *t1,
                OPJ_UINT32 w,
                OPJ_UINT32 h)
@@ -1250,7 +1250,7 @@ void opj_t1_destroy(opj_t1_t *p_t1)
        opj_free(p_t1);
 }
 
-opj_bool opj_t1_decode_cblks(   opj_t1_t* t1,
+OPJ_BOOL opj_t1_decode_cblks(   opj_t1_t* t1,
                             opj_tcd_tilecomp_t* tilec,
                             opj_tccp_t* tccp
                             )
@@ -1350,7 +1350,7 @@ opj_bool opj_t1_decode_cblks(   opj_t1_t* t1,
 }
 
 
-opj_bool opj_t1_decode_cblk(opj_t1_t *t1,
+OPJ_BOOL opj_t1_decode_cblk(opj_t1_t *t1,
                             opj_tcd_cblk_dec_t* cblk,
                             OPJ_UINT32 orient,
                             OPJ_UINT32 roishift,
@@ -1444,7 +1444,7 @@ opj_bool opj_t1_decode_cblk(opj_t1_t *t1,
 
 
 
-opj_bool opj_t1_encode_cblks(   opj_t1_t *t1,
+OPJ_BOOL opj_t1_encode_cblks(   opj_t1_t *t1,
                                 opj_tcd_tile_t *tile,
                                 opj_tcp_t *tcp,
                                 const OPJ_FLOAT64 * mct_norms
index e62f8fe313b76d7aa6c5b6c9e15455015210faab..0de117af4baba47a670243cbab5714be7dac24f1 100644 (file)
@@ -119,7 +119,7 @@ Encode the code-blocks of a tile
 @param tcp Tile coding parameters
 @param mct_norms  FIXME DOC
 */
-opj_bool opj_t1_encode_cblks(   opj_t1_t *t1,
+OPJ_BOOL opj_t1_encode_cblks(   opj_t1_t *t1,
                                 opj_tcd_tile_t *tile,
                                 opj_tcp_t *tcp,
                                 const OPJ_FLOAT64 * mct_norms);
@@ -130,7 +130,7 @@ Decode the code-blocks of a tile
 @param tilec The tile to decode
 @param tccp Tile coding parameters
 */
-opj_bool opj_t1_decode_cblks(   opj_t1_t* t1,
+OPJ_BOOL opj_t1_decode_cblks(   opj_t1_t* t1,
                                 opj_tcd_tilecomp_t* tilec,
                                 opj_tccp_t* tccp);
 
index 5a2432035d6f7566db35b99a20878b9ab42dfecb..8c0df60f71a76ee08ad0230430705fef32205f3f 100644 (file)
@@ -60,7 +60,7 @@ Encode a packet of a tile to a destination buffer
 @param cstr_info Codestream information structure
 @return
 */
-static opj_bool opj_t2_encode_packet(   OPJ_UINT32 tileno,
+static OPJ_BOOL opj_t2_encode_packet(   OPJ_UINT32 tileno,
                                         opj_tcd_tile_t *tile,
                                         opj_tcp_t *tcp,
                                         opj_pi_iterator_t *pi,
@@ -82,7 +82,7 @@ Decode a packet of a tile from a source buffer
 
 @return  FIXME DOC
 */
-static opj_bool opj_t2_decode_packet(   opj_t2_t* t2,
+static OPJ_BOOL opj_t2_decode_packet(   opj_t2_t* t2,
                                         opj_tcd_tile_t *tile,
                                         opj_tcp_t *tcp,
                                         opj_pi_iterator_t *pi,
@@ -91,7 +91,7 @@ static opj_bool opj_t2_decode_packet(   opj_t2_t* t2,
                                         OPJ_UINT32 max_length,
                                         opj_packet_info_t *pack_info);
 
-static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
+static OPJ_BOOL opj_t2_skip_packet( opj_t2_t* p_t2,
                                     opj_tcd_tile_t *p_tile,
                                     opj_tcp_t *p_tcp,
                                     opj_pi_iterator_t *p_pi,
@@ -100,17 +100,17 @@ static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
                                     OPJ_UINT32 p_max_length,
                                     opj_packet_info_t *p_pack_info);
 
-static opj_bool opj_t2_read_packet_header(  opj_t2_t* p_t2,
+static OPJ_BOOL opj_t2_read_packet_header(  opj_t2_t* p_t2,
                                             opj_tcd_tile_t *p_tile,
                                             opj_tcp_t *p_tcp,
                                             opj_pi_iterator_t *p_pi,
-                                            opj_bool * p_is_data_present,
+                                            OPJ_BOOL * p_is_data_present,
                                             OPJ_BYTE *p_src_data,
                                             OPJ_UINT32 * p_data_read,
                                             OPJ_UINT32 p_max_length,
                                             opj_packet_info_t *p_pack_info);
 
-static opj_bool opj_t2_read_packet_data(opj_t2_t* p_t2,
+static OPJ_BOOL opj_t2_read_packet_data(opj_t2_t* p_t2,
                                         opj_tcd_tile_t *p_tile,
                                         opj_pi_iterator_t *p_pi,
                                         OPJ_BYTE *p_src_data,
@@ -118,7 +118,7 @@ static opj_bool opj_t2_read_packet_data(opj_t2_t* p_t2,
                                         OPJ_UINT32 p_max_length,
                                         opj_packet_info_t *pack_info);
 
-static opj_bool opj_t2_skip_packet_data(opj_t2_t* p_t2,
+static OPJ_BOOL opj_t2_skip_packet_data(opj_t2_t* p_t2,
                                         opj_tcd_tile_t *p_tile,
                                         opj_pi_iterator_t *p_pi,
                                         OPJ_UINT32 * p_data_read,
@@ -131,7 +131,7 @@ static opj_bool opj_t2_skip_packet_data(opj_t2_t* p_t2,
 @param cblksty
 @param first
 */
-static opj_bool opj_t2_init_seg(    opj_tcd_cblk_dec_t* cblk,
+static OPJ_BOOL opj_t2_init_seg(    opj_tcd_cblk_dec_t* cblk,
                                     OPJ_UINT32 index,
                                     OPJ_UINT32 cblksty,
                                     OPJ_UINT32 first);
@@ -189,7 +189,7 @@ OPJ_UINT32 opj_t2_getnumpasses(opj_bio_t *bio) {
 
 /* ----------------------------------------------------------------------- */
 
-opj_bool opj_t2_encode_packets( opj_t2_t* p_t2,
+OPJ_BOOL opj_t2_encode_packets( opj_t2_t* p_t2,
                                 OPJ_UINT32 p_tile_no,
                                 opj_tcd_tile_t *p_tile,
                                 OPJ_UINT32 p_maxlayers,
@@ -310,7 +310,7 @@ opj_bool opj_t2_encode_packets( opj_t2_t* p_t2,
         return OPJ_TRUE;
 }
 
-opj_bool opj_t2_decode_packets( opj_t2_t *p_t2,
+OPJ_BOOL opj_t2_decode_packets( opj_t2_t *p_t2,
                                 OPJ_UINT32 p_tile_no,
                                 opj_tcd_tile_t *p_tile,
                                 OPJ_BYTE *p_src,
@@ -358,13 +358,13 @@ opj_bool opj_t2_decode_packets( opj_t2_t *p_t2,
                  * l_current_pi->resno is always >= p_tile->comps[l_current_pi->compno].minimum_num_resolutions
                  * and no l_img_comp->resno_decoded are computed
                  */
-                opj_bool* first_pass_failed = (opj_bool*)opj_malloc(l_image->numcomps * sizeof(opj_bool));
+                OPJ_BOOL* first_pass_failed = (OPJ_BOOL*)opj_malloc(l_image->numcomps * sizeof(OPJ_BOOL));
                 if (!first_pass_failed)
                 {
                     opj_pi_destroy(l_pi,l_nb_pocs);
                     return OPJ_FALSE;
                 }
-                memset(first_pass_failed, OPJ_TRUE, l_image->numcomps * sizeof(opj_bool));
+                memset(first_pass_failed, OPJ_TRUE, l_image->numcomps * sizeof(OPJ_BOOL));
 
                 while (opj_pi_next(l_current_pi)) {
 
@@ -474,7 +474,7 @@ void opj_t2_destroy(opj_t2_t *t2) {
         }
 }
 
-opj_bool opj_t2_decode_packet(  opj_t2_t* p_t2,
+OPJ_BOOL opj_t2_decode_packet(  opj_t2_t* p_t2,
                                 opj_tcd_tile_t *p_tile,
                                 opj_tcp_t *p_tcp,
                                 opj_pi_iterator_t *p_pi,
@@ -483,7 +483,7 @@ opj_bool opj_t2_decode_packet(  opj_t2_t* p_t2,
                                 OPJ_UINT32 p_max_length,
                                 opj_packet_info_t *p_pack_info)
 {
-        opj_bool l_read_data;
+        OPJ_BOOL l_read_data;
         OPJ_UINT32 l_nb_bytes_read = 0;
         OPJ_UINT32 l_nb_total_bytes_read = 0;
 
@@ -513,7 +513,7 @@ opj_bool opj_t2_decode_packet(  opj_t2_t* p_t2,
         return OPJ_TRUE;
 }
 
-opj_bool opj_t2_encode_packet(  OPJ_UINT32 tileno,
+OPJ_BOOL opj_t2_encode_packet(  OPJ_UINT32 tileno,
                                 opj_tcd_tile_t * tile,
                                 opj_tcp_t * tcp,
                                 opj_pi_iterator_t *pi,
@@ -738,7 +738,7 @@ opj_bool opj_t2_encode_packet(  OPJ_UINT32 tileno,
         return OPJ_TRUE;
 }
 
-static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
+static OPJ_BOOL opj_t2_skip_packet( opj_t2_t* p_t2,
                                     opj_tcd_tile_t *p_tile,
                                     opj_tcp_t *p_tcp,
                                     opj_pi_iterator_t *p_pi,
@@ -747,7 +747,7 @@ static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
                                     OPJ_UINT32 p_max_length,
                                     opj_packet_info_t *p_pack_info)
 {
-        opj_bool l_read_data;
+        OPJ_BOOL l_read_data;
         OPJ_UINT32 l_nb_bytes_read = 0;
         OPJ_UINT32 l_nb_total_bytes_read = 0;
 
@@ -778,11 +778,11 @@ static opj_bool opj_t2_skip_packet( opj_t2_t* p_t2,
 
 
 
-opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2,
+OPJ_BOOL opj_t2_read_packet_header( opj_t2_t* p_t2,
                                     opj_tcd_tile_t *p_tile,
                                     opj_tcp_t *p_tcp,
                                     opj_pi_iterator_t *p_pi,
-                                    opj_bool * p_is_data_present,
+                                    OPJ_BOOL * p_is_data_present,
                                     OPJ_BYTE *p_src_data,
                                     OPJ_UINT32 * p_data_read,
                                     OPJ_UINT32 p_max_length,
@@ -1033,7 +1033,7 @@ opj_bool opj_t2_read_packet_header( opj_t2_t* p_t2,
         return OPJ_TRUE;
 }
 
-opj_bool opj_t2_read_packet_data(   opj_t2_t* p_t2,
+OPJ_BOOL opj_t2_read_packet_data(   opj_t2_t* p_t2,
                                     opj_tcd_tile_t *p_tile,
                                     opj_pi_iterator_t *p_pi,
                                     OPJ_BYTE *p_src_data,
@@ -1148,7 +1148,7 @@ opj_bool opj_t2_read_packet_data(   opj_t2_t* p_t2,
         return OPJ_TRUE;
 }
 
-opj_bool opj_t2_skip_packet_data(   opj_t2_t* p_t2,
+OPJ_BOOL opj_t2_skip_packet_data(   opj_t2_t* p_t2,
                                     opj_tcd_tile_t *p_tile,
                                     opj_pi_iterator_t *p_pi,
                                     OPJ_UINT32 * p_data_read,
@@ -1246,7 +1246,7 @@ opj_bool opj_t2_skip_packet_data(   opj_t2_t* p_t2,
 }
 
 
-opj_bool opj_t2_init_seg(   opj_tcd_cblk_dec_t* cblk,
+OPJ_BOOL opj_t2_init_seg(   opj_tcd_cblk_dec_t* cblk,
                             OPJ_UINT32 index, 
                             OPJ_UINT32 cblksty, 
                             OPJ_UINT32 first)
index a0956ce9fd047f293131ea0d02f4bd841f5a9c7f..38c0aab43c4ce97b8fd7c58c9d7aef951758c340 100644 (file)
@@ -69,7 +69,7 @@ Encode the packets of a tile to a destination buffer
 @param pino             FIXME DOC
 @param t2_mode          If == 0 In Threshold calculation ,If == 1 Final pass
 */
-opj_bool opj_t2_encode_packets(        opj_t2_t* t2,
+OPJ_BOOL opj_t2_encode_packets(        opj_t2_t* t2,
                                                                OPJ_UINT32 tileno,
                                                                opj_tcd_tile_t *tile,
                                                                OPJ_UINT32 maxlayers,
@@ -94,7 +94,7 @@ Decode the packets of a tile from a source buffer
 
 @return FIXME DOC
  */
-opj_bool opj_t2_decode_packets(        opj_t2_t *t2,
+OPJ_BOOL opj_t2_decode_packets(        opj_t2_t *t2,
                                 OPJ_UINT32 tileno,
                                 opj_tcd_tile_t *tile,
                                 OPJ_BYTE *src,
index 88d771998552d00c62cad3ae1e3e8f2311d0612b..db5ccb1e55a682b06b10f32d88361673a042727d 100644 (file)
@@ -98,7 +98,7 @@ void tcd_dump(FILE *fd, opj_tcd_t *tcd, opj_tcd_image_t * img) {
 /**
 * Allocates memory for a decoding code block.
 */
-static opj_bool opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block);
+static OPJ_BOOL opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block);
 
 /**
  * Deallocates the decoding data of the given precinct.
@@ -108,7 +108,7 @@ static void opj_tcd_code_block_dec_deallocate (opj_tcd_precinct_t * p_precinct);
 /**
  * Allocates memory for an encoding code block.
  */
-static opj_bool opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block);
+static OPJ_BOOL opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block);
 
 /**
  * Deallocates the encoding data of the given precinct.
@@ -123,36 +123,36 @@ Free the memory allocated for encoding
 static void opj_tcd_free_tile(opj_tcd_t *tcd);
 
 
-static opj_bool opj_tcd_t2_decode ( opj_tcd_t *p_tcd,
+static OPJ_BOOL opj_tcd_t2_decode ( opj_tcd_t *p_tcd,
                                     OPJ_BYTE * p_src_data,
                                     OPJ_UINT32 * p_data_read,
                                     OPJ_UINT32 p_max_src_size,
                                     opj_codestream_index_t *p_cstr_index );
 
-static opj_bool opj_tcd_t1_decode (opj_tcd_t *p_tcd);
+static OPJ_BOOL opj_tcd_t1_decode (opj_tcd_t *p_tcd);
 
-static opj_bool opj_tcd_dwt_decode (opj_tcd_t *p_tcd);
+static OPJ_BOOL opj_tcd_dwt_decode (opj_tcd_t *p_tcd);
 
-static opj_bool opj_tcd_mct_decode (opj_tcd_t *p_tcd);
+static OPJ_BOOL opj_tcd_mct_decode (opj_tcd_t *p_tcd);
 
-static opj_bool opj_tcd_dc_level_shift_decode (opj_tcd_t *p_tcd);
+static OPJ_BOOL opj_tcd_dc_level_shift_decode (opj_tcd_t *p_tcd);
 
 
-static opj_bool opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd );
+static OPJ_BOOL opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd );
 
-static opj_bool opj_tcd_mct_encode ( opj_tcd_t *p_tcd );
+static OPJ_BOOL opj_tcd_mct_encode ( opj_tcd_t *p_tcd );
 
-static opj_bool opj_tcd_dwt_encode ( opj_tcd_t *p_tcd );
+static OPJ_BOOL opj_tcd_dwt_encode ( opj_tcd_t *p_tcd );
 
-static opj_bool opj_tcd_t1_encode ( opj_tcd_t *p_tcd );
+static OPJ_BOOL opj_tcd_t1_encode ( opj_tcd_t *p_tcd );
 
-static opj_bool opj_tcd_t2_encode (     opj_tcd_t *p_tcd,
+static OPJ_BOOL opj_tcd_t2_encode (     opj_tcd_t *p_tcd,
                                                                     OPJ_BYTE * p_dest_data,
                                                                     OPJ_UINT32 * p_data_written,
                                                                     OPJ_UINT32 p_max_dest_size,
                                                                     opj_codestream_info_t *p_cstr_info );
 
-static opj_bool opj_tcd_rate_allocate_encode(   opj_tcd_t *p_tcd,
+static OPJ_BOOL opj_tcd_rate_allocate_encode(   opj_tcd_t *p_tcd,
                                                                                         OPJ_BYTE * p_dest_data,
                                                                                         OPJ_UINT32 p_max_dest_size,
                                                                                         opj_codestream_info_t *p_cstr_info );
@@ -162,7 +162,7 @@ static opj_bool opj_tcd_rate_allocate_encode(   opj_tcd_t *p_tcd,
 /**
 Create a new TCD handle
 */
-opj_tcd_t* opj_tcd_create(opj_bool p_is_decoder)
+opj_tcd_t* opj_tcd_create(OPJ_BOOL p_is_decoder)
 {
         opj_tcd_t *l_tcd = 00;
 
@@ -375,7 +375,7 @@ void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final)
         }
 }
 
-opj_bool opj_tcd_rateallocate(  opj_tcd_t *tcd,
+OPJ_BOOL opj_tcd_rateallocate(  opj_tcd_t *tcd,
                                                                 OPJ_BYTE *dest,
                                                                 OPJ_UINT32 * p_data_written,
                                                                 OPJ_UINT32 len,
@@ -464,7 +464,7 @@ opj_bool opj_tcd_rateallocate(  opj_tcd_t *tcd,
         for (layno = 0; layno < tcd_tcp->numlayers; layno++) {
                 OPJ_FLOAT64 lo = min;
                 OPJ_FLOAT64 hi = max;
-                opj_bool success = OPJ_FALSE;
+                OPJ_BOOL success = OPJ_FALSE;
                 OPJ_UINT32 maxlen = tcd_tcp->rates[layno] ? opj_uint_min(((OPJ_UINT32) ceil(tcd_tcp->rates[layno])), len) : len;
                 OPJ_FLOAT64 goodthresh = 0;
                 OPJ_FLOAT64 stable_thresh = 0;
@@ -563,7 +563,7 @@ opj_bool opj_tcd_rateallocate(  opj_tcd_t *tcd,
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_init( opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_init( opj_tcd_t *p_tcd,
                                            opj_image_t * p_image,
                                            opj_cp_t * p_cp )
 {
@@ -608,7 +608,7 @@ void opj_tcd_destroy(opj_tcd_t *tcd) {
 
 /* ----------------------------------------------------------------------- */
 #define MACRO_TCD_ALLOCATE(FUNCTION,TYPE,FRACTION,ELEMENT,FUNCTION_ELEMENT)                                                                                                                                       \
-opj_bool FUNCTION (     opj_tcd_t *p_tcd,                        \
+OPJ_BOOL FUNCTION (     opj_tcd_t *p_tcd,                        \
                         OPJ_UINT32 p_tile_no                        \
                         )                                           \
 {                                                                   \
@@ -995,7 +995,7 @@ MACRO_TCD_ALLOCATE(opj_tcd_init_decode_tile, opj_tcd_cblk_dec_t, 0.5f, dec, opj_
 /**
  * Allocates memory for an encoding code block.
  */
-opj_bool opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block)
+OPJ_BOOL opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block)
 {
         if (! p_code_block->data) {
 
@@ -1028,7 +1028,7 @@ opj_bool opj_tcd_code_block_enc_allocate (opj_tcd_cblk_enc_t * p_code_block)
 /**
  * Allocates memory for a decoding code block.
  */
-opj_bool opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block)
+OPJ_BOOL opj_tcd_code_block_dec_allocate (opj_tcd_cblk_dec_t * p_code_block)
 {
         OPJ_UINT32 l_seg_size;
 
@@ -1090,7 +1090,7 @@ OPJ_UINT32 opj_tcd_get_decoded_tile_size ( opj_tcd_t *p_tcd )
         return l_data_size;
 }
 
-opj_bool opj_tcd_encode_tile(   opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_encode_tile(   opj_tcd_t *p_tcd,
                                                         OPJ_UINT32 p_tile_no,
                                                         OPJ_BYTE *p_dest,
                                                         OPJ_UINT32 * p_data_written,
@@ -1174,7 +1174,7 @@ opj_bool opj_tcd_encode_tile(   opj_tcd_t *p_tcd,
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_decode_tile(   opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_decode_tile(   opj_tcd_t *p_tcd,
                                 OPJ_BYTE *p_src,
                                 OPJ_UINT32 p_max_length,
                                 OPJ_UINT32 p_tile_no,
@@ -1260,7 +1260,7 @@ opj_bool opj_tcd_decode_tile(   opj_tcd_t *p_tcd,
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_update_tile_data ( opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_update_tile_data ( opj_tcd_t *p_tcd,
                                     OPJ_BYTE * p_dest,
                                     OPJ_UINT32 p_dest_length
                                     )
@@ -1455,7 +1455,7 @@ void opj_tcd_free_tile(opj_tcd_t *p_tcd)
 }
 
 
-opj_bool opj_tcd_t2_decode (opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_t2_decode (opj_tcd_t *p_tcd,
                             OPJ_BYTE * p_src_data,
                             OPJ_UINT32 * p_data_read,
                             OPJ_UINT32 p_max_src_size,
@@ -1487,7 +1487,7 @@ opj_bool opj_tcd_t2_decode (opj_tcd_t *p_tcd,
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_t1_decode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_t1_decode ( opj_tcd_t *p_tcd )
 {
         OPJ_UINT32 compno;
         opj_t1_t * l_t1;
@@ -1517,7 +1517,7 @@ opj_bool opj_tcd_t1_decode ( opj_tcd_t *p_tcd )
 }
 
 
-opj_bool opj_tcd_dwt_decode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_dwt_decode ( opj_tcd_t *p_tcd )
 {
         OPJ_UINT32 compno;
         opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles;
@@ -1557,7 +1557,7 @@ opj_bool opj_tcd_dwt_decode ( opj_tcd_t *p_tcd )
 
         return OPJ_TRUE;
 }
-opj_bool opj_tcd_mct_decode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_mct_decode ( opj_tcd_t *p_tcd )
 {
         opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles;
         opj_tcp_t * l_tcp = p_tcd->tcp;
@@ -1628,7 +1628,7 @@ opj_bool opj_tcd_mct_decode ( opj_tcd_t *p_tcd )
 }
 
 
-opj_bool opj_tcd_dc_level_shift_decode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_dc_level_shift_decode ( opj_tcd_t *p_tcd )
 {
         OPJ_UINT32 compno;
         opj_tcd_tilecomp_t * l_tile_comp = 00;
@@ -1795,7 +1795,7 @@ OPJ_UINT32 opj_tcd_get_encoded_tile_size ( opj_tcd_t *p_tcd )
         return l_data_size;
 }
                 
-opj_bool opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd )
 {
         OPJ_UINT32 compno;
         opj_tcd_tilecomp_t * l_tile_comp = 00;
@@ -1835,7 +1835,7 @@ opj_bool opj_tcd_dc_level_shift_encode ( opj_tcd_t *p_tcd )
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_mct_encode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_mct_encode ( opj_tcd_t *p_tcd )
 {
         opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles;
         opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps;
@@ -1890,7 +1890,7 @@ opj_bool opj_tcd_mct_encode ( opj_tcd_t *p_tcd )
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_dwt_encode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_dwt_encode ( opj_tcd_t *p_tcd )
 {
         opj_tcd_tile_t * l_tile = p_tcd->tcd_image->tiles;
         opj_tcd_tilecomp_t * l_tile_comp = p_tcd->tcd_image->tiles->comps;
@@ -1916,7 +1916,7 @@ opj_bool opj_tcd_dwt_encode ( opj_tcd_t *p_tcd )
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_t1_encode ( opj_tcd_t *p_tcd )
+OPJ_BOOL opj_tcd_t1_encode ( opj_tcd_t *p_tcd )
 {
         opj_t1_t * l_t1;
         const OPJ_FLOAT64 * l_mct_norms;
@@ -1950,7 +1950,7 @@ opj_bool opj_tcd_t1_encode ( opj_tcd_t *p_tcd )
         return OPJ_TRUE;
 }
 
-opj_bool opj_tcd_t2_encode (opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_t2_encode (opj_tcd_t *p_tcd,
                                                 OPJ_BYTE * p_dest_data,
                                                 OPJ_UINT32 * p_data_written,
                                                 OPJ_UINT32 p_max_dest_size,
@@ -1988,7 +1988,7 @@ opj_bool opj_tcd_t2_encode (opj_tcd_t *p_tcd,
 }
 
 
-opj_bool opj_tcd_rate_allocate_encode(  opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_rate_allocate_encode(  opj_tcd_t *p_tcd,
                                                                             OPJ_BYTE * p_dest_data,
                                                                             OPJ_UINT32 p_max_dest_size,
                                                                             opj_codestream_info_t *p_cstr_info )
@@ -2016,7 +2016,7 @@ opj_bool opj_tcd_rate_allocate_encode(  opj_tcd_t *p_tcd,
 }
 
 
-opj_bool opj_tcd_copy_tile_data (       opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_copy_tile_data (       opj_tcd_t *p_tcd,
                                                                     OPJ_BYTE * p_src,
                                                                     OPJ_UINT32 p_src_length )
 {
index ed98f7ead5d26db177a9ae65fff964c232e962e7..8889afcec9f969feb6caf033d867035d67946d4b 100644 (file)
@@ -223,7 +223,7 @@ Create a new TCD handle
 @param p_is_decoder FIXME DOC
 @return Returns a new TCD handle if successful returns NULL otherwise
 */
-opj_tcd_t* opj_tcd_create(opj_bool p_is_decoder);
+opj_tcd_t* opj_tcd_create(OPJ_BOOL p_is_decoder);
 
 /**
 Destroy a previously created TCD handle
@@ -239,7 +239,7 @@ void opj_tcd_destroy(opj_tcd_t *tcd);
  *
  * @return true if the encoding values could be set (false otherwise).
 */
-opj_bool opj_tcd_init( opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_init( opj_tcd_t *p_tcd,
                                                opj_image_t * p_image,
                                                opj_cp_t * p_cp );
 
@@ -252,7 +252,7 @@ opj_bool opj_tcd_init(      opj_tcd_t *p_tcd,
  *
  * @return     true if the remaining data is sufficient.
  */
-opj_bool opj_tcd_init_decode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no);
+OPJ_BOOL opj_tcd_init_decode_tile(opj_tcd_t *p_tcd, OPJ_UINT32 p_tile_no);
 
 void opj_tcd_makelayer_fixed(opj_tcd_t *tcd, OPJ_UINT32 layno, OPJ_UINT32 final);
 
@@ -263,7 +263,7 @@ void opj_tcd_makelayer(     opj_tcd_t *tcd,
                                                OPJ_FLOAT64 thresh,
                                                OPJ_UINT32 final);
 
-opj_bool opj_tcd_rateallocate( opj_tcd_t *tcd,
+OPJ_BOOL opj_tcd_rateallocate( opj_tcd_t *tcd,
                                                                OPJ_BYTE *dest,
                                                                OPJ_UINT32 * p_data_written,
                                                                OPJ_UINT32 len,
@@ -284,7 +284,7 @@ OPJ_UINT32 opj_tcd_get_decoded_tile_size (opj_tcd_t *p_tcd );
  * @param      p_cstr_info             Codestream information structure
  * @return  true if the coding is successfull.
 */
-opj_bool opj_tcd_encode_tile(   opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_encode_tile(   opj_tcd_t *p_tcd,
                                                            OPJ_UINT32 p_tile_no,
                                                            OPJ_BYTE *p_dest,
                                                            OPJ_UINT32 * p_data_written,
@@ -300,7 +300,7 @@ Decode a tile from a buffer into a raw image
 @param tileno Number that identifies one of the tiles to be decoded
 @param cstr_info  FIXME DOC
 */
-opj_bool opj_tcd_decode_tile(   opj_tcd_t *tcd,
+OPJ_BOOL opj_tcd_decode_tile(   opj_tcd_t *tcd,
                                                            OPJ_BYTE *src,
                                                            OPJ_UINT32 len,
                                                            OPJ_UINT32 tileno,
@@ -310,7 +310,7 @@ opj_bool opj_tcd_decode_tile(   opj_tcd_t *tcd,
 /**
  * Copies tile data from the system onto the given memory block.
  */
-opj_bool opj_tcd_update_tile_data (    opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_update_tile_data (    opj_tcd_t *p_tcd,
                                                                    OPJ_BYTE * p_dest,
                                                                    OPJ_UINT32 p_dest_length );
 
@@ -327,13 +327,13 @@ OPJ_UINT32 opj_tcd_get_encoded_tile_size ( opj_tcd_t *p_tcd );
  *
  * @return true if the encoding values could be set (false otherwise).
 */
-opj_bool opj_tcd_init_encode_tile (    opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_init_encode_tile (    opj_tcd_t *p_tcd,
                                                                    OPJ_UINT32 p_tile_no );
 
 /**
  * Copies tile data from the given memory block onto the system.
  */
-opj_bool opj_tcd_copy_tile_data (opj_tcd_t *p_tcd,
+OPJ_BOOL opj_tcd_copy_tile_data (opj_tcd_t *p_tcd,
                                  OPJ_BYTE * p_src,
                                  OPJ_UINT32 p_src_length );