d@0
|
1 <html lang="en">
|
d@0
|
2 <head>
|
d@0
|
3 <title>The Discrete Hartley Transform - FFTW 3.2.1</title>
|
d@0
|
4 <meta http-equiv="Content-Type" content="text/html">
|
d@0
|
5 <meta name="description" content="FFTW 3.2.1">
|
d@0
|
6 <meta name="generator" content="makeinfo 4.8">
|
d@0
|
7 <link title="Top" rel="start" href="index.html#Top">
|
d@0
|
8 <link rel="up" href="More-DFTs-of-Real-Data.html#More-DFTs-of-Real-Data" title="More DFTs of Real Data">
|
d@0
|
9 <link rel="prev" href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029" title="Real even/odd DFTs (cosine/sine transforms)">
|
d@0
|
10 <link href="http://www.gnu.org/software/texinfo/" rel="generator-home" title="Texinfo Homepage">
|
d@0
|
11 <!--
|
d@0
|
12 This manual is for FFTW
|
d@0
|
13 (version 3.2.1, 5 February 2009).
|
d@0
|
14
|
d@0
|
15 Copyright (C) 2003 Matteo Frigo.
|
d@0
|
16
|
d@0
|
17 Copyright (C) 2003 Massachusetts Institute of Technology.
|
d@0
|
18
|
d@0
|
19 Permission is granted to make and distribute verbatim copies of
|
d@0
|
20 this manual provided the copyright notice and this permission
|
d@0
|
21 notice are preserved on all copies.
|
d@0
|
22
|
d@0
|
23 Permission is granted to copy and distribute modified versions of
|
d@0
|
24 this manual under the conditions for verbatim copying, provided
|
d@0
|
25 that the entire resulting derived work is distributed under the
|
d@0
|
26 terms of a permission notice identical to this one.
|
d@0
|
27
|
d@0
|
28 Permission is granted to copy and distribute translations of this
|
d@0
|
29 manual into another language, under the above conditions for
|
d@0
|
30 modified versions, except that this permission notice may be
|
d@0
|
31 stated in a translation approved by the Free Software Foundation.
|
d@0
|
32 -->
|
d@0
|
33 <meta http-equiv="Content-Style-Type" content="text/css">
|
d@0
|
34 <style type="text/css"><!--
|
d@0
|
35 pre.display { font-family:inherit }
|
d@0
|
36 pre.format { font-family:inherit }
|
d@0
|
37 pre.smalldisplay { font-family:inherit; font-size:smaller }
|
d@0
|
38 pre.smallformat { font-family:inherit; font-size:smaller }
|
d@0
|
39 pre.smallexample { font-size:smaller }
|
d@0
|
40 pre.smalllisp { font-size:smaller }
|
d@0
|
41 span.sc { font-variant:small-caps }
|
d@0
|
42 span.roman { font-family:serif; font-weight:normal; }
|
d@0
|
43 span.sansserif { font-family:sans-serif; font-weight:normal; }
|
d@0
|
44 --></style>
|
d@0
|
45 </head>
|
d@0
|
46 <body>
|
d@0
|
47 <div class="node">
|
d@0
|
48 <p>
|
d@0
|
49 <a name="The-Discrete-Hartley-Transform"></a>
|
d@0
|
50 Previous: <a rel="previous" accesskey="p" href="Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029.html#Real-even_002fodd-DFTs-_0028cosine_002fsine-transforms_0029">Real even/odd DFTs (cosine/sine transforms)</a>,
|
d@0
|
51 Up: <a rel="up" accesskey="u" href="More-DFTs-of-Real-Data.html#More-DFTs-of-Real-Data">More DFTs of Real Data</a>
|
d@0
|
52 <hr>
|
d@0
|
53 </div>
|
d@0
|
54
|
d@0
|
55 <h4 class="subsection">2.5.3 The Discrete Hartley Transform</h4>
|
d@0
|
56
|
d@0
|
57 <p>The discrete Hartley transform (DHT) is an invertible linear transform
|
d@0
|
58 closely related to the DFT. In the DFT, one multiplies each input by
|
d@0
|
59 cos - i * sin (a complex exponential), whereas in the DHT each
|
d@0
|
60 input is multiplied by simply cos + sin. Thus, the DHT
|
d@0
|
61 transforms <code>n</code> real numbers to <code>n</code> real numbers, and has the
|
d@0
|
62 convenient property of being its own inverse. In FFTW, a DHT (of any
|
d@0
|
63 positive <code>n</code>) can be specified by an r2r kind of <code>FFTW_DHT</code>.
|
d@0
|
64 <a name="index-FFTW_005fDHT-97"></a><a name="index-discrete-Hartley-transform-98"></a><a name="index-DHT-99"></a>
|
d@0
|
65 If you are planning to use the DHT because you've heard that it is
|
d@0
|
66 “faster” than the DFT (FFT), <strong>stop here</strong>. That story is an old
|
d@0
|
67 but enduring misconception that was debunked in 1987: a properly
|
d@0
|
68 designed real-input FFT (such as FFTW's) has no more operations in
|
d@0
|
69 general than an FHT. Moreover, in FFTW, the DHT is ordinarily
|
d@0
|
70 <em>slower</em> than the DFT for composite sizes (see below).
|
d@0
|
71
|
d@0
|
72 <p>Like the DFT, in FFTW the DHT is unnormalized, so computing a DHT of
|
d@0
|
73 size <code>n</code> followed by another DHT of the same size will result in
|
d@0
|
74 the original array multiplied by <code>n</code>.
|
d@0
|
75 <a name="index-normalization-100"></a>
|
d@0
|
76 The DHT was originally proposed as a more efficient alternative to the
|
d@0
|
77 DFT for real data, but it was subsequently shown that a specialized DFT
|
d@0
|
78 (such as FFTW's r2hc or r2c transforms) could be just as fast. In FFTW,
|
d@0
|
79 the DHT is actually computed by post-processing an r2hc transform, so
|
d@0
|
80 there is ordinarily no reason to prefer it from a performance
|
d@0
|
81 perspective.<a rel="footnote" href="#fn-1" name="fnd-1"><sup>1</sup></a>
|
d@0
|
82 However, we have heard rumors that the DHT might be the most appropriate
|
d@0
|
83 transform in its own right for certain applications, and we would be
|
d@0
|
84 very interested to hear from anyone who finds it useful.
|
d@0
|
85
|
d@0
|
86 <p>If <code>FFTW_DHT</code> is specified for multiple dimensions of a
|
d@0
|
87 multi-dimensional transform, FFTW computes the separable product of 1d
|
d@0
|
88 DHTs along each dimension. Unfortunately, this is not quite the same
|
d@0
|
89 thing as a true multi-dimensional DHT; you can compute the latter, if
|
d@0
|
90 necessary, with at most <code>rank-1</code> post-processing passes
|
d@0
|
91 [see e.g. H. Hao and R. N. Bracewell, <i>Proc. IEEE</i> <b>75</b>, 264–266 (1987)].
|
d@0
|
92
|
d@0
|
93 <p>For the precise mathematical definition of the DHT as used by FFTW, see
|
d@0
|
94 <a href="What-FFTW-Really-Computes.html#What-FFTW-Really-Computes">What FFTW Really Computes</a>.
|
d@0
|
95
|
d@0
|
96 <!-- ************************************************************ -->
|
d@0
|
97 <div class="footnote">
|
d@0
|
98 <hr>
|
d@0
|
99 <h4>Footnotes</h4><p class="footnote"><small>[<a name="fn-1" href="#fnd-1">1</a>]</small> We provide the DHT mainly as a byproduct of some
|
d@0
|
100 internal algorithms. FFTW computes a real input/output DFT of
|
d@0
|
101 <em>prime</em> size by re-expressing it as a DHT plus post/pre-processing
|
d@0
|
102 and then using Rader's prime-DFT algorithm adapted to the DHT.</p>
|
d@0
|
103
|
d@0
|
104 <p><hr></div>
|
d@0
|
105
|
d@0
|
106 </body></html>
|
d@0
|
107
|