OpenJPEG  1.5.1
opj_includes.h
Go to the documentation of this file.
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_X64
00093     return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
00094 #else
00095     int i;
00096  
00097     _asm{
00098         fld f
00099         fistp i
00100     };
00101  
00102     return i;
00103 #endif
00104 }
00105 #endif
00106 
00107 #include "j2k_lib.h"
00108 #include "opj_malloc.h"
00109 #include "event.h"
00110 #include "bio.h"
00111 #include "cio.h"
00112 
00113 #include "image.h"
00114 #include "j2k.h"
00115 #include "jp2.h"
00116 #include "jpt.h"
00117 
00118 #include "mqc.h"
00119 #include "raw.h"
00120 #include "bio.h"
00121 #include "tgt.h"
00122 #include "pi.h"
00123 #include "tcd.h"
00124 #include "t1.h"
00125 #include "dwt.h"
00126 #include "t2.h"
00127 #include "mct.h"
00128 #include "int.h"
00129 #include "fix.h"
00130 
00131 #include "cidx_manager.h"
00132 #include "indexbox_manager.h"
00133 
00134 /* JPWL>> */
00135 #ifdef USE_JPWL
00136 #include "./jpwl/jpwl.h"
00137 #endif /* USE_JPWL */
00138 /* <<JPWL */
00139 
00140 #endif /* OPJ_INCLUDES_H */