1mlib_SignalFFT_2(3MLIB)   mediaLib Library Functions   mlib_SignalFFT_2(3MLIB)
2
3
4

NAME

6       mlib_SignalFFT_2, mlib_SignalFFT_2_S16_S16, mlib_SignalFFT_2_S16C_S16C,
7       mlib_SignalFFT_2_S16C_S16, mlib_SignalFFT_2_S16, mlib_SignalFFT_2_S16C,
8       mlib_SignalFFT_2_F32_F32,     mlib_SignalFFT_2_F32C_F32C,     mlib_Sig‐
9       nalFFT_2_F32C_F32,     mlib_SignalFFT_2_F32,     mlib_SignalFFT_2_F32C,
10       mlib_SignalFFT_2_D64_D64,     mlib_SignalFFT_2_D64C_D64C,     mlib_Sig‐
11       nalFFT_2_D64C_D64, mlib_SignalFFT_2_D64, mlib_SignalFFT_2_D64C - signal
12       Fast Fourier Transform (FFT)
13

SYNOPSIS

15       cc [ flag... ] file... -lmlib [ library... ]
16       #include <mlib.h>
17
18       mlib_status mlib_SignalFFT_2_S16_S16(mlib_s16 *dstr, mlib_s16 *dsti,
19            const mlib_s16 *srcr, const mlib_s16 *srci, mlib_s32 order);
20
21
22       mlib_status mlib_SignalFFT_2_S16C_S16C(mlib_s16 *dstc,
23            const mlib_s16 *srcc,
24            mlib_s32 order);
25
26
27       mlib_status mlib_SignalFFT_2_S16C_S16(mlib_s16 *dstc, const mlib_s16 *srcr,
28            mlib_s32 order);
29
30
31       mlib_status mlib_SignalFFT_2_S16(mlib_s16 *srcdstr, mlib_s16 *srcdsti,
32            mlib_s32 order);
33
34
35       mlib_status mlib_SignalFFT_2_S16C(mlib_s16 *srcdstc, mlib_s32 order);
36
37
38       mlib_status mlib_SignalFFT_2_F32_F32(mlib_f32 *dstr,
39            mlib_f32 *dsti,const mlib_f32 *srcr,
40            const mlib_f32 *srci,
41            mlib_s32 order);
42
43
44       mlib_status mlib_SignalFFT_2_F32C_F32C(mlib_f32 *dstc,
45            const mlib_f32 *srcc,
46            mlib_s32 order);
47
48
49       mlib_status mlib_SignalFFT_2_F32C_F32(mlib_f32 *dstc, const mlib_f32 *srcr,
50            mlib_s32 order);
51
52
53       mlib_status mlib_SignalFFT_2_F32(mlib_f32 *srcdstr, mlib_f32 *srcdsti,
54            mlib_s32 order);
55
56
57       mlib_status mlib_SignalFFT_2_F32C(mlib_f32 *srcdstc, mlib_s32 order);
58
59
60       mlib_status mlib_SignalFFT_2_D64_D64(mlib_d64 *dstr, mlib_d64 *dsti,
61            const mlib_d64 *srcr, const mlib_d64 *srci, mlib_s32 order);
62
63
64       mlib_status mlib_SignalFFT_2_D64C_D64C(mlib_d64 *dstc,
65            const mlib_d64 *srcc,mlib_s32 order);
66
67
68       mlib_status mlib_SignalFFT_2_D64C_D64(mlib_d64 *dstc, const mlib_d64 *srcr,
69            mlib_s32 order);
70
71
72       mlib_status mlib_SignalFFT_2_D64(mlib_d64 *srcdstr, mlib_d64 *srcdsti,
73            mlib_s32 order);
74
75
76       mlib_status mlib_SignalFFT_2_D64C(mlib_d64 *srcdstc, mlib_s32 order);
77
78

DESCRIPTION

80       Each  of  the  functions  in this group performs Fast Fourier Transform
81       (FFT).
82
83
84       The following equation is used for forward FFT:
85
86                   1   N-1
87         dst[k] = ---- SUM {src[n] * exp(-j2*PI*n*k/N)}
88                   C1  n=0
89
90
91
92       and the following equation is used for inverse FFT (IFFT):
93
94                   1   N-1
95         dst[n] = ---- SUM {src[k] * exp(j2*PI*n*k/N)}
96                   C2  k=0
97
98
99
100       where
101
102         k = 0, 1, ..., (N - 1)
103         n = 0, 1, ..., (N - 1)
104         N = 2**order
105
106
107
108       The signal FFT/IFFT functions  can  be  categorized  into  four  groups
109       according to the ScaleMode in the function names in the following form:
110
111         mlib_Signal[FFT|IFFT]_ScaleMode_OutType_InType_OpMode()
112         mlib_Signal[FFT|IFFT]_ScaleMode_DataType_OpMode()
113
114
115
116       The scaling factors C1 and C2 used in the equations are defined as fol‐
117       lows:
118
119           o      For ScaleMode = 1, C1 = 1 and C2 = 2**order.
120
121           o      For ScaleMode = 2, C1 = 2**order and C2 = 1.
122
123           o      For ScaleMode = 3, C1 = C2  =  2**(order/2)  when  order  is
124                  even,  or  C1  =  2**((order+1)/2) and C2 = 2**((order-1)/2)
125                  when order is odd.
126
127           o      For ScaleMode = 4, C1 = 2**P and C2 = 2**Q, where  P  and  Q
128                  are  adaptive scaling factors and are generated by the func‐
129                  tions.
130
131
132       For functions with only real parts for the source signal, the imaginary
133       parts  are  assumed  to be all zero. For functions with only real parts
134       for the destination signal, the  imaginary  parts  are  discarded.  The
135       functions  with only one data type in their names perform the operation
136       in place.
137

PARAMETERS

139       Each function takes some of the following arguments:
140
141       dstr       Destination signal array that contains the real parts.
142
143
144       dsti       Destination signal array that contains the imaginary parts.
145
146
147       srcr       Source signal array that contains the real parts.
148
149
150       srci       Source signal array that contains the imaginary parts.
151
152
153       dstc       Complex destination signal  array.  dstc[2*i]  contains  the
154                  real parts, and dstc[2*i+1] contains the imaginary parts.
155
156
157       srcc       Complex  source  signal  array.  srcc[2*i] contains the real
158                  parts, and srcc[2*i+1] contains the imaginary parts.
159
160
161       srcdstr    Source and destination signal array that contains  the  real
162                  parts.
163
164
165       srcdsti    Source and destination signal array that contains the imagi‐
166                  nary parts.
167
168
169       srcdstc    Complex source and destination  signal  array.  srcdstc[2*i]
170                  contains  the  real  parts,  and srcdstc[2*i+1] contains the
171                  imaginary parts.
172
173
174       order      Order of the transformation. The  base-2  logarithm  of  the
175                  number of data samples.
176
177

RETURN VALUES

179       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
180       MLIB_FAILURE.
181

ATTRIBUTES

183       See attributes(5) for descriptions of the following attributes:
184
185
186
187
188       ┌─────────────────────────────┬─────────────────────────────┐
189       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
190       ├─────────────────────────────┼─────────────────────────────┤
191       │Interface Stability          │Committed                    │
192       ├─────────────────────────────┼─────────────────────────────┤
193       │MT-Level                     │MT-Safe                      │
194       └─────────────────────────────┴─────────────────────────────┘
195

SEE ALSO

197       mlib_SignalFFT_1(3MLIB),       mlib_SignalFFT_3(3MLIB),       mlib_Sig‐
198       nalFFT_4(3MLIB),   mlib_SignalIFFT_1(3MLIB),  mlib_SignalIFFT_2(3MLIB),
199       mlib_SignalIFFT_3(3MLIB), mlib_SignalIFFT_4(3MLIB), attributes(5)
200
201
202
203SunOS 5.11                        2 Mar 2007           mlib_SignalFFT_2(3MLIB)
Impressum