~ubuntu-branches/ubuntu/saucy/sflphone/saucy

« back to all changes in this revision

Viewing changes to sflphone-common/src/audio/codecs/g722.h

  • Committer: Bazaar Package Importer
  • Author(s): Francois Marier
  • Date: 2010-12-24 16:33:55 UTC
  • mfrom: (1.1.2 upstream)
  • Revision ID: james.westby@ubuntu.com-20101224163355-tkvvikqxbrbav6up
Tags: 0.9.11-1
* New upstream release
* Add new build dependencies on libwebkit-dev and libyaml-dev

* Bump Standards-Version up to 3.9.1
* Bump debhelper compatibility to 8
* Patch another typo in the upstream code (lintian notice)

Show diffs side-by-side

added added

removed removed

Lines of Context:
8
8
 * it under the terms of the GNU General Public License as published by
9
9
 * the Free Software Foundation; either version 3 of the License, or
10
10
 * (at your option) any later version.
11
 
 * 
 
11
 *
12
12
 * This program is distributed in the hope that it will be useful,
13
13
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14
14
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15
15
 * GNU General Public License for more details.
16
 
 *                                                                              
 
16
 *
17
17
 * You should have received a copy of the GNU General Public License
18
18
 * along with this program; if not, write to the Free Software
19
19
 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
48
48
 
49
49
#include <stdint.h>
50
50
 
51
 
enum
52
 
{
 
51
enum {
53
52
    G722_SAMPLE_RATE_8000 = 0x0001,
54
53
    G722_PACKED = 0x0002
55
54
};
61
60
#define INT16_MIN       (-32768)
62
61
#endif
63
62
 
64
 
typedef struct
65
 
{
 
63
typedef struct {
66
64
    /*! TRUE if the operating in the special ITU test mode, with the band split filters
67
65
             disabled. */
68
66
    int itu_test_mode;
76
74
    /*! Signal history for the QMF */
77
75
    int x[24];
78
76
 
79
 
    struct
80
 
    {
 
77
    struct {
81
78
        int s;
82
79
        int sp;
83
80
        int sz;
99
96
    int out_bits;
100
97
} g722_encode_state_t;
101
98
 
102
 
typedef struct
103
 
{
 
99
typedef struct {
104
100
    /*! TRUE if the operating in the special ITU test mode, with the band split filters
105
101
             disabled. */
106
102
    int itu_test_mode;
114
110
    /*! Signal history for the QMF */
115
111
    int x[24];
116
112
 
117
 
    struct
118
 
    {
 
113
    struct {
119
114
        int s;
120
115
        int sp;
121
116
        int sz;
130
125
        int nb;
131
126
        int det;
132
127
    } band[2];
133
 
    
 
128
 
134
129
    unsigned int in_buffer;
135
130
    int in_bits;
136
131
    unsigned int out_buffer;
141
136
extern "C" {
142
137
#endif
143
138
 
144
 
void g722_encode_init (void);
145
 
int g722_encode_release();
146
 
int g722_encode(uint8_t g722_data[], const int16_t amp[], int len);
 
139
    void g722_encode_init (void);
 
140
    int g722_encode_release();
 
141
    int g722_encode (uint8_t g722_data[], const int16_t amp[], int len);
147
142
 
148
 
void g722_decode_init (void);
149
 
int g722_decode_release();
150
 
int g722_decode(int16_t amp[], const uint8_t g722_data[], int len);
 
143
    void g722_decode_init (void);
 
144
    int g722_decode_release();
 
145
    int g722_decode (int16_t amp[], const uint8_t g722_data[], int len);
151
146
 
152
147
#ifdef __cplusplus
153
148
}