summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer_v1.0/doc/html/fft_8hcc.html
blob: 444037203f784d9a3b7090d121c302d9f0445ccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
<title>Graphic Equalizer 2: C:/Project  Marcel &amp; Oliver/Graphic_Equalizer/src/fft.hcc File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.3.9.1 -->
<div class="qindex"><a class="qindex" href="main.html">Main&nbsp;Page</a> | <a class="qindex" href="annotated.html">Data&nbsp;Structures</a> | <a class="qindex" href="dirs.html">Directories</a> | <a class="qindex" href="files.html">File&nbsp;List</a> | <a class="qindex" href="functions.html">Data&nbsp;Fields</a> | <a class="qindex" href="globals.html">Globals</a></div>
<div class="nav">
<a class="el" href="dir_000000.html">C:</a>&nbsp;/&nbsp;<a class="el" href="dir_000001.html">Project  Marcel &amp; Oliver</a>&nbsp;/&nbsp;<a class="el" href="dir_000002.html">Graphic_Equalizer</a>&nbsp;/&nbsp;<a class="el" href="dir_000004.html">src</a></div>
<h1>fft.hcc File Reference</h1><code>#include &lt;stdlib.hch&gt;</code><br>
<code>#include "pal_master.hch"</code><br>
<code>#include "<a class="el" href="audio_8hch-source.html">audio.hch</a>"</code><br>
<code>#include "<a class="el" href="weights__256_8hch-source.html">weights_256.hch</a>"</code><br>
<code>#include "<a class="el" href="configuration_8hch-source.html">configuration.hch</a>"</code><br>
<code>#include "xilinxmult.hch"</code><br>
<code>#include "<a class="el" href="fft_8hch-source.html">fft.hch</a>"</code><br>

<p>
Include dependency graph for fft.hcc:<p><center><img src="fft_8hcc__incl.png" border="0" usemap="#fft.hcc_map" alt="Include dependency graph"></center>
<map name="fft.hcc_map">
<area href="audio_8hch.html" shape="rect" coords="245,7,325,34" alt="">
<area href="weights__256_8hch.html" shape="rect" coords="349,7,472,34" alt="">
<area href="configuration_8hch.html" shape="rect" coords="496,7,621,34" alt="">
<area href="fft_8hch.html" shape="rect" coords="773,7,832,34" alt="">
</map>

<p>
<a href="fft_8hcc-source.html">Go to the source code of this file.</a><table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Defines</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">#define&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a0">DC_COMPONENT</a>&nbsp;&nbsp;&nbsp;8470527</td></tr>

<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">macro proc&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a2">multiply</a> (result, op_a, op_b)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Procedure used for multiply-ing.  <a href="#a2"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a3">calculate_fft</a> (unsigned 1 select_inverse)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine performs the Fast Fourier Transform for calculation of the frequency spectrum.  <a href="#a3"></a><br></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a4">perform_fft</a> (signed 16 *pcm_audio)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a5">perform_ifft</a> (signed 16 *modified_audio, unsigned 6 *ifft_info)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a6">equalize_audio</a> (<a class="el" href="structaudiodata__t.html">audiodata_t</a> *audiodata)</td></tr>

<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This routine equalizes the frequencies derived by the FFT calculation, according to the settings of the equalizer bars.  <a href="#a6"></a><br></td></tr>
<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">ram signed&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="fft_8hcc.html#a1">eq_settings</a> [16] = {0,2,4,7,10,13,16,19,22,26,30,35,41,48,55,63}</td></tr>

</table>
<hr><a name="_details"></a><h2>Detailed Description</h2>
<h2><a class="anchor" name="generic">
Graphic Equalizer API</a></h2>
on the samples. Besides the FFT this module also will equalize the audio signal according to the setting made by the user.<h2><a class="anchor" name="project">
Project information.</a></h2>
Project Graphic Equalizer<br>
 <dl compact><dt><b>Author:</b></dt><dd>M. Lauwerijssen </dd></dl>
<dl compact><dt><b>Date:</b></dt><dd>20041110 </dd></dl>
<dl compact><dt><b>Version:</b></dt><dd>0.1</dd></dl>
<h2><a class="anchor" name="copyright">
Copyright</a></h2>
Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved<h2><a class="anchor" name="history">
Change history</a></h2>
20041110: M. Lauwerijssen<br>
 Initial version
<p>
Definition in file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.<hr><h2>Define Documentation</h2>
<a class="anchor" name="a0" doxytag="fft.hcc::DC_COMPONENT"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">#define DC_COMPONENT&nbsp;&nbsp;&nbsp;8470527          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00069">69</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.    </td>
  </tr>
</table>
<hr><h2>Function Documentation</h2>
<a class="anchor" name="a2" doxytag="fft.hcc::multiply"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">macro proc multiply           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">result&nbsp;</td>
          <td class="mdname" nowrap>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>op_a&nbsp;</td>
          <td class="mdname" nowrap>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>op_b&nbsp;</td>
          <td class="mdname" nowrap></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
Procedure used for multiply-ing. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>result</em>&nbsp;</td><td>variable containing the result of the multiply procedure </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>op_a</em>&nbsp;</td><td>integer value to be multiplied. </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>op_b</em>&nbsp;</td><td>integer value to be multiplied.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>Procedure returns through variable. </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>signed</em>&nbsp;</td><td>36 </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00082">82</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.
<p>
Referenced by <a class="el" href="fft_8hcc-source.html#l00104">calculate_fft()</a>, and <a class="el" href="fft_8hcc-source.html#l00398">equalize_audio()</a>.    </td>
  </tr>
</table>
<a class="anchor" name="a3" doxytag="fft.hcc::calculate_fft"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void calculate_fft           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">unsigned 1&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>select_inverse</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This routine performs the Fast Fourier Transform for calculation of the frequency spectrum. 
<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>select_inverse</em>&nbsp;</td><td>determines if a FFT or iFFT has to be calculated</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>nothing </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>void</em>&nbsp;</td><td>cost 12391 cycles </td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00104">104</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.
<p>
References <a class="el" href="fft_8hcc-source.html#l00082">multiply()</a>, <a class="el" href="fft_8hch-source.html#l00001">NUMBER_OF_COLUMNS</a>, <a class="el" href="fft_8hch-source.html#l00002">NUMBER_OF_POINTS</a>, <a class="el" href="weights__256_8hch-source.html#l00135">weight_im</a>, and <a class="el" href="weights__256_8hch-source.html#l00004">weight_re</a>.
<p>
Referenced by <a class="el" href="fft_8hcc-source.html#l00259">perform_fft()</a>, and <a class="el" href="fft_8hcc-source.html#l00324">perform_ifft()</a>.    </td>
  </tr>
</table>

<p>
Here is the call graph for this function:<p><center><img src="fft_8hcc_a3_cgraph.png" border="0" usemap="#fft_8hcc_a3_cgraph_map" alt=""></center>
<map name="fft_8hcc_a3_cgraph_map">
<area href="fft_8hcc.html#a2" shape="rect" coords="151,8,221,34" alt="">
</map>
<a class="anchor" name="a4" doxytag="fft.hcc::perform_fft"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void perform_fft           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">signed 16 *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>pcm_audio</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00259">259</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.
<p>
References <a class="el" href="fft_8hcc-source.html#l00104">calculate_fft()</a>.    </td>
  </tr>
</table>

<p>
Here is the call graph for this function:<p><center><img src="fft_8hcc_a4_cgraph.png" border="0" usemap="#fft_8hcc_a4_cgraph_map" alt=""></center>
<map name="fft_8hcc_a4_cgraph_map">
<area href="fft_8hcc.html#a3" shape="rect" coords="145,8,238,34" alt="">
<area href="fft_8hcc.html#a2" shape="rect" coords="287,8,357,34" alt="">
</map>
<a class="anchor" name="a5" doxytag="fft.hcc::perform_ifft"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void perform_ifft           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top">signed 16 *&nbsp;</td>
          <td class="mdname" nowrap> <em>modified_audio</em>, </td>
        </tr>
        <tr>
          <td class="md" nowrap align="right"></td>
          <td class="md"></td>
          <td class="md" nowrap>unsigned 6 *&nbsp;</td>
          <td class="mdname" nowrap> <em>ifft_info</em></td>
        </tr>
        <tr>
          <td class="md"></td>
          <td class="md">)&nbsp;</td>
          <td class="md" colspan="2"></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00324">324</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.
<p>
References <a class="el" href="fft_8hcc-source.html#l00104">calculate_fft()</a>.    </td>
  </tr>
</table>

<p>
Here is the call graph for this function:<p><center><img src="fft_8hcc_a5_cgraph.png" border="0" usemap="#fft_8hcc_a5_cgraph_map" alt=""></center>
<map name="fft_8hcc_a5_cgraph_map">
<area href="fft_8hcc.html#a3" shape="rect" coords="150,8,244,34" alt="">
<area href="fft_8hcc.html#a2" shape="rect" coords="293,8,362,34" alt="">
</map>
<a class="anchor" name="a6" doxytag="fft.hcc::equalize_audio"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">void equalize_audio           </td>
          <td class="md" valign="top">(&nbsp;</td>
          <td class="md" nowrap valign="top"><a class="el" href="structaudiodata__t.html">audiodata_t</a> *&nbsp;</td>
          <td class="mdname1" valign="top" nowrap> <em>audiodata</em>          </td>
          <td class="md" valign="top">&nbsp;)&nbsp;</td>
          <td class="md" nowrap></td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>
This routine equalizes the frequencies derived by the FFT calculation, according to the settings of the equalizer bars. 
<p>
<dl compact><dt><b>Note:</b></dt><dd>Cost: 3844 clock cycles (Maximum)</dd></dl>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>*audiodata</em>&nbsp;</td><td>pointer to the audiodata struct, containing the eq_info, etc.</td></tr>
  </table>
</dl>
<dl compact><dt><b>Returns:</b></dt><dd>void </dd></dl>
<dl compact><dt><b>Return values:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>void</em>&nbsp;</td><td></td></tr>
  </table>
</dl>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00398">398</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.
<p>
References <a class="el" href="audio_8hch-source.html#l00035">audiodata_t::display_log</a>, <a class="el" href="fft_8hcc-source.html#l00064">eq_settings</a>, <a class="el" href="audio_8hch-source.html#l00034">audiodata_t::equalizer_levels_ptr</a>, <a class="el" href="fft_8hcc-source.html#l00082">multiply()</a>, and <a class="el" href="fft_8hch-source.html#l00002">NUMBER_OF_POINTS</a>.    </td>
  </tr>
</table>

<p>
Here is the call graph for this function:<p><center><img src="fft_8hcc_a6_cgraph.png" border="0" usemap="#fft_8hcc_a6_cgraph_map" alt=""></center>
<map name="fft_8hcc_a6_cgraph_map">
<area href="fft_8hcc.html#a2" shape="rect" coords="167,8,237,34" alt="">
</map>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="a1" doxytag="fft.hcc::eq_settings"></a><p>
<table class="mdTable" width="100%" cellpadding="2" cellspacing="0">
  <tr>
    <td class="mdRow">
      <table cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td class="md" nowrap valign="top">ram signed <a class="el" href="fft_8hcc.html#a1">eq_settings</a>[16] = {0,2,4,7,10,13,16,19,22,26,30,35,41,48,55,63}          </td>
        </tr>
      </table>
    </td>
  </tr>
</table>
<table cellspacing="5" cellpadding="0" border="0">
  <tr>
    <td>
      &nbsp;
    </td>
    <td>

<p>

<p>
Definition at line <a class="el" href="fft_8hcc-source.html#l00064">64</a> of file <a class="el" href="fft_8hcc-source.html">fft.hcc</a>.
<p>
Referenced by <a class="el" href="fft_8hcc-source.html#l00398">equalize_audio()</a>.    </td>
  </tr>
</table>
<hr size="1"><address style="align: right;"><small>Generated on Thu Dec 9 14:37:09 2004 for Graphic Equalizer 2 by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.3.9.1 </small></address>
</body>
</html>