61 static void ff_celp_lp_synthesis_filterf_mips(
float *
out,
62 const float *filter_coeffs,
63 const float*
in,
int buffer_length,
68 float out0, out1, out2, out3;
69 float old_out0, old_out1, old_out2, old_out3;
71 const float *p_filter_coeffs;
77 b -= filter_coeffs[0] * filter_coeffs[0];
78 c -= filter_coeffs[1] * filter_coeffs[0];
79 c -= filter_coeffs[0] *
b;
85 for (n = 0; n <= buffer_length - 4; n+=4) {
86 p_filter_coeffs = filter_coeffs;
95 "lwc1 $f2, 8(%[filter_coeffs]) \n\t"
96 "lwc1 $f1, 4(%[filter_coeffs]) \n\t"
97 "lwc1 $f0, 0(%[filter_coeffs]) \n\t"
98 "nmsub.s %[out0], %[out0], $f2, %[old_out1] \n\t"
99 "nmsub.s %[out1], %[out1], $f2, %[old_out2] \n\t"
100 "nmsub.s %[out2], %[out2], $f2, %[old_out3] \n\t"
101 "lwc1 $f3, 12(%[filter_coeffs]) \n\t"
102 "nmsub.s %[out0], %[out0], $f1, %[old_out2] \n\t"
103 "nmsub.s %[out1], %[out1], $f1, %[old_out3] \n\t"
104 "nmsub.s %[out2], %[out2], $f3, %[old_out2] \n\t"
105 "nmsub.s %[out0], %[out0], $f0, %[old_out3] \n\t"
106 "nmsub.s %[out3], %[out3], $f3, %[old_out3] \n\t"
107 "nmsub.s %[out1], %[out1], $f3, %[old_out1] \n\t"
108 "nmsub.s %[out0], %[out0], $f3, %[old_out0] \n\t"
110 : [out0]
"+f"(out0), [out1]
"+f"(out1),
111 [out2]
"+f"(out2), [out3]
"+f"(out3)
112 : [old_out0]
"f"(old_out0), [old_out1]
"f"(old_out1),
113 [old_out2]
"f"(old_out2), [old_out3]
"f"(old_out3),
114 [filter_coeffs]
"r"(filter_coeffs)
115 :
"$f0",
"$f1",
"$f2",
"$f3",
"$f4",
"memory"
118 for (i = 5; i <= filter_length; i += 2) {
120 "lwc1 %[old_out3], -20(%[p_out]) \n\t"
121 "lwc1 $f5, 16(%[p_filter_coeffs]) \n\t"
124 "nmsub.s %[out1], %[out1], $f5, %[old_out0] \n\t"
125 "nmsub.s %[out3], %[out3], $f5, %[old_out2] \n\t"
126 "lwc1 $f4, 12(%[p_filter_coeffs]) \n\t"
127 "lwc1 %[old_out2], -16(%[p_out]) \n\t"
128 "nmsub.s %[out0], %[out0], $f5, %[old_out3] \n\t"
129 "nmsub.s %[out2], %[out2], $f5, %[old_out1] \n\t"
130 "nmsub.s %[out1], %[out1], $f4, %[old_out3] \n\t"
131 "nmsub.s %[out3], %[out3], $f4, %[old_out1] \n\t"
132 "mov.s %[old_out1], %[old_out3] \n\t"
133 "nmsub.s %[out0], %[out0], $f4, %[old_out2] \n\t"
134 "nmsub.s %[out2], %[out2], $f4, %[old_out0] \n\t"
136 : [out0]
"+f"(out0), [out1]
"+f"(out1),
137 [out2]
"+f"(out2), [out3]
"+f"(out3), [old_out0]
"+f"(old_out0),
138 [old_out1]
"+f"(old_out1), [old_out2]
"+f"(old_out2),
139 [old_out3]
"+f"(old_out3),[p_filter_coeffs]
"+r"(p_filter_coeffs),
142 :
"$f4",
"$f5",
"memory"
144 FFSWAP(
float, old_out0, old_out2);
148 "nmsub.s %[out3], %[out3], %[a], %[out2] \n\t"
149 "nmsub.s %[out2], %[out2], %[a], %[out1] \n\t"
150 "nmsub.s %[out3], %[out3], %[b], %[out1] \n\t"
151 "nmsub.s %[out1], %[out1], %[a], %[out0] \n\t"
152 "nmsub.s %[out2], %[out2], %[b], %[out0] \n\t"
153 "nmsub.s %[out3], %[out3], %[c], %[out0] \n\t"
155 : [out0]
"+f"(out0), [out1]
"+f"(out1),
156 [out2]
"+f"(out2), [out3]
"+f"(out3)
157 : [
a]
"f"(
a), [b]
"f"(b), [
c]
"f"(
c)
176 for (; n < buffer_length; n++) {
177 float out_val, out_val_i, fc_val;
178 p_filter_coeffs = filter_coeffs;
181 for (i = 1; i <= filter_length; i++) {
183 "lwc1 %[fc_val], 0(%[p_filter_coeffs]) \n\t"
184 "lwc1 %[out_val_i], -4(%[p_out]) \n\t"
187 "nmsub.s %[out_val], %[out_val], %[fc_val], %[out_val_i] \n\t"
189 : [fc_val]
"=&f"(fc_val), [out_val]
"+f"(out_val),
190 [out_val_i]
"=&f"(out_val_i), [p_out]
"+r"(p_out),
191 [p_filter_coeffs]
"+r"(p_filter_coeffs)
200 static void ff_celp_lp_zero_synthesis_filterf_mips(
float *out,
201 const float *filter_coeffs,
202 const float *in,
int buffer_length,
206 float sum_out8, sum_out7, sum_out6, sum_out5, sum_out4, fc_val;
207 float sum_out3, sum_out2, sum_out1;
208 const float *p_filter_coeffs, *p_in;
210 for (n = 0; n < buffer_length; n+=8) {
212 p_filter_coeffs = filter_coeffs;
228 "filt_lp_inner%=: \n\t"
229 "lwc1 %[fc_val], 0(%[p_filter_coeffs]) \n\t"
230 "lwc1 $f7, 6*4(%[p_in]) \n\t"
231 "lwc1 $f6, 5*4(%[p_in]) \n\t"
232 "lwc1 $f5, 4*4(%[p_in]) \n\t"
233 "lwc1 $f4, 3*4(%[p_in]) \n\t"
234 "lwc1 $f3, 2*4(%[p_in]) \n\t"
235 "lwc1 $f2, 4(%[p_in]) \n\t"
236 "lwc1 $f1, 0(%[p_in]) \n\t"
237 "lwc1 $f0, -4(%[p_in]) \n\t"
238 "addiu %[i], -2 \n\t"
239 "madd.s %[sum_out8], %[sum_out8], %[fc_val], $f7 \n\t"
240 "madd.s %[sum_out7], %[sum_out7], %[fc_val], $f6 \n\t"
241 "madd.s %[sum_out6], %[sum_out6], %[fc_val], $f5 \n\t"
242 "madd.s %[sum_out5], %[sum_out5], %[fc_val], $f4 \n\t"
243 "madd.s %[sum_out4], %[sum_out4], %[fc_val], $f3 \n\t"
244 "madd.s %[sum_out3], %[sum_out3], %[fc_val], $f2 \n\t"
245 "madd.s %[sum_out2], %[sum_out2], %[fc_val], $f1 \n\t"
246 "madd.s %[sum_out1], %[sum_out1], %[fc_val], $f0 \n\t"
247 "lwc1 %[fc_val], 4(%[p_filter_coeffs]) \n\t"
248 "lwc1 $f7, -8(%[p_in]) \n\t"
251 "madd.s %[sum_out8], %[sum_out8], %[fc_val], $f6 \n\t"
252 "madd.s %[sum_out7], %[sum_out7], %[fc_val], $f5 \n\t"
253 "madd.s %[sum_out6], %[sum_out6], %[fc_val], $f4 \n\t"
254 "madd.s %[sum_out5], %[sum_out5], %[fc_val], $f3 \n\t"
255 "madd.s %[sum_out4], %[sum_out4], %[fc_val], $f2 \n\t"
256 "madd.s %[sum_out3], %[sum_out3], %[fc_val], $f1 \n\t"
257 "madd.s %[sum_out2], %[sum_out2], %[fc_val], $f0 \n\t"
258 "madd.s %[sum_out1], %[sum_out1], %[fc_val], $f7 \n\t"
259 "bgtz %[i], filt_lp_inner%= \n\t"
261 : [sum_out8]
"+f"(sum_out8), [sum_out7]
"+f"(sum_out7),
262 [sum_out6]
"+f"(sum_out6), [sum_out5]
"+f"(sum_out5),
263 [sum_out4]
"+f"(sum_out4), [sum_out3]
"+f"(sum_out3),
264 [sum_out2]
"+f"(sum_out2), [sum_out1]
"+f"(sum_out1),
265 [fc_val]
"=&f"(fc_val), [p_filter_coeffs]
"+r"(p_filter_coeffs),
266 [p_in]
"+r"(p_in), [i]
"+r"(i)
268 :
"$f0",
"$f1",
"$f2",
"$f3",
"$f4",
"$f5",
"$f6",
"$f7",
"memory"