00001 /* 00002 * Copyright (c) 2005, Herve Drolon, FreeImage Team 00003 * All rights reserved. 00004 * 00005 * Redistribution and use in source and binary forms, with or without 00006 * modification, are permitted provided that the following conditions 00007 * are met: 00008 * 1. Redistributions of source code must retain the above copyright 00009 * notice, this list of conditions and the following disclaimer. 00010 * 2. Redistributions in binary form must reproduce the above copyright 00011 * notice, this list of conditions and the following disclaimer in the 00012 * documentation and/or other materials provided with the distribution. 00013 * 00014 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS' 00015 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 00016 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 00017 * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 00018 * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 00019 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 00020 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 00021 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 00022 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 00023 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 00024 * POSSIBILITY OF SUCH DAMAGE. 00025 */ 00026 #ifndef OPJ_INCLUDES_H 00027 #define OPJ_INCLUDES_H 00028 00029 /* 00030 ========================================================== 00031 Standard includes used by the library 00032 ========================================================== 00033 */ 00034 #include <memory.h> 00035 #include <stdlib.h> 00036 #include <string.h> 00037 #include <math.h> 00038 #include <float.h> 00039 #include <time.h> 00040 #include <stdio.h> 00041 #include <stdarg.h> 00042 #include <ctype.h> 00043 00044 /* 00045 ========================================================== 00046 OpenJPEG interface 00047 ========================================================== 00048 */ 00049 #include "openjpeg.h" 00050 00051 /* 00052 ========================================================== 00053 OpenJPEG modules 00054 ========================================================== 00055 */ 00056 00057 /* Ignore GCC attributes if this is not GCC */ 00058 #ifndef __GNUC__ 00059 #define __attribute__(x) /* __attribute__(x) */ 00060 #endif 00061 00062 /* 00063 The inline keyword is supported by C99 but not by C90. 00064 Most compilers implement their own version of this keyword ... 00065 */ 00066 #ifndef INLINE 00067 #if defined(_MSC_VER) 00068 #define INLINE __forceinline 00069 #elif defined(__GNUC__) 00070 #define INLINE __inline__ 00071 #elif defined(__MWERKS__) 00072 #define INLINE inline 00073 #else 00074 /* add other compilers here ... */ 00075 #define INLINE 00076 #endif /* defined(<Compiler>) */ 00077 #endif /* INLINE */ 00078 00079 /* Are restricted pointers available? (C99) */ 00080 #if (__STDC_VERSION__ != 199901L) 00081 /* Not a C99 compiler */ 00082 #ifdef __GNUC__ 00083 #define restrict __restrict__ 00084 #else 00085 #define restrict /* restrict */ 00086 #endif 00087 #endif 00088 00089 /* MSVC and Borland C do not have lrintf */ 00090 #if defined(_MSC_VER) || defined(__BORLANDC__) 00091 static INLINE long lrintf(float f){ 00092 #ifdef _M_IX86 00093 long int i; 00094 00095 _asm{ 00096 fld f 00097 fistp i 00098 }; 00099 return i; 00100 #else 00101 return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f)); 00102 #endif /* _M_IX86 */ 00103 } 00104 #endif 00105 00106 #include "j2k_lib.h" 00107 #include "opj_malloc.h" 00108 #include "event.h" 00109 #include "bio.h" 00110 #include "cio.h" 00111 00112 #include "image.h" 00113 #include "j2k.h" 00114 #include "jp2.h" 00115 #include "jpt.h" 00116 00117 #include "mqc.h" 00118 #include "raw.h" 00119 #include "bio.h" 00120 #include "tgt.h" 00121 #include "pi.h" 00122 #include "tcd.h" 00123 #include "t1.h" 00124 #include "dwt.h" 00125 #include "t2.h" 00126 #include "mct.h" 00127 #include "int.h" 00128 #include "fix.h" 00129 00130 #include "cidx_manager.h" 00131 #include "indexbox_manager.h" 00132 00133 /* JPWL>> */ 00134 #ifdef USE_JPWL 00135 #include "./jpwl/jpwl.h" 00136 #endif /* USE_JPWL */ 00137 /* <<JPWL */ 00138 00139 #endif /* OPJ_INCLUDES_H */