diff options
| author | Antonin Descampe <antonin@gmail.com> | 2010-12-08 11:06:41 +0000 |
|---|---|---|
| committer | Antonin Descampe <antonin@gmail.com> | 2010-12-08 11:06:41 +0000 |
| commit | d08a96e2517c545b8ff2d7b89c7778eb5b1fd4ba (patch) | |
| tree | 16f839d4499afc2ead2b759b22907a50bd012de3 /jp3d | |
| parent | 59d9b97ffe35f17c71b25a749b885054cb4727d9 (diff) | |
(thanks to Winfried for his help)
* [antonin] changed remaining "WIN32" to "_WIN32"
! [antonin] libopenjpeg has no more dependency on LCMS lib. Everything concerning color (icc profile, conversion to rgb, etc) has been put outside libopenjpeg and is used in j2k_to_image.c and mj2_to_frames.c.
- [antonin] removed "opj_convert{.c,.h}"
+ [antonin] added a directory "common/" that contains "getopt{.c,.h}" (previously in "codec/compat").
+ [antonin] added files "color{.c,.h}" in "common/" that define the code for icc profile management and sycc_to_rgb conversion
+ [antonin] added "common/format_defs.h" that contains common definitions used in image_to_j2k, j2k_to_image, j2k_dump.
Diffstat (limited to 'jp3d')
| -rw-r--r-- | jp3d/Makefile.nix | 2 | ||||
| -rwxr-xr-x | jp3d/codec/convert.c | 4 | ||||
| -rwxr-xr-x | jp3d/codec/jp3d_to_volume.c | 6 | ||||
| -rwxr-xr-x | jp3d/codec/volume_to_jp3d.c | 6 | ||||
| -rwxr-xr-x | jp3d/libjp3dvm/event.c | 4 | ||||
| -rwxr-xr-x | jp3d/libjp3dvm/jp3d_lib.c | 8 | ||||
| -rwxr-xr-x | jp3d/libjp3dvm/openjpeg.c | 8 |
7 files changed, 20 insertions, 18 deletions
diff --git a/jp3d/Makefile.nix b/jp3d/Makefile.nix index 0dd57ea3..4ca053e5 100644 --- a/jp3d/Makefile.nix +++ b/jp3d/Makefile.nix @@ -21,8 +21,6 @@ INCLS = ./libjp3dvm/t1_3d.h ./libjp3dvm/bio.h ./libjp3dvm/cio.h \ INCLUDE = -I.. -Ilibjp3dvm -AR = ar - INSTALL_LIBDIR = $(prefix)/lib headerdir = openjpeg3d-$(JP3D_MAJOR).$(JP3D_MINOR) INSTALL_INCLUDE = $(prefix)/include/$(headerdir) diff --git a/jp3d/codec/convert.c b/jp3d/codec/convert.c index b9aa656f..99eb7f2e 100755 --- a/jp3d/codec/convert.c +++ b/jp3d/codec/convert.c @@ -32,11 +32,11 @@ #include <stdlib.h> #include <string.h> #include "../libjp3dvm/openjpeg.h" -#ifdef WIN32 +#ifdef _WIN32 #include "windirent.h" #else #include <dirent.h> -#endif /* WIN32 */ +#endif /* _WIN32 */ diff --git a/jp3d/codec/jp3d_to_volume.c b/jp3d/codec/jp3d_to_volume.c index ee4425f2..995faaec 100755 --- a/jp3d/codec/jp3d_to_volume.c +++ b/jp3d/codec/jp3d_to_volume.c @@ -37,10 +37,12 @@ #include "getopt.h"
#include "convert.h"
-#ifndef WIN32
+#ifdef _WIN32
+#include <windows.h>
+#else
#define stricmp strcasecmp
#define strnicmp strncasecmp
-#endif
+#endif /* _WIN32 */
/* ----------------------------------------------------------------------- */
static double calc_PSNR(opj_volume_t *original, opj_volume_t *decoded)
diff --git a/jp3d/codec/volume_to_jp3d.c b/jp3d/codec/volume_to_jp3d.c index 238c47f5..d448fbe1 100755 --- a/jp3d/codec/volume_to_jp3d.c +++ b/jp3d/codec/volume_to_jp3d.c @@ -36,10 +36,12 @@ #include "getopt.h"
#include "convert.h"
-#ifndef WIN32
+#ifdef _WIN32
+#include <windows.h>
+#else
#define stricmp strcasecmp
#define strnicmp strncasecmp
-#endif
+#endif /* _WIN32 */
/* ----------------------------------------------------------------------- */
diff --git a/jp3d/libjp3dvm/event.c b/jp3d/libjp3dvm/event.c index 6fe8ae2e..c558218c 100755 --- a/jp3d/libjp3dvm/event.c +++ b/jp3d/libjp3dvm/event.c @@ -30,7 +30,7 @@ // Utility functions
// ==========================================================
-#ifndef WIN32
+#ifndef _WIN32
static char*
i2a(unsigned i, char *a, unsigned r) {
if (i/r > 0) a = i2a(i/r,a,r);
@@ -57,7 +57,7 @@ _itoa(int i, char *a, int r) { return a;
}
-#endif // !WIN32
+#endif // !_WIN32
/* ----------------------------------------------------------------------- */
diff --git a/jp3d/libjp3dvm/jp3d_lib.c b/jp3d/libjp3dvm/jp3d_lib.c index fe19ab8b..b2303991 100755 --- a/jp3d/libjp3dvm/jp3d_lib.c +++ b/jp3d/libjp3dvm/jp3d_lib.c @@ -24,17 +24,17 @@ * POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
#else
#include <sys/time.h>
#include <sys/resource.h>
#include <sys/times.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
#include "opj_includes.h"
double opj_clock() {
-#ifdef WIN32
+#ifdef _WIN32
/* WIN32: use QueryPerformance (very accurate) */
LARGE_INTEGER freq , t ;
/* freq is the clock speed of the CPU */
@@ -54,7 +54,7 @@ double opj_clock() { procTime = t.ru_utime.tv_sec + t.ru_stime.tv_sec;
/* (2b) More precisely! Get the microseconds part ! */
return ( procTime + (t.ru_utime.tv_usec + t.ru_stime.tv_usec) * 1e-6 ) ;
-#endif
+#endif /* _WIN32 */
}
void* opj_malloc( size_t size ) {
diff --git a/jp3d/libjp3dvm/openjpeg.c b/jp3d/libjp3dvm/openjpeg.c index eb4c39bf..8e3a0782 100755 --- a/jp3d/libjp3dvm/openjpeg.c +++ b/jp3d/libjp3dvm/openjpeg.c @@ -25,14 +25,14 @@ * POSSIBILITY OF SUCH DAMAGE.
*/
-#ifdef WIN32
+#ifdef _WIN32
#include <windows.h>
-#endif /* WIN32 */
+#endif /* _WIN32 */
#include "opj_includes.h"
#define JP3D_VERSION "1.3.0"
/* ---------------------------------------------------------------------- */
-#ifdef WIN32
+#ifdef _WIN32
#ifndef OPJ_STATIC
BOOL APIENTRY
DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) {
@@ -49,7 +49,7 @@ DllMain(HANDLE hModule, DWORD ul_reason_for_call, LPVOID lpReserved) { return TRUE;
}
#endif /* OPJ_STATIC */
-#endif /* WIN32 */
+#endif /* _WIN32 */
/* ---------------------------------------------------------------------- */
|
