vDSP.pas 41 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144
  1. {
  2. File: vDSP.p
  3. Contains: AltiVec DSP Interfaces
  4. Version: Technology: 1.0
  5. Release: Universal Interfaces 3.4.2
  6. Copyright: © 2000-2002 by Apple Computer, Inc., all rights reserved.
  7. Bugs?: For bug reports, consult the following page on
  8. the World Wide Web:
  9. http://www.freepascal.org/bugs.html
  10. }
  11. {
  12. Modified for use with Free Pascal
  13. Version 200
  14. Please report any bugs to <[email protected]>
  15. }
  16. {$mode macpas}
  17. {$packenum 1}
  18. {$macro on}
  19. {$inline on}
  20. {$CALLING MWPASCAL}
  21. unit vDSP;
  22. interface
  23. {$setc UNIVERSAL_INTERFACES_VERSION := $0342}
  24. {$setc GAP_INTERFACES_VERSION := $0200}
  25. {$ifc not defined USE_CFSTR_CONSTANT_MACROS}
  26. {$setc USE_CFSTR_CONSTANT_MACROS := TRUE}
  27. {$endc}
  28. {$ifc defined CPUPOWERPC and defined CPUI386}
  29. {$error Conflicting initial definitions for CPUPOWERPC and CPUI386}
  30. {$endc}
  31. {$ifc defined FPC_BIG_ENDIAN and defined FPC_LITTLE_ENDIAN}
  32. {$error Conflicting initial definitions for FPC_BIG_ENDIAN and FPC_LITTLE_ENDIAN}
  33. {$endc}
  34. {$ifc not defined __ppc__ and defined CPUPOWERPC}
  35. {$setc __ppc__ := 1}
  36. {$elsec}
  37. {$setc __ppc__ := 0}
  38. {$endc}
  39. {$ifc not defined __i386__ and defined CPUI386}
  40. {$setc __i386__ := 1}
  41. {$elsec}
  42. {$setc __i386__ := 0}
  43. {$endc}
  44. {$ifc defined __ppc__ and __ppc__ and defined __i386__ and __i386__}
  45. {$error Conflicting definitions for __ppc__ and __i386__}
  46. {$endc}
  47. {$ifc defined __ppc__ and __ppc__}
  48. {$setc TARGET_CPU_PPC := TRUE}
  49. {$setc TARGET_CPU_X86 := FALSE}
  50. {$elifc defined __i386__ and __i386__}
  51. {$setc TARGET_CPU_PPC := FALSE}
  52. {$setc TARGET_CPU_X86 := TRUE}
  53. {$elsec}
  54. {$error Neither __ppc__ nor __i386__ is defined.}
  55. {$endc}
  56. {$setc TARGET_CPU_PPC_64 := FALSE}
  57. {$ifc defined FPC_BIG_ENDIAN}
  58. {$setc TARGET_RT_BIG_ENDIAN := TRUE}
  59. {$setc TARGET_RT_LITTLE_ENDIAN := FALSE}
  60. {$elifc defined FPC_LITTLE_ENDIAN}
  61. {$setc TARGET_RT_BIG_ENDIAN := FALSE}
  62. {$setc TARGET_RT_LITTLE_ENDIAN := TRUE}
  63. {$elsec}
  64. {$error Neither FPC_BIG_ENDIAN nor FPC_LITTLE_ENDIAN are defined.}
  65. {$endc}
  66. {$setc ACCESSOR_CALLS_ARE_FUNCTIONS := TRUE}
  67. {$setc CALL_NOT_IN_CARBON := FALSE}
  68. {$setc OLDROUTINENAMES := FALSE}
  69. {$setc OPAQUE_TOOLBOX_STRUCTS := TRUE}
  70. {$setc OPAQUE_UPP_TYPES := TRUE}
  71. {$setc OTCARBONAPPLICATION := TRUE}
  72. {$setc OTKERNEL := FALSE}
  73. {$setc PM_USE_SESSION_APIS := TRUE}
  74. {$setc TARGET_API_MAC_CARBON := TRUE}
  75. {$setc TARGET_API_MAC_OS8 := FALSE}
  76. {$setc TARGET_API_MAC_OSX := TRUE}
  77. {$setc TARGET_CARBON := TRUE}
  78. {$setc TARGET_CPU_68K := FALSE}
  79. {$setc TARGET_CPU_MIPS := FALSE}
  80. {$setc TARGET_CPU_SPARC := FALSE}
  81. {$setc TARGET_OS_MAC := TRUE}
  82. {$setc TARGET_OS_UNIX := FALSE}
  83. {$setc TARGET_OS_WIN32 := FALSE}
  84. {$setc TARGET_RT_MAC_68881 := FALSE}
  85. {$setc TARGET_RT_MAC_CFM := FALSE}
  86. {$setc TARGET_RT_MAC_MACHO := TRUE}
  87. {$setc TYPED_FUNCTION_POINTERS := TRUE}
  88. {$setc TYPE_BOOL := FALSE}
  89. {$setc TYPE_EXTENDED := FALSE}
  90. {$setc TYPE_LONGLONG := TRUE}
  91. uses MacTypes,ConditionalMacros;
  92. {$ALIGN MAC68K}
  93. type
  94. DSPComplexPtr = ^DSPComplex;
  95. DSPComplex = record
  96. real: Single;
  97. imag: Single;
  98. end;
  99. DSPSplitComplexPtr = ^DSPSplitComplex;
  100. DSPSplitComplex = record
  101. realp: ^Single;
  102. imagp: ^Single;
  103. end;
  104. FFTSetup = ^SInt32; { an opaque 32-bit type }
  105. FFTSetupPtr = ^FFTSetup; { when a var xx:FFTSetup parameter can be nil, it is changed to xx: FFTSetupPtr }
  106. FFTDirection = SInt32;
  107. const
  108. kFFTDirection_Forward = 1;
  109. kFFTDirection_Inverse = -1;
  110. type
  111. FFTRadix = SInt32;
  112. const
  113. kFFTRadix2 = 0;
  114. kFFTRadix3 = 1;
  115. kFFTRadix5 = 2;
  116. {
  117. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  118. The criteria to invoke the PowerPC vector implementation is subject to
  119. change and become less restrictive in the future.
  120. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  121. }
  122. {
  123. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  124. Functions create_fftsetup and destroy_fftsetup.
  125. create_fftsetup will allocate memory and setup a weight array used by
  126. the FFT. The call destroy_fftsetup will free the array.
  127. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  128. }
  129. {
  130. * create_fftsetup()
  131. *
  132. * Availability:
  133. * Non-Carbon CFM: in vecLib 1.0 and later
  134. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  135. * Mac OS X: in version 10.0 and later
  136. }
  137. function create_fftsetup(log2n: UInt32; radix: FFTRadix): FFTSetup; external name '_create_fftsetup';
  138. {
  139. * destroy_fftsetup()
  140. *
  141. * Availability:
  142. * Non-Carbon CFM: in vecLib 1.0 and later
  143. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  144. * Mac OS X: in version 10.0 and later
  145. }
  146. procedure destroy_fftsetup(setup: FFTSetup); external name '_destroy_fftsetup';
  147. {
  148. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  149. Functions ctoz and ztoc.
  150. ctoz converts a complex array to a complex-split array
  151. ztoc converts a complex-split array to a complex array
  152. Criteria to invoke PowerPC vector code:
  153. 1. size > 3
  154. 2. strideC = 2
  155. 3. strideZ = 1
  156. 4. Z.realp and Z.imagp are relatively aligned.
  157. 5. C is 8-byte aligned if Z.realp and Z.imagp are 4-byte- aligned
  158. or C is 16-byte aligned if Z.realp and Z.imagp are at least
  159. 8-byte aligned.
  160. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  161. }
  162. {
  163. * ctoz()
  164. *
  165. * Availability:
  166. * Non-Carbon CFM: in vecLib 1.0 and later
  167. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  168. * Mac OS X: in version 10.0 and later
  169. }
  170. procedure ctoz(const (*var*) C: DSPComplex; strideC: SInt32; var Z: DSPSplitComplex; strideZ: SInt32; size: UInt32); external name '_ctoz';
  171. {
  172. * ztoc()
  173. *
  174. * Availability:
  175. * Non-Carbon CFM: in vecLib 1.0 and later
  176. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  177. * Mac OS X: in version 10.0 and later
  178. }
  179. procedure ztoc(const (*var*) Z: DSPSplitComplex; strideZ: SInt32; var C: DSPComplex; strideC: SInt32; size: UInt32); external name '_ztoc';
  180. {
  181. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  182. Functions fft_zip and fft_zipt
  183. In-place Split Complex Fourier Transform with or without temporary memory.
  184. Criteria to invoke PowerPC vector code:
  185. 1. ioData.realp and ioData.imagp must be 16-byte aligned.
  186. 2. stride = 1
  187. 3. 2 <= log2n <= 20
  188. 4. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
  189. If any of the above criteria are not satisfied, the PowerPC scalor code
  190. implementation will be used. The size of temporary memory for each part
  191. is the lower value of 4*n and 16k. Direction can be either
  192. kFFTDirection_Forward or kFFTDirection_Inverse.
  193. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  194. }
  195. {
  196. * fft_zip()
  197. *
  198. * Availability:
  199. * Non-Carbon CFM: in vecLib 1.0 and later
  200. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  201. * Mac OS X: in version 10.0 and later
  202. }
  203. procedure fft_zip(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zip';
  204. {
  205. * fft_zipt()
  206. *
  207. * Availability:
  208. * Non-Carbon CFM: in vecLib 1.0 and later
  209. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  210. * Mac OS X: in version 10.0 and later
  211. }
  212. procedure fft_zipt(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zipt';
  213. {
  214. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  215. Functions fft_zop and fft_zopt
  216. Out-of-place Split Complex Fourier Transform with or without temporary
  217. memory
  218. Criteria to invoke PowerPC vector code:
  219. 1. signal.realp and signal.imagp must be 16-byte aligned.
  220. 2. signalStride = 1
  221. 3. result.realp and result.imagp must be 16-byte aligned.
  222. 4. strideResult = 1
  223. 5. 2 <= log2n <= 20
  224. 6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
  225. If any of the above criteria are not satisfied, the PowerPC scalor code
  226. implementation will be used. The size of temporary memory for each part
  227. is the lower value of 4*n and 16k. Direction can be either
  228. kFFTDirection_Forward or kFFTDirection_Inverse.
  229. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  230. }
  231. {
  232. * fft_zop()
  233. *
  234. * Availability:
  235. * Non-Carbon CFM: in vecLib 1.0 and later
  236. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  237. * Mac OS X: in version 10.0 and later
  238. }
  239. procedure fft_zop(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zop';
  240. {
  241. * fft_zopt()
  242. *
  243. * Availability:
  244. * Non-Carbon CFM: in vecLib 1.0 and later
  245. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  246. * Mac OS X: in version 10.0 and later
  247. }
  248. procedure fft_zopt(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zopt';
  249. {
  250. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  251. Functions fft_zrip and fft_zript
  252. In-Place Real Fourier Transform with or without temporary memory,
  253. split Complex Format
  254. Criteria to invoke PowerPC vector code:
  255. 1. ioData.realp and ioData.imagp must be 16-byte aligned.
  256. 2. stride = 1
  257. 3. 3 <= log2n <= 13
  258. If any of the above criteria are not satisfied, the PowerPC scalor code
  259. implementation will be used. The size of temporary memory for each part
  260. is the lower value of 4*n and 16k. Direction can be either
  261. kFFTDirection_Forward or kFFTDirection_Inverse.
  262. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  263. }
  264. {
  265. * fft_zrip()
  266. *
  267. * Availability:
  268. * Non-Carbon CFM: in vecLib 1.0 and later
  269. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  270. * Mac OS X: in version 10.0 and later
  271. }
  272. procedure fft_zrip(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zrip';
  273. {
  274. * fft_zript()
  275. *
  276. * Availability:
  277. * Non-Carbon CFM: in vecLib 1.0 and later
  278. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  279. * Mac OS X: in version 10.0 and later
  280. }
  281. procedure fft_zript(setup: FFTSetup; var ioData: DSPSplitComplex; stride: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zript';
  282. {
  283. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  284. Functions fft_zrop and fft_zropt
  285. Out-of-Place Real Fourier Transform with or without temporary memory,
  286. split Complex Format
  287. Criteria to invoke PowerPC vector code:
  288. 1. signal.realp and signal.imagp must be 16-byte aligned.
  289. 2. signalStride = 1
  290. 3. result.realp and result.imagp must be be 16-byte aligned.
  291. 4. strideResult = 1
  292. 5. 3 <= log2n <= 13
  293. If any of the above criteria are not satisfied, the PowerPC scalor code
  294. implementation will be used. The size of temporary memory for each part
  295. is the lower value of 4*n and 16k. Direction can be either
  296. kFFTDirection_Forward or kFFTDirection_Inverse.
  297. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  298. }
  299. {
  300. * fft_zrop()
  301. *
  302. * Availability:
  303. * Non-Carbon CFM: in vecLib 1.0 and later
  304. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  305. * Mac OS X: in version 10.0 and later
  306. }
  307. procedure fft_zrop(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; log2n: UInt32; direction: FFTDirection); external name '_fft_zrop';
  308. {
  309. * fft_zropt()
  310. *
  311. * Availability:
  312. * Non-Carbon CFM: in vecLib 1.0 and later
  313. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  314. * Mac OS X: in version 10.0 and later
  315. }
  316. procedure fft_zropt(setup: FFTSetup; var signal: DSPSplitComplex; signalStride: SInt32; var result: DSPSplitComplex; strideResult: SInt32; var bufferTemp: DSPSplitComplex; log2n: UInt32; direction: FFTDirection); external name '_fft_zropt';
  317. {
  318. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  319. Functions fft2d_zip and fft2d_zipt
  320. In-place two dimensional Split Complex Fourier Transform with or without
  321. temporary memory
  322. Criteria to invoke PowerPC vector code:
  323. 1. ioData.realp and ioData.imagp must be 16-byte aligned.
  324. 2. strideInRow = 1;
  325. 3. strideInCol must be a multiple of 4
  326. 4. 2 <= log2nInRow <= 12
  327. 5. 2 <= log2nInCol <= 12
  328. 6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
  329. If any of the above criteria are not satisfied, the PowerPC scalor code
  330. implementation will be used. The size of temporary memory for each part
  331. is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
  332. Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
  333. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  334. }
  335. {
  336. * fft2d_zip()
  337. *
  338. * Availability:
  339. * Non-Carbon CFM: in vecLib 1.0 and later
  340. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  341. * Mac OS X: in version 10.0 and later
  342. }
  343. procedure fft2d_zip(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zip';
  344. {
  345. * fft2d_zipt()
  346. *
  347. * Availability:
  348. * Non-Carbon CFM: in vecLib 1.0 and later
  349. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  350. * Mac OS X: in version 10.0 and later
  351. }
  352. procedure fft2d_zipt(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zipt';
  353. {
  354. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  355. Functions fft2d_zop and fft2d_zopt
  356. Out-of-Place two dimemsional Split Complex Fourier Transform with or
  357. without temporary memory
  358. Criteria to invoke PowerPC vector code:
  359. 1. signal.realp and signal.imagp must be 16-byte aligned.
  360. 2. signalStrideInRow = 1;
  361. 3. signalStrideInCol must be a multiple of 4
  362. 4. result.realp and result.imagp must be 16-byte aligned.
  363. 5. strideResultInRow = 1;
  364. 6. strideResultInCol must be a multiple of 4
  365. 7. 2 <= log2nInRow <= 12
  366. 8. 2 <= log2nInCol <= 12
  367. 9. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
  368. If any of the above criteria are not satisfied, the PowerPC scalor code
  369. implementation will be used. The size of temporary memory for each part
  370. is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
  371. Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
  372. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  373. }
  374. {
  375. * fft2d_zop()
  376. *
  377. * Availability:
  378. * Non-Carbon CFM: in vecLib 1.0 and later
  379. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  380. * Mac OS X: in version 10.0 and later
  381. }
  382. procedure fft2d_zop(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zop';
  383. {
  384. * fft2d_zopt()
  385. *
  386. * Availability:
  387. * Non-Carbon CFM: in vecLib 1.0 and later
  388. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  389. * Mac OS X: in version 10.0 and later
  390. }
  391. procedure fft2d_zopt(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zopt';
  392. {
  393. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  394. Functions fft2d_zrip and fft2d_zript
  395. In-place two dimensional Real Fourier Transform with or without temporary
  396. memory, Split Complex Format
  397. Criteria to invoke PowerPC vector code:
  398. 1. ioData.realp and ioData.imagp must be 16-byte aligned.
  399. 2. strideInRow = 1;
  400. 3. strideInCol must be a multiple of 4
  401. 4. 3 <= log2nInRow <= 12
  402. 5. 3 <= log2nInCol <= 13
  403. 6. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
  404. If any of the above criteria are not satisfied, the PowerPC scalor code
  405. implementation will be used. The size of temporary memory for each part
  406. is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
  407. Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
  408. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  409. }
  410. {
  411. * fft2d_zrip()
  412. *
  413. * Availability:
  414. * Non-Carbon CFM: in vecLib 1.0 and later
  415. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  416. * Mac OS X: in version 10.0 and later
  417. }
  418. procedure fft2d_zrip(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zrip';
  419. {
  420. * fft2d_zript()
  421. *
  422. * Availability:
  423. * Non-Carbon CFM: in vecLib 1.0 and later
  424. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  425. * Mac OS X: in version 10.0 and later
  426. }
  427. procedure fft2d_zript(setup: FFTSetup; var ioData: DSPSplitComplex; strideInRow: SInt32; strideInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; direction: FFTDirection); external name '_fft2d_zript';
  428. {
  429. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  430. Functions fft2d_zrop and fft2d_zropt
  431. Out-of-Place Two-Dimemsional Real Fourier Transform with or without
  432. temporary memory, Split Complex Format
  433. Criteria to invoke PowerPC vector code:
  434. 1. signal.realp and signal.imagp must be 16-byte aligned.
  435. 2. signalStrideInRow = 1;
  436. 3. signalStrideInCol must be a multiple of 4
  437. 4. result.realp and result.imagp must be 16-byte aligned.
  438. 5. strideResultInRow = 1;
  439. 6. strideResultInCol must be a multiple of 4
  440. 7. 3 <= log2nInRow <= 12
  441. 8. 3 <= log2nInCol <= 13
  442. 9. bufferTemp.realp and bufferTemp.imagp must be 16-byte aligned.
  443. If any of the above criteria are not satisfied, the PowerPC scalor code
  444. implementation will be used. The size of temporary memory for each part
  445. is the lower value of 4*n and 16k. ( log2n = log2nInRow + log2nInCol )
  446. Direction can be either kFFTDirection_Forward or kFFTDirection_Inverse.
  447. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  448. }
  449. {
  450. * fft2d_zrop()
  451. *
  452. * Availability:
  453. * Non-Carbon CFM: in vecLib 1.0 and later
  454. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  455. * Mac OS X: in version 10.0 and later
  456. }
  457. procedure fft2d_zrop(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zrop';
  458. {
  459. * fft2d_zropt()
  460. *
  461. * Availability:
  462. * Non-Carbon CFM: in vecLib 1.0 and later
  463. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  464. * Mac OS X: in version 10.0 and later
  465. }
  466. procedure fft2d_zropt(setup: FFTSetup; var signal: DSPSplitComplex; signalStrideInRow: SInt32; signalStrideInCol: SInt32; var result: DSPSplitComplex; strideResultInRow: SInt32; strideResultInCol: SInt32; var bufferTemp: DSPSplitComplex; log2nInCol: UInt32; log2nInRow: UInt32; flag: SInt32); external name '_fft2d_zropt';
  467. {
  468. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  469. Function conv
  470. Floating Point Convolution and Correlation
  471. Criteria to invoke PowerPC vector code:
  472. 1. signal and result must have relative alignement.
  473. 2. 4 <= lenFilter <= 256
  474. 3. lenResult > 36
  475. 4. signalStride = 1
  476. 5. strideResult = 1
  477. If any of the above criteria are not satisfied, the PowerPC scalor code
  478. implementation will be used. strideFilter can be positive for
  479. correlation or negative for convolution.
  480. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  481. }
  482. {
  483. * conv()
  484. *
  485. * Availability:
  486. * Non-Carbon CFM: in vecLib 1.0 and later
  487. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  488. * Mac OS X: in version 10.0 and later
  489. }
  490. procedure conv((*const*) var signal: Single; signalStride: SInt32; (*const*) var filter: Single; strideFilter: SInt32; var result: Single; strideResult: SInt32; lenResult: SInt32; lenFilter: SInt32); external name '_conv';
  491. {
  492. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  493. Function vadd
  494. Floating Point Add
  495. Criteria to invoke PowerPC vector code:
  496. 1. input1 and input2 and result are all relatively aligned.
  497. 2. size >= 8
  498. 3. stride1 = 1
  499. 4. stride2 = 1
  500. 5. strideResult = 1
  501. If any of the above criteria are not satisfied, the PowerPC scalor code
  502. implementation will be used.
  503. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  504. }
  505. {
  506. * vadd()
  507. *
  508. * Availability:
  509. * Non-Carbon CFM: in vecLib 1.0 and later
  510. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  511. * Mac OS X: in version 10.0 and later
  512. }
  513. procedure vadd((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vadd';
  514. {
  515. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  516. Function vsub
  517. Floating Point Substract
  518. Criteria to invoke PowerPC vector code:
  519. 1. input1 and input2 and result are all relatively aligned.
  520. 2. size >= 8
  521. 3. stride1 = 1
  522. 4. stride2 = 1
  523. 5. strideResult = 1
  524. If any of the above criteria are not satisfied, the PowerPC scalor code
  525. implementation will be used.
  526. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  527. }
  528. {
  529. * vsub()
  530. *
  531. * Availability:
  532. * Non-Carbon CFM: in vecLib 1.0 and later
  533. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  534. * Mac OS X: in version 10.0 and later
  535. }
  536. procedure vsub((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsub';
  537. {
  538. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  539. Function vmul
  540. Floating Point Multiply
  541. Criteria to invoke PowerPC vector code:
  542. 1. input1 and input2 and result must be all relatively aligned.
  543. 2. size >= 8
  544. 3. stride1 = 1
  545. 4. stride2 = 1
  546. 5. strideResult = 1
  547. If any of the above criteria are not satisfied, the PowerPC scalor code
  548. implementation will be used.
  549. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  550. }
  551. {
  552. * vmul()
  553. *
  554. * Availability:
  555. * Non-Carbon CFM: in vecLib 1.0 and later
  556. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  557. * Mac OS X: in version 10.0 and later
  558. }
  559. procedure vmul((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vmul';
  560. {
  561. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  562. Function vsmul
  563. Floating Point - Scalar Multiply
  564. Criteria to invoke PowerPC vector code:
  565. 1. input1 and result are all relatively aligned.
  566. 2. size >= 8
  567. 3. stride1 = 1
  568. 5. strideResult = 1
  569. If any of the above criteria are not satisfied, the PowerPC scalor code
  570. implementation will be used.
  571. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  572. }
  573. {
  574. * vsmul()
  575. *
  576. * Availability:
  577. * Non-Carbon CFM: in vecLib 1.0 and later
  578. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  579. * Mac OS X: in version 10.0 and later
  580. }
  581. procedure vsmul((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsmul';
  582. {
  583. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  584. Function vsq
  585. Floating Point Square
  586. Criteria to invoke PowerPC vector code:
  587. 1. input and result are relatively aligned.
  588. 2. size >= 8
  589. 3. strideInput = 1
  590. 4. strideResult = 1
  591. If any of the above criteria are not satisfied, the PowerPC scalor code
  592. implementation will be used.
  593. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  594. }
  595. {
  596. * vsq()
  597. *
  598. * Availability:
  599. * Non-Carbon CFM: in vecLib 1.0 and later
  600. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  601. * Mac OS X: in version 10.0 and later
  602. }
  603. procedure vsq((*const*) var input: Single; strideInput: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vsq';
  604. {
  605. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  606. Function vssq
  607. Floating Point Signed Square
  608. Criteria to invoke PowerPC vector code:
  609. 1. input and result must be all relatively aligned.
  610. 2. size >= 8
  611. 3. strideInput = 1
  612. 4. strideResult = 1
  613. If any of the above criteria are not satisfied, the PowerPC scalor code
  614. implementation will be used.
  615. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  616. }
  617. {
  618. * vssq()
  619. *
  620. * Availability:
  621. * Non-Carbon CFM: in vecLib 1.0 and later
  622. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  623. * Mac OS X: in version 10.0 and later
  624. }
  625. procedure vssq((*const*) var input: Single; strideInput: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vssq';
  626. {
  627. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  628. Function dotpr
  629. Floating Point Dot product
  630. Criteria to invoke PowerPC vector code:
  631. 1. input1 and input2 are relatively aligned.
  632. 2. size >= 20
  633. 3. stride1 = 1
  634. 4. stride2 = 1
  635. If any of the above criteria are not satisfied, the PowerPC scalor code
  636. implementation will be used.
  637. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  638. }
  639. {
  640. * dotpr()
  641. *
  642. * Availability:
  643. * Non-Carbon CFM: in vecLib 1.0 and later
  644. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  645. * Mac OS X: in version 10.0 and later
  646. }
  647. procedure dotpr((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: Single; size: UInt32); external name '_dotpr';
  648. {
  649. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  650. Function vam
  651. Floating Point vadd and Multiply
  652. Criteria to invoke PowerPC vector code:
  653. 1. input1, input2, input_3 and result are all relatively aligned.
  654. 2. size >= 8
  655. 3. stride1 = 1
  656. 4. stride2 = 1
  657. 5. stride_3 = 1
  658. 6. strideResult = 1
  659. If any of the above criteria are not satisfied, the PowerPC scalor code
  660. implementation will be used.
  661. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  662. }
  663. {
  664. * vam()
  665. *
  666. * Availability:
  667. * Non-Carbon CFM: in vecLib 1.0 and later
  668. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  669. * Mac OS X: in version 10.0 and later
  670. }
  671. procedure vam((*const*) var input1: Single; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; (*const*) var input3: Single; stride3: SInt32; var result: Single; strideResult: SInt32; size: UInt32); external name '_vam';
  672. {
  673. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  674. Function zconv
  675. Split Complex Convolution and Correlation
  676. Criteria to invoke PowerPC vector code:
  677. 1. signal->realp, signal->imagp, result->realp, result->imagp
  678. must be relatively aligned.
  679. 2. 4 <= lenFilter <= 128
  680. 3. lenResult > 20
  681. 4. signalStride = 1
  682. 5. strideResult = 1
  683. If any of the above criteria are not satisfied, the PowerPC scalor code
  684. implementation will be used. strideFilter can be positive for correlation
  685. or negative for convolution
  686. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  687. }
  688. {
  689. * zconv()
  690. *
  691. * Availability:
  692. * Non-Carbon CFM: in vecLib 1.0 and later
  693. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  694. * Mac OS X: in version 10.0 and later
  695. }
  696. procedure zconv(var signal: DSPSplitComplex; signalStride: SInt32; var filter: DSPSplitComplex; strideFilter: SInt32; var result: DSPSplitComplex; strideResult: SInt32; lenResult: SInt32; lenFilter: SInt32); external name '_zconv';
  697. {
  698. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  699. Function zvadd
  700. Split Complex vadd
  701. Criteria to invoke PowerPC vector code:
  702. 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
  703. result.realp, result.imagp must be all relatively aligned.
  704. 2. size >= 8
  705. 3. stride1 = 1
  706. 4. stride2 = 1
  707. 5. strideResult = 1
  708. If any of the above criteria are not satisfied, the PowerPC scalor code
  709. implementation will be used.
  710. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  711. }
  712. {
  713. * zvadd()
  714. *
  715. * Availability:
  716. * Non-Carbon CFM: in vecLib 1.0 and later
  717. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  718. * Mac OS X: in version 10.0 and later
  719. }
  720. procedure zvadd(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvadd';
  721. {
  722. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  723. Function zvsub
  724. Split Complex Substract
  725. Criteria to invoke PowerPC vector code:
  726. 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
  727. result.realp, result.imagp must be all relatively aligned.
  728. 2. size >= 8
  729. 3. stride1 = 1
  730. 4. stride2 = 1
  731. 5. strideResult = 1
  732. If any of the above criteria are not satisfied, the PowerPC scalor code
  733. implementation will be used.
  734. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  735. }
  736. {
  737. * zvsub()
  738. *
  739. * Availability:
  740. * Non-Carbon CFM: in vecLib 1.0 and later
  741. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  742. * Mac OS X: in version 10.0 and later
  743. }
  744. procedure zvsub(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvsub';
  745. {
  746. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  747. Function zvmul
  748. Split Complex Multiply
  749. Criteria to invoke PowerPC vector code:
  750. 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
  751. result.realp, result.imagp must be all relatively aligned.
  752. 2. size >= 8
  753. 3. stride1 = 1
  754. 4. stride2 = 1
  755. 5. strideResult = 1
  756. If any of the above criteria are not satisfied, the PowerPC scalor code
  757. implementation will be used. The conjugate value can be 1 or -1.
  758. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  759. }
  760. {
  761. * zvmul()
  762. *
  763. * Availability:
  764. * Non-Carbon CFM: in vecLib 1.0 and later
  765. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  766. * Mac OS X: in version 10.0 and later
  767. }
  768. procedure zvmul(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32; conjugate: SInt32); external name '_zvmul';
  769. {
  770. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  771. Function zdotpr
  772. Split Complex Dot product
  773. Criteria to invoke PowerPC vector code:
  774. 1. input1.realp, input1.imagp, input2.realp, input2.imagp are all
  775. relatively aligned.
  776. 2. size >= 20
  777. 3. stride1 = 1
  778. 4. stride2 = 1
  779. If any of the above criteria are not satisfied, the PowerPC scalor code
  780. implementation will be used.
  781. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  782. }
  783. {
  784. * zdotpr()
  785. *
  786. * Availability:
  787. * Non-Carbon CFM: in vecLib 1.0 and later
  788. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  789. * Mac OS X: in version 10.0 and later
  790. }
  791. procedure zdotpr(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zdotpr';
  792. {
  793. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  794. Function zidotpr
  795. Split Complex Inner Dot product
  796. Criteria to invoke PowerPC vector code:
  797. 1. input1.realp, input1.imagp, input2.realp, input2.imagp must be
  798. all relatively aligned.
  799. 2. size >= 20
  800. 3. stride1 = 1
  801. 4. stride2 = 1
  802. If any of the above criteria are not satisfied, the PowerPC scalor code
  803. implementation will be used.
  804. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  805. }
  806. {
  807. * zidotpr()
  808. *
  809. * Availability:
  810. * Non-Carbon CFM: in vecLib 1.0 and later
  811. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  812. * Mac OS X: in version 10.0 and later
  813. }
  814. procedure zidotpr(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zidotpr';
  815. {
  816. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  817. Function zrdotpr
  818. Split Complex - Real Dot product
  819. Criteria to invoke PowerPC vector code:
  820. 1. input1.realp, input1.imagp, input2 are must be relatively aligned.
  821. 2. size >= 16
  822. 3. stride1 = 1
  823. 4. stride2 = 1
  824. If any of the above criteria are not satisfied, the PowerPC scalor code
  825. implementation will be used.
  826. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  827. }
  828. {
  829. * zrdotpr()
  830. *
  831. * Availability:
  832. * Non-Carbon CFM: in vecLib 1.0 and later
  833. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  834. * Mac OS X: in version 10.0 and later
  835. }
  836. procedure zrdotpr(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; size: UInt32); external name '_zrdotpr';
  837. {
  838. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  839. Function zvcma
  840. Split Complex Conjugate Multiply And vadd
  841. Criteria to invoke PowerPC vector code:
  842. 1. input1.realp, input1.imagp, input2.realp, input2.imagp,
  843. input_3.realp, input_3.imagp, result.realp, result.imagp
  844. must be all relatively aligned.
  845. 2. size >= 8
  846. 3. stride1 = 1
  847. 4. stride2 = 1
  848. 5. stride_3 = 1
  849. 6. strideResult = 1
  850. If any of the above criteria are not satisfied, the PowerPC scalor code
  851. implementation will be used.
  852. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  853. }
  854. {
  855. * zvcma()
  856. *
  857. * Availability:
  858. * Non-Carbon CFM: in vecLib 1.0 and later
  859. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  860. * Mac OS X: in version 10.0 and later
  861. }
  862. procedure zvcma(var input1: DSPSplitComplex; stride1: SInt32; var input2: DSPSplitComplex; stride2: SInt32; var input3: DSPSplitComplex; stride3: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zvcma';
  863. {
  864. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  865. Function zrvadd
  866. Split Complex - Real Add
  867. Criteria to invoke PowerPC vector code:
  868. 1. input1.realp, input1.imagp, input2, result.realp, result.imagp
  869. are all relatively aligned.
  870. 2. size >= 8
  871. 3. stride1 = 1
  872. 4. stride2 = 1
  873. 5. strideResult = 1
  874. If any of the above criteria are not satisfied, the PowerPC scalor code
  875. implementation will be used.
  876. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  877. }
  878. {
  879. * zrvadd()
  880. *
  881. * Availability:
  882. * Non-Carbon CFM: in vecLib 1.0 and later
  883. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  884. * Mac OS X: in version 10.0 and later
  885. }
  886. procedure zrvadd(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvadd';
  887. {
  888. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  889. Function zrvsub
  890. Split Complex - Real Substract
  891. Criteria to invoke PowerPC vector code:
  892. 1. input1.realp, input1.imagp, input2, result.realp, result.imagp
  893. must be all relatively aligned.
  894. 2. size >= 8
  895. 3. stride1 = 1
  896. 4. stride2 = 1
  897. 5. strideResult = 1
  898. If any of the above criteria are not satisfied, the PowerPC scalor code
  899. implementation will be used.
  900. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  901. }
  902. {
  903. * zrvsub()
  904. *
  905. * Availability:
  906. * Non-Carbon CFM: in vecLib 1.0 and later
  907. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  908. * Mac OS X: in version 10.0 and later
  909. }
  910. procedure zrvsub(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvsub';
  911. {
  912. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  913. Function zrvmul
  914. Split Complex - Real Multiply
  915. Criteria to invoke PowerPC vector code:
  916. 1. input1.realp, input1.imagp, input2, result.realp, result.imagp
  917. must be all relatively aligned.
  918. 2. size >= 8
  919. 3. stride1 = 1
  920. 4. stride2 = 1
  921. 5. strideResult = 1
  922. If any of the above criteria are not satisfied, the PowerPC scalor code
  923. implementation will be used.
  924. ÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑÑ
  925. }
  926. {
  927. * zrvmul()
  928. *
  929. * Availability:
  930. * Non-Carbon CFM: in vecLib 1.0 and later
  931. * CarbonLib: not in Carbon, but vecLib is compatible with Carbon
  932. * Mac OS X: in version 10.0 and later
  933. }
  934. procedure zrvmul(var input1: DSPSplitComplex; stride1: SInt32; (*const*) var input2: Single; stride2: SInt32; var result: DSPSplitComplex; strideResult: SInt32; size: UInt32); external name '_zrvmul';
  935. {$ifc undefined USE_NONE_APPLE_STANDARD_DATATYPES}
  936. {$setc USE_NONE_APPLE_STANDARD_DATATYPES := 1}
  937. {$endc}
  938. {$ifc USE_NONE_APPLE_STANDARD_DATATYPES}
  939. const
  940. FFT_FORWARD = 1;
  941. FFT_INVERSE = -1;
  942. FFT_RADIX2 = 0;
  943. FFT_RADIX3 = 1;
  944. FFT_RADIX5 = 2;
  945. type
  946. COMPLEX = DSPComplex;
  947. COMPLEXPtr = ^COMPLEX;
  948. COMPLEX_SPLIT = DSPSplitComplex;
  949. COMPLEX_SPLITPtr = ^COMPLEX_SPLIT;
  950. {$endc} {USE_NONE_APPLE_STANDARD_DATATYPES}
  951. {$ALIGN MAC68K}
  952. end.