DSP  1.1.0
DSP.h
00001 #ifndef QDSP_H
00002 #define QDSP_H
00003 
00004 #include <QObject>
00005 #include <math.h>
00006 
00007 class FFTPrivate;
00008 
00009 namespace DSP {
00010     const float  PI=3.14159265358979f;
00011     const float RADIANT = PI/180;
00012 
00013     class FFT : QObject {
00014         Q_OBJECT
00015         Q_DECLARE_PRIVATE(FFT)
00016         Q_CLASSINFO("Author", "Sebastiano Galazzo")
00017         Q_CLASSINFO("Email", "sebastiano.galazzo@gmail.com")
00018 
00019     public:
00026         explicit FFT(const long length, QObject *parent = 0);
00027 
00035         explicit FFT(const long width, const long height, QObject *parent = 0);
00036 
00040         virtual ~FFT();
00041 
00048         Q_INVOKABLE void compute(const float source [], float result []);
00049 
00056         Q_INVOKABLE void inverse(const float source [], float result []);
00057 
00064         Q_INVOKABLE void rescale(float source []) const;
00065 
00072         Q_INVOKABLE void compute2d(const float source [], float result []);
00073 
00080         Q_INVOKABLE void inverse2d(const float source [], float result []);
00081 
00082     protected:
00083 
00087         FFTPrivate* const d_ptr;
00088 
00089     private:
00093           long width;
00094 
00098         long height;
00099 
00100     };
00101 }
00102 
00103 #endif // QDSP_H
 All Classes Functions Variables