92
91
int y; /**< quantizer scaling factor for the next iteration */
95
static int quant_tbl16[] = /**< 16kbit/s 2bits per sample */
94
static const int quant_tbl16[] = /**< 16kbit/s 2bits per sample */
97
static int iquant_tbl16[] =
96
static const int iquant_tbl16[] =
98
97
{ 116, 365, 365, 116 };
99
static int W_tbl16[] =
98
static const int W_tbl16[] =
100
99
{ -22, 439, 439, -22 };
101
static int F_tbl16[] =
100
static const int F_tbl16[] =
104
static int quant_tbl24[] = /**< 24kbit/s 3bits per sample */
103
static const int quant_tbl24[] = /**< 24kbit/s 3bits per sample */
105
104
{ 7, 217, 330, INT_MAX };
106
static int iquant_tbl24[] =
105
static const int iquant_tbl24[] =
107
106
{ INT_MIN, 135, 273, 373, 373, 273, 135, INT_MIN };
108
static int W_tbl24[] =
107
static const int W_tbl24[] =
109
108
{ -4, 30, 137, 582, 582, 137, 30, -4 };
110
static int F_tbl24[] =
109
static const int F_tbl24[] =
111
110
{ 0, 1, 2, 7, 7, 2, 1, 0 };
113
static int quant_tbl32[] = /**< 32kbit/s 4bits per sample */
112
static const int quant_tbl32[] = /**< 32kbit/s 4bits per sample */
114
113
{ -125, 79, 177, 245, 299, 348, 399, INT_MAX };
115
static int iquant_tbl32[] =
114
static const int iquant_tbl32[] =
116
115
{ INT_MIN, 4, 135, 213, 273, 323, 373, 425,
117
116
425, 373, 323, 273, 213, 135, 4, INT_MIN };
118
static int W_tbl32[] =
117
static const int W_tbl32[] =
119
118
{ -12, 18, 41, 64, 112, 198, 355, 1122,
120
119
1122, 355, 198, 112, 64, 41, 18, -12};
121
static int F_tbl32[] =
120
static const int F_tbl32[] =
122
121
{ 0, 0, 0, 1, 1, 1, 3, 7, 7, 3, 1, 1, 1, 0, 0, 0 };
124
static int quant_tbl40[] = /**< 40kbit/s 5bits per sample */
123
static const int quant_tbl40[] = /**< 40kbit/s 5bits per sample */
125
124
{ -122, -16, 67, 138, 197, 249, 297, 338,
126
125
377, 412, 444, 474, 501, 527, 552, INT_MAX };
127
static int iquant_tbl40[] =
126
static const int iquant_tbl40[] =
128
127
{ INT_MIN, -66, 28, 104, 169, 224, 274, 318,
129
128
358, 395, 429, 459, 488, 514, 539, 566,
130
129
566, 539, 514, 488, 459, 429, 395, 358,
131
130
318, 274, 224, 169, 104, 28, -66, INT_MIN };
132
static int W_tbl40[] =
131
static const int W_tbl40[] =
133
132
{ 14, 14, 24, 39, 40, 41, 58, 100,
134
133
141, 179, 219, 280, 358, 440, 529, 696,
135
134
696, 529, 440, 358, 280, 219, 179, 141,
136
135
100, 58, 41, 40, 39, 24, 14, 14 };
137
static int F_tbl40[] =
136
static const int F_tbl40[] =
138
137
{ 0, 0, 0, 0, 0, 1, 1, 1, 1, 1, 2, 3, 4, 5, 6, 6,
139
138
6, 6, 5, 4, 3, 2, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0 };
141
static G726Tables G726Tables_pool[] =
140
static const G726Tables G726Tables_pool[] =
142
141
{{ 2, quant_tbl16, iquant_tbl16, W_tbl16, F_tbl16 },
143
142
{ 3, quant_tbl24, iquant_tbl24, W_tbl24, F_tbl24 },
144
143
{ 4, quant_tbl32, iquant_tbl32, W_tbl32, F_tbl32 },