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