~ubuntu-branches/ubuntu/feisty/fpc/feisty

« back to all changes in this revision

Viewing changes to packages/extra/univint/vDSP.pas

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2007-01-27 20:08:50 UTC
  • mfrom: (1.2.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20070127200850-9mrptaqqjsx9nwa7
Tags: 2.0.4-5
* Fixed Build-Depends.
* Add myself to Uploaders in debian/control.
* Make sure that the sources are really patched before building them.
* Build unit 'libc' on powerpc too.

Show diffs side-by-side

added added

removed removed

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