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

NAME

6       mlib_SignalFFT_4, mlib_SignalFFT_4_S16_S16, mlib_SignalFFT_4_S16C_S16C,
7       mlib_SignalFFT_4_S16C_S16, mlib_SignalFFT_4_S16,  mlib_SignalFFT_4_S16C
8       - signal Fast Fourier Transform (FFT)
9

SYNOPSIS

11       cc [ flag... ] file... -lmlib [ library... ]
12       #include <mlib.h>
13
14       mlib_status mlib_SignalFFT_4_S16_S16(mlib_s16 *dstr, mlib_s16 *dsti,
15            const mlib_s16 *srcr, const mlib_s16 *srci, mlib_s32 order,
16           mlib_s32 *scale);
17
18
19       mlib_status mlib_SignalFFT_4_S16C_S16C(mlib_s16 *dstc,
20            const mlib_s16 *srcc,
21            mlib_s32 order, mlib_s32 *scale);
22
23
24       mlib_status mlib_SignalFFT_4_S16C_S16(mlib_s16 *dstc,
25            const mlib_s16 *srcr,
26            mlib_s32 order, mlib_s32 *scale);
27
28
29       mlib_status mlib_SignalFFT_4_S16(mlib_s16 *srcdstr, mlib_s16 *srcdsti,
30            mlib_s32 order, mlib_s32 *scale);
31
32
33       mlib_status mlib_SignalFFT_4_S16C(mlib_s16 *srcdstc, mlib_s32 order,
34            mlib_s32 *scale);
35
36

DESCRIPTION

38       Each  of  the  functions  in this group performs Fast Fourier Transform
39       (FFT).
40
41
42       The following equation is used for forward FFT:
43
44                   1   N-1
45         dst[k] = ---- SUM {src[n] * exp(-j2*PI*n*k/N)}
46                   C1  n=0
47
48
49
50       and the following equation is used for inverse FFT (IFFT):
51
52                   1   N-1
53         dst[n] = ---- SUM {src[k] * exp(j2*PI*n*k/N)}
54                   C2  k=0
55
56
57
58       where
59
60         k = 0, 1, ..., (N - 1)
61         n = 0, 1, ..., (N - 1)
62         N = 2**order
63
64
65
66       The signal FFT/IFFT functions  can  be  categorized  into  four  groups
67       according to the ScaleMode in the function names in the following form:
68
69         mlib_Signal[FFT|IFFT]_ScaleMode_OutType_InType_OpMode()
70         mlib_Signal[FFT|IFFT]_ScaleMode_DataType_OpMode()
71
72
73
74       The scaling factors C1 and C2 used in the equations are defined as fol‐
75       lows:
76
77           o      For ScaleMode = 1, C1 = 1 and C2 = 2**order.
78
79           o      For ScaleMode = 2, C1 = 2**order and C2 = 1.
80
81           o      For ScaleMode = 3, C1 = C2  =  2**(order/2)  when  order  is
82                  even,  or  C1  =  2**((order+1)/2) and C2 = 2**((order-1)/2)
83                  when order is odd.
84
85           o      For ScaleMode = 4, C1 = 2**P and C2 = 2**Q, where  P  and  Q
86                  are  adaptive scaling factors and are generated by the func‐
87                  tions.
88
89
90       For functions with only real parts for the source signal, the imaginary
91       parts  are  assumed  to be all zero. For functions with only real parts
92       for the destination signal, the  imaginary  parts  are  discarded.  The
93       functions  with only one data type in their names perform the operation
94       in place.
95

PARAMETERS

97       Each function takes some of the following arguments:
98
99       dstr       Destination signal array that contains the real parts.
100
101
102       dsti       Destination signal array that contains the imaginary parts.
103
104
105       srcr       Source signal array that contains the real parts.
106
107
108       srci       Source signal array that contains the imaginary parts.
109
110
111       dstc       Complex destination signal  array.  dstc[2*i]  contains  the
112                  real parts, and dstc[2*i+1] contains the imaginary parts.
113
114
115       srcc       Complex  source  signal  array.  srcc[2*i] contains the real
116                  parts, and srcc[2*i+1] contains the imaginary parts.
117
118
119       srcdstr    Source and destination signal array that contains  the  real
120                  parts.
121
122
123       srcdsti    Source and destination signal array that contains the imagi‐
124                  nary parts.
125
126
127       srcdstc    Complex source and destination  signal  array.  srcdstc[2*i]
128                  contains  the  real  parts,  and srcdstc[2*i+1] contains the
129                  imaginary parts.
130
131
132       order      Order of the transformation. The  base-2  logarithm  of  the
133                  number of data samples.
134
135
136       scale      Adaptive scaling factor.
137
138

RETURN VALUES

140       The  function  returns MLIB_SUCCESS if successful. Otherwise it returns
141       MLIB_FAILURE.
142

ATTRIBUTES

144       See attributes(5) for descriptions of the following attributes:
145
146
147
148
149       ┌─────────────────────────────┬─────────────────────────────┐
150       │      ATTRIBUTE TYPE         │      ATTRIBUTE VALUE        │
151       ├─────────────────────────────┼─────────────────────────────┤
152       │Interface Stability          │Committed                    │
153       ├─────────────────────────────┼─────────────────────────────┤
154       │MT-Level                     │MT-Safe                      │
155       └─────────────────────────────┴─────────────────────────────┘
156

SEE ALSO

158       mlib_SignalFFT_1(3MLIB),       mlib_SignalFFT_2(3MLIB),       mlib_Sig‐
159       nalFFT_3(3MLIB),   mlib_SignalIFFT_1(3MLIB),  mlib_SignalIFFT_2(3MLIB),
160       mlib_SignalIFFT_3(3MLIB), mlib_SignalIFFT_4(3MLIB), attributes(5)
161
162
163
164SunOS 5.11                        2 Mar 2007           mlib_SignalFFT_4(3MLIB)
Impressum