ippr.h 50 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042
  1. /* /////////////////////////////////////////////////////////////////////////////
  2. //
  3. // INTEL CORPORATION PROPRIETARY INFORMATION
  4. // This software is supplied under the terms of a license agreement or
  5. // nondisclosure agreement with Intel Corporation and may not be copied
  6. // or disclosed except in accordance with the terms of that agreement.
  7. // Copyright(c) 2006-2009 Intel Corporation. All Rights Reserved.
  8. //
  9. // Intel(R) Performance Primitives
  10. // Realistic Rendering Library (ippRR)
  11. //
  12. */
  13. #if !defined( __IPPR_H__ ) || defined( _OWN_BLDPCS )
  14. #define __IPPR_H__
  15. #if defined (_WIN32_WCE) && defined (_M_IX86) && defined (__stdcall)
  16. #define _IPP_STDCALL_CDECL
  17. #undef __stdcall
  18. #endif
  19. #ifndef __IPPDEFS_H__
  20. #include "ippdefs.h"
  21. #endif
  22. #ifdef __cplusplus
  23. extern "C" {
  24. #endif
  25. #if !defined( _OWN_BLDPCS )
  26. typedef float IppPoint2D_32f[2];
  27. typedef float IppPoint3D_32f[3];
  28. typedef float IppVector3D_32f[4];
  29. typedef IppPoint3D_32f IppBox3D_32f[2];
  30. typedef IppPoint3D_32f IppTriangle3D_32f[3];
  31. typedef struct TriangleAccel IpprTriangleAccel;
  32. typedef struct KDTreeNode{
  33. Ipp32s flag_k_ofs;
  34. union _tree_data{
  35. Ipp32f split;
  36. Ipp32s items;
  37. }tree_data;
  38. }IpprKDTreeNode;
  39. typedef struct IntersectContext{
  40. IppBox3D_32f *pBound; /* pointer to bounding box for a whole object */
  41. IpprTriangleAccel *pAccel; /* pointer to triangle acceleration structure */
  42. IpprKDTreeNode *pRootNode; /* pointer to KD-tree root node */
  43. }IpprIntersectContext;
  44. /* Tree building algorithm identifiers */
  45. typedef enum {
  46. ippKDTBuildSimple = 0x499d3dc2, /* Simple building mode */
  47. ippKDTBuildPureSAH = 0x2d07705b /* SAH building mode */
  48. }IpprKDTreeBuildAlg;
  49. /* Context for simple building mode */
  50. typedef struct SimpleBuilderContext{
  51. IpprKDTreeBuildAlg Alg; /* Must be equal to ippKDTBuildSimple constant */
  52. Ipp32s MaxDepth; /* Subdivision depth (with middle point subdivision) */
  53. }IpprSmplBldContext;
  54. /* Context for SAH building mode */
  55. typedef struct PSAHBuilderContext{
  56. IpprKDTreeBuildAlg Alg; /* Must be equal to ippKDTBuildPureSAH constant */
  57. Ipp32s MaxDepth; /* Maximum tree subdivision depth (minimum - 0, maximum - 51) */
  58. Ipp32f QoS; /* Termination criteria modifier */
  59. Ipp32s AvailMemory; /* Maximum available memory in Mb */
  60. IppBox3D_32f *Bounds; /* Cut-off bounding box */
  61. }IpprPSAHBldContext;
  62. typedef enum {
  63. ippNormInd = 3,
  64. ippTriInd = 4
  65. } IpprIndexType;
  66. typedef enum _IpprSHType{
  67. ipprSHNormDirect=0, /* Normalized Spherical harmonic functions, direct computation */
  68. ipprSHNormRecurr /* Normalized Spherical harmonic functions, recurrent computation */
  69. }IpprSHType;
  70. typedef struct rSHState IpprSHState;
  71. #endif /* _OWN_BLDPCS */
  72. /* /////////////////////////////////////////////////////////////////////////////
  73. ////////////////////////////////////////////////////////////////////////////////
  74. // Functions declarations
  75. ////////////////////////////////////////////////////////////////////////////////
  76. ///////////////////////////////////////////////////////////////////////////// */
  77. /* /////////////////////////////////////////////////////////////////////////////
  78. // Name: ipprGetLibVersion
  79. // Purpose: getting of the library version
  80. // Returns: the structure of information about version
  81. // of ippRR library
  82. // Parameters:
  83. //
  84. // Notes: not necessary to release the returned structure
  85. */
  86. IPPAPI( const IppLibraryVersion*, ipprGetLibVersion, (void) )
  87. /* /////////////////////////////////////////////////////////////////////////////
  88. // Acceleration Functions
  89. //////////////////////////////////////////////////////////////////////////////// */
  90. /* ///////////////////////////////////////////////////////////////////////////
  91. // Name:
  92. // ipprTriangleAccelInit
  93. // Purpose:
  94. // Initialize a IpprtTriangleAccel for future usage in ipprIntersect...
  95. // Input Arguments:
  96. // pVertexCoord - pointer to the array of vertex coordinate.
  97. // pTrnglIndex - pointer to the triangle's indexes.
  98. // cntTrngl - the number of triangles.
  99. // Input Arguments:
  100. // pTrnglAccel - pointer to the structure IpprTriangleAccel
  101. // Returns:
  102. // ippStsNoErr No error.
  103. */
  104. IPPAPI(IppStatus, ipprTriangleAccelInit,(
  105. IpprTriangleAccel* pTrnglAccel,const Ipp32f* pVertexCoord,const Ipp32s* pTrnglIndex,int cntTrngl ))
  106. /* ///////////////////////////////////////////////////////////////////////////
  107. // Name:
  108. // ipprTriangleAccelGetSize
  109. //
  110. // Purpose:
  111. // Return size of IpprtTriangleAccel
  112. // Parameters:
  113. // pTrnglAccelSize - pointer to the resulting size of the structure
  114. // IpprtTriangleAccel
  115. // Returns:
  116. // ippStsNoErr No error.
  117. // ippStsNullPtrErr Indicates an error when pointer pTrnglAccelSize is NULL.
  118. */
  119. IPPAPI(IppStatus, ipprTriangleAccelGetSize,(int* pTrnglAccelSize))
  120. /* ///////////////////////////////////////////////////////////////////////////
  121. Name:
  122. ippiKDTreeBuildAlloc
  123. Purpose:
  124. Build the k-D tree for the set of triangles using one of predefined construction
  125. algorithms controlled by service parameters context.
  126. Parameters:
  127. pDstKDTree - address of a pointer to the built tree;
  128. pSrcVert - pointer to the scene element vertices array;
  129. pSrcTriInx - pointer to the scene element indexed triangles array;
  130. SrcVertSize - size of vertices array;
  131. SrcTriSize - size of triangles array;
  132. pDstKDTreeSize - address of the built tree size;
  133. QoS - fuzzy quality control parameter. takes values from 0.0 to 1.0;
  134. AlgType - type of tree construction algorithm
  135. Returns:
  136. ippStsNoErr No error.
  137. ippStsNullPtrErr Indicates an error when one of the pointers is NULL.
  138. ippStsSizeErr Wrong (negative) size of one of arrays.
  139. ippStsOutOfRangeErr QoS is out of [0.0, 1.0] range.
  140. ippStsNoMemErr Not enough memory for the tree construction algorithm.
  141. ippStsBadArgErr Unknown algorithm type.
  142. */
  143. IPPAPI(IppStatus, ipprKDTreeBuildAlloc,(
  144. IpprKDTreeNode **pDstKDTree,
  145. const Ipp32f * const pSrcVert,
  146. const Ipp32s * const pSrcTriInx,
  147. Ipp32s SrcVertSize,
  148. Ipp32s SrcTriSize,
  149. Ipp32s *pDstKDTreeSize,
  150. const void * const pBldContext))
  151. /* ///////////////////////////////////////////////////////////////////////////
  152. Name:
  153. ippiKDTreeFree
  154. Purpose:
  155. Frees memory allocated for the k-D tree during ippiKDTreeBuildAlloc.
  156. Parameters:
  157. pSrcKDTree - a pointer to the k-D tree;
  158. Returns:
  159. */
  160. IPPAPI(void, ipprKDTreeFree,(
  161. IpprKDTreeNode *pSrcKDTree))
  162. /* /////////////////////////////////////////////////////////////////////////////
  163. // Ray-scene Intersection Engine
  164. ////////////////////////////////////////////////////////////////////////////// */
  165. /* /////////////////////////////////////////////////////////////////////////////
  166. // Names: ipprIntersectMO_32f
  167. // Purpose: Calculates intersection points of rays with triangles,the indexes those triangles,
  168. // the distances from origin points to intersection points.
  169. //
  170. // Input Arguments:
  171. // pOrigin - array of pointers to a separate coordinates(x,y,z)of planes of the origin points..
  172. // pDirection - array of pointers to a separate coordinates(x,y,z)of planes of the ray's directions.
  173. // pContext - pointer to the intersection's context.
  174. // blockSize - size of rays' block.
  175. // Input/Output Arguments:
  176. // pDist - pointer to the distance from origin to intersection point. Else it is input value.
  177. // As input pDist[i] should be 0.f if you don't want to process this ray.
  178. // Output Arguments:
  179. // pHit - pointer to the local surface parameters( u, v )at hit point in case of intersection was found.
  180. // pTrngl - pointer to the Triangle index in case of intersection was found. Else it is -1.
  181. // Returns:
  182. // ippStsNoErr No errors
  183. // ippStsNoMemErr The node stack is overfilled.
  184. */
  185. IPPAPI(IppStatus,ipprIntersectMO_32f,(
  186. const Ipp32f* const pOrigin[3],
  187. const Ipp32f* const pDirection[3],
  188. Ipp32f* pDist,
  189. Ipp32f* pHit[2],
  190. Ipp32s* pTrngl,
  191. const IpprIntersectContext* pContext,
  192. IppiSize blockSize
  193. ))
  194. /* /////////////////////////////////////////////////////////////////////////////
  195. // Names: ipprIntersectEyeSO_32f
  196. // Purpose: Calculates intersection points of rays with triangles,the indexes those triangles,
  197. // the distances from origin points to intersection points.
  198. //
  199. // Input Arguments:
  200. // originEye - origin point.All rays have a single origin.
  201. // pDirection - array of pointers to a separate coordinates(x,y,z)of planes of the ray's directions.
  202. // pContext - pointer to the intersection's context.
  203. // blockSize - size of rays' block.
  204. // Output Arguments:
  205. // pDist - pointer to the distance from origin to intersection point. Else it is IPP_MAXABS_32F.
  206. // pHit - pointer to the local surface parameters( u, v )at hit point in case of intersection was found.
  207. // pTrngl - pointer to the Triangle index in case of intersection was found. Else it is -1.
  208. // Returns:
  209. // ippStsNoErr No errors
  210. // ippStsNoMemErr The node stack is overfilled.
  211. */
  212. IPPAPI(IppStatus,ipprIntersectEyeSO_32f,(
  213. IppPoint3D_32f originEye,
  214. const Ipp32f* const pDirection[3],
  215. Ipp32f* pDist,
  216. Ipp32f* pHit[2],
  217. Ipp32s* pTrngl,
  218. const IpprIntersectContext* pContext,
  219. IppiSize blockSize
  220. ))
  221. /* /////////////////////////////////////////////////////////////////////////////
  222. // Names: ipprIntersectMultipleSO_32f
  223. // Purpose: Calculates intersection points of rays with triangles,the indexes those triangles,
  224. // the distances from origin points to intersection points.
  225. //
  226. //Input parameters:
  227. // originEye origin point.All rays have a single origin.
  228. // pDirection 2D array of pointers to the vectors of directions.
  229. // pContext Pointer to the intersection context.
  230. // blockVolume blockVolume.width * blockVolume.height is total number of the rays.
  231. // blockVolume.depth - the specified number of the scene triangles.
  232. //Input Output parameters:
  233. //pDist Pointer to the 3D array of distances between the hit point and origin of the rays.
  234. //Output parameters:
  235. //pHit 3D array of pointers to the local surface parameters (u, v) at the hit
  236. // point if the intersection is found.
  237. //pTrngl Pointer to the 3D array of triangle indexes if the intersection is found. If not it is set to-1.
  238. // Returns:
  239. // ippStsNoErr No errors
  240. */
  241. IPPAPI(IppStatus,ipprIntersectMultipleSO_32f,(
  242. IppPoint3D_32f originEye,
  243. const Ipp32f* const pDirection[3],
  244. Ipp32f* pDistance,
  245. Ipp32f* pHit[2],
  246. Ipp32s* pTrngl,
  247. IpprVolume blockVolume,
  248. const IpprIntersectContext* pContext
  249. ))
  250. /* /////////////////////////////////////////////////////////////////////////////
  251. // Names: ipprIntersectAnySO_32f
  252. // Purpose: performs occlusion tests for block of rays with single origin.
  253. //
  254. // Input Arguments:
  255. // originEye - origin point.All rays have a single origin.
  256. // pDirection - array of pointers to a separate coordinates(x,y,z)of planes of the ray's directions.
  257. // pContext - pointer to the intersection's context.
  258. // blockSize - size of rays' block.
  259. // Input/Output Arguments:
  260. // pMask - pointer to the array of the mask. If output pMask[i][j] = 0, occlusion test for this ray is true.
  261. // Else it is input value.
  262. // As input pMask[i][j] should be 0 if you don't want to process this ray.Else it should be -1.
  263. // pTrngl - pointer to the Triangle index in case of intersection was found. Else it is -1.
  264. // Returns:
  265. // ippStsNoErr No errors
  266. // ippStsNoMemErr The node stack is overfilled.
  267. */
  268. IPPAPI(IppStatus,ipprIntersectAnySO_32f,(
  269. IppPoint3D_32f originEye,
  270. const Ipp32f* const pDirection[3],
  271. Ipp32s* pOccluder,
  272. Ipp32s* pMask,
  273. IppiSize blockSize,
  274. const IpprIntersectContext* pContext
  275. ))
  276. /* /////////////////////////////////////////////////////////////////////////////
  277. // Shaders Support Functions
  278. //////////////////////////////////////////////////////////////////////////////// */
  279. /* /////////////////////////////////////////////////////////////////////////////
  280. // Name: ipprMul_32f_C1P3IM
  281. // Purpose: Purpose: multiplies each element of three vectors of the accumulator (pSrcDst)
  282. // for which the corresponding element of a vector of a mask more or is equal to zero,
  283. // by an element of an source vector.
  284. // Name: ipprMul_32f_IM
  285. // Purpose: Multiplies an element of the accumulator (pSrcDst)
  286. // for which the corresponding element of a vector of a mask more or is equal to zero,
  287. // by an element of an source vector.
  288. // Input Arguments:
  289. // pSrc - pointer to the first source vector
  290. // pMask - pointer to the first mask's vector
  291. // len length of the vectors
  292. // Input/Output Arguments:
  293. // pSrcDst - pointer to the source/destination (accumulator) vectors.
  294. // Returns:
  295. // ippStsNoErr No errors
  296. */
  297. IPPAPI(IppStatus,ipprMul_32f_C1P3IM,( const Ipp32f* pSrc, const Ipp32s* pMask,
  298. Ipp32f* pSrcDst[3], int len ))
  299. IPPAPI(IppStatus,ipprMul_32f_C1IM,( const Ipp32f* pSrc, const Ipp32s* pMask,
  300. Ipp32f* pSrcDst, int len ))
  301. /* /////////////////////////////////////////////////////////////////////////////
  302. // Name: ipprAddMulMul_32f_AC1P3IM
  303. // Purpose: multiplies elements of two triplex source vectors and adds product
  304. // to triplex of the accumulator vectors ???
  305. // Input Arguments:
  306. // point - source point.
  307. // pSrc0 - pointer to the first source vector
  308. // pSrc1 - pointer to the second source vector
  309. // pMask - pointer to the mask's vector
  310. // len - length of the vectors
  311. // Output Arguments:
  312. // pSrcDst - pointer to the source/destination (accumulator) vector.
  313. // Notes:
  314. // pSrcDst[0][n] = pSrcDst[0][n] + pSrc1[n] * pSrc2[n] * point[0], n=0,1,2,..len-1.
  315. // pSrcDst[1][n] = pSrcDst[1][n] + pSrc1[n] * pSrc2[n] * point[1],
  316. // pSrcDst[2][n] = pSrcDst[2][n] + pSrc1[n] * pSrc2[n] * point[2],
  317. // E.g for Lambertian cosine low.
  318. // Returns:
  319. // ippStsNoErr No errors
  320. */
  321. IPPAPI(IppStatus,ipprAddMulMul_32f_AC1P3IM,(
  322. IppPoint3D_32f point,
  323. const Ipp32f* pSrc0,
  324. const Ipp32f* const pSrc1[3],
  325. const Ipp32s* pMask,
  326. Ipp32f* pSrcDst[3],
  327. int len
  328. ))
  329. /* /////////////////////////////////////////////////////////////////////////////
  330. // Name: ipprDiv_32f_C1IM
  331. // Purpose: divides an element of the accumulator (pSrcDst) for which the corresponding
  332. // element of a vector of a mask more or is equal to zero, into an element of an source vector.
  333. // Input Arguments:
  334. // pSrc - pointer to the divisor source vector
  335. // pMask - pointer to the mask vector.
  336. // len - vector's length, number of items.
  337. // Input-Output Argument:
  338. // pSrcDst - pointer to the source/destination (accumulator) vector.
  339. //
  340. // Returns:
  341. // ippStsNoErr No errors
  342. */
  343. IPPAPI(IppStatus,ipprDiv_32f_C1IM,(const Ipp32f* pSrc, const Ipp32s* pMask, Ipp32f* pSrcDst, int len ))
  344. /* ///////////////////////////////////////////////////////////////////////////
  345. // Name:
  346. // ipprDot_32f_P3C1M
  347. // Purpose:
  348. // calculates dot product of the incident ray directions and normales of surface.
  349. // Input Arguments:
  350. // pDirection - pointer to array of pointers to a separate coordinates(x,y,z)of planes of the ray's directions.
  351. // pDist - pointer to the IpprPointsOnRays_SO structure
  352. // pSurfNorm - pointer to the surface's normals.
  353. // Output arguments:
  354. // pSurfDotIn - pointer to the dot product.
  355. // Returns:
  356. // ippStsNoErr No errors
  357. */
  358. IPPAPI(IppStatus, ipprDot_32f_P3C1M,( const Ipp32f* const pSrc0[3],
  359. const Ipp32f* const pSrc1[3],const Ipp32s* pMask, Ipp32f* pDot, int len ))
  360. IPPAPI(IppStatus, ipprDotChangeNorm_32f_IM,( const Ipp32f* const pSrc[3],
  361. const Ipp32s* pMask, Ipp32f* pSrcDst[3],Ipp32f* pDot,int len ))
  362. /* ///////////////////////////////////////////////////////////////////////////
  363. // Name:
  364. // ipprDot_32f_M
  365. */
  366. IPPAPI(IppStatus, ipprDistAttenuationSO_32f_M,( IppPoint3D_32f point, const Ipp32f* const pSurfHit[3],
  367. const Ipp32s* pMask, Ipp32f* pDist, int len ))
  368. /* /////////////////////////////////////////////////////////////////////////////
  369. // Rays' casting
  370. //////////////////////////////////////////////////////////////////////////////// */
  371. /* /////////////////////////////////////////////////////////////////////////////
  372. // Name: ipprCastEye_32f
  373. // Purpose: to calculate the primary ray's vectors.
  374. // Input Arguments:
  375. // imPlaneOrg - the coordinate of origin the projection's plane.
  376. // dW - a step along width of the projection's plane.
  377. // dH - a step along height of the projection's plane.
  378. // wB - the number of block along width of Image.
  379. // hB - the number of block along height of Image.
  380. // cBlock - total number of rays in the block
  381. // blockSize - total number of the rays in the current block.
  382. // Input-Output Argument:
  383. // pDirection - pointer to the destination vector. It is not normalised.
  384. // Returns:
  385. // ippStsNoErr No errors
  386. */
  387. IPPAPI(IppStatus,ipprCastEye_32f,(
  388. IppPoint3D_32f imPlaneOrg,
  389. IppPoint3D_32f dW,
  390. IppPoint3D_32f dH,
  391. int wB,int hB,
  392. IppiSize cBlock,
  393. Ipp32f* pDirection[3],
  394. IppiSize blockSize ))
  395. /* /////////////////////////////////////////////////////////////////////////////
  396. // Names: ipprCastShadowSO_32f
  397. // Purpose: calculates block of shadow rays. for which the corresponding
  398. // element of a vector of a pMask more or is equal to zero.
  399. // Input Arguments:
  400. // pOrigin - pointer to the origin point.
  401. // pSurfDotIn - pointer to the vector of dot products of incident rays and normals
  402. // at intersections point.
  403. // pSurfNorm - pointer to array of pointers to a separate coordinates(x,y,z)of planes
  404. // of normals at intersections point.
  405. // pSurfHit - pointer to array of pointers to a separate coordinates(x,y,z)of planes of the intersection points.
  406. // pMask - pointer to the mask vector.
  407. // Output Arguments:
  408. // pDirection - pointer to the destination vector. Shouldn't be normalised.
  409. // pDist - . Here it is can be 0.f or 1.f
  410. // pDotRay - pointer to the vector of dot products of shadow rays and normals.
  411. // Returns:
  412. // ippStsNoErr No errors
  413. */
  414. IPPAPI(IppStatus,ipprCastShadowSO_32f,(
  415. IppPoint3D_32f pOrigin,
  416. const Ipp32f* pSurfDotIn,
  417. const Ipp32f* const pSurfNorm[3],
  418. const Ipp32f* const pSurfHit[3],
  419. Ipp32s* pMask,
  420. Ipp32f* pDotRay,
  421. Ipp32f* pDirection[3],
  422. int len
  423. ))
  424. /* /////////////////////////////////////////////////////////////////////////////
  425. // Names: ipprCastReflectionRay_32f
  426. // Purpose: calculates array of reflected rays, for which the corresponding
  427. // element of a vector of a mask more or is equal to zero.
  428. //
  429. // Input Arguments:
  430. // pIncident - pointer to the array of vectors of incident rays.
  431. // pMask - pointer to the mask vector.
  432. // pSurfNorm - pointer to array of pointers to a separate coordinates(x,y,z)of planes
  433. // of normals at intersections point.
  434. // Output Arguments:
  435. // pReflect - pointer to the array of rflected vectors.
  436. // Returns:
  437. // ippStsNoErr No errors
  438. */
  439. IPPAPI(IppStatus,ipprCastReflectionRay_32f,(
  440. const Ipp32f* const pInc[3],
  441. const Ipp32s* pMask,
  442. const Ipp32f* const pSurfNorm[3],
  443. Ipp32f* pReflect[3],
  444. int len ))
  445. /* /////////////////////////////////////////////////////////////////////////////
  446. // Surface properties ( pSurfHit, pSurfNorm, pSurfDotIn )
  447. //////////////////////////////////////////////////////////////////////////////// */
  448. /* /////////////////////////////////////////////////////////////////////////////
  449. // Name:
  450. // ipprHitPoint3DS0_32f/ipprHitPoint3DM0_32f
  451. // Purpose:
  452. // calculates explicit intersection coordinates in world coordinate system for a block
  453. // of rays from single/multiple origin.
  454. // Input Arguments:
  455. // pDist - generalized distance from origin to intersection point.
  456. // originEye - origin point. All rays have a single origin.
  457. // pOrigin - pointer to array of pointers to a separate coordinates(x,y,z)of planes of the origin points.
  458. // pDirection - pointer to array of pointers to a separate coordinates(x,y,z)of planes of the ray's directions.
  459. // blockSize - size of rays' block.
  460. // Output arguments:
  461. // pSurfHit - pointer to array of pointers to a separate coordinates(x,y,z)of planes of the intersection points.
  462. // Returns:
  463. // ippStsNoErr No errors
  464. */
  465. IPPAPI(IppStatus, ipprHitPoint3DEpsS0_32f_M,(
  466. const IppPoint3D_32f originEye,
  467. const Ipp32f* const pDirection[3],
  468. const Ipp32f* pDist,
  469. const Ipp32s* pMask,
  470. Ipp32f* pSurfHit[3],
  471. int len,
  472. Ipp32f eps
  473. ))
  474. IPPAPI(IppStatus, ipprHitPoint3DEpsM0_32f_M,(
  475. const Ipp32f* const pOrigin[3],
  476. const Ipp32f* const pDirection[3],
  477. const Ipp32f* pDist,
  478. const Ipp32s* pMask,
  479. Ipp32f* pSurfHit[3],
  480. int len,
  481. Ipp32f eps
  482. ))
  483. /* /////////////////////////////////////////////////////////////////////////////
  484. // Names: ipprSurfTriangleNormal_32f
  485. // Purpose: calculates the surface's normals from triangles' normals.
  486. //
  487. // Input Arguments:
  488. // pTrnglNorm - pointer to the triangles' normal. Interlived
  489. // pTrngl - pointer to triangles' indexes
  490. // pHit - pointer to the local surface parameters( u, v )at hit point in case of intersection was found.
  491. // blockSize - size of rays' block.
  492. // Output Arguments:
  493. // pSurfNorm - pointer to the surface's normals.
  494. // sameTri ???
  495. // Returns:
  496. // ippStsNoErr No errors
  497. */
  498. IPPAPI(IppStatus, ipprSurfFlatNormal_32f,(
  499. const Ipp32f* pTrnglNorm,
  500. const Ipp32s* pTrngl,
  501. Ipp32f* pSurfNorm[3],
  502. int len
  503. ))
  504. IPPAPI(IppStatus, ipprSurfSmoothNormal_32f,(
  505. const Ipp32f* pVertNorm,
  506. const Ipp32s* pIndexNorm,
  507. const Ipp32s* pTrngl,
  508. const Ipp32f* const pHit[2],
  509. Ipp32f* pSurfNorm[3], int len, IpprIndexType ippInd
  510. ))
  511. /* /////////////////////////////////////////////////////////////////////////////
  512. // Helper Functions
  513. //////////////////////////////////////////////////////////////////////////////// */
  514. /* /////////////////////////////////////////////////////////////////////////////
  515. // Names: ipprSetBoundBox_32f
  516. // Purpose: Calculates an axis aligned bounding box for the object.
  517. //
  518. // Input Arguments:
  519. // pVertCoor - pointer to the coordinates of triangle's vertexes.
  520. // lenTri - the number of triangles in the mesh.
  521. // Output Arguments:
  522. // pBound - pointer to the axis aligned bounding box of current object.
  523. // Returns:
  524. // ippStsNoErr No errors
  525. */
  526. IPPAPI(IppStatus, ipprSetBoundBox_32f,(
  527. const Ipp32f* pVertCoor,
  528. int lenTri,
  529. IppBox3D_32f* pBound
  530. ))
  531. /* /////////////////////////////////////////////////////////////////////////////
  532. // Names: ipprTriangleNormal_32f
  533. // Purpose: calculates triangles' normals from object.
  534. //
  535. // Input Arguments:
  536. // pTrnglCoor - pointer to the coordinates of triangle's vertexes.
  537. // pTrnglIndex - pointer to the triangle's indexes.
  538. // lenTri - the number of triangles in the mesh.
  539. // Output Arguments:
  540. // pTrnglNorm - pointer to the triangles' normals.
  541. // Returns:
  542. // ippStsNoErr No errors
  543. */
  544. IPPAPI(IppStatus, ipprTriangleNormal_32f,(
  545. const Ipp32f* pTrnglCoor,
  546. const int* pTrnglIndex,
  547. Ipp32f* pTrnglNorm,
  548. int lenTrngl
  549. ))
  550. /* /////////////////////////////////////////////////////////////////////////////
  551. // 3D Geometric Transform Functions
  552. //////////////////////////////////////////////////////////////////////////////// */
  553. /*
  554. // Name: ipprResizeGetBufSize
  555. // Purpose: Computes the size of an external work buffer (in bytes)
  556. // Parameters:
  557. // srcVOI region of interest of source volume
  558. // dstVOI region of interest of destination volume
  559. // nChannel number of channels
  560. // interpolation type of interpolation to perform for resizing the input volume:
  561. // IPPI_INTER_NN nearest neighbor interpolation
  562. // IPPI_INTER_LINEAR trilinear interpolation
  563. // IPPI_INTER_CUBIC tricubic polynomial interpolation
  564. // including two-parameter cubic filters:
  565. // IPPI_INTER_CUBIC2P_BSPLINE B-spline filter (1, 0)
  566. // IPPI_INTER_CUBIC2P_CATMULLROM Catmull-Rom filter (0, 1/2)
  567. // IPPI_INTER_CUBIC2P_B05C03 special filter with parameters (1/2, 3/10)
  568. // pSize pointer to the external buffer`s size
  569. // Returns:
  570. // ippStsNoErr no errors
  571. // ippStsNullPtrErr pSize == NULL
  572. // ippStsSizeErr width or height or depth of volumes is less or equal zero
  573. // ippStsNumChannelsErr number of channels is not one
  574. // ippStsInterpolationErr (interpolation != IPPI_INTER_NN) &&
  575. // (interpolation != IPPI_INTER_LINEAR) &&
  576. // (interpolation != IPPI_INTER_CUBIC) &&
  577. // (interpolation != IPPI_INTER_CUBIC2P_BSPLINE) &&
  578. // (interpolation != IPPI_INTER_CUBIC2P_CATMULLROM) &&
  579. // (interpolation != IPPI_INTER_CUBIC2P_B05C03)
  580. */
  581. IPPAPI(IppStatus, ipprResizeGetBufSize, (
  582. IpprCuboid srcVOI, IpprCuboid dstVOI, int nChannel, int interpolation, int* pSize))
  583. /*
  584. // Name: ipprResize_<mode>
  585. // Purpose: Performs RESIZE transform of the source volume
  586. // by xFactor, yFactor, zFactor and xShift, yShift, zShift
  587. // |X'| |xFactor 0 0 | |X| |xShift|
  588. // |Y'| = | yFactor 0 | * |Y| + |yShift|
  589. // |Z'| | 0 0 zFactor| |Z| |zShift|
  590. // Parameters:
  591. // pSrc pointer to source volume data (8u_C1V, 16u_C1V, 32f_C1V modes)
  592. // or array of pointers to planes in source volume data
  593. // srcVolume size of source volume
  594. // srcStep step in every plane of source volume
  595. // srcPlaneStep step between planes of source volume (8u_C1V, 16u_C1V, 32f_C1V modes)
  596. // srcVOI volume of interest of source volume
  597. // pDst pointer to destination volume data (8u_C1V and 16u_C1V modes)
  598. // or array of pointers to planes in destination volume data
  599. // dstStep step in every plane of destination volume
  600. // dstPlaneStep step between planes of destination volume (8u_C1V, 16u_C1V, 32f_C1V modes)
  601. // dstVOI volume of interest of destination volume
  602. // xFactor they specify fraction of resizing in X direction
  603. // yFactor they specify fraction of resizing in Y direction
  604. // zFactor they specify fraction of resizing in Z direction
  605. // xShift they specify shifts of resizing in X direction
  606. // yShift they specify shifts of resizing in Y direction
  607. // zShift they specify shifts of resizing in Z direction
  608. // interpolation type of interpolation to perform for resizing the input volume:
  609. // IPPI_INTER_NN nearest neighbor interpolation
  610. // IPPI_INTER_LINEAR trilinear interpolation
  611. // IPPI_INTER_CUBIC tricubic polynomial interpolation
  612. // including two-parameter cubic filters:
  613. // IPPI_INTER_CUBIC2P_BSPLINE B-spline filter (1, 0)
  614. // IPPI_INTER_CUBIC2P_CATMULLROM Catmull-Rom filter (0, 1/2)
  615. // IPPI_INTER_CUBIC2P_B05C03 special filter with parameters (1/2, 3/10)
  616. // pBuffer pointer to work buffer
  617. // Returns:
  618. // ippStsNoErr no errors
  619. // ippStsNullPtrErr pSrc == NULL or pDst == NULL or pBuffer == NULL
  620. // ippStsSizeErr width or height or depth of volumes is less or equal zero
  621. // ippStsWrongIntersectVOI VOI hasn't an intersection with the source or destination volume
  622. // ippStsResizeFactorErr xFactor or yFactor or zFactor is less or equal zero
  623. // ippStsInterpolationErr (interpolation != IPPI_INTER_NN) &&
  624. // (interpolation != IPPI_INTER_LINEAR) &&
  625. // (interpolation != IPPI_INTER_CUBIC) &&
  626. // (interpolation != IPPI_INTER_CUBIC2P_BSPLINE) &&
  627. // (interpolation != IPPI_INTER_CUBIC2P_CATMULLROM) &&
  628. // (interpolation != IPPI_INTER_CUBIC2P_B05C03)
  629. // Notes:
  630. // <mode> are 8u_C1V or 16u_C1V or 32f_C1V or 8u_C1PV or 16u_C1PV or 32f_C1PV
  631. */
  632. IPPAPI(IppStatus, ipprResize_8u_C1V, (
  633. const Ipp8u* pSrc, IpprVolume srcVolume, int srcStep, int srcPlaneStep, IpprCuboid srcVOI,
  634. Ipp8u* pDst, int dstStep, int dstPlaneStep, IpprCuboid dstVOI,
  635. double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
  636. int interpolation, Ipp8u* pBuffer))
  637. IPPAPI(IppStatus, ipprResize_16u_C1V, (
  638. const Ipp16u* pSrc, IpprVolume srcVolume, int srcStep, int srcPlaneStep, IpprCuboid srcVOI,
  639. Ipp16u* pDst, int dstStep, int dstPlaneStep, IpprCuboid dstVOI,
  640. double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
  641. int interpolation, Ipp8u* pBuffer))
  642. IPPAPI(IppStatus, ipprResize_32f_C1V, (
  643. const Ipp32f* pSrc, IpprVolume srcVolume, int srcStep, int srcPlaneStep, IpprCuboid srcVOI,
  644. Ipp32f* pDst, int dstStep, int dstPlaneStep, IpprCuboid dstVOI,
  645. double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
  646. int interpolation, Ipp8u* pBuffer))
  647. IPPAPI(IppStatus, ipprResize_8u_C1PV, (
  648. const Ipp8u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  649. Ipp8u* const pDst[], int dstStep, IpprCuboid dstVOI,
  650. double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
  651. int interpolation, Ipp8u* pBuffer))
  652. IPPAPI(IppStatus, ipprResize_16u_C1PV, (
  653. const Ipp16u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  654. Ipp16u* const pDst[], int dstStep, IpprCuboid dstVOI,
  655. double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
  656. int interpolation, Ipp8u* pBuffer))
  657. IPPAPI(IppStatus, ipprResize_32f_C1PV, (
  658. const Ipp32f* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  659. Ipp32f* const pDst[], int dstStep, IpprCuboid dstVOI,
  660. double xFactor, double yFactor, double zFactor, double xShift, double yShift, double zShift,
  661. int interpolation, Ipp8u* pBuffer))
  662. /*
  663. // Name: ipprWarpAffineGetBufSize
  664. // Purpose: Computes the size of an external work buffer (in bytes)
  665. // Parameters:
  666. // srcVOI region of interest of source volume
  667. // dstVOI region of interest of destination volume
  668. // nChannel number of channels
  669. // interpolation type of interpolation to perform for resizing the input volume:
  670. // IPPI_INTER_NN nearest neighbor interpolation
  671. // IPPI_INTER_LINEAR trilinear interpolation
  672. // IPPI_INTER_CUBIC tricubic polynomial interpolation
  673. // including two-parameter cubic filters:
  674. // IPPI_INTER_CUBIC2P_BSPLINE B-spline filter (1, 0)
  675. // IPPI_INTER_CUBIC2P_CATMULLROM Catmull-Rom filter (0, 1/2)
  676. // IPPI_INTER_CUBIC2P_B05C03 special filter with parameters (1/2, 3/10)
  677. // pSize pointer to the external buffer`s size
  678. // Returns:
  679. // ippStsNoErr no errors
  680. // ippStsNullPtrErr pSize == NULL
  681. // ippStsSizeErr size of source or destination volumes is less or equal zero
  682. // ippStsNumChannelsErr number of channels is not one
  683. // ippStsInterpolationErr (interpolation != IPPI_INTER_NN) &&
  684. // (interpolation != IPPI_INTER_LINEAR) &&
  685. // (interpolation != IPPI_INTER_CUBIC) &&
  686. // (interpolation != IPPI_INTER_CUBIC2P_BSPLINE) &&
  687. // (interpolation != IPPI_INTER_CUBIC2P_CATMULLROM) &&
  688. // (interpolation != IPPI_INTER_CUBIC2P_B05C03)
  689. */
  690. IPPAPI(IppStatus, ipprWarpAffineGetBufSize, (
  691. IpprCuboid srcVOI, IpprCuboid dstVOI, int nChannel, int interpolation, int* pSize))
  692. /*
  693. // Names: ipprWarpAffine_<mode>
  694. // Purpose: Performs AFFINE transform of the source volume by matrix a[3][4]
  695. // |X'| |a00 a01 a02| |X| |a03|
  696. // |Y'| = |a10 a11 a12| * |Y| + |a13|
  697. // |Z'| |a20 a21 a22| |Z| |a23|
  698. // Parameters:
  699. // pSrc array of pointers to planes in source volume data
  700. // srcVolume size of source volume
  701. // srcStep step in every plane of source volume
  702. // srcVOI volume of interest of source volume
  703. // pDst array of pointers to planes in destination volume data
  704. // dstStep step in every plane of destination volume
  705. // dstVOI volume of interest of destination volume
  706. // coeffs affine transform matrix
  707. // interpolation type of interpolation to perform for affine transform the input volume:
  708. // IPPI_INTER_NN nearest neighbor interpolation
  709. // IPPI_INTER_LINEAR trilinear interpolation
  710. // IPPI_INTER_CUBIC tricubic polynomial interpolation
  711. // including two-parameter cubic filters:
  712. // IPPI_INTER_CUBIC2P_BSPLINE B-spline filter (1, 0)
  713. // IPPI_INTER_CUBIC2P_CATMULLROM Catmull-Rom filter (0, 1/2)
  714. // IPPI_INTER_CUBIC2P_B05C03 special filter with parameters (1/2, 3/10)
  715. // pBuffer pointer to work buffer
  716. // Returns:
  717. // ippStsNoErr no errors
  718. // ippStsNullPtrErr pSrc == NULL or pDst == NULL or pBuffer == NULL
  719. // ippStsSizeErr width or height or depth of source volume is less or equal zero
  720. // ippStsWrongIntersectVOI VOI hasn't an intersection with the source or destination volume
  721. // ippStsCoeffErr determinant of the transform matrix Aij is equal to zero
  722. // ippStsInterpolationErr interpolation has an illegal value
  723. // Notes:
  724. // <mode> are 8u_C1PV or 16u_C1PV or 32f_C1PV
  725. */
  726. IPPAPI(IppStatus, ipprWarpAffine_8u_C1PV, (
  727. const Ipp8u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  728. Ipp8u* const pDst[], int dstStep, IpprCuboid dstVOI,
  729. const double coeffs[3][4], int interpolation, Ipp8u* pBuffer))
  730. IPPAPI(IppStatus, ipprWarpAffine_16u_C1PV, (
  731. const Ipp16u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  732. Ipp16u* const pDst[], int dstStep, IpprCuboid dstVOI,
  733. const double coeffs[3][4], int interpolation, Ipp8u* pBuffer))
  734. IPPAPI(IppStatus, ipprWarpAffine_32f_C1PV, (
  735. const Ipp32f* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  736. Ipp32f* const pDst[], int dstStep, IpprCuboid dstVOI,
  737. const double coeffs[3][4], int interpolation, Ipp8u* pBuffer))
  738. /*
  739. // Names: ipprRemap_<mode>
  740. // Purpose: Performs REMAP TRANSFORM of the source volume by remapping
  741. // dst[i,j,k] = src[xMap[i,j,k], yMap[i,j,k], zMap[i,j,k]]
  742. // Parameters:
  743. // pSrc array of pointers to planes in source volume data
  744. // srcVolume size of source volume
  745. // srcStep step in every plane of source volume
  746. // srcVOI volume of interest of source volume
  747. // pxMap array of pointers to images with X coordinates of map
  748. // pyMap array of pointers to images with Y coordinates of map
  749. // pzMap array of pointers to images with Z coordinates of map
  750. // mapStep step in every plane of each map volumes
  751. // pDst array of pointers to planes in destination volume data
  752. // dstStep step in every plane of destination volume
  753. // dstVolume size of destination volume
  754. // interpolation type of interpolation to perform for resizing the input volume:
  755. // IPPI_INTER_NN nearest neighbor interpolation
  756. // IPPI_INTER_LINEAR trilinear interpolation
  757. // IPPI_INTER_CUBIC tricubic polynomial interpolation
  758. // including two-parameter cubic filters:
  759. // IPPI_INTER_CUBIC2P_BSPLINE B-spline filter (1, 0)
  760. // IPPI_INTER_CUBIC2P_CATMULLROM Catmull-Rom filter (0, 1/2)
  761. // IPPI_INTER_CUBIC2P_B05C03 special filter with parameters (1/2, 3/10)
  762. // Returns:
  763. // ippStsNoErr no errors
  764. // ippStsNullPtrErr pSrc == NULL or pDst == NULL or
  765. // pxMap == NULL or pyMap == NULL or pzMap == NULL
  766. // ippStsSizeErr width or height or depth of volumes is less or equal zero
  767. // ippStsInterpolationErr interpolation has an illegal value
  768. // ippStsWrongIntersectVOI srcVOI hasn't intersection with the source volume, no operation
  769. // Notes:
  770. // <mode> are 8u_C1PV or 16u_C1PV or 32f_C1PV
  771. */
  772. IPPAPI(IppStatus, ipprRemap_8u_C1PV, (
  773. const Ipp8u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  774. const Ipp32f* const pxMap[], const Ipp32f* const pyMap[], const Ipp32f* const pzMap[], int mapStep,
  775. Ipp8u* const pDst[], int dstStep, IpprVolume dstVolume, int interpolation))
  776. IPPAPI(IppStatus, ipprRemap_16u_C1PV, (
  777. const Ipp16u* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  778. const Ipp32f* const pxMap[], const Ipp32f* const pyMap[], const Ipp32f* const pzMap[], int mapStep,
  779. Ipp16u* const pDst[], int dstStep, IpprVolume dstVolume, int interpolation))
  780. IPPAPI(IppStatus, ipprRemap_32f_C1PV, (
  781. const Ipp32f* const pSrc[], IpprVolume srcVolume, int srcStep, IpprCuboid srcVOI,
  782. const Ipp32f* const pxMap[], const Ipp32f* const pyMap[], const Ipp32f* const pzMap[], int mapStep,
  783. Ipp32f* const pDst[], int dstStep, IpprVolume dstVolume, int interpolation))
  784. /* /////////////////////////////////////////////////////////////////////////////
  785. // 3D General Linear Filters
  786. //////////////////////////////////////////////////////////////////////////////// */
  787. /*
  788. // Name: ipprFilterGetBufSize
  789. // Purpose: Computes the size of an external work buffer (in bytes)
  790. // Parameters:
  791. // dstVolume size of the volume
  792. // kernelVolume size of the kernel volume
  793. // nChannel number of channels
  794. // pSize pointer to the external buffer`s size
  795. // Returns:
  796. // ippStsNoErr no errors
  797. // ippStsNullPtrErr pSize == NULL
  798. // ippStsSizeErr width or height or depth of volumes is less or equal zero
  799. // ippStsNumChannelsErr number of channels is not one
  800. */
  801. IPPAPI(IppStatus, ipprFilterGetBufSize, (
  802. IpprVolume dstVolume, IpprVolume kernelVolume, int nChannel, int* pSize))
  803. /*
  804. // Name: ipprFilter_16s_C1PV
  805. // Purpose: Filters a volume using a general integer cuboidal kernel
  806. // Parameters:
  807. // pSrc array of pointers to planes in source volume data
  808. // srcStep step in every plane of source volume
  809. // pDst array of pointers to planes in destination volume data
  810. // dstStep step in every plane of destination volume
  811. // dstVolume size of the processed volume
  812. // pKernel pointer to the kernel values
  813. // kernelVolume size of the kernel volume
  814. // anchor anchor 3d-cell specifying the cuboidal kernel alignment
  815. // with respect to the position of the input voxel
  816. // divisor the integer value by which the computed result is divided
  817. // pBuffer pointer to the external buffer`s size
  818. // Returns:
  819. // ippStsNoErr no errors
  820. // ippStsNullPtrErr one of the pointers is NULL
  821. // ippStsSizeErr width or height or depth of volumes is less or equal zero
  822. // ippStsDivisorErr divisor value is zero, function execution is interrupted
  823. */
  824. IPPAPI(IppStatus, ipprFilter_16s_C1PV, (
  825. const Ipp16s* const pSrc[], int srcStep,
  826. const Ipp16s* pDst[], int dstStep, IpprVolume dstVolume,
  827. const Ipp32s* pKernel, IpprVolume kernelVolume, IpprPoint anchor, int divisor,
  828. Ipp8u* pBuffer))
  829. /* /////////////////////////////////////////////////////////////////////////////
  830. // Spherical Harmonics lighting function
  831. ///////////////////////////////////////////////////////////////////////////// */
  832. /*
  833. // Name: ipprSHGetSize_32f
  834. // Purpose: Acquires the size of state structure used for Spherical Harmonic computations
  835. // Returns size of a memory buffer which is required for initialization of the state structure
  836. // used in various algorithms related to Spherical Harmonic functions.
  837. // Parameters:
  838. // maxL the maximal order for Spherical Harmonic to support after initialization
  839. // of SH structure by ipprSHInit function with given order and type
  840. // shType the type of algorithm used for SH calculation: ippSHNormDirect or ippSHNormRecurr.
  841. // pSize the size of memory in bytes required for this IppSHState instance to be initialized correctly
  842. //
  843. //
  844. // Returns:
  845. // ippStsNoErr Indicates no error.
  846. // ippStsSizeErr Indicates an error when maxL is greater then 15.
  847. // ippStsNullPtrErr Indicates an error when the pSize pointer is NULL.
  848. // ippStsRangeErr Indicates an error when shType is not equal to ippSHNormDirect or ippSHNormRecurr.
  849. */
  850. IPPAPI(IppStatus, ipprSHGetSize_32f,(Ipp32u maxL, IpprSHType shType, Ipp32u *pSize))
  851. /*
  852. // Name: ipprSHInit_32f
  853. // Purpose: Initializes the state structure used for Spherical Harmonic computations
  854. // in the buffer which must be provided of size not less than acquired by the ipprSHGetSize function.
  855. // Parameters:
  856. // pSHState pointer to the memory buffer used for pSHState structure initialization
  857. // maxL the maximal order of Spherical Harmonics to support after initialization
  858. // with using pSHState structure.
  859. // shType the type of algorithm to use for SH calculation with using this state structure:
  860. // ippSHNormDirect or ippSHNormRecurr.
  861. // Returns:
  862. // ippStsNoErr Indicates no error.
  863. // ippStsNullPtrErr Indicates an error when the pSHState pointer is NULL.
  864. // ippStsSizeErr Indicates an error when L is greater then 15.
  865. // ippStsRangeErr Indicates an error when shType is not equal to ippSHNormDirect or ippSHNormRecurr.
  866. */
  867. IPPAPI(IppStatus, ipprSHInit_32f,(IpprSHState *pSHState, Ipp32u maxL, IpprSHType shType))
  868. /*
  869. // Name: ipprSH_32f, ipprSHBand_32f
  870. // Purpose: Compute the Spherical Harmonics
  871. // Parameters:
  872. // pX, pY, pZ pointers to the source vectors of length N
  873. // which represents the points of a unit sphere given in Cartesians coordinates
  874. // N the number of Cartesians points, i.e. the length of input vectors
  875. // pDstYlm pointer to the destination vector to store SH values computed at given points
  876. // for orders up to order L, of size (L+1)*(L+1)
  877. // pDstBandYlm pointer to the destination vector to store SH values computed at given points
  878. // for order L only, of size (2*L+1)
  879. // L the order up to which to compute SH values,
  880. // must not be greater then maximal order used in the function ipprSHInit call.
  881. // pSHState pointer to the SH state structure initialized with maximal order not less then L
  882. // Returns:
  883. // ippStsNoErr Indicates no error.
  884. // ippStsNullPtrErr Indicates an error when the pX, pY, pZ, pDstYlm or pDstBandYlm pointer is NULL.
  885. // ippStsRangeErr Indicates an error when L is greater then maximal order used for SH state structure
  886. // initialization by the function ipprSHInit.
  887. // ippStsSizeErr Indicates an error when N is equal to zero
  888. */
  889. IPPAPI(IppStatus, ipprSH_32f,(const Ipp32f *pX, const Ipp32f *pY, const Ipp32f *pZ, Ipp32u N,
  890. Ipp32f *pDstYlm, Ipp32u L, IpprSHState *pSHState))
  891. IPPAPI(IppStatus, ipprSHBand_32f,(const Ipp32f *pX, const Ipp32f *pY, const Ipp32f *pZ, Ipp32u N,
  892. Ipp32f *pDstBandYlm, Ipp32u L))
  893. /*
  894. // Name: ipprSHTFwd_32f_C1I, ipprSHTFwd_32f_C3P3I, ipprSHTFwd_32f_P3I
  895. // Purpose: The functions perform projecting of a given function defined on unit sphere into SH basis
  896. // i.e. computes SH transform
  897. // C1I: single value function (gray)
  898. // C3I: RGB color function (x,y,z) -> (R,G,B)
  899. // Parameters:
  900. // pX, pY, pZ pointers to the source vectors of length N
  901. // which represents the points of a unit sphere given in Cartesians coordinates
  902. // pDst Pointer the input vector of values of a color function on a unit sphere
  903. // Points to the source image for pixel-order data or
  904. // to an array of pointers to separate source color planes for plane-order data.
  905. // N the number of Cartesians points, i.e. the length of input vectors
  906. // pSrcDstClm pointer to the destination vector or arrays of vectors
  907. // storing running values of SHT coefficients. Do not forget to zero them proir to first call.
  908. // of length (L+1)*(L+1)
  909. // L the order up to which to compute SH transform,
  910. // must not be greater then maximal order used in the function ipprSHInit call.
  911. // pSHState pointer to the SH state structure initialized with maximal order not less then L
  912. // Returns:
  913. // ippStsNoErr Indicates no error.
  914. // ippStsNullPtrErr Indicates an error when the pX, pY, pZ, pSrc, pSrcDstSHT or pSHState pointer is NULL.
  915. // ippStsSizeErr Indicates an error when N is equal to zero
  916. // ippStsRangeErr Indicates an error when L is greater then maximal order
  917. // used in SH state structure initialization by the function ipprSHInit.
  918. //
  919. */
  920. IPPAPI(IppStatus, ipprSHTFwd_32f_C1I,(const Ipp32f *pX, const Ipp32f *pY, const Ipp32f *pZ, const Ipp32f *pSrc,
  921. Ipp32u N, Ipp32f *pSrcDstClm, Ipp32u L, IpprSHState *pSHState))
  922. IPPAPI(IppStatus, ipprSHTFwd_32f_C3P3I,(const Ipp32f *pX, const Ipp32f *pY, const Ipp32f *pZ, const Ipp32f *pSrc,
  923. Ipp32u N, Ipp32f *pSrcDstClm[3], Ipp32u L, IpprSHState *pSHState))
  924. IPPAPI(IppStatus, ipprSHTFwd_32f_P3I,(const Ipp32f *pX, const Ipp32f *pY, const Ipp32f *pZ, const Ipp32f *pSrc[3],
  925. Ipp32u N, Ipp32f *pSrcDstClm[3], Ipp32u L, IpprSHState *pSHState))
  926. /*
  927. // Name: ipprSHTInv_32f_C1,ipprSHTInv_32f_P3
  928. // Purpose: The functions reconstruct a function defined on unit sphere by its SHT coefficients
  929. // i.e. computes ISHT transform
  930. // C1: single value function (gray)
  931. // C3: RGB color function (x,y,z) -> (R,G,B)
  932. //
  933. // Parameters:
  934. // pSrcClm the input vector or arrays of vectors of the pre-computed SHT coefficients of the length (L+1)*(L+1)
  935. // L the order of SHT, must not be greater then maximal order used in the ipprSHInit call.
  936. // pX, pY, pZ pointers to the source vectors which represents the points of a unit sphere
  937. // given in Cartesians coordinates
  938. // pDst Pointer the output vector of values of reconstructed color function on a unit sphere
  939. // Points to the source image for pixel-order data or
  940. // to an array of pointers to separate source color planes for plane-order data.
  941. // N the number of Cartesians points, i.e. the length of input pX, pY, pZ and number of dst pixels
  942. // pSHState pointer to the SH state structure initialized with maximal order not less then L
  943. */
  944. IPPAPI(IppStatus, ipprSHTInv_32f_C1,(const Ipp32f *pSrcClm, Ipp32u L, const Ipp32f *pX, const Ipp32f *pY,
  945. const Ipp32f *pZ, Ipp32f *pDst, Ipp32u N, IpprSHState *pSHState))
  946. IPPAPI(IppStatus, ipprSHTInv_32f_P3C3,(const Ipp32f *pSrcClm[3], Ipp32u L, const Ipp32f *pX, const Ipp32f *pY,
  947. const Ipp32f *pZ, Ipp32f *pDst, Ipp32u N, IpprSHState *pSHState))
  948. IPPAPI(IppStatus, ipprSHTInv_32f_P3,(const Ipp32f *pSrcClm[3], Ipp32u L, const Ipp32f *pX, const Ipp32f *pY,
  949. const Ipp32f *pZ, Ipp32f *pDst[3], Ipp32u N, IpprSHState *pSHState))
  950. #ifdef __cplusplus
  951. }
  952. #endif
  953. #if defined (_IPP_STDCALL_CDECL)
  954. #undef _IPP_STDCALL_CDECL
  955. #define __stdcall __cdecl
  956. #endif
  957. #endif /* __IPPR_H__ */
  958. /* ////////////////////////////// End of file /////////////////////////////// */