spandsp  0.0.6
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 */
34 {
35  /*! \brief ??? */
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 */
144 {
145  /*! \brief ??? */
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 */
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 ---------------------------------------------------------*/
Definition: private/lpc10.h:33
float lpi[3]
???
Definition: private/lpc10.h:196
float pebuf[LPC10_SAMPLES_PER_FRAME *3]
???
Definition: private/lpc10.h:52
int32_t p[2][60]
???
Definition: private/lpc10.h:128
float exc[166]
???
Definition: private/lpc10.h:192
float exc2[166]
???
Definition: private/lpc10.h:194
int hyst
Initial value FALSE.
Definition: private/lpc10.h:96
int32_t ipito
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition: private/lpc10.h:178
float dither
Initial value 20.0f.
Definition: private/lpc10.h:100
float z21
???
Definition: private/lpc10.h:42
int error_correction
???
Definition: private/lpc10.h:146
int32_t l2ptr2
Initial value 9.
Definition: private/lpc10.h:92
int32_t iptold
Initial value 60.
Definition: private/lpc10.h:150
float fpc
No initial value necessary.
Definition: private/lpc10.h:84
int32_t ivoico
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition: private/lpc10.h:176
float rco[10]
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition: private/lpc10.h:182
float rmsbuf[3]
???
Definition: private/lpc10.h:72
Definition: private/lpc10.h:143
int32_t voibuf[4][2]
???
Definition: private/lpc10.h:70
int16_t y[5]
???
Definition: private/lpc10.h:208
int32_t osbuf[10]
No initial value necessary.
Definition: private/lpc10.h:60
float d__
Initial value 1.0f.
Definition: private/lpc10.h:82
int32_t isync
???
Definition: private/lpc10.h:136
int32_t ofbue
???
Definition: private/lpc10.h:116
int32_t buflen
Initial value LPC10_SAMPLES_PER_FRAME.
Definition: private/lpc10.h:172
float snr
???
Definition: private/lpc10.h:102
int32_t k
???
Definition: private/lpc10.h:206
int32_t olbue
???
Definition: private/lpc10.h:120
int32_t drms[3]
???
Definition: private/lpc10.h:166
float l2sum1
???
Definition: private/lpc10.h:88
float rmso_bsynz
???
Definition: private/lpc10.h:200
float bias
???
Definition: private/lpc10.h:58
float rcbuf[3][10]
???
Definition: private/lpc10.h:74
float hpi[3]
???
Definition: private/lpc10.h:198
int32_t ivp2h
???
Definition: private/lpc10.h:154
int32_t iavgp
Initial value 60.
Definition: private/lpc10.h:158
float dei[2]
???
Definition: private/lpc10.h:212
float lpbuf[696]
???
Definition: private/lpc10.h:54
int32_t drc[10][3]
???
Definition: private/lpc10.h:162
int32_t ipoint
???
Definition: private/lpc10.h:130
float l2buf[16]
???
Definition: private/lpc10.h:86
float n
???
Definition: private/lpc10.h:80
float zpre
???
Definition: private/lpc10.h:76
int32_t iovoic
???
Definition: private/lpc10.h:156
int first
Initial value TRUE.
Definition: private/lpc10.h:152
float rmso
Initial value 1.0f.
Definition: private/lpc10.h:180
int32_t jsamp
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition: private/lpc10.h:184
int32_t ipo
???
Definition: private/lpc10.h:190
float z22
???
Definition: private/lpc10.h:46
float s[60]
???
Definition: private/lpc10.h:126
int32_t sfbue
???
Definition: private/lpc10.h:118
int32_t slbue
???
Definition: private/lpc10.h:122
int32_t fbue
???
Definition: private/lpc10.h:114
float voice[3][2]
Initial value is probably unnecessary.
Definition: private/lpc10.h:106
int32_t awin[3][2]
Initial value awin[2][0] = 307; awin[2][1] = 462;.
Definition: private/lpc10.h:68
float z12
???
Definition: private/lpc10.h:44
float buf[LPC10_SAMPLES_PER_FRAME *2]
???
Definition: private/lpc10.h:170
int32_t lasti
No initial value necessary.
Definition: private/lpc10.h:94
int32_t lbve
???
Definition: private/lpc10.h:108
int32_t lbue
???
Definition: private/lpc10.h:110
float maxmin
???
Definition: private/lpc10.h:104
int32_t obound[3]
???
Definition: private/lpc10.h:64
float alphax
???
Definition: private/lpc10.h:132
int error_correction
???
Definition: private/lpc10.h:36
int32_t j
???
Definition: private/lpc10.h:204
float ivbuf[312]
???
Definition: private/lpc10.h:56
float z11
???
Definition: private/lpc10.h:40
int32_t dpit[3]
???
Definition: private/lpc10.h:164
float inbuf[LPC10_SAMPLES_PER_FRAME *3]
???
Definition: private/lpc10.h:50
float deo[3]
???
Definition: private/lpc10.h:214
int32_t erate
???
Definition: private/lpc10.h:160
int32_t osptr
Initial value 1.
Definition: private/lpc10.h:62
int32_t fbve
???
Definition: private/lpc10.h:112
int first_pitsyn
Initial value TRUE.
Definition: private/lpc10.h:186
int32_t l2ptr1
Initial value 1.
Definition: private/lpc10.h:90
int32_t vwin[3][2]
Initial value vwin[2][0] = 307; vwin[2][1] = 462;.
Definition: private/lpc10.h:66