33
30
<h2><span class="refentrytitle"><a name="gst-plugins-base-libs-gstffts16.top_of_page"></a>gstffts16</span></h2>
34
31
<p>gstffts16 — FFT functions for signed 16 bit integer samples</p>
36
<td valign="top" align="right"></td>
33
<td class="gallery_image" valign="top" align="right"></td>
37
34
</tr></table></div>
38
<div class="refsynopsisdiv">
39
<a name="gst-plugins-base-libs-gstffts16.synopsis"></a><h2>Synopsis</h2>
40
<pre class="synopsis">
41
#include <gst/fft/gstffts16.h>
43
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16">GstFFTS16</a>;
44
struct <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex">GstFFTS16Complex</a>;
45
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="returnvalue">GstFFTS16</span></a> * <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()">gst_fft_s16_new</a> (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> len</code></em>,
46
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> inverse</code></em>);
47
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-fft" title="gst_fft_s16_fft ()">gst_fft_s16_fft</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
48
<em class="parameter"><code>const <span class="type">gint16</span> *timedata</code></em>,
49
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> *freqdata</code></em>);
50
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-inverse-fft" title="gst_fft_s16_inverse_fft ()">gst_fft_s16_inverse_fft</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
51
<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> *freqdata</code></em>,
52
<em class="parameter"><code><span class="type">gint16</span> *timedata</code></em>);
53
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-window" title="gst_fft_s16_window ()">gst_fft_s16_window</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
54
<em class="parameter"><code><span class="type">gint16</span> *timedata</code></em>,
55
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstfft.html#GstFFTWindow" title="enum GstFFTWindow"><span class="type">GstFFTWindow</span></a> window</code></em>);
56
<span class="returnvalue">void</span> <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-free" title="gst_fft_s16_free ()">gst_fft_s16_free</a> (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>);
35
<div class="refsect1">
36
<a name="gst-plugins-base-libs-gstffts16.functions"></a><h2>Functions</h2>
37
<div class="informaltable"><table width="100%" border="0">
39
<col width="150px" class="functions_return">
40
<col class="functions_name">
44
<td class="function_type">
45
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="returnvalue">GstFFTS16</span></a> *
47
<td class="function_name">
48
<a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()">gst_fft_s16_new</a> <span class="c_punctuation">()</span>
52
<td class="function_type">
53
<span class="returnvalue">void</span>
55
<td class="function_name">
56
<a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-fft" title="gst_fft_s16_fft ()">gst_fft_s16_fft</a> <span class="c_punctuation">()</span>
60
<td class="function_type">
61
<span class="returnvalue">void</span>
63
<td class="function_name">
64
<a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-inverse-fft" title="gst_fft_s16_inverse_fft ()">gst_fft_s16_inverse_fft</a> <span class="c_punctuation">()</span>
68
<td class="function_type">
69
<span class="returnvalue">void</span>
71
<td class="function_name">
72
<a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-window" title="gst_fft_s16_window ()">gst_fft_s16_window</a> <span class="c_punctuation">()</span>
76
<td class="function_type">
77
<span class="returnvalue">void</span>
79
<td class="function_name">
80
<a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-free" title="gst_fft_s16_free ()">gst_fft_s16_free</a> <span class="c_punctuation">()</span>
86
<div class="refsect1">
87
<a name="gst-plugins-base-libs-gstffts16.other"></a><h2>Types and Values</h2>
88
<div class="informaltable"><table width="100%" border="0">
90
<col width="150px" class="name">
91
<col class="description">
95
<td class="datatype_keyword"> </td>
96
<td class="function_name"><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16">GstFFTS16</a></td>
99
<td class="datatype_keyword">struct</td>
100
<td class="function_name"><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex">GstFFTS16Complex</a></td>
105
<div class="refsect1">
106
<a name="gst-plugins-base-libs-gstffts16.object-hierarchy"></a><h2>Object Hierarchy</h2>
110
<div class="refsect1">
111
<a name="gst-plugins-base-libs-gstffts16.includes"></a><h2>Includes</h2>
112
<pre class="synopsis">#include <gst/fft/gstffts16.h>
59
115
<div class="refsect1">
60
116
<a name="gst-plugins-base-libs-gstffts16.description"></a><h2>Description</h2>
62
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> provides a FFT implementation and related functions for
63
signed 16 bit integer samples. To use this call <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a> for
117
<p><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> provides a FFT implementation and related functions for
118
signed 16 bit integer samples. To use this call <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a> for
64
119
allocating a <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with the appropriate parameters and
65
then call <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-fft" title="gst_fft_s16_fft ()"><code class="function">gst_fft_s16_fft()</code></a> or <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-inverse-fft" title="gst_fft_s16_inverse_fft ()"><code class="function">gst_fft_s16_inverse_fft()</code></a> to perform the
66
FFT or inverse FFT on a buffer of samples.
69
After use free the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-free" title="gst_fft_s16_free ()"><code class="function">gst_fft_s16_free()</code></a>.
72
For the best performance use <a class="link" href="gst-plugins-base-libs-gstfft.html#gst-fft-next-fast-length" title="gst_fft_next_fast_length ()"><code class="function">gst_fft_next_fast_length()</code></a> to get a
120
then call <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-fft" title="gst_fft_s16_fft ()"><code class="function">gst_fft_s16_fft()</code></a> or <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-inverse-fft" title="gst_fft_s16_inverse_fft ()"><code class="function">gst_fft_s16_inverse_fft()</code></a> to perform the
121
FFT or inverse FFT on a buffer of samples.</p>
122
<p>After use free the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-free" title="gst_fft_s16_free ()"><code class="function">gst_fft_s16_free()</code></a>.</p>
123
<p>For the best performance use <a class="link" href="gst-plugins-base-libs-gstfft.html#gst-fft-next-fast-length" title="gst_fft_next_fast_length ()"><code class="function">gst_fft_next_fast_length()</code></a> to get a
73
124
number that is entirely a product of 2, 3 and 5 and use this as the
74
<em class="parameter"><code>len</code></em> parameter for <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a>.
77
The <em class="parameter"><code>len</code></em> parameter specifies the number of samples in the time domain that
125
<em class="parameter"><code>len</code></em>
126
parameter for <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a>.</p>
127
<p>The <em class="parameter"><code>len</code></em>
128
parameter specifies the number of samples in the time domain that
78
129
will be processed or generated. The number of samples in the frequency domain
79
is <em class="parameter"><code>len</code></em>/2 + 1. To get n samples in the frequency domain use 2*n - 2 as <em class="parameter"><code>len</code></em>.
82
Before performing the FFT on time domain data it usually makes sense
83
to apply a window function to it. For this <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-window" title="gst_fft_s16_window ()"><code class="function">gst_fft_s16_window()</code></a> can comfortably
87
Be aware, that you can't simply run <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-inverse-fft" title="gst_fft_s16_inverse_fft ()"><code class="function">gst_fft_s16_inverse_fft()</code></a> on the
88
resulting frequency data of <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-fft" title="gst_fft_s16_fft ()"><code class="function">gst_fft_s16_fft()</code></a> to get the original data back.
130
is <em class="parameter"><code>len</code></em>
131
/2 + 1. To get n samples in the frequency domain use 2*n - 2 as <em class="parameter"><code>len</code></em>
133
<p>Before performing the FFT on time domain data it usually makes sense
134
to apply a window function to it. For this <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-window" title="gst_fft_s16_window ()"><code class="function">gst_fft_s16_window()</code></a> can comfortably
136
<p>Be aware, that you can't simply run <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-inverse-fft" title="gst_fft_s16_inverse_fft ()"><code class="function">gst_fft_s16_inverse_fft()</code></a> on the
137
resulting frequency data of <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-fft" title="gst_fft_s16_fft ()"><code class="function">gst_fft_s16_fft()</code></a> to get the original data back.
89
138
The relation between them is iFFT (FFT (x)) = x / nfft where nfft is the
90
139
length of the FFT. This also has to be taken into account when calculation
91
the magnitude of the frequency data.
94
<div class="refsect1">
95
<a name="gst-plugins-base-libs-gstffts16.details"></a><h2>Details</h2>
140
the magnitude of the frequency data.</p>
142
<div class="refsect1">
143
<a name="gst-plugins-base-libs-gstffts16.functions_details"></a><h2>Functions</h2>
144
<div class="refsect2">
145
<a name="gst-fft-s16-new"></a><h3>gst_fft_s16_new ()</h3>
146
<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="returnvalue">GstFFTS16</span></a> *
147
gst_fft_s16_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> len</code></em>,
148
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> inverse</code></em>);</pre>
149
<p>This returns a new <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with the given parameters. It makes
150
sense to keep one instance for several calls for speed reasons.</p>
151
<p><em class="parameter"><code>len</code></em>
152
must be even and to get the best performance a product of
153
2, 3 and 5. To get the next number with this characteristics use
154
<a class="link" href="gst-plugins-base-libs-gstfft.html#gst-fft-next-fast-length" title="gst_fft_next_fast_length ()"><code class="function">gst_fft_next_fast_length()</code></a>.</p>
155
<div class="refsect3">
156
<a name="id-1.2.7.5.8.2.6"></a><h4>Parameters</h4>
157
<div class="informaltable"><table width="100%" border="0">
159
<col width="150px" class="parameters_name">
160
<col class="parameters_description">
161
<col width="200px" class="parameters_annotations">
165
<td class="parameter_name"><p>len</p></td>
166
<td class="parameter_description"><p>Length of the FFT in the time domain</p></td>
167
<td class="parameter_annotations"> </td>
170
<td class="parameter_name"><p>inverse</p></td>
171
<td class="parameter_description"><p><a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance should be used for the inverse FFT</p></td>
172
<td class="parameter_annotations"> </td>
177
<div class="refsect3">
178
<a name="id-1.2.7.5.8.2.7"></a><h4>Returns</h4>
179
<p> a new <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance.</p>
184
<div class="refsect2">
185
<a name="gst-fft-s16-fft"></a><h3>gst_fft_s16_fft ()</h3>
186
<pre class="programlisting"><span class="returnvalue">void</span>
187
gst_fft_s16_fft (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
188
<em class="parameter"><code>const <span class="type">gint16</span> *timedata</code></em>,
189
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> *freqdata</code></em>);</pre>
190
<p>This performs the FFT on <em class="parameter"><code>timedata</code></em>
191
and puts the result in <em class="parameter"><code>freqdata</code></em>
193
<p><em class="parameter"><code>timedata</code></em>
194
must have as many samples as specified with the <em class="parameter"><code>len</code></em>
196
allocating the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a>.</p>
197
<p><em class="parameter"><code>freqdata</code></em>
198
must be large enough to hold <em class="parameter"><code>len</code></em>
199
/2 + 1 <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> frequency
201
<div class="refsect3">
202
<a name="id-1.2.7.5.8.3.7"></a><h4>Parameters</h4>
203
<div class="informaltable"><table width="100%" border="0">
205
<col width="150px" class="parameters_name">
206
<col class="parameters_description">
207
<col width="200px" class="parameters_annotations">
211
<td class="parameter_name"><p>self</p></td>
212
<td class="parameter_description"><p><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</p></td>
213
<td class="parameter_annotations"> </td>
216
<td class="parameter_name"><p>timedata</p></td>
217
<td class="parameter_description"><p>Buffer of the samples in the time domain</p></td>
218
<td class="parameter_annotations"> </td>
221
<td class="parameter_name"><p>freqdata</p></td>
222
<td class="parameter_description"><p>Target buffer for the samples in the frequency domain</p></td>
223
<td class="parameter_annotations"> </td>
230
<div class="refsect2">
231
<a name="gst-fft-s16-inverse-fft"></a><h3>gst_fft_s16_inverse_fft ()</h3>
232
<pre class="programlisting"><span class="returnvalue">void</span>
233
gst_fft_s16_inverse_fft (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
234
<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> *freqdata</code></em>,
235
<em class="parameter"><code><span class="type">gint16</span> *timedata</code></em>);</pre>
236
<p>This performs the inverse FFT on <em class="parameter"><code>freqdata</code></em>
237
and puts the result in <em class="parameter"><code>timedata</code></em>
239
<p><em class="parameter"><code>freqdata</code></em>
240
must have <em class="parameter"><code>len</code></em>
241
/2 + 1 samples, where <em class="parameter"><code>len</code></em>
242
is the parameter specified
243
while allocating the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a>.</p>
244
<p><em class="parameter"><code>timedata</code></em>
245
must be large enough to hold <em class="parameter"><code>len</code></em>
246
time domain samples.</p>
247
<div class="refsect3">
248
<a name="id-1.2.7.5.8.4.7"></a><h4>Parameters</h4>
249
<div class="informaltable"><table width="100%" border="0">
251
<col width="150px" class="parameters_name">
252
<col class="parameters_description">
253
<col width="200px" class="parameters_annotations">
257
<td class="parameter_name"><p>self</p></td>
258
<td class="parameter_description"><p><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</p></td>
259
<td class="parameter_annotations"> </td>
262
<td class="parameter_name"><p>freqdata</p></td>
263
<td class="parameter_description"><p>Buffer of the samples in the frequency domain</p></td>
264
<td class="parameter_annotations"> </td>
267
<td class="parameter_name"><p>timedata</p></td>
268
<td class="parameter_description"><p>Target buffer for the samples in the time domain</p></td>
269
<td class="parameter_annotations"> </td>
276
<div class="refsect2">
277
<a name="gst-fft-s16-window"></a><h3>gst_fft_s16_window ()</h3>
278
<pre class="programlisting"><span class="returnvalue">void</span>
279
gst_fft_s16_window (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
280
<em class="parameter"><code><span class="type">gint16</span> *timedata</code></em>,
281
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstfft.html#GstFFTWindow" title="enum GstFFTWindow"><span class="type">GstFFTWindow</span></a> window</code></em>);</pre>
282
<p>This calls the window function <em class="parameter"><code>window</code></em>
283
on the <em class="parameter"><code>timedata</code></em>
285
<div class="refsect3">
286
<a name="id-1.2.7.5.8.5.5"></a><h4>Parameters</h4>
287
<div class="informaltable"><table width="100%" border="0">
289
<col width="150px" class="parameters_name">
290
<col class="parameters_description">
291
<col width="200px" class="parameters_annotations">
295
<td class="parameter_name"><p>self</p></td>
296
<td class="parameter_description"><p><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</p></td>
297
<td class="parameter_annotations"> </td>
300
<td class="parameter_name"><p>timedata</p></td>
301
<td class="parameter_description"><p>Time domain samples</p></td>
302
<td class="parameter_annotations"> </td>
305
<td class="parameter_name"><p>window</p></td>
306
<td class="parameter_description"><p>Window function to apply</p></td>
307
<td class="parameter_annotations"> </td>
314
<div class="refsect2">
315
<a name="gst-fft-s16-free"></a><h3>gst_fft_s16_free ()</h3>
316
<pre class="programlisting"><span class="returnvalue">void</span>
317
gst_fft_s16_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>);</pre>
318
<p>This frees the memory allocated for <em class="parameter"><code>self</code></em>
320
<div class="refsect3">
321
<a name="id-1.2.7.5.8.6.5"></a><h4>Parameters</h4>
322
<div class="informaltable"><table width="100%" border="0">
324
<col width="150px" class="parameters_name">
325
<col class="parameters_description">
326
<col width="200px" class="parameters_annotations">
329
<td class="parameter_name"><p>self</p></td>
330
<td class="parameter_description"><p><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</p></td>
331
<td class="parameter_annotations"> </td>
337
<div class="refsect1">
338
<a name="gst-plugins-base-libs-gstffts16.other_details"></a><h2>Types and Values</h2>
96
339
<div class="refsect2">
97
340
<a name="GstFFTS16"></a><h3>GstFFTS16</h3>
98
341
<pre class="programlisting">typedef struct _GstFFTS16 GstFFTS16;</pre>
109
Data type for complex numbers composed of
110
signed 16 bit integers.
112
<div class="variablelist"><table border="0" class="variablelist">
114
<col align="left" valign="top">
119
<td><p><span class="term"><span class="type">gint16</span> <em class="structfield"><code><a name="GstFFTS16Complex.r"></a>r</code></em>;</span></p></td>
123
<td><p><span class="term"><span class="type">gint16</span> <em class="structfield"><code><a name="GstFFTS16Complex.i"></a>i</code></em>;</span></p></td>
124
<td>Imaginary part</td>
130
<div class="refsect2">
131
<a name="gst-fft-s16-new"></a><h3>gst_fft_s16_new ()</h3>
132
<pre class="programlisting"><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="returnvalue">GstFFTS16</span></a> * gst_fft_s16_new (<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gint"><span class="type">gint</span></a> len</code></em>,
133
<em class="parameter"><code><a href="http://library.gnome.org/devel/glib/unstable/glib-Basic-Types.html#gboolean"><span class="type">gboolean</span></a> inverse</code></em>);</pre>
135
This returns a new <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with the given parameters. It makes
136
sense to keep one instance for several calls for speed reasons.
139
<em class="parameter"><code>len</code></em> must be even and to get the best performance a product of
140
2, 3 and 5. To get the next number with this characteristics use
141
<a class="link" href="gst-plugins-base-libs-gstfft.html#gst-fft-next-fast-length" title="gst_fft_next_fast_length ()"><code class="function">gst_fft_next_fast_length()</code></a>.
143
<div class="variablelist"><table border="0" class="variablelist">
145
<col align="left" valign="top">
150
<td><p><span class="term"><em class="parameter"><code>len</code></em> :</span></p></td>
151
<td>Length of the FFT in the time domain</td>
154
<td><p><span class="term"><em class="parameter"><code>inverse</code></em> :</span></p></td>
156
<a href="http://library.gnome.org/devel/glib/unstable/glib-Standard-Macros.html#TRUE:CAPS"><code class="literal">TRUE</code></a> if the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance should be used for the inverse FFT</td>
159
<td><p><span class="term"><span class="emphasis"><em>Returns</em></span> :</span></p></td>
160
<td>a new <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance.</td>
166
<div class="refsect2">
167
<a name="gst-fft-s16-fft"></a><h3>gst_fft_s16_fft ()</h3>
168
<pre class="programlisting"><span class="returnvalue">void</span> gst_fft_s16_fft (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
169
<em class="parameter"><code>const <span class="type">gint16</span> *timedata</code></em>,
170
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> *freqdata</code></em>);</pre>
172
This performs the FFT on <em class="parameter"><code>timedata</code></em> and puts the result in <em class="parameter"><code>freqdata</code></em>.
175
<em class="parameter"><code>timedata</code></em> must have as many samples as specified with the <em class="parameter"><code>len</code></em> parameter while
176
allocating the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a>.
179
<em class="parameter"><code>freqdata</code></em> must be large enough to hold <em class="parameter"><code>len</code></em>/2 + 1 <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> frequency
182
<div class="variablelist"><table border="0" class="variablelist">
184
<col align="left" valign="top">
189
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
191
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</td>
194
<td><p><span class="term"><em class="parameter"><code>timedata</code></em> :</span></p></td>
195
<td>Buffer of the samples in the time domain</td>
198
<td><p><span class="term"><em class="parameter"><code>freqdata</code></em> :</span></p></td>
199
<td>Target buffer for the samples in the frequency domain</td>
205
<div class="refsect2">
206
<a name="gst-fft-s16-inverse-fft"></a><h3>gst_fft_s16_inverse_fft ()</h3>
207
<pre class="programlisting"><span class="returnvalue">void</span> gst_fft_s16_inverse_fft (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
208
<em class="parameter"><code>const <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16Complex" title="struct GstFFTS16Complex"><span class="type">GstFFTS16Complex</span></a> *freqdata</code></em>,
209
<em class="parameter"><code><span class="type">gint16</span> *timedata</code></em>);</pre>
211
This performs the inverse FFT on <em class="parameter"><code>freqdata</code></em> and puts the result in <em class="parameter"><code>timedata</code></em>.
214
<em class="parameter"><code>freqdata</code></em> must have <em class="parameter"><code>len</code></em>/2 + 1 samples, where <em class="parameter"><code>len</code></em> is the parameter specified
215
while allocating the <a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance with <a class="link" href="gst-plugins-base-libs-gstffts16.html#gst-fft-s16-new" title="gst_fft_s16_new ()"><code class="function">gst_fft_s16_new()</code></a>.
218
<em class="parameter"><code>timedata</code></em> must be large enough to hold <em class="parameter"><code>len</code></em> time domain samples.
220
<div class="variablelist"><table border="0" class="variablelist">
222
<col align="left" valign="top">
227
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
229
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</td>
232
<td><p><span class="term"><em class="parameter"><code>freqdata</code></em> :</span></p></td>
233
<td>Buffer of the samples in the frequency domain</td>
236
<td><p><span class="term"><em class="parameter"><code>timedata</code></em> :</span></p></td>
237
<td>Target buffer for the samples in the time domain</td>
243
<div class="refsect2">
244
<a name="gst-fft-s16-window"></a><h3>gst_fft_s16_window ()</h3>
245
<pre class="programlisting"><span class="returnvalue">void</span> gst_fft_s16_window (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>,
246
<em class="parameter"><code><span class="type">gint16</span> *timedata</code></em>,
247
<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstfft.html#GstFFTWindow" title="enum GstFFTWindow"><span class="type">GstFFTWindow</span></a> window</code></em>);</pre>
249
This calls the window function <em class="parameter"><code>window</code></em> on the <em class="parameter"><code>timedata</code></em> sample buffer.
251
<div class="variablelist"><table border="0" class="variablelist">
253
<col align="left" valign="top">
258
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
260
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</td>
263
<td><p><span class="term"><em class="parameter"><code>timedata</code></em> :</span></p></td>
264
<td>Time domain samples</td>
267
<td><p><span class="term"><em class="parameter"><code>window</code></em> :</span></p></td>
268
<td>Window function to apply</td>
274
<div class="refsect2">
275
<a name="gst-fft-s16-free"></a><h3>gst_fft_s16_free ()</h3>
276
<pre class="programlisting"><span class="returnvalue">void</span> gst_fft_s16_free (<em class="parameter"><code><a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> *self</code></em>);</pre>
278
This frees the memory allocated for <em class="parameter"><code>self</code></em>.
280
<div class="variablelist"><table border="0" class="variablelist">
282
<col align="left" valign="top">
286
<td><p><span class="term"><em class="parameter"><code>self</code></em> :</span></p></td>
288
<a class="link" href="gst-plugins-base-libs-gstffts16.html#GstFFTS16" title="GstFFTS16"><span class="type">GstFFTS16</span></a> instance for this call</td>
351
<p>Data type for complex numbers composed of
352
signed 16 bit integers.</p>
353
<div class="refsect3">
354
<a name="id-1.2.7.5.9.3.5"></a><h4>Members</h4>
355
<div class="informaltable"><table width="100%" border="0">
357
<col width="300px" class="struct_members_name">
358
<col class="struct_members_description">
359
<col width="200px" class="struct_members_annotations">
363
<td class="struct_member_name"><p><span class="type">gint16</span> <em class="structfield"><code><a name="GstFFTS16Complex.r"></a>r</code></em>;</p></td>
364
<td class="struct_member_description"><p>Real part</p></td>
365
<td class="struct_member_annotations"> </td>
368
<td class="struct_member_name"><p><span class="type">gint16</span> <em class="structfield"><code><a name="GstFFTS16Complex.i"></a>i</code></em>;</p></td>
369
<td class="struct_member_description"><p>Imaginary part</p></td>
370
<td class="struct_member_annotations"> </td>
294
378
<div class="footer">
296
Generated by GTK-Doc V1.19</div>
380
Generated by GTK-Doc V1.20</div>
b'\\ No newline at end of file'