spandsp
0.0.6
Main Page
Related Pages
Classes
Files
File List
File Members
private/g722.h
Go to the documentation of this file.
1
/*
2
* SpanDSP - a series of DSP components for telephony
3
*
4
* private/g722.h - The ITU G.722 codec.
5
*
6
* Written by Steve Underwood <steveu@coppice.org>
7
*
8
* Copyright (C) 2005 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
* Based on a single channel G.722 codec which is:
26
*
27
***** Copyright (c) CMU 1993 *****
28
* Computer Science, Speech Group
29
* Chengxiang Lu and Alex Hauptmann
30
*/
31
32
33
/*! \file */
34
35
#if !defined(_SPANDSP_PRIVATE_G722_H_)
36
#define _SPANDSP_PRIVATE_G722_H_
37
38
/*! The per band parameters for both encoding and decoding G.722 */
39
typedef
struct
40
{
41
int16_t nb;
42
int16_t det;
43
int16_t s;
44
int16_t sz;
45
int16_t r;
46
int16_t p[2];
47
int16_t a[2];
48
int16_t b[6];
49
int16_t d[7];
50
}
g722_band_t
;
51
52
/*!
53
G.722 encode state
54
*/
55
struct
g722_encode_state_s
56
{
57
/*! TRUE if the operating in the special ITU test mode, with the band split filters
58
disabled. */
59
int
itu_test_mode
;
60
/*! TRUE if the G.722 data is packed */
61
int
packed
;
62
/*! TRUE if encode from 8k samples/second */
63
int
eight_k
;
64
/*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
65
int
bits_per_sample
;
66
67
/*! Signal history for the QMF */
68
int16_t
x
[12];
69
int16_t y[12];
70
int
ptr;
71
72
g722_band_t
band[2];
73
74
uint32_t in_buffer;
75
int
in_bits;
76
uint32_t out_buffer;
77
int
out_bits;
78
};
79
80
/*!
81
G.722 decode state
82
*/
83
struct
g722_decode_state_s
84
{
85
/*! TRUE if the operating in the special ITU test mode, with the band split filters
86
disabled. */
87
int
itu_test_mode
;
88
/*! TRUE if the G.722 data is packed */
89
int
packed
;
90
/*! TRUE if decode to 8k samples/second */
91
int
eight_k
;
92
/*! 6 for 48000kbps, 7 for 56000kbps, or 8 for 64000kbps. */
93
int
bits_per_sample
;
94
95
/*! Signal history for the QMF */
96
int16_t
x
[12];
97
int16_t y[12];
98
int
ptr;
99
100
g722_band_t
band[2];
101
102
uint32_t in_buffer;
103
int
in_bits;
104
uint32_t out_buffer;
105
int
out_bits;
106
};
107
108
#endif
109
/*- End of file ------------------------------------------------------------*/
src
spandsp
private
g722.h
Generated by
1.8.1.1