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

Maj openpjeg

parent 454fc4f0
...@@ -249,11 +249,11 @@ namespace otb ...@@ -249,11 +249,11 @@ namespace otb
itkExceptionMacro(<<"Failed to read image header."); itkExceptionMacro(<<"Failed to read image header.");
} }
bool goesOn = true;
OPJ_BYTE * tile_data; OPJ_BYTE * tile_data;
OPJ_INT32 tile_x1,tile_y1; OPJ_INT32 tile_x1,tile_y1;
OPJ_UINT32 data_size,nb_comps; OPJ_UINT32 data_size,nb_comps;
OPJ_UINT32 tile_index; OPJ_UINT32 tile_index;
OPJ_BOOL goesOn = true;
while(goesOn) while(goesOn)
{ {
......
...@@ -56,13 +56,13 @@ Write a byte ...@@ -56,13 +56,13 @@ Write a byte
@param bio BIO handle @param bio BIO handle
@return Returns 0 if successful, returns 1 otherwise @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 Read a byte
@param bio BIO handle @param bio BIO handle
@return Returns 0 if successful, returns 1 otherwise @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); ...@@ -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->buf = (bio->buf << 8) & 0xffff;
bio->ct = bio->buf == 0xff00 ? 7 : 8; bio->ct = bio->buf == 0xff00 ? 7 : 8;
if (bio->bp >= bio->end) { if (bio->bp >= bio->end) {
...@@ -84,7 +84,7 @@ static bool bio_byteout(opj_bio_t *bio) { ...@@ -84,7 +84,7 @@ static bool bio_byteout(opj_bio_t *bio) {
return false; 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->buf = (bio->buf << 8) & 0xffff;
bio->ct = bio->buf == 0xff00 ? 7 : 8; bio->ct = bio->buf == 0xff00 ? 7 : 8;
if (bio->bp >= bio->end) { if (bio->bp >= bio->end) {
...@@ -163,7 +163,7 @@ OPJ_UINT32 bio_read(opj_bio_t *bio, OPJ_UINT32 n) { ...@@ -163,7 +163,7 @@ OPJ_UINT32 bio_read(opj_bio_t *bio, OPJ_UINT32 n) {
return v; return v;
} }
bool bio_flush(opj_bio_t *bio) { OPJ_BOOL bio_flush(opj_bio_t *bio) {
bio->ct = 0; bio->ct = 0;
if (bio_byteout(bio)) { if (bio_byteout(bio)) {
return true; return true;
...@@ -177,7 +177,7 @@ bool bio_flush(opj_bio_t *bio) { ...@@ -177,7 +177,7 @@ bool bio_flush(opj_bio_t *bio) {
return false; return false;
} }
bool bio_inalign(opj_bio_t *bio) { OPJ_BOOL bio_inalign(opj_bio_t *bio) {
bio->ct = 0; bio->ct = 0;
if ((bio->buf & 0xff) == 0xff) { if ((bio->buf & 0xff) == 0xff) {
if (bio_bytein(bio)) { if (bio_bytein(bio)) {
......
...@@ -110,13 +110,13 @@ Flush bits ...@@ -110,13 +110,13 @@ Flush bits
@param bio BIO handle @param bio BIO handle
@return Returns 1 if successful, returns 0 otherwise @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) Passes the ending bits (coming from flushing)
@param bio BIO handle @param bio BIO handle
@return Returns 1 if successful, returns 0 otherwise @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) ...@@ -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. * Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
* @return a stream object. * @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; opj_stream_private_t * l_stream = 00;
l_stream = (opj_stream_private_t*) opj_malloc(sizeof(opj_stream_private_t)); 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) ...@@ -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. * Creates an abstract stream. This function does nothing except allocating memory and initializing the abstract stream.
* @return a stream object. * @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); 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 ...@@ -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. * @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. * @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. // the number of bytes written on the media.
OPJ_UINT32 l_current_write_nb_bytes = 0; 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 ...@@ -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) 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_current_skip_nb_bytes = 0;
OPJ_SIZE_T l_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, ...@@ -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. * @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. * @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_current_data = p_stream->m_stored_data;
p_stream->m_bytes_in_buffer = 0; 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 ...@@ -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. * @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. * @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 if
(! opj_stream_flush(p_stream,p_event_mgr)) (! 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, ...@@ -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. * @param p_event_mgr the user event manager to be notified of special events.
* @return true if the stream is seekable. * @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); 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 ...@@ -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. * 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; 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) ...@@ -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; 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; return false;
} }
......
...@@ -131,7 +131,7 @@ typedef struct opj_stream_private ...@@ -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 *); 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. * 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 ...@@ -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. * @param p_event_mgr the user event manager to be notified of special events.
* @return true if the data could be flushed, false else. * @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. * 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 ...@@ -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. * @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. * @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. * 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 ...@@ -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. * @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. * @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. * 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, ...@@ -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. * @param p_event_mgr the user event manager to be notified of special events.
* @return true if the stream is seekable. * @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. * 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_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_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); 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 ...@@ -124,11 +124,11 @@ static void dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsi
/** /**
Inverse wavelet transform in 2-D. 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 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 ...@@ -372,7 +372,7 @@ static void dwt_encode_stepsize(OPJ_INT32 stepsize, OPJ_INT32 numbps, opj_stepsi
/* <summary> */ /* <summary> */
/* Forward 5-3 wavelet transform in 2-D. */ /* Forward 5-3 wavelet transform in 2-D. */
/* </summary> */ /* </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 i, j, k;
OPJ_INT32 *a = 00; OPJ_INT32 *a = 00;
...@@ -454,7 +454,7 @@ INLINE bool dwt_encode_procedure(opj_tcd_tilecomp_t * tilec,void (*p_function)(O ...@@ -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. */ /* Forward 5-3 wavelet transform in 2-D. */
/* </summary> */ /* </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); return dwt_encode_procedure(tilec,dwt_encode_1);
} }
...@@ -462,7 +462,7 @@ bool dwt_encode(opj_tcd_tilecomp_t * tilec) ...@@ -462,7 +462,7 @@ bool dwt_encode(opj_tcd_tilecomp_t * tilec)
/* <summary> */ /* <summary> */
/* Inverse 5-3 wavelet transform in 2-D. */ /* Inverse 5-3 wavelet transform in 2-D. */
/* </summary> */ /* </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); return dwt_decode_tile(tilec, numres, &dwt_decode_1);
} }
...@@ -488,7 +488,7 @@ OPJ_FLOAT64 dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient) { ...@@ -488,7 +488,7 @@ OPJ_FLOAT64 dwt_getnorm(OPJ_UINT32 level, OPJ_UINT32 orient) {
/* <summary> */ /* <summary> */
/* Forward 9-7 wavelet transform in 2-D. */ /* Forward 9-7 wavelet transform in 2-D. */
/* </summary> */ /* </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); 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 ...@@ -552,7 +552,7 @@ static OPJ_UINT32 dwt_max_resolution(opj_tcd_resolution_t* restrict r, OPJ_UINT3
/* <summary> */ /* <summary> */
/* Inverse wavelet transform in 2-D. */ /* Inverse wavelet transform in 2-D. */
/* </summary> */ /* </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 h;
dwt_t v; dwt_t v;
...@@ -786,7 +786,7 @@ static void v4dwt_decode(v4dwt_t* restrict dwt){ ...@@ -786,7 +786,7 @@ static void v4dwt_decode(v4dwt_t* restrict dwt){
/* <summary> */ /* <summary> */
/* Inverse 9-7 wavelet transform in 2-D. */ /* Inverse 9-7 wavelet transform in 2-D. */
/* </summary> */ /* </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 h;
v4dwt_t v; v4dwt_t v;
......
...@@ -57,14 +57,14 @@ Forward 5-3 wavelet tranform in 2-D. ...@@ -57,14 +57,14 @@ Forward 5-3 wavelet tranform in 2-D.
Apply a reversible DWT transform to a component of an image. Apply a reversible DWT transform to a component of an image.
@param tilec Tile component information (current tile) @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. Inverse 5-3 wavelet tranform in 2-D.
Apply a reversible inverse DWT transform to a component of an image. Apply a reversible inverse DWT transform to a component of an image.
@param tilec Tile component information (current tile) @param tilec Tile component information (current tile)
@param numres Number of resolution levels to decode @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. 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) @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. ...@@ -83,14 +83,14 @@ Forward 9-7 wavelet transform in 2-D.
Apply an irreversible DWT transform to a component of an image. Apply an irreversible DWT transform to a component of an image.
@param tilec Tile component information (current tile) @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. Inverse 9-7 wavelet transform in 2-D.
Apply an irreversible inverse DWT transform to a component of an image. Apply an irreversible inverse DWT transform to a component of an image.
@param tilec Tile component information (current tile) @param tilec Tile component information (current tile)
@param numres Number of resolution levels to decode @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. 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) @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) { ...@@ -43,7 +43,7 @@ i2a(OPJ_UINT32 i, OPJ_CHAR *a, OPJ_UINT32 r) {
#endif #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 */ #define MSG_SIZE 512 /* 512 bytes should be more than enough for a short message */
opj_msg_callback msg_handler = 00; opj_msg_callback msg_handler = 00;
void * l_data = 00; void * l_data = 00;
......
...@@ -77,7 +77,7 @@ typedef struct opj_event_mgr ...@@ -77,7 +77,7 @@ typedef struct opj_event_mgr
* @param fmt Format-control string (plus optionnal arguments) * @param fmt Format-control string (plus optionnal arguments)
* @return Returns true if successful, returns false otherwise * @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) ...@@ -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_validation_list the list of procedure to modify.
* @param p_procedure the procedure to add. * @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 if
(p_validation_list->m_nb_max_procedures == p_validation_list->m_nb_procedures) (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); ...@@ -95,7 +95,7 @@ void opj_procedure_list_destroy(opj_procedure_list_t * p_list);
* *
* @return true if the procedure could ne added. * @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. * Gets the number of validation procedures.
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
#include "opj_malloc.h" #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_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, void opj_lupInvert (OPJ_FLOAT32 * pSrcMatrix,
OPJ_FLOAT32 * pDestMatrix, OPJ_FLOAT32 * pDestMatrix,
...@@ -41,7 +41,7 @@ void opj_lupInvert (OPJ_FLOAT32 * pSrcMatrix, ...@@ -41,7 +41,7 @@ void opj_lupInvert (OPJ_FLOAT32 * pSrcMatrix,
/** /**
* Matrix inversion. * 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_BYTE * l_data = 00;
OPJ_UINT32 l_permutation_size = n * sizeof(OPJ_UINT32); OPJ_UINT32 l_permutation_size = n * sizeof(OPJ_UINT32);
...@@ -75,7 +75,7 @@ bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix, ...@@ -75,7 +75,7 @@ bool opj_matrix_inversion_f(OPJ_FLOAT32 * pSrcMatrix,OPJ_FLOAT32 * pDestMatrix,
/** /**
* LUP decomposition * 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 * tmpPermutations = permutations;
OPJ_UINT32 * dstPermutations; OPJ_UINT32 * dstPermutations;
......
...@@ -35,6 +35,6 @@ ...@@ -35,6 +35,6 @@
* @param pDestMatrix data to store the inverted matrix. * @param pDestMatrix data to store the inverted matrix.
* @return 1 if the inversion is successful, 0 if the matrix is singular. * @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 #endif
This diff is collapsed.