Mercurial > hg > audiostuff
comparison spandsp-0.0.6pre17/src/spandsp/private/lpc10.h @ 4:26cd8f1ef0b1
import spandsp-0.0.6pre17
author | Peter Meerwald <pmeerw@cosy.sbg.ac.at> |
---|---|
date | Fri, 25 Jun 2010 15:50:58 +0200 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
3:c6c5a16ce2f2 | 4:26cd8f1ef0b1 |
---|---|
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 * $Id: lpc10.h,v 1.3 2009/04/12 09:12:11 steveu Exp $ | |
26 */ | |
27 | |
28 #if !defined(_SPANDSP_PRIVATE_LPC10_H_) | |
29 #define _SPANDSP_PRIVATE_LPC10_H_ | |
30 | |
31 /*! | |
32 LPC10 codec encoder state descriptor. This defines the state of | |
33 a single working instance of the LPC10 encoder. | |
34 */ | |
35 struct lpc10_encode_state_s | |
36 { | |
37 /*! \brief ??? */ | |
38 int error_correction; | |
39 | |
40 /* State used only by function high_pass_100hz */ | |
41 /*! \brief ??? */ | |
42 float z11; | |
43 /*! \brief ??? */ | |
44 float z21; | |
45 /*! \brief ??? */ | |
46 float z12; | |
47 /*! \brief ??? */ | |
48 float z22; | |
49 | |
50 /* State used by function lpc10_analyse */ | |
51 /*! \brief ??? */ | |
52 float inbuf[LPC10_SAMPLES_PER_FRAME*3]; | |
53 /*! \brief ??? */ | |
54 float pebuf[LPC10_SAMPLES_PER_FRAME*3]; | |
55 /*! \brief ??? */ | |
56 float lpbuf[696]; | |
57 /*! \brief ??? */ | |
58 float ivbuf[312]; | |
59 /*! \brief ??? */ | |
60 float bias; | |
61 /*! \brief No initial value necessary */ | |
62 int32_t osbuf[10]; | |
63 /*! \brief Initial value 1 */ | |
64 int32_t osptr; | |
65 /*! \brief ??? */ | |
66 int32_t obound[3]; | |
67 /*! \brief Initial value vwin[2][0] = 307; vwin[2][1] = 462; */ | |
68 int32_t vwin[3][2]; | |
69 /*! \brief Initial value awin[2][0] = 307; awin[2][1] = 462; */ | |
70 int32_t awin[3][2]; | |
71 /*! \brief ??? */ | |
72 int32_t voibuf[4][2]; | |
73 /*! \brief ??? */ | |
74 float rmsbuf[3]; | |
75 /*! \brief ??? */ | |
76 float rcbuf[3][10]; | |
77 /*! \brief ??? */ | |
78 float zpre; | |
79 | |
80 /* State used by function onset */ | |
81 /*! \brief ??? */ | |
82 float n; | |
83 /*! \brief Initial value 1.0f */ | |
84 float d__; | |
85 /*! \brief No initial value necessary */ | |
86 float fpc; | |
87 /*! \brief ??? */ | |
88 float l2buf[16]; | |
89 /*! \brief ??? */ | |
90 float l2sum1; | |
91 /*! \brief Initial value 1 */ | |
92 int32_t l2ptr1; | |
93 /*! \brief Initial value 9 */ | |
94 int32_t l2ptr2; | |
95 /*! \brief No initial value necessary */ | |
96 int32_t lasti; | |
97 /*! \brief Initial value FALSE */ | |
98 int hyst; | |
99 | |
100 /* State used by function lpc10_voicing */ | |
101 /*! \brief Initial value 20.0f */ | |
102 float dither; | |
103 /*! \brief ??? */ | |
104 float snr; | |
105 /*! \brief ??? */ | |
106 float maxmin; | |
107 /*! \brief Initial value is probably unnecessary */ | |
108 float voice[3][2]; | |
109 /*! \brief ??? */ | |
110 int32_t lbve; | |
111 /*! \brief ??? */ | |
112 int32_t lbue; | |
113 /*! \brief ??? */ | |
114 int32_t fbve; | |
115 /*! \brief ??? */ | |
116 int32_t fbue; | |
117 /*! \brief ??? */ | |
118 int32_t ofbue; | |
119 /*! \brief ??? */ | |
120 int32_t sfbue; | |
121 /*! \brief ??? */ | |
122 int32_t olbue; | |
123 /*! \brief ??? */ | |
124 int32_t slbue; | |
125 | |
126 /* State used by function dynamic_pitch_tracking */ | |
127 /*! \brief ??? */ | |
128 float s[60]; | |
129 /*! \brief ??? */ | |
130 int32_t p[2][60]; | |
131 /*! \brief ??? */ | |
132 int32_t ipoint; | |
133 /*! \brief ??? */ | |
134 float alphax; | |
135 | |
136 /* State used by function lpc10_pack */ | |
137 /*! \brief ??? */ | |
138 int32_t isync; | |
139 }; | |
140 | |
141 /*! | |
142 LPC10 codec decoder state descriptor. This defines the state of | |
143 a single working instance of the LPC10 decoder. | |
144 */ | |
145 struct lpc10_decode_state_s | |
146 { | |
147 /*! \brief ??? */ | |
148 int error_correction; | |
149 | |
150 /* State used by function decode */ | |
151 /*! \brief Initial value 60 */ | |
152 int32_t iptold; | |
153 /*! \brief Initial value TRUE */ | |
154 int first; | |
155 /*! \brief ??? */ | |
156 int32_t ivp2h; | |
157 /*! \brief ??? */ | |
158 int32_t iovoic; | |
159 /*! \brief Initial value 60. */ | |
160 int32_t iavgp; | |
161 /*! \brief ??? */ | |
162 int32_t erate; | |
163 /*! \brief ??? */ | |
164 int32_t drc[10][3]; | |
165 /*! \brief ??? */ | |
166 int32_t dpit[3]; | |
167 /*! \brief ??? */ | |
168 int32_t drms[3]; | |
169 | |
170 /* State used by function synths */ | |
171 /*! \brief ??? */ | |
172 float buf[LPC10_SAMPLES_PER_FRAME*2]; | |
173 /*! \brief Initial value LPC10_SAMPLES_PER_FRAME */ | |
174 int32_t buflen; | |
175 | |
176 /* State used by function pitsyn */ | |
177 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ | |
178 int32_t ivoico; | |
179 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ | |
180 int32_t ipito; | |
181 /*! \brief Initial value 1.0f */ | |
182 float rmso; | |
183 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ | |
184 float rco[10]; | |
185 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ | |
186 int32_t jsamp; | |
187 /*! \brief Initial value TRUE */ | |
188 int first_pitsyn; | |
189 | |
190 /* State used by function bsynz */ | |
191 /*! \brief ??? */ | |
192 int32_t ipo; | |
193 /*! \brief ??? */ | |
194 float exc[166]; | |
195 /*! \brief ??? */ | |
196 float exc2[166]; | |
197 /*! \brief ??? */ | |
198 float lpi[3]; | |
199 /*! \brief ??? */ | |
200 float hpi[3]; | |
201 /*! \brief ??? */ | |
202 float rmso_bsynz; | |
203 | |
204 /* State used by function random */ | |
205 /*! \brief ??? */ | |
206 int32_t j; | |
207 /*! \brief ??? */ | |
208 int32_t k; | |
209 /*! \brief ??? */ | |
210 int16_t y[5]; | |
211 | |
212 /* State used by function deemp */ | |
213 /*! \brief ??? */ | |
214 float dei[2]; | |
215 /*! \brief ??? */ | |
216 float deo[3]; | |
217 }; | |
218 | |
219 #endif | |
220 /*- End of include ---------------------------------------------------------*/ |