(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.
This commit is contained in:
Antonin Descampe 2010-12-08 11:06:41 +00:00
parent c906c230fb
commit 9fdaaa3316
7 changed files with 20 additions and 18 deletions

View File

@ -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)

View File

@ -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 */

View File

@ -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)

View File

@ -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 */
/* ----------------------------------------------------------------------- */

View File

@ -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
/* ----------------------------------------------------------------------- */

View File

@ -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 ) {

View File

@ -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 */
/* ---------------------------------------------------------------------- */