Mercurial > mplayer.hg
annotate libao2/remez.h @ 5039:da65bafd5e99
very obsoleted...
author | arpi |
---|---|
date | Mon, 11 Mar 2002 00:58:32 +0000 |
parents | 3f041e737e62 |
children |
rev | line source |
---|---|
3482
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
1 /************************************************************************** |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
2 * Parks-McClellan algorithm for FIR filter design (C version) |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
3 *------------------------------------------------- |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
4 * Copyright (c) 1995,1998 Jake Janovetz (janovetz@uiuc.edu) |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
5 * |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
6 * This library is free software; you can redistribute it and/or |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
7 * modify it under the terms of the GNU Library General Public |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
8 * License as published by the Free Software Foundation; either |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
9 * version 2 of the License, or (at your option) any later version. |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
10 * |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
11 * This library is distributed in the hope that it will be useful, |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
14 * Library General Public License for more details. |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
15 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
16 * You should have received a copy of the GNU Library General Public |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
17 * License along with this library; if not, write to the Free |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
18 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
19 * |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
20 *************************************************************************/ |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
21 #ifndef __REMEZ_H__ |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
22 #define __REMEZ_H__ |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
23 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
24 #define BANDPASS 1 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
25 #define DIFFERENTIATOR 2 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
26 #define HILBERT 3 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
27 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
28 #define NEGATIVE 0 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
29 #define POSITIVE 1 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
30 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
31 #define Pi 3.1415926535897932 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
32 #define Pi2 6.2831853071795865 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
33 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
34 #define GRIDDENSITY 16 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
35 #define MAXITERATIONS 40 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
36 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
37 /* Function prototype for remez() - the only function that should need be |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
38 * called from external code |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
39 */ |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
40 void remez(double h[], int numtaps, |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
41 int numband, double bands[], double des[], double weight[], |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
42 int type); |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
43 |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
44 #endif /* __REMEZ_H__ */ |
3f041e737e62
code by Jake Janovetz to find FIR filter coefficients using the Parks-McClellan algorithm
steve
parents:
diff
changeset
|
45 |