view src/dmfft.h @ 2238:5db6e0b63b35

Change again how the interlace type information is stored. Now store it in DMC64Image::extraInfo[] where it actually makes sense. Also add index for FLI type.
author Matti Hamalainen <ccr@tnsp.org>
date Sat, 15 Jun 2019 06:43:36 +0300
parents 1e5cf1144f36
children
line wrap: on
line source

#ifndef DMFFT_H
#define DMFFT_H 1

#include "dmlib.h"


typedef double DMFFTType;


typedef struct
{
    int npoints;
    DMFFTType *sinTable;
    int *breversed;
} DMFFTContext;


int   dmInitializeFFT(DMFFTContext *, int);
void  dmEndFFT(DMFFTContext *);
int   dmRealFFT(DMFFTContext *, DMFFTType *);

int   dmConvertFFTtoFreqDomain(DMFFTContext *ctx, DMFFTType *buffer,
      DMFFTType *real, DMFFTType *imag);

int   dmConvertFFTtoFreqAndPower(DMFFTContext *ctx, DMFFTType *buffer,
      DMFFTType *real, DMFFTType *imag, DMFFTType *power, const DMFFTType scale);

int   dmConvertFFTtoPowerAndSum(DMFFTContext *ctx, DMFFTType *buffer,
      DMFFTType *power, const DMFFTType pscale, DMFFTType *sum, const DMFFTType sscale);

int   dmConvertFFTtoTimeDomain(DMFFTContext *ctx, DMFFTType *buffer, DMFFTType *tdom);


#endif // DMFFT_H