131 for(i = 0; i < 8; i++){
133 memcpy(tmp, dec->
cvector, i *
sizeof(*tmp));
134 for(j = 0; j < i; j++)
136 (dec->
cvector[j] << 15) + 0x4000) >> 15;
140 for(i = 0; i < 8; i++)
151 for(i = 0; i < 8; i++){
156 for(i = 0; i < 8; i++){
161 for(i = 0; i < 8; i++){
169 int16_t tmp[146 + 60], *ptr0, *ptr1;
178 for(i = 0; i < 146; i++)
180 off = (t / 25) + dec->
offset1[quart >> 1] + 18;
181 off = av_clip(off, 0, 145);
182 ptr0 = tmp + 145 -
off;
185 for(i = 0; i < 60; i++){
186 t = (ptr0[0] * filter[0] + ptr0[1] * filter[1] + 0x2000) >> 14;
201 memset(out, 0, 60 *
sizeof(*out));
202 for(i = 0; i < 7; i++) {
211 for(i = 0, j = 3; (i < 30) && (j > 0); i++){
221 coef = dec->
pulsepos[quart] & 0x7FFF;
223 for(i = 30, j = 4; (i < 60) && (j > 0); i++){
241 for(i = 0; i < 60; i++){
251 int16_t *ptr0, *ptr1;
254 ptr1 = dec->
filters + quart * 8;
255 for(i = 0; i < 60; i++){
257 for(k = 0; k < 8; k++)
258 sum += ptr0[k] * ptr1[k];
259 sum = (sum + (out[i] << 12) + 0x800) >> 12;
260 out[i] = av_clip(sum, -0x7FFE, 0x7FFE);
261 for(k = 7; k > 0; k--)
262 ptr0[k] = ptr0[k - 1];
266 for(i = 0; i < 8; i++)
270 for(i = 0; i < 60; i++){
272 for(k = 0; k < 8; k++)
273 sum += ptr0[k] * t[k];
274 for(k = 7; k > 0; k--)
275 ptr0[k] = ptr0[k - 1];
277 out[i] = ((out[i] << 12) - sum) >> 12;
280 for(i = 0; i < 8; i++)
284 for(i = 0; i < 60; i++){
285 int sum = out[i] << 12;
286 for(k = 0; k < 8; k++)
287 sum += ptr0[k] * t[k];
288 for(k = 7; k > 0; k--)
289 ptr0[k] = ptr0[k - 1];
290 ptr0[0] = av_clip((sum + 0x800) >> 12, -0x7FFE, 0x7FFE);
292 sum = ((ptr0[1] * (dec->
filtval - (dec->
filtval >> 2))) >> 4) + sum;
293 sum = sum - (sum >> 3);
294 out[i] = av_clip((sum + 0x800) >> 12, -0x7FFE, 0x7FFE);
302 for(i = 0; i < 8; i++)
307 int *got_frame_ptr,
AVPacket *avpkt)
311 int buf_size = avpkt->
size;
318 iterations = buf_size / 32;
322 "Too small input buffer (%d bytes), need at least 32 bytes\n", buf_size);
330 samples = (int16_t *)frame->
data[0];
332 memset(samples, 0, iterations * 240 *
sizeof(*samples));
334 for(j = 0; j < iterations; j++) {
341 for(i = 0; i < 4; i++) {
358 .
name =
"truespeech",