libilbc
0.0.1
filter.h
1
/*
2
* iLBC - a library for the iLBC codec
3
*
4
* filter.h - The iLBC low bit rate speech codec.
5
*
6
* Adapted by Steve Underwood <steveu@coppice.org> from the reference
7
* iLBC code supplied in RFC3951.
8
*
9
* Original code Copyright (C) The Internet Society (2004).
10
* All changes to produce this version Copyright (C) 2008 by Steve Underwood
11
* All Rights Reserved.
12
*
13
* This program is distributed in the hope that it will be useful,
14
* but WITHOUT ANY WARRANTY; without even the implied warranty of
15
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16
*/
17
18
#ifndef __iLBC_FILTER_H
19
#define __iLBC_FILTER_H
20
21
void
AllPoleFilter(
float
*InOut,
/* (i/o) on entrance InOut[-orderCoef] to
22
InOut[-1] contain the state of the
23
filter (delayed samples). InOut[0] to
24
InOut[lengthInOut-1] contain the filter
25
input, on en exit InOut[-orderCoef] to
26
InOut[-1] is unchanged and InOut[0] to
27
InOut[lengthInOut-1] contain filtered
28
samples */
29
const
float
*Coef,
/* (i) filter coefficients, Coef[0] is assumed to be 1.0 */
30
int
lengthInOut,
/* (i) number of input/output samples */
31
int
orderCoef);
/* (i) number of filter coefficients */
32
33
void
AllZeroFilter(
float
*In,
/* (i) In[0] to In[lengthInOut-1] contain
34
filter input samples */
35
const
float
*Coef,
/* (i) filter coefficients (Coef[0] is assumed to be 1.0) */
36
int
lengthInOut,
/* (i) number of input/output samples */
37
int
orderCoef,
/* (i) number of filter coefficients */
38
float
*Out);
/* (i/o) on entrance Out[-orderCoef] to Out[-1]
39
contain the filter state, on exit Out[0]
40
to Out[lengthInOut-1] contain filtered
41
samples */
42
43
void
ZeroPoleFilter(
float
*In,
/* (i) In[0] to In[lengthInOut-1] contain filter
44
input samples In[-orderCoef] to In[-1]
45
contain state of all-zero section */
46
const
float
*ZeroCoef,
/* (i) filter coefficients for all-zero
47
section (ZeroCoef[0] is assumed to
48
be 1.0) */
49
const
float
*PoleCoef,
/* (i) filter coefficients for all-pole section
50
(ZeroCoef[0] is assumed to be 1.0) */
51
int
lengthInOut,
/* (i) number of input/output samples */
52
int
orderCoef,
/* (i) number of filter coefficients */
53
float
*Out);
/* (i/o) on entrance Out[-orderCoef] to Out[-1]
54
contain state of all-pole section. On
55
exit Out[0] to Out[lengthInOut-1]
56
contain filtered samples */
57
58
void
DownSample(
const
float
*In,
/* (i) input samples */
59
const
float
*Coef,
/* (i) filter coefficients */
60
int
lengthIn,
/* (i) number of input samples */
61
float
*state,
/* (i) filter state */
62
float
*Out);
/* (o) downsampled output */
63
64
#endif
src
filter.h
Generated by
1.9.8