36 for (i = 0; i < 13; i++)
42 return (a * b + (1 << 14)) >> 15;
48 const int16_t *src = dst - lag;
50 for (i = 0; i < 40; i++)
63 int abs =
FFABS(filtered);
64 if (abs < 11059) abs <<= 1;
65 else if (abs < 20070) abs += 11059;
66 else abs = (abs >> 2) + 26112;
67 return filtered < 0 ? -abs : abs;
73 for (i = 7; i >= 0; i--) {
75 v[i + 1] = v[i] +
gsm_mult(rrp[i], in);
87 for (i = 0; i < 8; i++)
88 rrp[i] =
get_rrp((lar_prev[i] >> 2) + (lar_prev[i] >> 1) + (lar[i] >> 2));
89 for (i = 0; i < 13; i++)
92 for (i = 0; i < 8; i++)
93 rrp[i] =
get_rrp((lar_prev[i] >> 1) + (lar [i] >> 1));
94 for (i = 13; i < 27; i++)
97 for (i = 0; i < 8; i++)
98 rrp[i] =
get_rrp((lar_prev[i] >> 2) + (lar [i] >> 1) + (lar[i] >> 2));
99 for (i = 27; i < 40; i++)
102 for (i = 0; i < 8; i++)
104 for (i = 40; i < 160; i++)
113 for (i = 0; i < 160; i++) {
114 msr = av_clip_int16(data[i] +
gsm_mult(msr, 28180));
115 data[i] = av_clip_int16(msr << 1) & ~7;
125 int16_t *ref_dst = ctx->
ref_buf + 120;
136 for (i = 0; i < 4; i++) {
140 lag = av_clip(lag, 40, 120);