135 for(i = 0; i < 8; i++){
137 memcpy(tmp, dec->
cvector, i *
sizeof(*tmp));
138 for(j = 0; j < i; j++)
140 (dec->
cvector[j] << 15) + 0x4000) >> 15;
144 for(i = 0; i < 8; i++)
155 for(i = 0; i < 8; i++){
160 for(i = 0; i < 8; i++){
165 for(i = 0; i < 8; i++){
173 int16_t tmp[146 + 60], *ptr0, *ptr1;
182 for(i = 0; i < 146; i++)
184 off = (t / 25) + dec->
offset1[quart >> 1] + 18;
185 off = av_clip(off, 0, 145);
186 ptr0 = tmp + 145 -
off;
189 for(i = 0; i < 60; i++){
190 t = (ptr0[0] * filter[0] + ptr0[1] * filter[1] + 0x2000) >> 14;
205 memset(out, 0, 60 *
sizeof(*out));
206 for(i = 0; i < 7; i++) {
215 for(i = 0, j = 3; (i < 30) && (j > 0); i++){
225 coef = dec->
pulsepos[quart] & 0x7FFF;
227 for(i = 30, j = 4; (i < 60) && (j > 0); i++){
245 for(i = 0; i < 60; i++){
255 int16_t *ptr0, *ptr1;
258 ptr1 = dec->
filters + quart * 8;
259 for(i = 0; i < 60; i++){
261 for(k = 0; k < 8; k++)
262 sum += ptr0[k] * ptr1[k];
263 sum = (sum + (out[i] << 12) + 0x800) >> 12;
264 out[i] = av_clip(sum, -0x7FFE, 0x7FFE);
265 for(k = 7; k > 0; k--)
266 ptr0[k] = ptr0[k - 1];
270 for(i = 0; i < 8; i++)
274 for(i = 0; i < 60; i++){
276 for(k = 0; k < 8; k++)
277 sum += ptr0[k] * t[k];
278 for(k = 7; k > 0; k--)
279 ptr0[k] = ptr0[k - 1];
281 out[i] = ((out[i] << 12) - sum) >> 12;
284 for(i = 0; i < 8; i++)
288 for(i = 0; i < 60; i++){
289 int sum = out[i] << 12;
290 for(k = 0; k < 8; k++)
291 sum += ptr0[k] * t[k];
292 for(k = 7; k > 0; k--)
293 ptr0[k] = ptr0[k - 1];
294 ptr0[0] = av_clip((sum + 0x800) >> 12, -0x7FFE, 0x7FFE);
296 sum = ((ptr0[1] * (dec->
filtval - (dec->
filtval >> 2))) >> 4) + sum;
297 sum = sum - (sum >> 3);
298 out[i] = av_clip((sum + 0x800) >> 12, -0x7FFE, 0x7FFE);
306 for(i = 0; i < 8; i++)
311 int *got_frame_ptr,
AVPacket *avpkt)
314 int buf_size = avpkt->
size;
321 iterations = buf_size / 32;
325 "Too small input buffer (%d bytes), need at least 32 bytes\n", buf_size);
337 memset(samples, 0, iterations * 240 *
sizeof(*samples));
339 for(j = 0; j < iterations; j++) {
346 for(i = 0; i < 4; i++) {
364 .
name =
"truespeech",