Go to the documentation of this file.
31 #define W1 22725 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
32 #define W2 21407 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
33 #define W3 19266 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
34 #define W4 16383 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
35 #define W5 12873 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
36 #define W6 8867 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
37 #define W7 4520 //cos(i*M_PI/16)*sqrt(2)*(1<<14) + 0.5
62 #define IDCT_ROW_COND_DC(src1, src2) \
63 "dmfc1 $11, "#src1" \n\t" \
64 "dmfc1 $12, "#src2" \n\t" \
65 "and $11, $11, $9 \n\t" \
66 "or $10, $11, $12 \n\t" \
69 "punpcklhw $f30, "#src1", "#src2" \n\t" \
70 "punpckhhw $f31, "#src1", "#src2" \n\t" \
72 "punpcklhw "#src1", $f30, $f31 \n\t" \
74 "punpckhhw "#src2", $f30, $f31 \n\t" \
76 "pmaddhw $f30, "#src1", $f18 \n\t" \
77 "pmaddhw $f31, "#src2", $f19 \n\t" \
78 "paddw $f28, $f30, $f31 \n\t" \
79 "psubw $f29, $f30, $f31 \n\t" \
80 "punpcklwd $f30, $f28, $f29 \n\t" \
81 "punpckhwd $f31, $f28, $f29 \n\t" \
82 "paddw $f26, $f30, $f31 \n\t" \
83 "paddw $f26, $f26, $f16 \n\t" \
85 "psraw $f26, $f26, $f17 \n\t" \
87 "pmaddhw $f30, "#src1", $f20 \n\t" \
88 "pmaddhw $f31, "#src2", $f21 \n\t" \
89 "paddw $f28, $f30, $f31 \n\t" \
90 "psubw $f29, $f30, $f31 \n\t" \
91 "punpcklwd $f30, $f28, $f29 \n\t" \
92 "punpckhwd $f31, $f28, $f29 \n\t" \
93 "paddw $f27, $f30, $f31 \n\t" \
94 "paddw $f27, $f27, $f16 \n\t" \
96 "psraw $f27, $f27, $f17 \n\t" \
98 "pmaddhw $f30, "#src1", $f22 \n\t" \
99 "pmaddhw $f31, "#src2", $f23 \n\t" \
100 "paddw $f28, $f30, $f31 \n\t" \
101 "psubw $f29, $f30, $f31 \n\t" \
102 "punpcklwd $f30, $f28, $f29 \n\t" \
103 "punpckhwd $f31, $f28, $f29 \n\t" \
104 "paddw $f28, $f30, $f31 \n\t" \
105 "paddw $f28, $f28, $f16 \n\t" \
107 "psraw $f28, $f28, $f17 \n\t" \
109 "pmaddhw $f30, "#src1", $f24 \n\t" \
110 "pmaddhw $f31, "#src2", $f25 \n\t" \
111 "paddw "#src1", $f30, $f31 \n\t" \
112 "psubw "#src2", $f30, $f31 \n\t" \
113 "punpcklwd $f30, "#src1", "#src2" \n\t" \
114 "punpckhwd $f31, "#src1", "#src2" \n\t" \
115 "paddw $f29, $f30, $f31 \n\t" \
116 "paddw $f29, $f29, $f16 \n\t" \
118 "psraw $f29, $f29, $f17 \n\t" \
120 "punpcklhw "#src1", $f26, $f27 \n\t" \
121 "punpckhhw $f30, $f27, $f26 \n\t" \
122 "punpcklhw $f31, $f28, $f29 \n\t" \
123 "punpckhhw "#src2", $f29, $f28 \n\t" \
125 "punpcklwd "#src1", "#src1", $f31 \n\t" \
127 "punpcklwd "#src2", "#src2", $f30 \n\t" \
132 "dmtc1 $10, $f30 \n\t" \
133 "psllh $f28, "#src1", $f30 \n\t" \
134 "dmtc1 $9, $f31 \n\t" \
135 "punpcklhw $f29, $f28, $f28 \n\t" \
136 "and $f29, $f29, $f31 \n\t" \
137 "paddw $f28, $f28, $f29 \n\t" \
138 "punpcklwd "#src1", $f28, $f28 \n\t" \
139 "punpcklwd "#src2", $f28, $f28 \n\t" \
145 "gslqc1 $f19, $f18, 0x00(%[w_arr]) \n\t"
146 "gslqc1 $f21, $f20, 0x10(%[w_arr]) \n\t"
147 "gslqc1 $f23, $f22, 0x20(%[w_arr]) \n\t"
148 "gslqc1 $f25, $f24, 0x30(%[w_arr]) \n\t"
149 "gslqc1 $f17, $f16, 0x40(%[w_arr]) \n\t"
151 "gslqc1 $f1, $f0, 0x00(%[block]) \n\t"
152 "gslqc1 $f3, $f2, 0x10(%[block]) \n\t"
153 "gslqc1 $f5, $f4, 0x20(%[block]) \n\t"
154 "gslqc1 $f7, $f6, 0x30(%[block]) \n\t"
155 "gslqc1 $f9, $f8, 0x40(%[block]) \n\t"
156 "gslqc1 $f11, $f10, 0x50(%[block]) \n\t"
157 "gslqc1 $f13, $f12, 0x60(%[block]) \n\t"
158 "gslqc1 $f15, $f14, 0x70(%[block]) \n\t"
161 "dmfc1 $9, $f17 \n\t"
163 "mtc1 $10, $f17 \n\t"
173 #define IDCT_COL_CASE1(src, out1, out2) \
174 "pmaddhw $f26, "#src", $f18 \n\t" \
175 "pmaddhw $f27, "#src", $f20 \n\t" \
176 "pmaddhw $f28, "#src", $f22 \n\t" \
177 "pmaddhw $f29, "#src", $f24 \n\t" \
179 "punpcklwd $f30, $f26, $f26 \n\t" \
180 "punpckhwd $f31, $f26, $f26 \n\t" \
182 "paddw $f26, $f30, $f31 \n\t" \
183 "punpcklwd $f30, $f27, $f27 \n\t" \
184 "punpckhwd $f31, $f27, $f27 \n\t" \
186 "paddw $f27, $f30, $f31 \n\t" \
187 "punpcklwd $f30, $f28, $f28 \n\t" \
188 "punpckhwd $f31, $f28, $f28 \n\t" \
190 "paddw $f28, $f30, $f31 \n\t" \
191 "punpcklwd $f30, $f29, $f29 \n\t" \
192 "punpckhwd $f31, $f29, $f29 \n\t" \
194 "paddw $f29, $f30, $f31 \n\t" \
198 "punpcklhw $f30, $f26, $f27 \n\t" \
199 "punpcklhw $f31, $f28, $f29 \n\t" \
200 "punpckhwd "#out1", $f30, $f31 \n\t" \
201 "psrah "#out1", "#out1", $f16 \n\t" \
202 "punpcklhw $f30, $f27, $f26 \n\t" \
203 "punpcklhw $f31, $f29, $f28 \n\t" \
204 "punpckhwd "#out2", $f31, $f30 \n\t" \
205 "psrah "#out2", "#out2", $f16 \n\t"
207 #define IDCT_COL_CASE2(src1, src2, out1, out2) \
208 "pmaddhw $f28, "#src1", $f18 \n\t" \
209 "pmaddhw $f29, "#src2", $f19 \n\t" \
210 "paddw $f30, $f28, $f29 \n\t" \
211 "psubw $f31, $f28, $f29 \n\t" \
212 "punpcklwd $f28, $f30, $f31 \n\t" \
213 "punpckhwd $f29, $f30, $f31 \n\t" \
214 "pmaddhw $f30, "#src1", $f20 \n\t" \
215 "pmaddhw $f31, "#src2", $f21 \n\t" \
217 "paddw $f26, $f28, $f29 \n\t" \
218 "paddw $f28, $f30, $f31 \n\t" \
219 "psubw $f29, $f30, $f31 \n\t" \
220 "punpcklwd $f30, $f28, $f29 \n\t" \
221 "punpckhwd $f31, $f28, $f29 \n\t" \
222 "pmaddhw $f28, "#src1", $f22 \n\t" \
223 "pmaddhw $f29, "#src2", $f23 \n\t" \
225 "paddw $f27, $f30, $f31 \n\t" \
226 "paddw $f30, $f28, $f29 \n\t" \
227 "psubw $f31, $f28, $f29 \n\t" \
228 "punpcklwd $f28, $f30, $f31 \n\t" \
229 "punpckhwd $f29, $f30, $f31 \n\t" \
230 "pmaddhw $f30, "#src1", $f24 \n\t" \
231 "pmaddhw $f31, "#src2", $f25 \n\t" \
233 "paddw $f28, $f28, $f29 \n\t" \
234 "paddw "#out1", $f30, $f31 \n\t" \
235 "psubw "#out2", $f30, $f31 \n\t" \
236 "punpcklwd $f30, "#out1", "#out2" \n\t" \
237 "punpckhwd $f31, "#out1", "#out2" \n\t" \
239 "paddw $f29, $f30, $f31 \n\t" \
243 "punpcklhw "#out1", $f26, $f27 \n\t" \
244 "punpckhhw "#out2", $f27, $f26 \n\t" \
245 "punpcklhw $f30, $f28, $f29 \n\t" \
246 "punpckhhw $f31, $f29, $f28 \n\t" \
247 "punpckhwd "#out1", "#out1", $f30 \n\t" \
248 "punpckhwd "#out2", $f31, "#out2" \n\t" \
249 "psrah "#out1", "#out1", $f16 \n\t" \
250 "psrah "#out2", "#out2", $f16 \n\t"
256 "gsldlc1 $f17, 0x57(%[w_arr]) \n\t"
257 "gsldrc1 $f17, 0x50(%[w_arr]) \n\t"
259 "dmtc1 $10, $f16 \n\t"
260 "paddh $f0, $f0, $f17 \n\t"
262 "punpcklhw $f26, $f0, $f4 \n\t"
263 "punpckhhw $f27, $f0, $f4 \n\t"
264 "punpcklhw $f28, $f8, $f12 \n\t"
265 "punpckhhw $f29, $f8, $f12 \n\t"
266 "punpcklwd $f0, $f26, $f28 \n\t"
267 "punpckhwd $f4, $f26, $f28 \n\t"
268 "punpcklwd $f8, $f27, $f29 \n\t"
269 "punpckhwd $f12, $f27, $f29 \n\t"
271 "or $f26, $f2, $f6 \n\t"
272 "or $f26, $f26, $f10 \n\t"
273 "or $f26, $f26, $f14 \n\t"
274 "dmfc1 $10, $f26 \n\t"
290 "punpcklhw $f26, $f2, $f6 \n\t"
291 "punpckhhw $f27, $f2, $f6 \n\t"
292 "punpcklhw $f28, $f10, $f14 \n\t"
293 "punpckhhw $f29, $f10, $f14 \n\t"
294 "punpcklwd $f2, $f26, $f28 \n\t"
295 "punpckhwd $f6, $f26, $f28 \n\t"
296 "punpcklwd $f10, $f27, $f29 \n\t"
297 "punpckhwd $f14, $f27, $f29 \n\t"
310 "punpcklhw $f26, $f0, $f4 \n\t"
311 "punpckhhw $f27, $f0, $f4 \n\t"
312 "punpcklhw $f28, $f8, $f12 \n\t"
313 "punpckhhw $f29, $f8, $f12 \n\t"
314 "punpcklwd $f0, $f26, $f28 \n\t"
315 "punpckhwd $f4, $f26, $f28 \n\t"
316 "punpcklwd $f8, $f27, $f29 \n\t"
317 "punpckhwd $f12, $f27, $f29 \n\t"
319 "punpcklhw $f26, $f2, $f6 \n\t"
320 "punpckhhw $f27, $f2, $f6 \n\t"
321 "punpcklhw $f28, $f10, $f14 \n\t"
322 "punpckhhw $f29, $f10, $f14 \n\t"
323 "punpcklwd $f2, $f26, $f28 \n\t"
324 "punpckhwd $f6, $f26, $f28 \n\t"
325 "punpcklwd $f10, $f27, $f29 \n\t"
326 "punpckhwd $f14, $f27, $f29 \n\t"
330 "paddh $f1, $f1, $f17 \n\t"
332 "punpcklhw $f26, $f1, $f5 \n\t"
333 "punpckhhw $f27, $f1, $f5 \n\t"
334 "punpcklhw $f28, $f9, $f13 \n\t"
335 "punpckhhw $f29, $f9, $f13 \n\t"
336 "punpcklwd $f1, $f26, $f28 \n\t"
337 "punpckhwd $f5, $f26, $f28 \n\t"
338 "punpcklwd $f9, $f27, $f29 \n\t"
339 "punpckhwd $f13, $f27, $f29 \n\t"
341 "or $f26, $f3, $f7 \n\t"
342 "or $f26, $f26, $f11 \n\t"
343 "or $f26, $f26, $f15 \n\t"
344 "dmfc1 $10, $f26 \n\t"
360 "punpcklhw $f26, $f3, $f7 \n\t"
361 "punpckhhw $f27, $f3, $f7 \n\t"
362 "punpcklhw $f28, $f11, $f15 \n\t"
363 "punpckhhw $f29, $f11, $f15 \n\t"
364 "punpcklwd $f3, $f26, $f28 \n\t"
365 "punpckhwd $f7, $f26, $f28 \n\t"
366 "punpcklwd $f11, $f27, $f29 \n\t"
367 "punpckhwd $f15, $f27, $f29 \n\t"
380 "punpcklhw $f26, $f1, $f5 \n\t"
381 "punpckhhw $f27, $f1, $f5 \n\t"
382 "punpcklhw $f28, $f9, $f13 \n\t"
383 "punpckhhw $f29, $f9, $f13 \n\t"
384 "punpcklwd $f1, $f26, $f28 \n\t"
385 "punpckhwd $f5, $f26, $f28 \n\t"
386 "punpcklwd $f9, $f27, $f29 \n\t"
387 "punpckhwd $f13, $f27, $f29 \n\t"
389 "punpcklhw $f26, $f3, $f7 \n\t"
390 "punpckhhw $f27, $f3, $f7 \n\t"
391 "punpcklhw $f28, $f11, $f15 \n\t"
392 "punpckhhw $f29, $f11, $f15 \n\t"
393 "punpcklwd $f3, $f26, $f28 \n\t"
394 "punpckhwd $f7, $f26, $f28 \n\t"
395 "punpcklwd $f11, $f27, $f29 \n\t"
396 "punpckhwd $f15, $f27, $f29 \n\t"
398 "gssqc1 $f1, $f0, 0x00(%[block]) \n\t"
399 "gssqc1 $f5, $f4, 0x10(%[block]) \n\t"
400 "gssqc1 $f9, $f8, 0x20(%[block]) \n\t"
401 "gssqc1 $f13, $f12, 0x30(%[block]) \n\t"
402 "gssqc1 $f3, $f2, 0x40(%[block]) \n\t"
403 "gssqc1 $f7, $f6, 0x50(%[block]) \n\t"
404 "gssqc1 $f11, $f10, 0x60(%[block]) \n\t"
405 "gssqc1 $f15, $f14, 0x70(%[block]) \n\t"
void ff_simple_idct_8_mmi(int16_t *block)
void ff_add_pixels_clamped_mmi(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_simple_idct_put_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
#define IDCT_COL_CASE1(src, out1, out2)
#define IDCT_COL_CASE2(src1, src2, out1, out2)
#define RECOVER_REG
recover register
void ff_put_pixels_clamped_mmi(const int16_t *block, uint8_t *av_restrict pixels, ptrdiff_t line_size)
void ff_simple_idct_add_8_mmi(uint8_t *dest, ptrdiff_t line_size, int16_t *block)
#define BACKUP_REG
backup register
#define DECLARE_ALIGNED(n, t, v)
__asm__(".macro parse_r var r\n\t" "\\var = -1\n\t" _IFC_REG(0) _IFC_REG(1) _IFC_REG(2) _IFC_REG(3) _IFC_REG(4) _IFC_REG(5) _IFC_REG(6) _IFC_REG(7) _IFC_REG(8) _IFC_REG(9) _IFC_REG(10) _IFC_REG(11) _IFC_REG(12) _IFC_REG(13) _IFC_REG(14) _IFC_REG(15) _IFC_REG(16) _IFC_REG(17) _IFC_REG(18) _IFC_REG(19) _IFC_REG(20) _IFC_REG(21) _IFC_REG(22) _IFC_REG(23) _IFC_REG(24) _IFC_REG(25) _IFC_REG(26) _IFC_REG(27) _IFC_REG(28) _IFC_REG(29) _IFC_REG(30) _IFC_REG(31) ".iflt \\var\n\t" ".error \"Unable to parse register name \\r\"\n\t" ".endif\n\t" ".endm")
The exact code depends on how similar the blocks are and how related they are to the block
#define IDCT_ROW_COND_DC(src1, src2)