From e93d5a683f8af382bbdb4bea4cf6fe2bd8337411 Mon Sep 17 00:00:00 2001 From: Antonin Descampe Date: Tue, 12 Apr 2011 17:24:30 +0000 Subject: [PATCH] Fixed internal function names conflict with Jasper (http://code.google.com/p/openjpeg/issues/detail?id=30) --- CHANGES | 1 + libopenjpeg/jp2.c | 6 +++--- libopenjpeg/jp2.h | 4 ++-- libopenjpeg/openjpeg.c | 4 ++-- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES b/CHANGES index b90778dd..9046831a 100644 --- a/CHANGES +++ b/CHANGES @@ -6,6 +6,7 @@ What's New for OpenJPEG + : added April 12, 2011 +* [antonin] Fixed internal function names conflict with Jasper (http://code.google.com/p/openjpeg/issues/detail?id=30) * [antonin] convert.c: ENDIAN condition removed, tiftoimage and imagetotif updated (ALPHA added for RGB and GRAY, correct handling of 12-bit precision), small bugfixes (credit to Winfried) * [antonin] small fix in configure.ac (credit to Vincent Torri) diff --git a/libopenjpeg/jp2.c b/libopenjpeg/jp2.c index 9c14a6be..62085a70 100644 --- a/libopenjpeg/jp2.c +++ b/libopenjpeg/jp2.c @@ -681,7 +681,7 @@ bool jp2_read_jp2h(opj_jp2_t *jp2, opj_cio_t *cio, opj_jp2_color_t *color) }/* jp2_read_jp2h() */ -opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, +opj_image_t* opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info) { opj_common_ptr cinfo; @@ -743,7 +743,7 @@ opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, } return image; -}/* jp2_decode() */ +}/* opj_jp2_decode() */ void jp2_write_jp2h(opj_jp2_t *jp2, opj_cio_t *cio) { @@ -1065,7 +1065,7 @@ void jp2_setup_encoder(opj_jp2_t *jp2, opj_cparameters_t *parameters, opj_image_ } -bool jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { +bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info) { /* JP2 encoding */ diff --git a/libopenjpeg/jp2.h b/libopenjpeg/jp2.h index 9ad662cb..42f082f4 100644 --- a/libopenjpeg/jp2.h +++ b/libopenjpeg/jp2.h @@ -193,7 +193,7 @@ Decode an image from a JPEG-2000 file stream @param cstr_info Codestream information structure if required, NULL otherwise @return Returns a decoded image if successful, returns NULL otherwise */ -opj_image_t* jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info); +opj_image_t* opj_jp2_decode(opj_jp2_t *jp2, opj_cio_t *cio, opj_codestream_info_t *cstr_info); /** Creates a JP2 compression structure @param cinfo Codec context info @@ -221,7 +221,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, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); +bool opj_jp2_encode(opj_jp2_t *jp2, opj_cio_t *cio, opj_image_t *image, opj_codestream_info_t *cstr_info); /* ----------------------------------------------------------------------- */ /*@}*/ diff --git a/libopenjpeg/openjpeg.c b/libopenjpeg/openjpeg.c index c79c7fe1..518e902b 100644 --- a/libopenjpeg/openjpeg.c +++ b/libopenjpeg/openjpeg.c @@ -160,7 +160,7 @@ opj_image_t* OPJ_CALLCONV opj_decode_with_info(opj_dinfo_t *dinfo, opj_cio_t *ci case CODEC_JPT: return j2k_decode_jpt_stream((opj_j2k_t*)dinfo->j2k_handle, cio, cstr_info); case CODEC_JP2: - return jp2_decode((opj_jp2_t*)dinfo->jp2_handle, cio, cstr_info); + return opj_jp2_decode((opj_jp2_t*)dinfo->jp2_handle, cio, cstr_info); case CODEC_UNKNOWN: default: break; @@ -311,7 +311,7 @@ bool OPJ_CALLCONV opj_encode_with_info(opj_cinfo_t *cinfo, opj_cio_t *cio, opj_i case CODEC_J2K: return j2k_encode((opj_j2k_t*)cinfo->j2k_handle, cio, image, cstr_info); case CODEC_JP2: - return jp2_encode((opj_jp2_t*)cinfo->jp2_handle, cio, image, cstr_info); + return opj_jp2_encode((opj_jp2_t*)cinfo->jp2_handle, cio, image, cstr_info); case CODEC_JPT: case CODEC_UNKNOWN: default: -- 2.40.0