spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/lpc10.h
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/lpc10.h - LPC10 low bit rate speech codec.
5
*
6
* Written by Steve Underwood <steveu@coppice.org>
7
*
8
* Copyright (C) 2006 Steve Underwood
9
*
10
* All rights reserved.
11
*
12
* This program is free software; you can redistribute it and/or modify
13
* it under the terms of the GNU Lesser General Public License version 2.1,
14
* as published by the Free Software Foundation.
15
*
16
* This program is distributed in the hope that it will be useful,
17
* but WITHOUT ANY WARRANTY; without even the implied warranty of
18
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19
* GNU Lesser General Public License for more details.
20
*
21
* You should have received a copy of the GNU Lesser General Public
22
* License along with this program; if not, write to the Free Software
23
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
*/
25
26
#if !defined(_SPANDSP_PRIVATE_LPC10_H_)
27
#define _SPANDSP_PRIVATE_LPC10_H_
28
29
/*!
30
LPC10 codec encoder state descriptor. This defines the state of
31
a single working instance of the LPC10 encoder.
32
*/
33
struct
lpc10_encode_state_s
34
{
35
/*! \brief ??? */
36
int
error_correction
;
37
38
/* State used only by function high_pass_100hz */
39
/*! \brief ??? */
40
float
z11
;
41
/*! \brief ??? */
42
float
z21
;
43
/*! \brief ??? */
44
float
z12
;
45
/*! \brief ??? */
46
float
z22
;
47
48
/* State used by function lpc10_analyse */
49
/*! \brief ??? */
50
float
inbuf
[LPC10_SAMPLES_PER_FRAME*3];
51
/*! \brief ??? */
52
float
pebuf
[LPC10_SAMPLES_PER_FRAME*3];
53
/*! \brief ??? */
54
float
lpbuf
[696];
55
/*! \brief ??? */
56
float
ivbuf
[312];
57
/*! \brief ??? */
58
float
bias
;
59
/*! \brief No initial value necessary */
60
int32_t
osbuf
[10];
61
/*! \brief Initial value 1 */
62
int32_t
osptr
;
63
/*! \brief ??? */
64
int32_t
obound
[3];
65
/*! \brief Initial value vwin[2][0] = 307; vwin[2][1] = 462; */
66
int32_t
vwin
[3][2];
67
/*! \brief Initial value awin[2][0] = 307; awin[2][1] = 462; */
68
int32_t
awin
[3][2];
69
/*! \brief ??? */
70
int32_t
voibuf
[4][2];
71
/*! \brief ??? */
72
float
rmsbuf
[3];
73
/*! \brief ??? */
74
float
rcbuf
[3][10];
75
/*! \brief ??? */
76
float
zpre
;
77
78
/* State used by function onset */
79
/*! \brief ??? */
80
float
n
;
81
/*! \brief Initial value 1.0f */
82
float
d__
;
83
/*! \brief No initial value necessary */
84
float
fpc
;
85
/*! \brief ??? */
86
float
l2buf
[16];
87
/*! \brief ??? */
88
float
l2sum1
;
89
/*! \brief Initial value 1 */
90
int32_t
l2ptr1
;
91
/*! \brief Initial value 9 */
92
int32_t
l2ptr2
;
93
/*! \brief No initial value necessary */
94
int32_t
lasti
;
95
/*! \brief Initial value FALSE */
96
int
hyst
;
97
98
/* State used by function lpc10_voicing */
99
/*! \brief Initial value 20.0f */
100
float
dither
;
101
/*! \brief ??? */
102
float
snr
;
103
/*! \brief ??? */
104
float
maxmin
;
105
/*! \brief Initial value is probably unnecessary */
106
float
voice
[3][2];
107
/*! \brief ??? */
108
int32_t
lbve
;
109
/*! \brief ??? */
110
int32_t
lbue
;
111
/*! \brief ??? */
112
int32_t
fbve
;
113
/*! \brief ??? */
114
int32_t
fbue
;
115
/*! \brief ??? */
116
int32_t
ofbue
;
117
/*! \brief ??? */
118
int32_t
sfbue
;
119
/*! \brief ??? */
120
int32_t
olbue
;
121
/*! \brief ??? */
122
int32_t
slbue
;
123
124
/* State used by function dynamic_pitch_tracking */
125
/*! \brief ??? */
126
float
s
[60];
127
/*! \brief ??? */
128
int32_t
p
[2][60];
129
/*! \brief ??? */
130
int32_t
ipoint
;
131
/*! \brief ??? */
132
float
alphax
;
133
134
/* State used by function lpc10_pack */
135
/*! \brief ??? */
136
int32_t
isync
;
137
};
138
139
/*!
140
LPC10 codec decoder state descriptor. This defines the state of
141
a single working instance of the LPC10 decoder.
142
*/
143
struct
lpc10_decode_state_s
144
{
145
/*! \brief ??? */
146
int
error_correction
;
147
148
/* State used by function decode */
149
/*! \brief Initial value 60 */
150
int32_t
iptold
;
151
/*! \brief Initial value TRUE */
152
int
first
;
153
/*! \brief ??? */
154
int32_t
ivp2h
;
155
/*! \brief ??? */
156
int32_t
iovoic
;
157
/*! \brief Initial value 60. */
158
int32_t
iavgp
;
159
/*! \brief ??? */
160
int32_t
erate
;
161
/*! \brief ??? */
162
int32_t
drc
[10][3];
163
/*! \brief ??? */
164
int32_t
dpit
[3];
165
/*! \brief ??? */
166
int32_t
drms
[3];
167
168
/* State used by function synths */
169
/*! \brief ??? */
170
float
buf
[LPC10_SAMPLES_PER_FRAME*2];
171
/*! \brief Initial value LPC10_SAMPLES_PER_FRAME */
172
int32_t
buflen
;
173
174
/* State used by function pitsyn */
175
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
176
int32_t
ivoico
;
177
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
178
int32_t
ipito
;
179
/*! \brief Initial value 1.0f */
180
float
rmso
;
181
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
182
float
rco
[10];
183
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
184
int32_t
jsamp
;
185
/*! \brief Initial value TRUE */
186
int
first_pitsyn
;
187
188
/* State used by function bsynz */
189
/*! \brief ??? */
190
int32_t
ipo
;
191
/*! \brief ??? */
192
float
exc
[166];
193
/*! \brief ??? */
194
float
exc2
[166];
195
/*! \brief ??? */
196
float
lpi
[3];
197
/*! \brief ??? */
198
float
hpi
[3];
199
/*! \brief ??? */
200
float
rmso_bsynz
;
201
202
/* State used by function random */
203
/*! \brief ??? */
204
int32_t
j
;
205
/*! \brief ??? */
206
int32_t
k
;
207
/*! \brief ??? */
208
int16_t
y
[5];
209
210
/* State used by function deemp */
211
/*! \brief ??? */
212
float
dei
[2];
213
/*! \brief ??? */
214
float
deo
[3];
215
};
216
217
#endif
218
/*- End of include ---------------------------------------------------------*/
src
spandsp
private
lpc10.h
Generated by
1.8.1.1