From 76ee6b84417a5476b8b3eb7c326d3f38e3f3a998 Mon Sep 17 00:00:00 2001 From: Giuseppe Baruffa Date: Thu, 7 Dec 2006 18:46:28 +0000 Subject: [PATCH] + Antonin verified that the MacOS build of JPWL module suffered from a missing definition of the "min" macro; I've added this into both jpwl.h and rs.h --- ChangeLog | 3 +++ jpwl/JPWL_image_to_j2k.dsp | 2 +- jpwl/jpwl.h | 10 ++++++++++ jpwl/rs.h | 9 +++++++++ 4 files changed, 23 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 20f816a8..dcccc9ec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -5,6 +5,9 @@ What's New for OpenJPEG ! : changed + : added +December 07, 2006 ++ [Giuseppe Baruffa] Antonin verified that the MacOS build suffered from a missing definition of the "min" macro; I've added this definition (properly #ifndef'ed) into both jpwl.h and rs.h + December 05, 2006 * [Giuseppe Baruffa] Better fix of the TPH EPBs bug in JPWL module * [GB] Fixed the UEP bug in JPWL module; now, during a UEP specification, RS protection or CRC check can be switched off for selected range of packets, and consequently reswitched on without confusing the decoder diff --git a/jpwl/JPWL_image_to_j2k.dsp b/jpwl/JPWL_image_to_j2k.dsp index f1fb5385..f924ee18 100644 --- a/jpwl/JPWL_image_to_j2k.dsp +++ b/jpwl/JPWL_image_to_j2k.dsp @@ -66,7 +66,7 @@ LINK32=link.exe # PROP Ignore_Export_Lib 0 # PROP Target_Dir "" # ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /GZ /c -# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libopenjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "OPJ_STATIC" /D "USE_JPWL" /FD /GZ /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /I "../libopenjpeg" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /D "OPJ_STATIC" /D "USE_JPWL" /FR /FD /GZ /c # ADD BASE RSC /l 0x80c /d "_DEBUG" # ADD RSC /l 0x80c /d "_DEBUG" BSC32=bscmake.exe diff --git a/jpwl/jpwl.h b/jpwl/jpwl.h index a533e3a3..8af80fdb 100644 --- a/jpwl/jpwl.h +++ b/jpwl/jpwl.h @@ -365,6 +365,16 @@ and get the CRC at the end */ #define jpwl_updateCRC32(CRC, DATA) updateCRC32(CRC, DATA) +/** +Computes the minimum between two integers +@param a first integer to compare +@param b second integer to compare +@return returns the minimum integer between a and b +*/ +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif /* min */ + /*@}*/ #endif /* USE_JPWL */ diff --git a/jpwl/rs.h b/jpwl/rs.h index b303af79..047d9c2f 100644 --- a/jpwl/rs.h +++ b/jpwl/rs.h @@ -94,6 +94,15 @@ int encode_rs(dtype data[], dtype bb[]); */ int eras_dec_rs(dtype data[], int eras_pos[], int no_eras); +/** +Computes the minimum between two integers +@param a first integer to compare +@param b second integer to compare +@return returns the minimum integer between a and b +*/ +#ifndef min +#define min(a,b) (((a) < (b)) ? (a) : (b)) +#endif /* min */ #endif /* __CRC32_HEADER__ */