annotate fft/fftw/fftw-3.3.4/doc/html/The-Discrete-Hartley-Transform.html @ 40:223f770b5341 kissfft-double tip

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