1mlib_SignalFFTW_1(3MLIB) mediaLib Library Functions mlib_SignalFFTW_1(3MLIB)
2
3
4
6 mlib_SignalFFTW_1, mlib_SignalFFTW_1_S16_S16_Mod, mlib_Sig‐
7 nalFFTW_1_S16C_S16C_Mod, mlib_SignalFFTW_1_S16C_S16_Mod, mlib_Sig‐
8 nalFFTW_1_S16_Mod, mlib_SignalFFTW_1_S16C_Mod, mlib_Sig‐
9 nalFFTW_1_F32_F32, mlib_SignalFFTW_1_F32C_F32C, mlib_Sig‐
10 nalFFTW_1_F32C_F32, mlib_SignalFFTW_1_F32, mlib_SignalFFTW_1_F32C -
11 signal Fast Fourier Transform with windowing (FFTW)
12
14 cc [ flag... ] file... -lmlib [ library... ]
15 #include <mlib.h>
16
17 mlib_status mlib_SignalFFTW_1_S16_S16_Mod(mlib_s16 *dstr, mlib_s16 *dsti,
18 const mlib_s16 *srcr, const mlib_s16 *srci, const mlib_s16 *window,
19 mlib_s32 order);
20
21
22 mlib_status mlib_SignalFFTW_1_S16C_S16C_Mod(mlib_s16 *dstc,
23 const mlib_s16 *srcc,const mlib_s16 *window, mlib_s32 order);
24
25
26 mlib_status mlib_SignalFFTW_1_S16C_S16_Mod(mlib_s16 *dstc,
27 const mlib_s16 *srcr,const mlib_s16 *window, mlib_s32 order);
28
29
30 mlib_status mlib_SignalFFTW_1_S16_Mod(mlib_s16 *srcdstr,
31 mlib_s16 *srcdsti,const mlib_s16 *window, mlib_s32 order);
32
33
34 mlib_status mlib_SignalFFTW_1_S16C_Mod(mlib_s16 *srcdstc,
35 const mlib_s16 *window,mlib_s32 order);
36
37
38 mlib_status mlib_SignalFFTW_1_F32_F32(mlib_f32 *dstr,
39 mlib_f32 *dsti,const mlib_f32 *srcr, const mlib_f32 *srci,
40 const mlib_f32 *window,mlib_s32 order);
41
42
43 mlib_status mlib_SignalFFTW_1_F32C_F32C(mlib_f32 *dstc,
44 const mlib_f32 *srcc,const mlib_f32 *window, mlib_s32 order);
45
46
47 mlib_status mlib_SignalFFTW_1_F32C_F32(mlib_f32 *dstc,
48 const mlib_f32 *srcr,const mlib_f32 *window, mlib_s32 order);
49
50
51 mlib_status mlib_SignalFFTW_1_F32(mlib_f32 *srcdstr,
52 mlib_f32 *srcdsti,const mlib_f32 *window, mlib_s32 order);
53
54
55 mlib_status mlib_SignalFFTW_1_F32C(mlib_f32 *srcdstc,
56 const mlib_f32 *window,mlib_s32 order);
57
58
60 Each of the functions in this group performs Fast Fourier Transform
61 with windowing (FFTW).
62
63
64 The FFTW functions use the following equation:
65
66 1 N-1
67 dst[k] = ---- SUM {src[n] * window[n] * exp(-j2*PI*n*k/N)}
68 C1 n=0
69
70
71
72 and the IFFTW functions use the following equation:
73
74 1 N-1
75 dst[n] = ---- SUM {src[k] * window[k] * exp(j2*PI*n*k/N)}
76 C2 k=0
77
78
79
80 where
81
82 k = 0, 1, ..., (N - 1)
83 n = 0, 1, ..., (N - 1)
84 N = 2**order
85
86
87
88 The signal FFTW/IFFTW functions can be categorized into four groups
89 according to the ScaleMode in the function names in the following form:
90
91 mlib_Signal[FFTW|IFFTW]_ScaleMode_OutType_InType_OpMode()
92 mlib_Signal[FFTW|IFFTW]_ScaleMode_DataType_OpMode()
93
94
95
96 The scaling factors C1 and C2 used in the equations are defined as fol‐
97 lows:
98
99 o For ScaleMode = 1, C1 = 1 and C2 = 2**order.
100
101 o For ScaleMode = 2, C1 = 2**order and C2 = 1.
102
103 o For ScaleMode = 3, C1 = C2 = 2**(order/2) when order is
104 even, or C1 = 2**((order+1)/2) and C2 = 2**((order-1)/2)
105 when order is odd.
106
107 o For ScaleMode = 4, C1 = 2**P and C2 = 2**Q, where P and Q
108 are adaptive scaling factors and are generated by the func‐
109 tions.
110
111
112 For functions with only real parts for the source signal, the imaginary
113 parts are assumed to be all zero. For functions with only real parts
114 for the destination signal, the imaginary parts are discarded. The
115 functions with only one data type in their names perform the operation
116 in place.
117
119 Each function takes some of the following arguments:
120
121 dstr Destination signal array that contains the real parts.
122
123
124 dsti Destination signal array that contains the imaginary parts.
125
126
127 srcr Source signal array that contains the real parts.
128
129
130 srci Source signal array that contains the imaginary parts.
131
132
133 dstc Complex destination signal array. dstc[2*i] contains the
134 real parts, and dstc[2*i+1] contains the imaginary parts.
135
136
137 srcc Complex source signal array. srcc[2*i] contains the real
138 parts, and srcc[2*i+1] contains the imaginary parts.
139
140
141 srcdstr Source and destination signal array that contains the real
142 parts.
143
144
145 srcdsti Source and destination signal array that contains the imagi‐
146 nary parts.
147
148
149 srcdstc Complex source and destination signal array. srcdstc[2*i]
150 contains the real parts, and srcdstc[2*i+1] contains the
151 imaginary parts.
152
153
154 window Window coefficient array with 2**order real elements. The
155 window coefficients are in Q15 format for the S16 data type,
156 or in float format for the F32 data type.
157
158
159 order Order of the transformation. The base-2 logarithm of the
160 number of data samples.
161
162
164 Each function returns MLIB_SUCCESS if successful. Otherwise it returns
165 MLIB_FAILURE.
166
168 See attributes(5) for descriptions of the following attributes:
169
170
171
172
173 ┌─────────────────────────────┬─────────────────────────────┐
174 │ ATTRIBUTE TYPE │ ATTRIBUTE VALUE │
175 ├─────────────────────────────┼─────────────────────────────┤
176 │Interface Stability │Committed │
177 ├─────────────────────────────┼─────────────────────────────┤
178 │MT-Level │MT-Safe │
179 └─────────────────────────────┴─────────────────────────────┘
180
182 mlib_SignalFFTW_2(3MLIB), mlib_SignalFFTW_3(3MLIB), mlib_Sig‐
183 nalFFTW_4(3MLIB), mlib_SignalIFFTW_1(3MLIB), mlib_SignalIFFTW_2(3MLIB),
184 mlib_SignalIFFTW_3(3MLIB), mlib_SignalIFFTW_4(3MLIB), attributes(5)
185
186
187
188SunOS 5.11 2 Mar 2007 mlib_SignalFFTW_1(3MLIB)