spandsp 0.0.6
|
00001 /* 00002 * SpanDSP - a series of DSP components for telephony 00003 * 00004 * private/lpc10.h - LPC10 low bit rate speech codec. 00005 * 00006 * Written by Steve Underwood <steveu@coppice.org> 00007 * 00008 * Copyright (C) 2006 Steve Underwood 00009 * 00010 * All rights reserved. 00011 * 00012 * This program is free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU Lesser General Public License version 2.1, 00014 * as published by the Free Software Foundation. 00015 * 00016 * This program is distributed in the hope that it will be useful, 00017 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00019 * GNU Lesser General Public License for more details. 00020 * 00021 * You should have received a copy of the GNU Lesser General Public 00022 * License along with this program; if not, write to the Free Software 00023 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. 00024 */ 00025 00026 #if !defined(_SPANDSP_PRIVATE_LPC10_H_) 00027 #define _SPANDSP_PRIVATE_LPC10_H_ 00028 00029 /*! 00030 LPC10 codec encoder state descriptor. This defines the state of 00031 a single working instance of the LPC10 encoder. 00032 */ 00033 struct lpc10_encode_state_s 00034 { 00035 /*! \brief ??? */ 00036 int error_correction; 00037 00038 /* State used only by function high_pass_100hz */ 00039 /*! \brief ??? */ 00040 float z11; 00041 /*! \brief ??? */ 00042 float z21; 00043 /*! \brief ??? */ 00044 float z12; 00045 /*! \brief ??? */ 00046 float z22; 00047 00048 /* State used by function lpc10_analyse */ 00049 /*! \brief ??? */ 00050 float inbuf[LPC10_SAMPLES_PER_FRAME*3]; 00051 /*! \brief ??? */ 00052 float pebuf[LPC10_SAMPLES_PER_FRAME*3]; 00053 /*! \brief ??? */ 00054 float lpbuf[696]; 00055 /*! \brief ??? */ 00056 float ivbuf[312]; 00057 /*! \brief ??? */ 00058 float bias; 00059 /*! \brief No initial value necessary */ 00060 int32_t osbuf[10]; 00061 /*! \brief Initial value 1 */ 00062 int32_t osptr; 00063 /*! \brief ??? */ 00064 int32_t obound[3]; 00065 /*! \brief Initial value vwin[2][0] = 307; vwin[2][1] = 462; */ 00066 int32_t vwin[3][2]; 00067 /*! \brief Initial value awin[2][0] = 307; awin[2][1] = 462; */ 00068 int32_t awin[3][2]; 00069 /*! \brief ??? */ 00070 int32_t voibuf[4][2]; 00071 /*! \brief ??? */ 00072 float rmsbuf[3]; 00073 /*! \brief ??? */ 00074 float rcbuf[3][10]; 00075 /*! \brief ??? */ 00076 float zpre; 00077 00078 /* State used by function onset */ 00079 /*! \brief ??? */ 00080 float n; 00081 /*! \brief Initial value 1.0f */ 00082 float d__; 00083 /*! \brief No initial value necessary */ 00084 float fpc; 00085 /*! \brief ??? */ 00086 float l2buf[16]; 00087 /*! \brief ??? */ 00088 float l2sum1; 00089 /*! \brief Initial value 1 */ 00090 int32_t l2ptr1; 00091 /*! \brief Initial value 9 */ 00092 int32_t l2ptr2; 00093 /*! \brief No initial value necessary */ 00094 int32_t lasti; 00095 /*! \brief Initial value FALSE */ 00096 int hyst; 00097 00098 /* State used by function lpc10_voicing */ 00099 /*! \brief Initial value 20.0f */ 00100 float dither; 00101 /*! \brief ??? */ 00102 float snr; 00103 /*! \brief ??? */ 00104 float maxmin; 00105 /*! \brief Initial value is probably unnecessary */ 00106 float voice[3][2]; 00107 /*! \brief ??? */ 00108 int32_t lbve; 00109 /*! \brief ??? */ 00110 int32_t lbue; 00111 /*! \brief ??? */ 00112 int32_t fbve; 00113 /*! \brief ??? */ 00114 int32_t fbue; 00115 /*! \brief ??? */ 00116 int32_t ofbue; 00117 /*! \brief ??? */ 00118 int32_t sfbue; 00119 /*! \brief ??? */ 00120 int32_t olbue; 00121 /*! \brief ??? */ 00122 int32_t slbue; 00123 00124 /* State used by function dynamic_pitch_tracking */ 00125 /*! \brief ??? */ 00126 float s[60]; 00127 /*! \brief ??? */ 00128 int32_t p[2][60]; 00129 /*! \brief ??? */ 00130 int32_t ipoint; 00131 /*! \brief ??? */ 00132 float alphax; 00133 00134 /* State used by function lpc10_pack */ 00135 /*! \brief ??? */ 00136 int32_t isync; 00137 }; 00138 00139 /*! 00140 LPC10 codec decoder state descriptor. This defines the state of 00141 a single working instance of the LPC10 decoder. 00142 */ 00143 struct lpc10_decode_state_s 00144 { 00145 /*! \brief ??? */ 00146 int error_correction; 00147 00148 /* State used by function decode */ 00149 /*! \brief Initial value 60 */ 00150 int32_t iptold; 00151 /*! \brief Initial value TRUE */ 00152 int first; 00153 /*! \brief ??? */ 00154 int32_t ivp2h; 00155 /*! \brief ??? */ 00156 int32_t iovoic; 00157 /*! \brief Initial value 60. */ 00158 int32_t iavgp; 00159 /*! \brief ??? */ 00160 int32_t erate; 00161 /*! \brief ??? */ 00162 int32_t drc[10][3]; 00163 /*! \brief ??? */ 00164 int32_t dpit[3]; 00165 /*! \brief ??? */ 00166 int32_t drms[3]; 00167 00168 /* State used by function synths */ 00169 /*! \brief ??? */ 00170 float buf[LPC10_SAMPLES_PER_FRAME*2]; 00171 /*! \brief Initial value LPC10_SAMPLES_PER_FRAME */ 00172 int32_t buflen; 00173 00174 /* State used by function pitsyn */ 00175 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ 00176 int32_t ivoico; 00177 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ 00178 int32_t ipito; 00179 /*! \brief Initial value 1.0f */ 00180 float rmso; 00181 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ 00182 float rco[10]; 00183 /*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */ 00184 int32_t jsamp; 00185 /*! \brief Initial value TRUE */ 00186 int first_pitsyn; 00187 00188 /* State used by function bsynz */ 00189 /*! \brief ??? */ 00190 int32_t ipo; 00191 /*! \brief ??? */ 00192 float exc[166]; 00193 /*! \brief ??? */ 00194 float exc2[166]; 00195 /*! \brief ??? */ 00196 float lpi[3]; 00197 /*! \brief ??? */ 00198 float hpi[3]; 00199 /*! \brief ??? */ 00200 float rmso_bsynz; 00201 00202 /* State used by function random */ 00203 /*! \brief ??? */ 00204 int32_t j; 00205 /*! \brief ??? */ 00206 int32_t k; 00207 /*! \brief ??? */ 00208 int16_t y[5]; 00209 00210 /* State used by function deemp */ 00211 /*! \brief ??? */ 00212 float dei[2]; 00213 /*! \brief ??? */ 00214 float deo[3]; 00215 }; 00216 00217 #endif 00218 /*- End of include ---------------------------------------------------------*/