Lines Matching refs:diff

36     int32_t tmp0, tmp1, diff;  in WebRtcSpl_DownBy2IntToShort()  local
45 diff = tmp0 - state[1]; in WebRtcSpl_DownBy2IntToShort()
49 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_DownBy2IntToShort()
50 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_DownBy2IntToShort()
52 diff = tmp1 - state[2]; in WebRtcSpl_DownBy2IntToShort()
54 diff = diff >> 14; in WebRtcSpl_DownBy2IntToShort()
55 if (diff < 0) in WebRtcSpl_DownBy2IntToShort()
56 diff += 1; in WebRtcSpl_DownBy2IntToShort()
57 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_DownBy2IntToShort()
59 diff = tmp0 - state[3]; in WebRtcSpl_DownBy2IntToShort()
61 diff = diff >> 14; in WebRtcSpl_DownBy2IntToShort()
62 if (diff < 0) in WebRtcSpl_DownBy2IntToShort()
63 diff += 1; in WebRtcSpl_DownBy2IntToShort()
64 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_DownBy2IntToShort()
77 diff = tmp0 - state[5]; in WebRtcSpl_DownBy2IntToShort()
79 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_DownBy2IntToShort()
80 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_DownBy2IntToShort()
82 diff = tmp1 - state[6]; in WebRtcSpl_DownBy2IntToShort()
84 diff = diff >> 14; in WebRtcSpl_DownBy2IntToShort()
85 if (diff < 0) in WebRtcSpl_DownBy2IntToShort()
86 diff += 1; in WebRtcSpl_DownBy2IntToShort()
87 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_DownBy2IntToShort()
89 diff = tmp0 - state[7]; in WebRtcSpl_DownBy2IntToShort()
91 diff = diff >> 14; in WebRtcSpl_DownBy2IntToShort()
92 if (diff < 0) in WebRtcSpl_DownBy2IntToShort()
93 diff += 1; in WebRtcSpl_DownBy2IntToShort()
94 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_DownBy2IntToShort()
134 int32_t tmp0, tmp1, diff; in WebRtcSpl_DownBy2ShortToInt() local
143 diff = tmp0 - state[1]; in WebRtcSpl_DownBy2ShortToInt()
145 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_DownBy2ShortToInt()
146 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_DownBy2ShortToInt()
148 diff = tmp1 - state[2]; in WebRtcSpl_DownBy2ShortToInt()
152 diff = diff >> 14; in WebRtcSpl_DownBy2ShortToInt()
153 if (diff < 0) in WebRtcSpl_DownBy2ShortToInt()
154 diff += 1; in WebRtcSpl_DownBy2ShortToInt()
155 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_DownBy2ShortToInt()
157 diff = tmp0 - state[3]; in WebRtcSpl_DownBy2ShortToInt()
159 diff = diff >> 14; in WebRtcSpl_DownBy2ShortToInt()
160 if (diff < 0) in WebRtcSpl_DownBy2ShortToInt()
161 diff += 1; in WebRtcSpl_DownBy2ShortToInt()
162 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_DownBy2ShortToInt()
175 diff = tmp0 - state[5]; in WebRtcSpl_DownBy2ShortToInt()
177 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_DownBy2ShortToInt()
178 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_DownBy2ShortToInt()
180 diff = tmp1 - state[6]; in WebRtcSpl_DownBy2ShortToInt()
182 diff = diff >> 14; in WebRtcSpl_DownBy2ShortToInt()
183 if (diff < 0) in WebRtcSpl_DownBy2ShortToInt()
184 diff += 1; in WebRtcSpl_DownBy2ShortToInt()
185 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_DownBy2ShortToInt()
187 diff = tmp0 - state[7]; in WebRtcSpl_DownBy2ShortToInt()
189 diff = diff >> 14; in WebRtcSpl_DownBy2ShortToInt()
190 if (diff < 0) in WebRtcSpl_DownBy2ShortToInt()
191 diff += 1; in WebRtcSpl_DownBy2ShortToInt()
192 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_DownBy2ShortToInt()
210 int32_t tmp0, tmp1, diff; in WebRtcSpl_UpBy2ShortToInt() local
217 diff = tmp0 - state[5]; in WebRtcSpl_UpBy2ShortToInt()
219 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_UpBy2ShortToInt()
220 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_UpBy2ShortToInt()
222 diff = tmp1 - state[6]; in WebRtcSpl_UpBy2ShortToInt()
224 diff = diff >> 14; in WebRtcSpl_UpBy2ShortToInt()
225 if (diff < 0) in WebRtcSpl_UpBy2ShortToInt()
226 diff += 1; in WebRtcSpl_UpBy2ShortToInt()
227 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_UpBy2ShortToInt()
229 diff = tmp0 - state[7]; in WebRtcSpl_UpBy2ShortToInt()
231 diff = diff >> 14; in WebRtcSpl_UpBy2ShortToInt()
232 if (diff < 0) in WebRtcSpl_UpBy2ShortToInt()
233 diff += 1; in WebRtcSpl_UpBy2ShortToInt()
234 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_UpBy2ShortToInt()
247 diff = tmp0 - state[1]; in WebRtcSpl_UpBy2ShortToInt()
249 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_UpBy2ShortToInt()
250 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_UpBy2ShortToInt()
252 diff = tmp1 - state[2]; in WebRtcSpl_UpBy2ShortToInt()
254 diff = diff >> 14; in WebRtcSpl_UpBy2ShortToInt()
255 if (diff < 0) in WebRtcSpl_UpBy2ShortToInt()
256 diff += 1; in WebRtcSpl_UpBy2ShortToInt()
257 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_UpBy2ShortToInt()
259 diff = tmp0 - state[3]; in WebRtcSpl_UpBy2ShortToInt()
261 diff = diff >> 14; in WebRtcSpl_UpBy2ShortToInt()
262 if (diff < 0) in WebRtcSpl_UpBy2ShortToInt()
263 diff += 1; in WebRtcSpl_UpBy2ShortToInt()
264 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_UpBy2ShortToInt()
280 int32_t tmp0, tmp1, diff; in WebRtcSpl_UpBy2IntToInt() local
287 diff = tmp0 - state[5]; in WebRtcSpl_UpBy2IntToInt()
289 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_UpBy2IntToInt()
290 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_UpBy2IntToInt()
292 diff = tmp1 - state[6]; in WebRtcSpl_UpBy2IntToInt()
294 diff = diff >> 14; in WebRtcSpl_UpBy2IntToInt()
295 if (diff < 0) in WebRtcSpl_UpBy2IntToInt()
296 diff += 1; in WebRtcSpl_UpBy2IntToInt()
297 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_UpBy2IntToInt()
299 diff = tmp0 - state[7]; in WebRtcSpl_UpBy2IntToInt()
301 diff = diff >> 14; in WebRtcSpl_UpBy2IntToInt()
302 if (diff < 0) in WebRtcSpl_UpBy2IntToInt()
303 diff += 1; in WebRtcSpl_UpBy2IntToInt()
304 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_UpBy2IntToInt()
317 diff = tmp0 - state[1]; in WebRtcSpl_UpBy2IntToInt()
319 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_UpBy2IntToInt()
320 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_UpBy2IntToInt()
322 diff = tmp1 - state[2]; in WebRtcSpl_UpBy2IntToInt()
324 diff = diff >> 14; in WebRtcSpl_UpBy2IntToInt()
325 if (diff < 0) in WebRtcSpl_UpBy2IntToInt()
326 diff += 1; in WebRtcSpl_UpBy2IntToInt()
327 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_UpBy2IntToInt()
329 diff = tmp0 - state[3]; in WebRtcSpl_UpBy2IntToInt()
331 diff = diff >> 14; in WebRtcSpl_UpBy2IntToInt()
332 if (diff < 0) in WebRtcSpl_UpBy2IntToInt()
333 diff += 1; in WebRtcSpl_UpBy2IntToInt()
334 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_UpBy2IntToInt()
350 int32_t tmp0, tmp1, diff; in WebRtcSpl_UpBy2IntToShort() local
357 diff = tmp0 - state[5]; in WebRtcSpl_UpBy2IntToShort()
359 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_UpBy2IntToShort()
360 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_UpBy2IntToShort()
362 diff = tmp1 - state[6]; in WebRtcSpl_UpBy2IntToShort()
364 diff = diff >> 14; in WebRtcSpl_UpBy2IntToShort()
365 if (diff < 0) in WebRtcSpl_UpBy2IntToShort()
366 diff += 1; in WebRtcSpl_UpBy2IntToShort()
367 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_UpBy2IntToShort()
369 diff = tmp0 - state[7]; in WebRtcSpl_UpBy2IntToShort()
371 diff = diff >> 14; in WebRtcSpl_UpBy2IntToShort()
372 if (diff < 0) in WebRtcSpl_UpBy2IntToShort()
373 diff += 1; in WebRtcSpl_UpBy2IntToShort()
374 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_UpBy2IntToShort()
392 diff = tmp0 - state[1]; in WebRtcSpl_UpBy2IntToShort()
394 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_UpBy2IntToShort()
395 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_UpBy2IntToShort()
397 diff = tmp1 - state[2]; in WebRtcSpl_UpBy2IntToShort()
399 diff = diff >> 14; in WebRtcSpl_UpBy2IntToShort()
400 if (diff < 0) in WebRtcSpl_UpBy2IntToShort()
401 diff += 1; in WebRtcSpl_UpBy2IntToShort()
402 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_UpBy2IntToShort()
404 diff = tmp0 - state[3]; in WebRtcSpl_UpBy2IntToShort()
406 diff = diff >> 14; in WebRtcSpl_UpBy2IntToShort()
407 if (diff < 0) in WebRtcSpl_UpBy2IntToShort()
408 diff += 1; in WebRtcSpl_UpBy2IntToShort()
409 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_UpBy2IntToShort()
429 int32_t tmp0, tmp1, diff; in WebRtcSpl_LPBy2ShortToInt() local
440 diff = tmp0 - state[1]; in WebRtcSpl_LPBy2ShortToInt()
442 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2ShortToInt()
443 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_LPBy2ShortToInt()
445 diff = tmp1 - state[2]; in WebRtcSpl_LPBy2ShortToInt()
447 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
448 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
449 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
450 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_LPBy2ShortToInt()
452 diff = tmp0 - state[3]; in WebRtcSpl_LPBy2ShortToInt()
454 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
455 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
456 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
457 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_LPBy2ShortToInt()
470 diff = tmp0 - state[5]; in WebRtcSpl_LPBy2ShortToInt()
472 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2ShortToInt()
473 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_LPBy2ShortToInt()
475 diff = tmp1 - state[6]; in WebRtcSpl_LPBy2ShortToInt()
477 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
478 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
479 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
480 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_LPBy2ShortToInt()
482 diff = tmp0 - state[7]; in WebRtcSpl_LPBy2ShortToInt()
484 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
485 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
486 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
487 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_LPBy2ShortToInt()
501 diff = tmp0 - state[9]; in WebRtcSpl_LPBy2ShortToInt()
503 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2ShortToInt()
504 tmp1 = state[8] + diff * kResampleAllpass[1][0]; in WebRtcSpl_LPBy2ShortToInt()
506 diff = tmp1 - state[10]; in WebRtcSpl_LPBy2ShortToInt()
508 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
509 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
510 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
511 tmp0 = state[9] + diff * kResampleAllpass[1][1]; in WebRtcSpl_LPBy2ShortToInt()
513 diff = tmp0 - state[11]; in WebRtcSpl_LPBy2ShortToInt()
515 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
516 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
517 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
518 state[11] = state[10] + diff * kResampleAllpass[1][2]; in WebRtcSpl_LPBy2ShortToInt()
530 diff = tmp0 - state[13]; in WebRtcSpl_LPBy2ShortToInt()
532 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2ShortToInt()
533 tmp1 = state[12] + diff * kResampleAllpass[0][0]; in WebRtcSpl_LPBy2ShortToInt()
535 diff = tmp1 - state[14]; in WebRtcSpl_LPBy2ShortToInt()
537 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
538 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
539 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
540 tmp0 = state[13] + diff * kResampleAllpass[0][1]; in WebRtcSpl_LPBy2ShortToInt()
542 diff = tmp0 - state[15]; in WebRtcSpl_LPBy2ShortToInt()
544 diff = diff >> 14; in WebRtcSpl_LPBy2ShortToInt()
545 if (diff < 0) in WebRtcSpl_LPBy2ShortToInt()
546 diff += 1; in WebRtcSpl_LPBy2ShortToInt()
547 state[15] = state[14] + diff * kResampleAllpass[0][2]; in WebRtcSpl_LPBy2ShortToInt()
563 int32_t tmp0, tmp1, diff; in WebRtcSpl_LPBy2IntToInt() local
574 diff = tmp0 - state[1]; in WebRtcSpl_LPBy2IntToInt()
576 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2IntToInt()
577 tmp1 = state[0] + diff * kResampleAllpass[1][0]; in WebRtcSpl_LPBy2IntToInt()
579 diff = tmp1 - state[2]; in WebRtcSpl_LPBy2IntToInt()
581 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
582 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
583 diff += 1; in WebRtcSpl_LPBy2IntToInt()
584 tmp0 = state[1] + diff * kResampleAllpass[1][1]; in WebRtcSpl_LPBy2IntToInt()
586 diff = tmp0 - state[3]; in WebRtcSpl_LPBy2IntToInt()
588 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
589 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
590 diff += 1; in WebRtcSpl_LPBy2IntToInt()
591 state[3] = state[2] + diff * kResampleAllpass[1][2]; in WebRtcSpl_LPBy2IntToInt()
604 diff = tmp0 - state[5]; in WebRtcSpl_LPBy2IntToInt()
608 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2IntToInt()
609 tmp1 = state[4] + diff * kResampleAllpass[0][0]; in WebRtcSpl_LPBy2IntToInt()
611 diff = tmp1 - state[6]; in WebRtcSpl_LPBy2IntToInt()
613 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
614 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
615 diff += 1; in WebRtcSpl_LPBy2IntToInt()
616 tmp0 = state[5] + diff * kResampleAllpass[0][1]; in WebRtcSpl_LPBy2IntToInt()
618 diff = tmp0 - state[7]; in WebRtcSpl_LPBy2IntToInt()
620 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
621 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
622 diff += 1; in WebRtcSpl_LPBy2IntToInt()
623 state[7] = state[6] + diff * kResampleAllpass[0][2]; in WebRtcSpl_LPBy2IntToInt()
637 diff = tmp0 - state[9]; in WebRtcSpl_LPBy2IntToInt()
639 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2IntToInt()
640 tmp1 = state[8] + diff * kResampleAllpass[1][0]; in WebRtcSpl_LPBy2IntToInt()
642 diff = tmp1 - state[10]; in WebRtcSpl_LPBy2IntToInt()
644 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
645 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
646 diff += 1; in WebRtcSpl_LPBy2IntToInt()
647 tmp0 = state[9] + diff * kResampleAllpass[1][1]; in WebRtcSpl_LPBy2IntToInt()
649 diff = tmp0 - state[11]; in WebRtcSpl_LPBy2IntToInt()
651 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
652 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
653 diff += 1; in WebRtcSpl_LPBy2IntToInt()
654 state[11] = state[10] + diff * kResampleAllpass[1][2]; in WebRtcSpl_LPBy2IntToInt()
666 diff = tmp0 - state[13]; in WebRtcSpl_LPBy2IntToInt()
668 diff = (diff + (1 << 13)) >> 14; in WebRtcSpl_LPBy2IntToInt()
669 tmp1 = state[12] + diff * kResampleAllpass[0][0]; in WebRtcSpl_LPBy2IntToInt()
671 diff = tmp1 - state[14]; in WebRtcSpl_LPBy2IntToInt()
673 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
674 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
675 diff += 1; in WebRtcSpl_LPBy2IntToInt()
676 tmp0 = state[13] + diff * kResampleAllpass[0][1]; in WebRtcSpl_LPBy2IntToInt()
678 diff = tmp0 - state[15]; in WebRtcSpl_LPBy2IntToInt()
680 diff = diff >> 14; in WebRtcSpl_LPBy2IntToInt()
681 if (diff < 0) in WebRtcSpl_LPBy2IntToInt()
682 diff += 1; in WebRtcSpl_LPBy2IntToInt()
683 state[15] = state[14] + diff * kResampleAllpass[0][2]; in WebRtcSpl_LPBy2IntToInt()