Commit d7ddc2c8 authored by Julien Michel's avatar Julien Michel
Browse files

Maj openpjeg

parent 454fc4f0
......@@ -249,11 +249,11 @@ namespace otb
itkExceptionMacro(<<"Failed to read image header.");
}
bool goesOn = true;
OPJ_BYTE * tile_data;
OPJ_INT32 tile_x1,tile_y1;
OPJ_UINT32 data_size,nb_comps;
OPJ_UINT32 tile_index;
OPJ_BOOL goesOn = true;
while(goesOn)
{
......
......@@ -56,13 +56,13 @@ Write a byte
@param bio BIO handle
@return Returns 0 if successful, returns 1 otherwise
*/
static bool bio_byteout(opj_bio_t *bio);
static OPJ_BOOL bio_byteout(opj_bio_t *bio);
/**
Read a byte
@param bio BIO handle
@return Returns 0 if successful, returns 1 otherwise
*/
static bool bio_bytein(opj_bio_t *bio);
static OPJ_BOOL bio_bytein(opj_bio_t *bio);
/*@}*/
......@@ -74,7 +74,7 @@ static bool bio_bytein(opj_bio_t *bio);
==========================================================
*/
static bool bio_byteout(opj_bio_t *bio) {
static OPJ_BOOL bio_byteout(opj_bio_t *bio) {
bio->buf = (bio->buf << 8) & 0xffff;
bio->ct = bio->buf == 0xff00 ? 7 : 8;
if (bio->bp >= bio->end) {
......@@ -84,7 +84,7 @@ static bool bio_byteout(opj_bio_t *bio) {
return false;
}
static bool bio_bytein(opj_bio_t *bio) {
static OPJ_BOOL bio_bytein(opj_bio_t *bio) {
bio->buf = (bio->buf << 8) & 0xffff;
bio->ct = bio->buf == 0xff00 ? 7 : 8;
if (bio->bp >= bio->end) {
......@@ -163,7 +163,7 @@ OPJ_UINT32 bio_read(opj_bio_t *bio, OPJ_UINT32 n) {
return v;
}
bool bio_flush(opj_bio_t *bio) {
OPJ_BOOL bio_flush(opj_bio_t *bio) {
bio->ct = 0;
if (bio_byteout(bio)) {
return true;
......@@ -177,7 +177,7 @@ bool bio_flush(opj_bio_t *bio) {
return false;
}
bool bio_inalign(opj_bio_t *bio) {
OPJ_BOOL bio_inalign(opj_bio_t *bio) {
bio->ct = 0;
if ((bio->buf & 0xff) == 0xff) {
if (bio_bytein(bio)) {
......
......@@ -110,13 +110,13 @@ Flush bits
@param bio BIO handle
@return Returns 1 if successful, returns 0 otherwise
*/
bool bio_flush(opj_bio_t *bio);
OPJ_BOOL bio_flush(opj_bio_t *bio);
/**
Passes the ending bits (coming from flushing)
@param bio BIO handle
@return Returns 1 if successful, returns 0 otherwise
*/
bool bio_inalign(opj_bio_t *bio);
OPJ_BOOL bio_inalign(opj_bio_t *bio);
/* ----------------------------------------------------------------------- */
/*@}*/
......
......@@ -224,7 +224,7 @@ void opj_read_float_LE(const OPJ_BYTE * p_buffer, OPJ_FLOAT32 * p_value)
* Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
* @return a stream object.
*/
opj_stream_t* opj_stream_create(OPJ_UINT32 p_size,bool l_is_input)
opj_stream_t* OPJ_CALLCONV opj_stream_create(OPJ_UINT32 p_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));
......@@ -268,7 +268,7 @@ opj_stream_t* opj_stream_create(OPJ_UINT32 p_size,bool l_is_input)
* Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
* @return a stream object.
*/
opj_stream_t* opj_stream_default_create(bool l_is_input)
opj_stream_t* OPJ_CALLCONV opj_stream_default_create(OPJ_BOOL l_is_input)
{
return opj_stream_create(J2K_STREAM_CHUNK_SIZE,l_is_input);
}
......@@ -548,7 +548,7 @@ OPJ_UINT32 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 the number of bytes written, or -1 if an error occured.
*/
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_UINT32 l_current_write_nb_bytes = 0;
......@@ -646,7 +646,7 @@ OPJ_SIZE_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_SIZE_T p_s
*/
OPJ_SIZE_T opj_stream_write_skip (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, opj_event_mgr_t * p_event_mgr)
{
bool l_is_written = 0;
OPJ_BOOL l_is_written = 0;
OPJ_SIZE_T l_current_skip_nb_bytes = 0;
OPJ_SIZE_T l_skip_nb_bytes = 0;
......@@ -721,7 +721,7 @@ OPJ_SIZE_T opj_stream_skip (opj_stream_private_t * p_stream, OPJ_SIZE_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.
*/
bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, opj_event_mgr_t * p_event_mgr)
OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, opj_event_mgr_t * p_event_mgr)
{
p_stream->m_current_data = p_stream->m_stored_data;
p_stream->m_bytes_in_buffer = 0;
......@@ -748,7 +748,7 @@ bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, o
* @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.
*/
bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, opj_event_mgr_t * p_event_mgr)
OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, opj_event_mgr_t * p_event_mgr)
{
if
(! opj_stream_flush(p_stream,p_event_mgr))
......@@ -781,7 +781,7 @@ bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size,
* @param p_event_mgr the user event manager to be notified of special events.
* @return true if the stream is seekable.
*/
bool opj_stream_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr)
OPJ_BOOL opj_stream_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr)
{
return p_stream->m_opj_seek(p_stream,p_size,p_event_mgr);
}
......@@ -789,7 +789,7 @@ bool opj_stream_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct
/**
* Tells if the given stream is seekable.
*/
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;
}
......@@ -811,7 +811,7 @@ OPJ_SIZE_T opj_stream_default_skip (OPJ_SIZE_T p_nb_bytes, void * p_user_data)
return (OPJ_SIZE_T) -1;
}
bool opj_stream_default_seek (OPJ_SIZE_T p_nb_bytes, void * p_user_data)
OPJ_BOOL opj_stream_default_seek (OPJ_SIZE_T p_nb_bytes, void * p_user_data)
{
return false;
}
......
......@@ -131,7 +131,7 @@ typedef struct opj_stream_private
OPJ_SIZE_T (* m_opj_skip)(struct opj_stream_private * ,OPJ_SIZE_T , struct opj_event_mgr *);
bool (* m_opj_seek) (struct opj_stream_private * , OPJ_SIZE_T , struct opj_event_mgr *);
OPJ_BOOL (* m_opj_seek) (struct opj_stream_private * , OPJ_SIZE_T , struct opj_event_mgr *);
/**
* number of bytes containing in the buffer.
......@@ -275,7 +275,7 @@ OPJ_UINT32 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.
*/
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.
......@@ -320,7 +320,7 @@ OPJ_SIZE_T opj_stream_read_skip (opj_stream_private_t * p_stream, OPJ_SIZE_T p_s
* @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.
*/
bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
OPJ_BOOL opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
/**
* Skips a number of bytes from the stream.
......@@ -329,7 +329,7 @@ bool opj_stream_read_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, s
* @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.
*/
bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
OPJ_BOOL opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
/**
* Seeks a number of bytes from the stream.
......@@ -338,17 +338,17 @@ bool opj_stream_write_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size,
* @param p_event_mgr the user event manager to be notified of special events.
* @return true if the stream is seekable.
*/
bool opj_stream_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
OPJ_BOOL opj_stream_seek (opj_stream_private_t * p_stream, OPJ_SIZE_T p_size, struct opj_event_mgr * p_event_mgr);
/**
* Tells if the given stream is seekable.
*/
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);
OPJ_UINT32 opj_stream_default_read (void * p_buffer, OPJ_UINT32 p_nb_bytes, void * p_user_data);
OPJ_UINT32 opj_stream_default_write (void * p_buffer, OPJ_UINT32 p_nb_bytes, void * p_user_data);
OPJ_SIZE_T opj_stream_default_skip (OPJ_SIZE_T p_nb_bytes, void * p_user_data);
bool opj_stream_default_seek (OPJ_SIZE_T p_nb_bytes, void * p_user_data);
OPJ_BOOL opj_stream_default_seek (OPJ_SIZE_T p_nb_bytes, void * p_user_data);
/* ----------------------------------------------------------------------- */
/*@}*/
......
......@@ -124,11 +124,11 @@ static void dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsi
/**
Inverse wavelet transform in 2-D.
*/
static bool dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 i, DWT1DFN fn);
static OPJ_BOOL dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 i, DWT1DFN fn);
static OPJ_UINT32 dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT32 i);
static INLINE bool dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) );
static INLINE OPJ_BOOL dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) );
/*@}*/
/*@}*/
......@@ -372,7 +372,7 @@ static void dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsi
/* <summary> */
/* Forward 5-3 wavelet transform in 2-D. */
/* </summary> */
INLINE bool dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(OPJ_INT32 *, OPJ_INT32,OPJ_INT32,OPJ_INT32) )
INLINE OPJ_BOOL 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;
......@@ -454,7 +454,7 @@ INLINE bool dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(O
}
/* Forward 5-3 wavelet transform in 2-D. */
/* </summary> */
bool dwt_encode(opj_tcd_tilecomp_t * tilec)
OPJ_BOOL dwt_encode(opj_tcd_tilecomp_t * tilec)
{
return dwt_encode_procedure(tilec,dwt_encode_1);
}
......@@ -462,7 +462,7 @@ bool dwt_encode(opj_tcd_tilecomp_t * tilec)
/* <summary> */
/* Inverse 5-3 wavelet transform in 2-D. */
/* </summary> */
bool dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres) {
OPJ_BOOL dwt_decode(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres) {
return dwt_decode_tile(tilec, numres, &dwt_decode_1);
}
......@@ -488,7 +488,7 @@ OPJ_FLOAT64 dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient) {
/* <summary> */
/* Forward 9-7 wavelet transform in 2-D. */
/* </summary> */
bool dwt_encode_real(opj_tcd_tilecomp_t * tilec)
OPJ_BOOL dwt_encode_real(opj_tcd_tilecomp_t * tilec)
{
return dwt_encode_procedure(tilec,dwt_encode_1_real);
}
......@@ -552,7 +552,7 @@ static OPJ_UINT32 dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT3
/* <summary> */
/* Inverse wavelet transform in 2-D. */
/* </summary> */
static bool dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1DFN dwt_1D) {
static OPJ_BOOL dwt_decode_tile(opj_tcd_tilecomp_t* tilec, OPJ_UINT32 numres, DWT1DFN dwt_1D) {
dwt_t h;
dwt_t v;
......@@ -786,7 +786,7 @@ static void v4dwt_decode(v4dwt_t* restrict dwt){
/* <summary> */
/* Inverse 9-7 wavelet transform in 2-D. */
/* </summary> */
bool dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres){
OPJ_BOOL dwt_decode_real(opj_tcd_tilecomp_t* restrict tilec, OPJ_UINT32 numres){
v4dwt_t h;
v4dwt_t v;
......
......@@ -57,14 +57,14 @@ 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)
*/
bool dwt_encode(struct opj_tcd_tilecomp * tilec);
OPJ_BOOL dwt_encode(struct opj_tcd_tilecomp * tilec);
/**
Inverse 5-3 wavelet tranform in 2-D.
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
*/
bool dwt_decode(struct opj_tcd_tilecomp* tilec, OPJ_UINT32 numres);
OPJ_BOOL dwt_decode(struct opj_tcd_tilecomp* tilec, OPJ_UINT32 numres);
/**
Get the gain of a subband for the reversible 5-3 DWT.
@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
......@@ -83,14 +83,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)
*/
bool dwt_encode_real(struct opj_tcd_tilecomp * tilec);
OPJ_BOOL dwt_encode_real(struct opj_tcd_tilecomp * 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
*/
bool dwt_decode_real(struct opj_tcd_tilecomp* tilec, OPJ_UINT32 numres);
OPJ_BOOL dwt_decode_real(struct opj_tcd_tilecomp* tilec, OPJ_UINT32 numres);
/**
Get the gain of a subband for the irreversible 9-7 DWT.
@param orient Number that identifies the subband (0->LL, 1->HL, 2->LH, 3->HH)
......
......@@ -43,7 +43,7 @@ i2a(OPJ_UINT32 i, OPJ_CHAR *a, OPJ_UINT32 r) {
#endif
/* ----------------------------------------------------------------------- */
bool opj_event_msg(opj_event_mgr_t * p_event_mgr, OPJ_INT32 event_type, const OPJ_CHAR *fmt, ...) {
OPJ_BOOL opj_event_msg(opj_event_mgr_t * p_event_mgr, OPJ_INT32 event_type, const OPJ_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;
......
......@@ -77,7 +77,7 @@ typedef struct opj_event_mgr
* @param fmt Format-control string (plus optionnal arguments)
* @return Returns true if successful, returns false otherwise
*/
bool opj_event_msg(struct opj_event_mgr * p_event_mgr, OPJ_INT32 event_type, const OPJ_CHAR *fmt, ...);
OPJ_BOOL opj_event_msg(struct opj_event_mgr * p_event_mgr, OPJ_INT32 event_type, const OPJ_CHAR *fmt, ...);
/* ----------------------------------------------------------------------- */
/*@}*/
......
......@@ -89,7 +89,7 @@ void opj_procedure_list_destroy(opj_procedure_list_t * p_list)
* @param p_validation_list the list of procedure to modify.
* @param p_procedure the procedure to add.
*/
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)
......
......@@ -95,7 +95,7 @@ void opj_procedure_list_destroy(opj_procedure_list_t * p_list);
*
* @return true if the procedure could ne added.
*/
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.
......
......@@ -28,7 +28,7 @@
#include "opj_malloc.h"
bool opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, OPJ_FLOAT32 * p_swap_area,OPJ_UINT32 n);
OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, OPJ_FLOAT32 * p_swap_area,OPJ_UINT32 n);
void opj_lupSolve(OPJ_FLOAT32 * pResult, OPJ_FLOAT32* pMatrix, OPJ_FLOAT32* pVector, OPJ_UINT32* pPermutations, OPJ_UINT32 n,OPJ_FLOAT32 * p_intermediate_data);
void opj_lupInvert (OPJ_FLOAT32 * pSrcMatrix,
OPJ_FLOAT32 * pDestMatrix,
......@@ -41,7 +41,7 @@ void opj_lupInvert (OPJ_FLOAT32 * pSrcMatrix,
/**
* Matrix inversion.
*/
bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix, OPJ_UINT32 n)
OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix, OPJ_UINT32 n)
{
OPJ_BYTE * l_data = 00;
OPJ_UINT32 l_permutation_size = n * sizeof(OPJ_UINT32);
......@@ -75,7 +75,7 @@ bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix,
/**
* LUP decomposition
*/
bool opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, OPJ_FLOAT32 * p_swap_area,OPJ_UINT32 n)
OPJ_BOOL opj_lupDecompose(OPJ_FLOAT32 * matrix,OPJ_UINT32 * permutations, OPJ_FLOAT32 * p_swap_area,OPJ_UINT32 n)
{
OPJ_UINT32 * tmpPermutations = permutations;
OPJ_UINT32 * dstPermutations;
......
......@@ -35,6 +35,6 @@
* @param pDestMatrix data to store the inverted matrix.
* @return 1 if the inversion is successful, 0 if the matrix is singular.
*/
bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix, OPJ_UINT32 n);
OPJ_BOOL opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix, OPJ_UINT32 n);
#endif
This diff is collapsed.
......@@ -40,6 +40,7 @@ The functions in J2K.C have for goal to read/write the several parts of the code
*/
#include "openjpeg.h"
#include "opj_includes.h"
struct opj_dparameters;
struct opj_stream_private;
......@@ -372,15 +373,15 @@ typedef struct opj_cp
/* UniPG>> */
#ifdef USE_JPWL
/** enables writing of EPC in MH, thus activating JPWL */
bool epc_on;
OPJ_BOOL epc_on;
/** enables writing of EPB, in case of activated JPWL */
bool epb_on;
OPJ_BOOL epb_on;
/** enables writing of ESD, in case of activated JPWL */
bool esd_on;
OPJ_BOOL esd_on;
/** enables writing of informative techniques of ESD, in case of activated JPWL */
bool info_on;
OPJ_BOOL info_on;
/** enables writing of RED, in case of activated JPWL */
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) */
......@@ -406,7 +407,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 */
bool correct;
OPJ_BOOL correct;
/** expected number of components at the decoder */
int exp_comps;
/** maximum number of tiles at the decoder */
......@@ -553,7 +554,7 @@ void j2k_destroy (opj_j2k_t *p_j2k);
*
* @return true if the codec is valid.
*/
bool j2k_start_compress(
OPJ_BOOL j2k_start_compress(
opj_j2k_t *p_j2k,
struct opj_stream_private *cio,
struct opj_image * p_image,
......@@ -563,7 +564,7 @@ bool j2k_start_compress(
* Ends the compression procedures and possibiliy add data to be read after the
* codestream.
*/
bool j2k_end_compress(opj_j2k_t *p_j2k, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
OPJ_BOOL j2k_end_compress(opj_j2k_t *p_j2k, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
/**
* Sets up the decoder decoding parameters using user parameters.
......@@ -586,7 +587,7 @@ void j2k_setup_decoder(
*
* @return true if the box is valid.
*/
bool j2k_read_header(
OPJ_BOOL j2k_read_header(
opj_j2k_t *p_j2k,
struct opj_image ** p_image,
OPJ_INT32 * p_tile_x0,
......@@ -611,7 +612,7 @@ opj_image_t* j2k_decode(opj_j2k_t *j2k, struct opj_stream_private *cio, struct o
* Ends the decompression procedures and possibiliy add data to be read after the
* codestream.
*/
bool j2k_end_decompress(opj_j2k_t *j2k, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
OPJ_BOOL j2k_end_decompress(opj_j2k_t *j2k, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
/**
Decode an image form a JPT-stream (JPEG 2000, JPIP)
......@@ -644,7 +645,7 @@ void j2k_setup_encoder(opj_j2k_t *j2k, opj_cparameters_t *parameters, opj_image_
* @param p_stream the stream to write data to.
* @param p_manager the user event manager.
*/
bool j2k_write_tile (
OPJ_BOOL j2k_write_tile (
opj_j2k_t * p_j2k,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
......@@ -666,12 +667,12 @@ const char * j2k_convert_progression_order(OPJ_PROG_ORDER prg_order);
/**
* Encodes an image into a JPEG-2000 codestream
*/
bool j2k_encode(
OPJ_BOOL j2k_encode(
opj_j2k_t * p_j2k,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager
);
bool j2k_setup_mct_encoding (opj_tcp_t * p_tcp,opj_image_t * p_image);
OPJ_BOOL j2k_setup_mct_encoding (opj_tcp_t * p_tcp,opj_image_t * p_image);
/**
* Decode tile data.
......@@ -679,7 +680,7 @@ bool j2k_setup_mct_encoding (opj_tcp_t * p_tcp,opj_image_t * p_image);
* @param p_stream the stream to write data to.
* @param p_manager the user event manager.
*/
bool j2k_decode_tile (
OPJ_BOOL j2k_decode_tile (
opj_j2k_t * p_j2k,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
......@@ -693,7 +694,7 @@ bool j2k_decode_tile (
* @param p_stream the stream to write data to.
* @param p_manager the user event manager.
*/
bool j2k_read_tile_header (
OPJ_BOOL j2k_read_tile_header (
opj_j2k_t * p_j2k,
OPJ_UINT32 * p_tile_index,
OPJ_UINT32 * p_data_size,
......@@ -702,7 +703,7 @@ bool j2k_read_tile_header (
OPJ_INT32 * p_tile_x1,
OPJ_INT32 * p_tile_y1,
OPJ_UINT32 * p_nb_comps,
bool * p_go_on,
OPJ_BOOL * p_go_on,
struct opj_stream_private *p_stream,
struct opj_event_mgr * p_manager
);
......@@ -718,7 +719,7 @@ bool j2k_read_tile_header (
*
* @return true if the area could be set.
*/
bool j2k_set_decode_area(
OPJ_BOOL j2k_set_decode_area(
opj_j2k_t *p_j2k,
OPJ_INT32 p_start_x,
OPJ_INT32 p_start_y,
......
......@@ -58,7 +58,7 @@
*
* @return true if writting was successful.
*/
bool jp2_write_jp2h(
OPJ_BOOL jp2_write_jp2h(
opj_jp2_t *jp2,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager
......@@ -73,7 +73,7 @@ bool jp2_write_jp2h(
*
* @return true if writting was successful.
*/
bool jp2_skip_jp2c(
OPJ_BOOL jp2_skip_jp2c(
opj_jp2_t *jp2,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager
......@@ -89,7 +89,7 @@ bool jp2_skip_jp2c(
*
* @return true if the JP2 Header box was successfully reconized.
*/
bool jp2_read_jp2h(
OPJ_BOOL jp2_read_jp2h(
opj_jp2_t *jp2,
unsigned char * p_header_data,
unsigned int p_header_size,
......@@ -105,7 +105,7 @@ bool jp2_read_jp2h(
*
* @return true if writting was successful.
*/
static bool jp2_write_jp2c(
static OPJ_BOOL jp2_write_jp2c(
opj_jp2_t *jp2,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager
......@@ -121,7 +121,7 @@ static bool jp2_write_jp2c(
*
* @return true if the box is reconized, false otherwise
*/
static bool jp2_read_boxhdr(
static OPJ_BOOL jp2_read_boxhdr(
opj_jp2_box_t *box,
OPJ_UINT32 * p_number_bytes_read,
struct opj_stream_private *cio,
......@@ -138,7 +138,7 @@ static bool jp2_read_boxhdr(
*
* @return true if the box is reconized, false otherwise
*/
static bool jp2_read_boxhdr_char(
static OPJ_BOOL jp2_read_boxhdr_char(
opj_jp2_box_t *box,
OPJ_BYTE * p_data,
OPJ_UINT32 * p_number_bytes_read,
......@@ -156,7 +156,7 @@ static bool jp2_read_boxhdr_char(
*
* @return true if the file signature box is valid.
*/
static bool jp2_read_jp(
static OPJ_BOOL jp2_read_jp(
opj_jp2_t *jp2,
unsigned char * p_header_data,
unsigned int p_header_size,
......@@ -172,7 +172,7 @@ static bool jp2_read_jp(
*
* @return true if writting was successful.
*/
static bool jp2_write_jp(
static OPJ_BOOL jp2_write_jp(
opj_jp2_t *jp2,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager
......@@ -187,7 +187,7 @@ static bool jp2_write_jp(
*
* @return true if writting was successful.
*/
static bool jp2_write_ftyp(
static OPJ_BOOL jp2_write_ftyp(
opj_jp2_t *jp2,
struct opj_stream_private *cio,
struct opj_event_mgr * p_manager
......@@ -203,7 +203,7 @@ static bool jp2_write_ftyp(
*
* @return true if the FTYP box is valid.
*/
static bool jp2_read_ftyp(
static OPJ_BOOL jp2_read_ftyp(
opj_jp2_t *jp2,
unsigned char * p_header_data,
unsigned int p_header_size,
......@@ -220,7 +220,7 @@ static bool jp2_read_ftyp(