spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/g726.h
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/g726.h - ITU G.726 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_G726_H_)
27
#define _SPANDSP_PRIVATE_G726_H_
28
29
/*!
30
* The following is the definition of the state structure
31
* used by the G.726 encoder and decoder to preserve their internal
32
* state between successive calls. The meanings of the majority
33
* of the state structure fields are explained in detail in the
34
* ITU Recommendation G.726. The field names are essentially indentical
35
* to variable names in the bit level description of the coding algorithm
36
* included in this recommendation.
37
*/
38
struct
g726_state_s
39
{
40
/*! The bit rate */
41
int
rate
;
42
/*! The external coding, for tandem operation */
43
int
ext_coding
;
44
/*! The number of bits per sample */
45
int
bits_per_sample
;
46
/*! One of the G.726_PACKING_xxx options */
47
int
packing
;
48
49
/*! Locked or steady state step size multiplier. */
50
int32_t
yl
;
51
/*! Unlocked or non-steady state step size multiplier. */
52
int16_t
yu
;
53
/*! int16_t term energy estimate. */
54
int16_t
dms
;
55
/*! Long term energy estimate. */
56
int16_t
dml
;
57
/*! Linear weighting coefficient of 'yl' and 'yu'. */
58
int16_t
ap
;
59
60
/*! Coefficients of pole portion of prediction filter. */
61
int16_t
a
[2];
62
/*! Coefficients of zero portion of prediction filter. */
63
int16_t
b
[6];
64
/*! Signs of previous two samples of a partially reconstructed signal. */
65
int16_t
pk
[2];
66
/*! Previous 6 samples of the quantized difference signal represented in
67
an internal floating point format. */
68
int16_t
dq
[6];
69
/*! Previous 2 samples of the quantized difference signal represented in an
70
internal floating point format. */
71
int16_t
sr
[2];
72
/*! Delayed tone detect */
73
int
td
;
74
75
/*! \brief The bit stream processing context. */
76
bitstream_state_t
bs
;
77
78
/*! \brief The current encoder function. */
79
g726_encoder_func_t
enc_func
;
80
/*! \brief The current decoder function. */
81
g726_decoder_func_t
dec_func
;
82
};
83
84
#endif
85
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
g726.h
Generated on Sun Aug 4 2013 10:16:46 for spandsp by
1.8.4