Fixed internal function names conflict with Jasper (http://code.google.com/p/openjpeg/issues/detail?id=30)

This commit is contained in:
Antonin Descampe 2011-04-12 17:24:30 +00:00
parent a916dcd052
commit fef7d00dc8
4 changed files with 13 additions and 10 deletions

View File

@ -5,6 +5,9 @@ What's New for OpenJPEG
! : changed
+ : added
April 12, 2011
* [antonin] Fixed internal function names conflict with Jasper (http://code.google.com/p/openjpeg/issues/detail?id=30)
November 25, 2010
* [antonin] Fix leak in jp2_read_header_procedure() (from even.rouault, see issue 29 on googlecode)

View File

@ -1829,7 +1829,7 @@ Encode an image into a JPEG-2000 file stream
@param cstr_info Codestream information structure if required, NULL otherwise
@return Returns true if successful, returns false otherwise
*/
bool jp2_encode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager)
bool opj_jp2_encode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager)
{
return j2k_encode(jp2->j2k,cio,p_manager);
}
@ -1857,7 +1857,7 @@ bool jp2_write_tile (
* @param p_stream the stream to write data to.
* @param p_manager the user event manager.
*/
bool jp2_decode_tile (
bool opj_jp2_decode_tile (
opj_jp2_t * p_jp2,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,
@ -2074,7 +2074,7 @@ bool jp2_skip_jp2c(
return true;
}
struct opj_image * jp2_decode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager)
struct opj_image * opj_jp2_decode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager)
{
/* J2K decoding */
struct opj_image * image = j2k_decode(jp2->j2k, cio, p_manager);

View File

@ -203,7 +203,7 @@ void jp2_setup_decoder(opj_jp2_t *jp2, struct opj_dparameters *parameters);
* @param cstr_info Codestream information structure if required, NULL otherwise
* @return Returns a decoded image if successful, returns NULL otherwise
*/
struct opj_image* jp2_decode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
struct opj_image* opj_jp2_decode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
/**
Setup the encoder parameters using the current image and using user parameters.
Coding parameters are returned in jp2->j2k->cp.
@ -237,7 +237,7 @@ Encode an image into a JPEG-2000 file stream
@param cstr_info Codestream information structure if required, NULL otherwise
@return Returns true if successful, returns false otherwise
*/
bool jp2_encode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
bool opj_jp2_encode(opj_jp2_t *jp2, struct opj_stream_private *cio, struct opj_event_mgr * p_manager);
/**
* Reads a jpeg2000 file header structure.
@ -286,7 +286,7 @@ bool jp2_write_tile (
* @param p_stream the stream to write data to.
* @param p_manager the user event manager.
*/
bool jp2_decode_tile (
bool opj_jp2_decode_tile (
opj_jp2_t * p_jp2,
OPJ_UINT32 p_tile_index,
OPJ_BYTE * p_data,

View File

@ -231,7 +231,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
case CODEC_JP2:
/* get a JP2 decoder handle */
l_info->m_codec_data.m_decompression.opj_decode = (opj_image_t* (*) (void *, struct opj_stream_private *, struct opj_event_mgr * ))jp2_decode;
l_info->m_codec_data.m_decompression.opj_decode = (opj_image_t* (*) (void *, struct opj_stream_private *, struct opj_event_mgr * ))opj_jp2_decode;
l_info->m_codec_data.m_decompression.opj_end_decompress = (bool (*) (void *,struct opj_stream_private *,struct opj_event_mgr *)) jp2_end_decompress;
l_info->m_codec_data.m_decompression.opj_read_header = (bool (*) (
void *,
@ -260,7 +260,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_decompress(OPJ_CODEC_FORMAT p_format)
struct opj_stream_private *,
struct opj_event_mgr * )) jp2_read_tile_header;
l_info->m_codec_data.m_decompression.opj_decode_tile_data = (bool (*) (void *,OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32,struct opj_stream_private *, struct opj_event_mgr * )) jp2_decode_tile;
l_info->m_codec_data.m_decompression.opj_decode_tile_data = (bool (*) (void *,OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32,struct opj_stream_private *, struct opj_event_mgr * )) opj_jp2_decode_tile;
l_info->m_codec_data.m_decompression.opj_destroy = (void (*) (void *))jp2_destroy;
l_info->m_codec_data.m_decompression.opj_setup_decoder = (void (*) (void * ,opj_dparameters_t * )) jp2_setup_decoder;
@ -612,7 +612,7 @@ opj_codec_t* OPJ_CALLCONV opj_create_compress(OPJ_CODEC_FORMAT p_format)
case CODEC_JP2:
/* get a JP2 decoder handle */
l_info->m_codec_data.m_compression.opj_encode = (bool (*) (void *, struct opj_stream_private *, struct opj_event_mgr * )) jp2_encode;
l_info->m_codec_data.m_compression.opj_encode = (bool (*) (void *, struct opj_stream_private *, struct opj_event_mgr * )) opj_jp2_encode;
l_info->m_codec_data.m_compression.opj_end_compress = (bool (*) (void *, struct opj_stream_private *, struct opj_event_mgr *)) jp2_end_compress;
l_info->m_codec_data.m_compression.opj_start_compress = (bool (*) (void *,struct opj_stream_private *,struct opj_image * , struct opj_event_mgr *)) jp2_start_compress;
l_info->m_codec_data.m_compression.opj_write_tile = (bool (*) (void *,OPJ_UINT32,OPJ_BYTE*,OPJ_UINT32,struct opj_stream_private *, struct opj_event_mgr *)) jp2_write_tile;
@ -840,7 +840,7 @@ bool OPJ_CALLCONV opj_set_error_handler(opj_codec_t * p_codec, opj_msg_callback
case CODEC_J2K:
return j2k_encode((opj_j2k_t*)cinfo->j2k_handle, (opj_stream_private_t *) cio, image, cstr_info);
case CODEC_JP2:
return jp2_encode((opj_jp2_t*)cinfo->jp2_handle, (opj_stream_private_t *) cio, image, cstr_info);
return opj_jp2_encode((opj_jp2_t*)cinfo->jp2_handle, (opj_stream_private_t *) cio, image, cstr_info);
case CODEC_JPT:
case CODEC_UNKNOWN:
default: