view dsp/transforms/FFT.h @ 19:d3a856b44c43

* reverting names to lower-case for C (as opposed to mixed-case for C++) -- this is how Mark L had it and he was probably right
author cannam
date Wed, 09 Jan 2008 10:48:08 +0000
parents d7116e3183f8
children a251fb0de594
line wrap: on
line source
/* -*- c-basic-offset: 4 indent-tabs-mode: nil -*-  vi:set ts=8 sts=4 sw=4: */

/*
    QM DSP Library

    Centre for Digital Music, Queen Mary, University of London.
    This file is based on Don Cross's public domain FFT implementation.
*/

#ifndef FFT_H
#define FFT_H

class FFT  
{
public:
    static void process(unsigned int p_nSamples, bool p_bInverseTransform,
                        double *p_lpRealIn, double *p_lpImagIn,
                        double *p_lpRealOut, double *p_lpImagOut);
    FFT();
    virtual ~FFT();

protected:
    static unsigned int reverseBits(unsigned int p_nIndex, unsigned int p_nBits);
    static unsigned int numberOfBitsNeeded( unsigned int p_nSamples );
    static bool isPowerOfTwo( unsigned int p_nX );
};

#endif