File: fft.h

package info (click to toggle)
webrtc-audio-processing 1.3-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 6,112 kB
  • sloc: cpp: 50,766; ansic: 19,793; asm: 236; makefile: 4
file content (58 lines) | stat: -rw-r--r-- 2,002 bytes parent folder | download | duplicates (44)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/*
 *  Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the ../../../LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

/*--------------------------------*-C-*---------------------------------*
 * File:
 *       fftn.h
 * ---------------------------------------------------------------------*
 * Re[]:        real value array
 * Im[]:        imaginary value array
 * nTotal:      total number of complex values
 * nPass:       number of elements involved in this pass of transform
 * nSpan:       nspan/nPass = number of bytes to increment pointer
 *              in Re[] and Im[]
 * isign: exponent: +1 = forward  -1 = reverse
 * scaling: normalizing constant by which the final result is *divided*
 * scaling == -1, normalize by total dimension of the transform
 * scaling <  -1, normalize by the square-root of the total dimension
 *
 * ----------------------------------------------------------------------
 * See the comments in the code for correct usage!
 */

#ifndef MODULES_THIRD_PARTY_FFT_FFT_H_
#define MODULES_THIRD_PARTY_FFT_FFT_H_

#define FFT_MAXFFTSIZE 2048
#define FFT_NFACTOR 11

typedef struct {
  unsigned int SpaceAlloced;
  unsigned int MaxPermAlloced;
  double Tmp0[FFT_MAXFFTSIZE];
  double Tmp1[FFT_MAXFFTSIZE];
  double Tmp2[FFT_MAXFFTSIZE];
  double Tmp3[FFT_MAXFFTSIZE];
  int Perm[FFT_MAXFFTSIZE];
  int factor[FFT_NFACTOR];

} FFTstr;

/* double precision routine */

int WebRtcIsac_Fftns(unsigned int ndim,
                     const int dims[],
                     double Re[],
                     double Im[],
                     int isign,
                     double scaling,
                     FFTstr* fftstate);

#endif /* MODULES_THIRD_PARTY_FFT_FFT_H_ */