xoreos  0.0.5
rdft.h
Go to the documentation of this file.
1 /* xoreos - A reimplementation of BioWare's Aurora engine
2  *
3  * xoreos is the legal property of its developers, whose names
4  * can be found in the AUTHORS file distributed with this source
5  * distribution.
6  *
7  * xoreos is free software; you can redistribute it and/or
8  * modify it under the terms of the GNU General Public License
9  * as published by the Free Software Foundation; either version 3
10  * of the License, or (at your option) any later version.
11  *
12  * xoreos is distributed in the hope that it will be useful,
13  * but WITHOUT ANY WARRANTY; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  * GNU General Public License for more details.
16  *
17  * You should have received a copy of the GNU General Public License
18  * along with xoreos. If not, see <http://www.gnu.org/licenses/>.
19  */
20 
25 /* Based on the (I)RDFT code in FFmpeg (<https://ffmpeg.org/)>, which
26  * is released under the terms of version 2 or later of the GNU Lesser
27  * General Public License.
28  *
29  * The original copyright note in libavcodec/rdft.c reads as follows:
30  *
31  * (I)RDFT transforms
32  * Copyright (c) 2009 Alex Converse <alex dot converse at gmail dot com>
33  *
34  * This file is part of FFmpeg.
35  *
36  * FFmpeg is free software; you can redistribute it and/or
37  * modify it under the terms of the GNU Lesser General Public
38  * License as published by the Free Software Foundation; either
39  * version 2.1 of the License, or (at your option) any later version.
40  *
41  * FFmpeg is distributed in the hope that it will be useful,
42  * but WITHOUT ANY WARRANTY; without even the implied warranty of
43  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
44  * Lesser General Public License for more details.
45  *
46  * You should have received a copy of the GNU Lesser General Public
47  * License along with FFmpeg; if not, write to the Free Software
48  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
49  */
50 
51 #ifndef COMMON_RDFT_H
52 #define COMMON_RDFT_H
53 
54 #include <boost/noncopyable.hpp>
55 
56 #include "src/common/types.h"
57 #include "src/common/scopedptr.h"
58 
59 namespace Common {
60 
61 class FFT;
62 
64 class RDFT : boost::noncopyable {
65 public:
71  };
72 
73  RDFT(int bits, TransformType trans);
74  ~RDFT();
75 
76  void calc(float *data);
77 
78 private:
79  int _bits;
80  bool _inverse;
82 
83  const float *_tSin;
84  const float *_tCos;
85 
87 };
88 
89 } // End of namespace Common
90 
91 #endif // COMMON_RDFT_H
TransformType
Definition: rdft.h:66
const float * _tSin
Definition: rdft.h:83
ScopedPtr< FFT > _fft
Definition: rdft.h:86
Definition: 2dafile.h:39
RDFT(int bits, TransformType trans)
Definition: rdft.cpp:61
const float * _tCos
Definition: rdft.h:84
A simple scoped smart pointer template.
Low-level type definitions to handle fixed width types portably.
A scoped plain pointer, allowing pointer-y access and normal deletion.
Definition: scopedptr.h:120
int _bits
Definition: rdft.h:79
void calc(float *data)
Definition: rdft.cpp:78
int _signConvention
Definition: rdft.h:81
(Inverse) Real Discrete Fourier Transform.
Definition: rdft.h:64
bool _inverse
Definition: rdft.h:80