private/lpc10.h
/*
* SpanDSP - a series of DSP components for telephony
*
* private/lpc10.h - LPC10 low bit rate speech codec.
*
* Written by Steve Underwood <steveu@coppice.org>
*
* Copyright (C) 2006 Steve Underwood
*
* All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License version 2.1,
* as published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this program; if not, write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
#if !defined(_SPANDSP_PRIVATE_LPC10_H_)
#define _SPANDSP_PRIVATE_LPC10_H_
/*!
LPC10 codec encoder state descriptor. This defines the state of
a single working instance of the LPC10 encoder.
*/
struct lpc10_encode_state_s
{
/*! \brief ??? */
int error_correction;
/* State used only by function high_pass_100hz */
/*! \brief ??? */
float z11;
/*! \brief ??? */
float z21;
/*! \brief ??? */
float z12;
/*! \brief ??? */
float z22;
/* State used by function lpc10_analyse */
/*! \brief ??? */
float inbuf[LPC10_SAMPLES_PER_FRAME*3];
/*! \brief ??? */
float pebuf[LPC10_SAMPLES_PER_FRAME*3];
/*! \brief ??? */
float lpbuf[696];
/*! \brief ??? */
float ivbuf[312];
/*! \brief ??? */
float bias;
/*! \brief No initial value necessary */
int32_t osbuf[10];
/*! \brief Initial value 1 */
int32_t osptr;
/*! \brief ??? */
int32_t obound[3];
/*! \brief Initial value vwin[2][0] = 307; vwin[2][1] = 462; */
int32_t vwin[3][2];
/*! \brief Initial value awin[2][0] = 307; awin[2][1] = 462; */
int32_t awin[3][2];
/*! \brief ??? */
int32_t voibuf[4][2];
/*! \brief ??? */
float rmsbuf[3];
/*! \brief ??? */
float rcbuf[3][10];
/*! \brief ??? */
float zpre;
/* State used by function onset */
/*! \brief ??? */
float n;
/*! \brief Initial value 1.0f */
float d__;
/*! \brief No initial value necessary */
float fpc;
/*! \brief ??? */
float l2buf[16];
/*! \brief ??? */
float l2sum1;
/*! \brief Initial value 1 */
int32_t l2ptr1;
/*! \brief Initial value 9 */
int32_t l2ptr2;
/*! \brief No initial value necessary */
int32_t lasti;
/*! \brief Initial value FALSE */
int hyst;
/* State used by function lpc10_voicing */
/*! \brief Initial value 20.0f */
float dither;
/*! \brief ??? */
float snr;
/*! \brief ??? */
float maxmin;
/*! \brief Initial value is probably unnecessary */
float voice[3][2];
/*! \brief ??? */
int32_t lbve;
/*! \brief ??? */
int32_t lbue;
/*! \brief ??? */
int32_t fbve;
/*! \brief ??? */
int32_t fbue;
/*! \brief ??? */
int32_t ofbue;
/*! \brief ??? */
int32_t sfbue;
/*! \brief ??? */
int32_t olbue;
/*! \brief ??? */
int32_t slbue;
/* State used by function dynamic_pitch_tracking */
/*! \brief ??? */
float s[60];
/*! \brief ??? */
int32_t p[2][60];
/*! \brief ??? */
int32_t ipoint;
/*! \brief ??? */
float alphax;
/* State used by function lpc10_pack */
/*! \brief ??? */
int32_t isync;
};
/*!
LPC10 codec decoder state descriptor. This defines the state of
a single working instance of the LPC10 decoder.
*/
struct lpc10_decode_state_s
{
/*! \brief ??? */
int error_correction;
/* State used by function decode */
/*! \brief Initial value 60 */
int32_t iptold;
/*! \brief Initial value TRUE */
int first;
/*! \brief ??? */
int32_t ivp2h;
/*! \brief ??? */
int32_t iovoic;
/*! \brief Initial value 60. */
int32_t iavgp;
/*! \brief ??? */
int32_t erate;
/*! \brief ??? */
int32_t drc[10][3];
/*! \brief ??? */
int32_t dpit[3];
/*! \brief ??? */
int32_t drms[3];
/* State used by function synths */
/*! \brief ??? */
float buf[LPC10_SAMPLES_PER_FRAME*2];
/*! \brief Initial value LPC10_SAMPLES_PER_FRAME */
int32_t buflen;
/* State used by function pitsyn */
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
int32_t ivoico;
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
int32_t ipito;
/*! \brief Initial value 1.0f */
float rmso;
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
float rco[10];
/*! \brief No initial value necessary as long as first_pitsyn is initially TRUE */
int32_t jsamp;
/*! \brief Initial value TRUE */
int first_pitsyn;
/* State used by function bsynz */
/*! \brief ??? */
int32_t ipo;
/*! \brief ??? */
float exc[166];
/*! \brief ??? */
float exc2[166];
/*! \brief ??? */
float lpi[3];
/*! \brief ??? */
float hpi[3];
/*! \brief ??? */
float rmso_bsynz;
/* State used by function random */
/*! \brief ??? */
int32_t j;
/*! \brief ??? */
int32_t k;
/*! \brief ??? */
int16_t y[5];
/* State used by function deemp */
/*! \brief ??? */
float dei[2];
/*! \brief ??? */
float deo[3];
};
#endif
/*- End of include ---------------------------------------------------------*/
lpc10_decode_state_s
Definition private/lpc10.h:144
lpc10_decode_state_s::ipito
int32_t ipito
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition private/lpc10.h:178
lpc10_decode_state_s::lpi
float lpi[3]
???
Definition private/lpc10.h:196
lpc10_decode_state_s::jsamp
int32_t jsamp
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition private/lpc10.h:184
lpc10_decode_state_s::erate
int32_t erate
???
Definition private/lpc10.h:160
lpc10_decode_state_s::hpi
float hpi[3]
???
Definition private/lpc10.h:198
lpc10_decode_state_s::iavgp
int32_t iavgp
Initial value 60.
Definition private/lpc10.h:158
lpc10_decode_state_s::first_pitsyn
int first_pitsyn
Initial value TRUE.
Definition private/lpc10.h:186
lpc10_decode_state_s::buflen
int32_t buflen
Initial value LPC10_SAMPLES_PER_FRAME.
Definition private/lpc10.h:172
lpc10_decode_state_s::ipo
int32_t ipo
???
Definition private/lpc10.h:190
lpc10_decode_state_s::buf
float buf[LPC10_SAMPLES_PER_FRAME *2]
???
Definition private/lpc10.h:170
lpc10_decode_state_s::deo
float deo[3]
???
Definition private/lpc10.h:214
lpc10_decode_state_s::exc
float exc[166]
???
Definition private/lpc10.h:192
lpc10_decode_state_s::error_correction
int error_correction
???
Definition private/lpc10.h:146
lpc10_decode_state_s::k
int32_t k
???
Definition private/lpc10.h:206
lpc10_decode_state_s::rmso
float rmso
Initial value 1.0f.
Definition private/lpc10.h:180
lpc10_decode_state_s::first
int first
Initial value TRUE.
Definition private/lpc10.h:152
lpc10_decode_state_s::dpit
int32_t dpit[3]
???
Definition private/lpc10.h:164
lpc10_decode_state_s::y
int16_t y[5]
???
Definition private/lpc10.h:208
lpc10_decode_state_s::exc2
float exc2[166]
???
Definition private/lpc10.h:194
lpc10_decode_state_s::drc
int32_t drc[10][3]
???
Definition private/lpc10.h:162
lpc10_decode_state_s::dei
float dei[2]
???
Definition private/lpc10.h:212
lpc10_decode_state_s::ivp2h
int32_t ivp2h
???
Definition private/lpc10.h:154
lpc10_decode_state_s::iovoic
int32_t iovoic
???
Definition private/lpc10.h:156
lpc10_decode_state_s::rco
float rco[10]
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition private/lpc10.h:182
lpc10_decode_state_s::rmso_bsynz
float rmso_bsynz
???
Definition private/lpc10.h:200
lpc10_decode_state_s::iptold
int32_t iptold
Initial value 60.
Definition private/lpc10.h:150
lpc10_decode_state_s::j
int32_t j
???
Definition private/lpc10.h:204
lpc10_decode_state_s::ivoico
int32_t ivoico
No initial value necessary as long as first_pitsyn is initially TRUE.
Definition private/lpc10.h:176
lpc10_decode_state_s::drms
int32_t drms[3]
???
Definition private/lpc10.h:166
lpc10_encode_state_s
Definition private/lpc10.h:34
lpc10_encode_state_s::lbue
int32_t lbue
???
Definition private/lpc10.h:110
lpc10_encode_state_s::inbuf
float inbuf[LPC10_SAMPLES_PER_FRAME *3]
???
Definition private/lpc10.h:50
lpc10_encode_state_s::slbue
int32_t slbue
???
Definition private/lpc10.h:122
lpc10_encode_state_s::snr
float snr
???
Definition private/lpc10.h:102
lpc10_encode_state_s::z11
float z11
???
Definition private/lpc10.h:40
lpc10_encode_state_s::bias
float bias
???
Definition private/lpc10.h:58
lpc10_encode_state_s::ipoint
int32_t ipoint
???
Definition private/lpc10.h:130
lpc10_encode_state_s::dither
float dither
Initial value 20.0f.
Definition private/lpc10.h:100
lpc10_encode_state_s::l2ptr2
int32_t l2ptr2
Initial value 9.
Definition private/lpc10.h:92
lpc10_encode_state_s::lbve
int32_t lbve
???
Definition private/lpc10.h:108
lpc10_encode_state_s::sfbue
int32_t sfbue
???
Definition private/lpc10.h:118
lpc10_encode_state_s::lasti
int32_t lasti
No initial value necessary.
Definition private/lpc10.h:94
lpc10_encode_state_s::n
float n
???
Definition private/lpc10.h:80
lpc10_encode_state_s::s
float s[60]
???
Definition private/lpc10.h:126
lpc10_encode_state_s::pebuf
float pebuf[LPC10_SAMPLES_PER_FRAME *3]
???
Definition private/lpc10.h:52
lpc10_encode_state_s::voibuf
int32_t voibuf[4][2]
???
Definition private/lpc10.h:70
lpc10_encode_state_s::alphax
float alphax
???
Definition private/lpc10.h:132
lpc10_encode_state_s::maxmin
float maxmin
???
Definition private/lpc10.h:104
lpc10_encode_state_s::zpre
float zpre
???
Definition private/lpc10.h:76
lpc10_encode_state_s::l2sum1
float l2sum1
???
Definition private/lpc10.h:88
lpc10_encode_state_s::olbue
int32_t olbue
???
Definition private/lpc10.h:120
lpc10_encode_state_s::z12
float z12
???
Definition private/lpc10.h:44
lpc10_encode_state_s::osbuf
int32_t osbuf[10]
No initial value necessary.
Definition private/lpc10.h:60
lpc10_encode_state_s::z22
float z22
???
Definition private/lpc10.h:46
lpc10_encode_state_s::l2ptr1
int32_t l2ptr1
Initial value 1.
Definition private/lpc10.h:90
lpc10_encode_state_s::fbue
int32_t fbue
???
Definition private/lpc10.h:114
lpc10_encode_state_s::rmsbuf
float rmsbuf[3]
???
Definition private/lpc10.h:72
lpc10_encode_state_s::error_correction
int error_correction
???
Definition private/lpc10.h:36
lpc10_encode_state_s::p
int32_t p[2][60]
???
Definition private/lpc10.h:128
lpc10_encode_state_s::ivbuf
float ivbuf[312]
???
Definition private/lpc10.h:56
lpc10_encode_state_s::ofbue
int32_t ofbue
???
Definition private/lpc10.h:116
lpc10_encode_state_s::isync
int32_t isync
???
Definition private/lpc10.h:136
lpc10_encode_state_s::fbve
int32_t fbve
???
Definition private/lpc10.h:112
lpc10_encode_state_s::d__
float d__
Initial value 1.0f.
Definition private/lpc10.h:82
lpc10_encode_state_s::z21
float z21
???
Definition private/lpc10.h:42
lpc10_encode_state_s::rcbuf
float rcbuf[3][10]
???
Definition private/lpc10.h:74
lpc10_encode_state_s::vwin
int32_t vwin[3][2]
Initial value vwin[2][0] = 307; vwin[2][1] = 462;.
Definition private/lpc10.h:66
lpc10_encode_state_s::awin
int32_t awin[3][2]
Initial value awin[2][0] = 307; awin[2][1] = 462;.
Definition private/lpc10.h:68
lpc10_encode_state_s::l2buf
float l2buf[16]
???
Definition private/lpc10.h:86
lpc10_encode_state_s::voice
float voice[3][2]
Initial value is probably unnecessary.
Definition private/lpc10.h:106
lpc10_encode_state_s::lpbuf
float lpbuf[696]
???
Definition private/lpc10.h:54
lpc10_encode_state_s::hyst
int hyst
Initial value FALSE.
Definition private/lpc10.h:96
lpc10_encode_state_s::obound
int32_t obound[3]
???
Definition private/lpc10.h:64
lpc10_encode_state_s::fpc
float fpc
No initial value necessary.
Definition private/lpc10.h:84
lpc10_encode_state_s::osptr
int32_t osptr
Initial value 1.
Definition private/lpc10.h:62