Gray C++ Libraries  0.0.2
A set of C++ libraries for MSVC, GNU on Windows, WinCE, Linux
cFFT.h
Go to the documentation of this file.
1 //
4 //
5 
6 #ifndef _INC_cFFT_H
7 #define _INC_cFFT_H
8 #ifndef NO_PRAGMA_ONCE
9 #pragma once
10 #endif
11 
12 #include "Calc.h"
14 #include "GrayCore/include/cBits.h"
15 
16 #ifdef GRAY_DLL // force implementation/instantiate for DLL/SO.
17 namespace Gray
18 {
19  template class GRAYLIB_LINK CArray<BYTE, BYTE>;
20  template class GRAYLIB_LINK CArray<short, short>;
21  template class GRAYLIB_LINK CArray<LONG, LONG>;
22 }
23 #endif
24 
25 namespace GrayLib
26 {
29  {
31  };
32 
34  {
38 
39  public:
40  bool m_bAutoScale;
41  static const BIT_ENUM_t k_DATASHIFT = 8; // number of bits.
43  LONG m_lScale;
44 
45  private:
46  const BIT_ENUM_t m_iFrameLengthBits;
47  const ITERATE_t m_iFrameLength;
48  const ITERATE_t m_iFrameHalf;
49 
52  CArray<BYTE, BYTE> m_HamWin;
53  CArray<short, short> m_SineTable;
54 
55  public:
56  cFFT(BIT_ENUM_t iLengthBits, bool bAutoScale = true);
57  ~cFFT();
58 
59  void DoHamWin();
60  void DoFFT();
61  void DoScale();
62 
64  };
65 };
66 #endif // _INC_cFFT_H
#define GRAYLIB_LINK
Definition: GrayLibBase.h:35
#define UNITTEST2_PREDEF(x)
Definition: cUnitTestDecl.h:19
Definition: cFFT.h:34
UNITTEST_FRIEND(cFFT)
bool m_bAutoScale
populate m_lScale or not.
Definition: cFFT.h:40
LONG m_lScale
FFT results.
Definition: cFFT.h:43
cArrayVal< LONG > m_Data
initial data and work frame (0-255) [ m_iFrameHalf ] k_DATASHIFT
Definition: cFFT.h:42
Definition: cFFT.h:29
Definition: cMesh.h:22
< The main namespace for all Core functions.
Definition: GrayCore.cpp:14
int ITERATE_t
like size_t but signed
Definition: Index.h:28
unsigned int BIT_ENUM_t
Enumerate number of bits or address a single bit in some array of bits.
Definition: cBits.h:20