opj_includes.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * Copyright (c) 2005, Hervé Drolon, FreeImage Team
  3. * All rights reserved.
  4. *
  5. * Redistribution and use in source and binary forms, with or without
  6. * modification, are permitted provided that the following conditions
  7. * are met:
  8. * 1. Redistributions of source code must retain the above copyright
  9. * notice, this list of conditions and the following disclaimer.
  10. * 2. Redistributions in binary form must reproduce the above copyright
  11. * notice, this list of conditions and the following disclaimer in the
  12. * documentation and/or other materials provided with the distribution.
  13. *
  14. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS `AS IS'
  15. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  16. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  17. * ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
  18. * LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
  19. * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
  20. * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
  21. * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
  22. * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
  23. * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
  24. * POSSIBILITY OF SUCH DAMAGE.
  25. */
  26. #ifndef OPJ_INCLUDES_H
  27. #define OPJ_INCLUDES_H
  28. /*
  29. ==========================================================
  30. Standard includes used by the library
  31. ==========================================================
  32. */
  33. #include <memory.h>
  34. #include <stdlib.h>
  35. #include <string.h>
  36. #include <math.h>
  37. #include <float.h>
  38. #include <time.h>
  39. #include <stdio.h>
  40. #include <stdarg.h>
  41. #include <ctype.h>
  42. /*
  43. ==========================================================
  44. OpenJPEG interface
  45. ==========================================================
  46. */
  47. #include "openjpeg.h"
  48. /*
  49. ==========================================================
  50. OpenJPEG modules
  51. ==========================================================
  52. */
  53. /* Ignore GCC attributes if this is not GCC */
  54. #ifndef __GNUC__
  55. #define __attribute__(x) /* __attribute__(x) */
  56. #endif
  57. /*
  58. The inline keyword is supported by C99 but not by C90.
  59. Most compilers implement their own version of this keyword ...
  60. */
  61. #ifndef INLINE
  62. #if defined(_MSC_VER)
  63. #define INLINE __forceinline
  64. #elif defined(__GNUC__)
  65. #define INLINE __inline__
  66. #elif defined(__MWERKS__)
  67. #define INLINE inline
  68. #else
  69. /* add other compilers here ... */
  70. #define INLINE
  71. #endif /* defined(<Compiler>) */
  72. #endif /* INLINE */
  73. /* Are restricted pointers available? (C99) */
  74. #if (__STDC_VERSION__ != 199901L)
  75. /* Not a C99 compiler */
  76. #ifdef __GNUC__
  77. #define restrict __restrict__
  78. #else
  79. #define restrict /* restrict */
  80. #endif
  81. #endif
  82. /* MSVC and Borland C do not have lrintf */
  83. #if defined(_MSC_VER) && ! _M_X64
  84. static INLINE long lrintf(float f){
  85. int i;
  86. _asm{
  87. fld f
  88. fistp i
  89. };
  90. return i;
  91. }
  92. #endif
  93. #include "j2k_lib.h"
  94. #include "opj_malloc.h"
  95. #include "event.h"
  96. #include "cio.h"
  97. #include "image.h"
  98. #include "j2k.h"
  99. #include "jp2.h"
  100. #include "jpt.h"
  101. #include "mqc.h"
  102. #include "raw.h"
  103. #include "bio.h"
  104. #include "tgt.h"
  105. #include "pi.h"
  106. #include "tcd.h"
  107. #include "t1.h"
  108. #include "dwt.h"
  109. #include "t2.h"
  110. #include "mct.h"
  111. #include "int.h"
  112. #include "fix.h"
  113. /* JPWL>> */
  114. #ifdef USE_JPWL
  115. #include "../jpwl/jpwl.h"
  116. #endif /* USE_JPWL */
  117. /* <<JPWL */
  118. #endif /* OPJ_INCLUDES_H */