opj_includes.h 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140
  1. /*
  2. * Copyright (c) 2005, Herve 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) || defined(__BORLANDC__)
  84. static INLINE long lrintf(float f){
  85. #ifdef _M_IX86
  86. long int i;
  87. _asm{
  88. fld f
  89. fistp i
  90. };
  91. return i;
  92. #else
  93. return (long)((f>0.0f) ? (f + 0.5f):(f -0.5f));
  94. #endif /* _M_IX86 */
  95. }
  96. #endif
  97. #include "j2k_lib.h"
  98. #include "opj_malloc.h"
  99. #include "event.h"
  100. #include "bio.h"
  101. #include "cio.h"
  102. #include "image.h"
  103. #include "j2k.h"
  104. #include "jp2.h"
  105. #include "jpt.h"
  106. #include "mqc.h"
  107. #include "raw.h"
  108. #include "bio.h"
  109. #include "tgt.h"
  110. #include "pi.h"
  111. #include "tcd.h"
  112. #include "t1.h"
  113. #include "dwt.h"
  114. #include "t2.h"
  115. #include "mct.h"
  116. #include "int.h"
  117. #include "fix.h"
  118. #include "cidx_manager.h"
  119. #include "indexbox_manager.h"
  120. /* JPWL>> */
  121. #ifdef USE_JPWL
  122. #include "./jpwl/jpwl.h"
  123. #endif /* USE_JPWL */
  124. /* <<JPWL */
  125. #endif /* OPJ_INCLUDES_H */