testfft.h

来自「realview22.rar」· C头文件 代码 · 共 71 行

H
71
字号
/* 
 * Copyright (C) ARM Limited 1998-2000. All rights reserved.
 *
 * fft.h
 *
 * C header for ARM FFT algorithm
 */

#ifndef FFT_H
#define FFT_H

/* Define basic data types */

/* real types */
typedef double real;      /* floating point */
typedef short  real16;    /* 16 bit fixed point */
typedef int    real32;    /* 32 bit fixed point */

/* complex types */
typedef struct { real   x, y; } comp;
typedef struct { real16 x, y; } comp16;
typedef struct { real32 x, y; } comp32;

/* FFT function types */
typedef int fFFT(void *input, void *output, int N, int preshift);
typedef int fFFT16(comp16 *input, comp16 *output, int N);
typedef int fFFT32(comp32 *input, comp32 *output, int N);

/* description of features supported by the FFT */
enum {
  FFT_forward   = 0,   /* FFT uses exp(-ijkw) coefficient */
  FFT_inverse   = 1,   /* FFT uses exp(+ijkw) coefficient */
  FFT_real      = 2,   /* FFT requires real input data */
  FFT_reversed  = 4,   /* FFT requires input bitreversed */
  FFT_prescale  = 8,   /* FFT can scale in first stage */
  FFT_evenlog   = 0x10, /* FFT supports N=2^even */
  FFT_oddlog    = 0x20, /* FFT supports N=2^odd */
  FFT_postshift = 0x40, /* FFT divides result by N */
  FFT_outinbuf  = 0x80  /* FFT places output in the input buffer! */
};

/* FFT test data type */
typedef struct {
  int N;        /* number of points in the FFT */
  char *name;   /* test textual name */
  comp *in;     /* complex FFT test input */
  comp *out;    /* complex FFT test output */
  int flags;    /* flags specifying data features */
} tFFTTest;

/* List of FFT tests of a given size */
typedef struct {
  int n;        /* number of tests there are */
  int N;        /* number of points in each test */
  tFFTTest *FFTTests; /* pointer to the tests */
} tFFTTests;

/* FFT function to test type */
typedef struct {
  fFFT *fn;     /* function to do the FFT */
  char *name;   /* textual name of the FFT function */
  char qshift;  /* max qshift for the input data */
  char inSize;  /* input real data element size in bytes */
  char outSize; /* output real data element size in bytes */
  int  flags;   /* flags specifying features used */
} tFFTFunction;

int FFT_fp  (comp   *input, comp   *output, int logN, int direction);

#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?