31 29443, 28346, 25207, 20449, 14701, 8693,
32 3143, -1352, -4402, -5865, -5850, -4673,
33 -2783, -672, 1211, 2536, 3130, 2991,
34 2259, 1170, 0, -1001, -1652, -1868,
35 -1666, -1147, -464, 218, 756, 1060,
36 1099, 904, 550, 135, -245, -514,
37 -634, -602, -451, -231, 0, 191,
38 308, 340, 296, 198, 78, -36,
39 -120, -163, -165, -132, -79, -19,
40 34, 73, 91, 89, 70, 38,
45 const int16_t* filter_coeffs,
int precision,
46 int frac_pos,
int filter_length,
int length)
50 av_assert1(frac_pos >= 0 && frac_pos < precision);
52 for (n = 0; n <
length; n++) {
56 for (i = 0; i < filter_length;) {
67 v += in[n + i] * filter_coeffs[idx + frac_pos];
70 v += in[n - i] * filter_coeffs[idx - frac_pos];
72 if (av_clip_int16(v >> 15) != (v >> 15))
79 const float *filter_coeffs,
int precision,
80 int frac_pos,
int filter_length,
int length)
84 for (n = 0; n <
length; n++) {
88 for (i = 0; i < filter_length;) {
89 v += in[n + i] * filter_coeffs[idx + frac_pos];
92 v += in[n - i] * filter_coeffs[idx - frac_pos];
105 for (i = 0; i <
length; i++) {
106 tmp = (hpf_f[0]* 15836LL) >> 13;
107 tmp += (hpf_f[1]* -7667LL) >> 13;
108 tmp += 7699 * (in[i] - 2*in[i-1] + in[i-2]);
112 out[i] = av_clip_int16((tmp + 0x800) >> 12);
120 const float zero_coeffs[2],
121 const float pole_coeffs[2],
122 float gain,
float mem[2],
int n)
127 for (i = 0; i <
n; i++) {
128 tmp = gain * in[i] - pole_coeffs[0] * mem[0] - pole_coeffs[1] * mem[1];
129 out[i] = tmp + zero_coeffs[0] * mem[0] + zero_coeffs[1] * mem[1];
138 float new_tilt_mem = samples[size - 1];
141 for (i = size - 1; i > 0; i--)
142 samples[i] -= tilt * samples[i - 1];
144 samples[0] -= tilt * *
mem;