ippwrapper.h 6.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265
  1. /*
  2. * NICE-Core - efficient algebra and computer vision methods
  3. * - libimage - An image library
  4. * See file License for license information.
  5. */
  6. #ifndef _LIMUNIMAGE_IPPWRAPPER_H
  7. #define _LIMUNIMAGE_IPPWRAPPER_H
  8. #ifdef NICE_USELIB_IPP
  9. #include <ippdefs.h>
  10. #include "ippi.h"
  11. #include <ipps.h>
  12. #include <ippcv.h>
  13. #include <ippcore.h>
  14. #include <ippcc.h>
  15. #else // NICE_USELIB_IPP
  16. #ifndef IPPWRAPPER_DEFS
  17. #define IPPWRAPPER_DEFS
  18. typedef unsigned char Ipp8u;
  19. typedef char Ipp8s;
  20. typedef signed short Ipp16s;
  21. typedef unsigned short Ipp16u;
  22. typedef signed int Ipp32s;
  23. typedef unsigned int Ipp32u;
  24. typedef float Ipp32f;
  25. typedef double Ipp64f;
  26. typedef long long Ipp64s;
  27. typedef unsigned long long Ipp64u;
  28. typedef enum {
  29. ippStsSingularErr = -195,
  30. ippStsDataTypeErr = -12,
  31. ippStsOutOfRangeErr = -11,
  32. ippStsDivByZeroErr = -10,
  33. ippStsMemAllocErr = -9,
  34. ippStsNullPtrErr = -8,
  35. ippStsRangeErr = -7,
  36. ippStsSizeErr = -6,
  37. ippStsBadArgErr = -5,
  38. ippStsNoMemErr = -4,
  39. ippStsErr = -2,
  40. ippStsNoErr = 0,
  41. ippStsDivByZero = 6
  42. } IppStatus;
  43. #define ippStsOk ippStsNoErr
  44. typedef enum {
  45. ippCmpLess,
  46. ippCmpLessEq,
  47. ippCmpEq,
  48. ippCmpGreaterEq,
  49. ippCmpGreater
  50. } IppCmpOp;
  51. typedef enum {
  52. ippAlgHintNone,
  53. ippAlgHintFast,
  54. ippAlgHintAccurate
  55. } IppHintAlgorithm;
  56. typedef enum {
  57. ippRndZero,
  58. ippRndNear
  59. } IppRoundMode;
  60. #endif // IPPWRAPPER_DEFS
  61. enum {
  62. IPPI_INTER_NN = 1,
  63. IPPI_INTER_LINEAR = 2,
  64. IPPI_INTER_CUBIC = 4,
  65. IPPI_INTER_SUPER = 8,
  66. IPPI_SMOOTH_EDGE = (1 << 31)
  67. };
  68. typedef struct {
  69. int x;
  70. int y;
  71. int width;
  72. int height;
  73. } IppiRect;
  74. typedef struct {
  75. int x;
  76. int y;
  77. } IppiPoint;
  78. typedef struct {
  79. int width;
  80. int height;
  81. } IppiSize;
  82. typedef enum {
  83. ippAxsHorizontal,
  84. ippAxsVertical,
  85. ippAxsBoth
  86. } IppiAxis;
  87. typedef enum _IppiBorderType {
  88. ippBorderConst = 0,
  89. ippBorderRepl = 1,
  90. ippBorderWrap = 2,
  91. ippBorderMirror = 3,
  92. ippBorderMirrorR = 4,
  93. ippBorderMirror2 = 5,
  94. ippBorderInMem = 6,
  95. ippBorderInMemTop = 0x0010,
  96. ippBorderInMemBottom = 0x0020
  97. } IppiBorderType;
  98. typedef enum {
  99. ippDitherNone,
  100. ippDitherFS,
  101. ippDitherJJN,
  102. ippDitherStucki,
  103. ippDitherBayer
  104. } IppiDitherType;
  105. typedef enum _IppiMaskSize {
  106. ippMskSize1x3 = 13,
  107. ippMskSize1x5 = 15,
  108. ippMskSize3x1 = 31,
  109. ippMskSize3x3 = 33,
  110. ippMskSize5x1 = 51,
  111. ippMskSize5x5 = 55
  112. } IppiMaskSize;
  113. typedef enum {
  114. ippAlphaOver,
  115. ippAlphaIn,
  116. ippAlphaOut,
  117. ippAlphaATop,
  118. ippAlphaXor,
  119. ippAlphaPlus,
  120. ippAlphaOverPremul,
  121. ippAlphaInPremul,
  122. ippAlphaOutPremul,
  123. ippAlphaATopPremul,
  124. ippAlphaXorPremul,
  125. ippAlphaPlusPremul
  126. } IppiAlphaType;
  127. typedef enum _IppiNorm {
  128. ippiNormInf = 0,
  129. ippiNormL1 = 1,
  130. ippiNormL2 = 2
  131. } IppiNorm;
  132. typedef enum _IppiKernelType {
  133. ippKernelSobel = 0,
  134. ippKernelScharr = 1
  135. } IppiKernelType;
  136. typedef struct _IppiConnectedComp {
  137. Ipp64f area; /* area of the segmented component */
  138. Ipp64f value[3]; /* gray scale value of the segmented component */
  139. IppiRect rect; /* bounding rectangle of the segmented component */
  140. } IppiConnectedComp;
  141. typedef struct _IppiPyramid {
  142. Ipp8u **pImage;
  143. IppiSize *pRoi;
  144. Ipp64f *pRate;
  145. int *pStep;
  146. Ipp8u *pState;
  147. int level;
  148. // int channels;
  149. // int depth;
  150. } IppiPyramid;
  151. typedef struct {
  152. Ipp32f x;
  153. Ipp32f y;
  154. } IppiPoint_32f;
  155. struct ipcvHaarClassifier_32f;
  156. typedef struct ipcvHaarClassifier_32f IppiHaarClassifier_32f;
  157. struct ipcvHaarClassifier_32s;
  158. typedef struct ipcvHaarClassifier_32s IppiHaarClassifier_32s;
  159. struct MomentState64f;
  160. struct MomentState64s;
  161. typedef struct MomentState64f IppiMomentState_64f;
  162. typedef struct MomentState64s IppiMomentState_64s;
  163. struct ipcvMorphState;
  164. typedef struct ipcvMorphState IppiMorphState;
  165. struct ipcvMorphAdvState;
  166. typedef struct ipcvMorphAdvState IppiMorphAdvState;
  167. struct ipcvMorphGrayState_8u;
  168. typedef struct ipcvMorphGrayState_8u IppiMorphGrayState_8u;
  169. struct ipcvMorphGrayState_32f;
  170. typedef struct ipcvMorphGrayState_32f IppiMorphGrayState_32f;
  171. struct OptFlowPyrLK;
  172. typedef struct OptFlowPyrLK IppiOptFlowPyrLK;
  173. typedef IppiOptFlowPyrLK IppiOptFlowPyrLK_8u_C1R;
  174. typedef IppiOptFlowPyrLK IppiOptFlowPyrLK_16u_C1R;
  175. typedef IppiOptFlowPyrLK IppiOptFlowPyrLK_32f_C1R;
  176. struct DeconvFFTState_32f_C1R;
  177. typedef struct DeconvFFTState_32f_C1R IppiDeconvFFTState_32f_C1R;
  178. struct DeconvFFTState_32f_C3R;
  179. typedef struct DeconvFFTState_32f_C3R IppiDeconvFFTState_32f_C3R;
  180. struct DeconvLR_32f_C1R;
  181. typedef struct DeconvLR_32f_C1R IppiDeconvLR_32f_C1R;
  182. struct DeconvLR_32f_C3R;
  183. typedef struct DeconvLR_32f_C3R IppiDeconvLR_32f_C3R;
  184. struct DFT2DSpec_C_32fc;
  185. typedef struct DFT2DSpec_C_32fc IppiDFTSpec_C_32fc;
  186. struct DFT2DSpec_R_32f;
  187. typedef struct DFT2DSpec_R_32f IppiDFTSpec_R_32f;
  188. struct DFT2DSpec_R_32s;
  189. typedef struct DFT2DSpec_R_32s IppiDFTSpec_R_32s;
  190. struct FFT2DSpec_C_32fc;
  191. typedef struct FFT2DSpec_C_32fc IppiFFTSpec_C_32fc;
  192. struct FFT2DSpec_R_32f;
  193. typedef struct FFT2DSpec_R_32f IppiFFTSpec_R_32f;
  194. struct FFT2DSpec_R_32s;
  195. typedef struct FFT2DSpec_R_32s IppiFFTSpec_R_32s;
  196. struct DCT2DFwdSpec_32f;
  197. typedef struct DCT2DFwdSpec_32f IppiDCTFwdSpec_32f;
  198. struct DCT2DInvSpec_32f;
  199. typedef struct DCT2DInvSpec_32f IppiDCTInvSpec_32f;
  200. struct iWTFwdSpec_32f_C1R;
  201. typedef struct iWTFwdSpec_32f_C1R IppiWTFwdSpec_32f_C1R;
  202. struct iWTInvSpec_32f_C1R;
  203. typedef struct iWTInvSpec_32f_C1R IppiWTInvSpec_32f_C1R;
  204. struct iWTFwdSpec_32f_C3R;
  205. typedef struct iWTFwdSpec_32f_C3R IppiWTFwdSpec_32f_C3R;
  206. struct iWTInvSpec_32f_C3R;
  207. typedef struct iWTInvSpec_32f_C3R IppiWTInvSpec_32f_C3R;
  208. #endif // !NICE_USELIB_IPP
  209. //#ifdef __GNUC__
  210. #include "core/image/ippwrapper.tcc"
  211. //#endifö
  212. #endif