35 int dstStride,
int src1Stride,
int h);
38 int src1Stride,
int h);
40 int dstStride,
int src1Stride,
int h);
42 int dstStride,
int src1Stride,
int h);
44 int dstStride,
int src1Stride,
int h);
46 int dstStride,
int src1Stride,
int h);
48 int dstStride,
int srcStride,
int h);
50 int dstStride,
int srcStride,
int h);
52 int dstStride,
int srcStride,
55 int dstStride,
int srcStride,
int h);
57 int dstStride,
int srcStride,
int h);
59 int dstStride,
int srcStride,
62 int dstStride,
int srcStride);
64 int dstStride,
int srcStride);
66 int dstStride,
int srcStride);
68 int dstStride,
int srcStride);
70 int dstStride,
int srcStride);
72 int dstStride,
int srcStride);
73 #define ff_put_no_rnd_pixels16_mmxext ff_put_pixels16_mmx
74 #define ff_put_no_rnd_pixels8_mmxext ff_put_pixels8_mmx
78 #define ff_put_pixels16_mmxext ff_put_pixels16_mmx
79 #define ff_put_pixels8_mmxext ff_put_pixels8_mmx
81 #define QPEL_OP(OPNAME, RND, MMX) \
82 static void OPNAME ## qpel8_mc00_ ## MMX(uint8_t *dst, uint8_t *src, \
85 ff_ ## OPNAME ## pixels8_ ## MMX(dst, src, stride, 8); \
88 static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \
92 uint8_t *const half = (uint8_t *) temp; \
93 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \
95 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \
99 static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \
102 ff_ ## OPNAME ## mpeg4_qpel8_h_lowpass_ ## MMX(dst, src, stride, \
106 static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \
110 uint8_t *const half = (uint8_t *) temp; \
111 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \
113 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + 1, half, stride, \
117 static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \
121 uint8_t *const half = (uint8_t *) temp; \
122 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \
124 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \
125 stride, stride, 8); \
128 static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \
131 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, src, \
135 static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \
139 uint8_t *const half = (uint8_t *) temp; \
140 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \
142 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + stride, half, stride,\
146 static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \
149 uint64_t half[8 + 9]; \
150 uint8_t *const halfH = (uint8_t *) half + 64; \
151 uint8_t *const halfHV = (uint8_t *) half; \
152 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
154 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, \
156 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
157 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, \
161 static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \
164 uint64_t half[8 + 9]; \
165 uint8_t *const halfH = (uint8_t *) half + 64; \
166 uint8_t *const halfHV = (uint8_t *) half; \
167 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
169 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \
171 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
172 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, \
176 static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \
179 uint64_t half[8 + 9]; \
180 uint8_t *const halfH = (uint8_t *) half + 64; \
181 uint8_t *const halfHV = (uint8_t *) half; \
182 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
184 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, \
186 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
187 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH + 8, halfHV, \
191 static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \
194 uint64_t half[8 + 9]; \
195 uint8_t *const halfH = (uint8_t *) half + 64; \
196 uint8_t *const halfHV = (uint8_t *) half; \
197 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
199 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \
201 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
202 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH + 8, halfHV, \
206 static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \
209 uint64_t half[8 + 9]; \
210 uint8_t *const halfH = (uint8_t *) half + 64; \
211 uint8_t *const halfHV = (uint8_t *) half; \
212 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
214 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
215 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, \
219 static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \
222 uint64_t half[8 + 9]; \
223 uint8_t *const halfH = (uint8_t *) half + 64; \
224 uint8_t *const halfHV = (uint8_t *) half; \
225 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
227 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
228 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH + 8, halfHV, \
232 static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \
235 uint64_t half[8 + 9]; \
236 uint8_t *const halfH = (uint8_t *) half; \
237 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
239 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, \
241 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \
245 static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \
248 uint64_t half[8 + 9]; \
249 uint8_t *const halfH = (uint8_t *) half; \
250 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
252 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \
254 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \
258 static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
262 uint8_t *const halfH = (uint8_t *) half; \
263 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
265 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \
269 static void OPNAME ## qpel16_mc00_ ## MMX(uint8_t *dst, uint8_t *src, \
272 ff_ ## OPNAME ## pixels16_ ## MMX(dst, src, stride, 16); \
275 static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \
279 uint8_t *const half = (uint8_t *) temp; \
280 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, \
282 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, \
286 static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \
289 ff_ ## OPNAME ## mpeg4_qpel16_h_lowpass_ ## MMX(dst, src, \
290 stride, stride, 16);\
293 static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \
297 uint8_t *const half = (uint8_t*) temp; \
298 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, \
300 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src + 1, half, \
301 stride, stride, 16); \
304 static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \
308 uint8_t *const half = (uint8_t *) temp; \
309 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, \
311 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, \
315 static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \
318 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, src, \
322 static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \
326 uint8_t *const half = (uint8_t *) temp; \
327 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, \
329 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src+stride, half, \
330 stride, stride, 16); \
333 static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \
336 uint64_t half[16 * 2 + 17 * 2]; \
337 uint8_t *const halfH = (uint8_t *) half + 256; \
338 uint8_t *const halfHV = (uint8_t *) half; \
339 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
341 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \
343 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
345 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, \
349 static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \
352 uint64_t half[16 * 2 + 17 * 2]; \
353 uint8_t *const halfH = (uint8_t *) half + 256; \
354 uint8_t *const halfHV = (uint8_t *) half; \
355 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
357 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \
359 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
361 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, \
365 static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \
368 uint64_t half[16 * 2 + 17 * 2]; \
369 uint8_t *const halfH = (uint8_t *) half + 256; \
370 uint8_t *const halfHV = (uint8_t *) half; \
371 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
373 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \
375 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
377 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH + 16, halfHV, \
381 static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \
384 uint64_t half[16 * 2 + 17 * 2]; \
385 uint8_t *const halfH = (uint8_t *) half + 256; \
386 uint8_t *const halfHV = (uint8_t *) half; \
387 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
389 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \
391 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
393 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH + 16, halfHV, \
397 static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \
400 uint64_t half[16 * 2 + 17 * 2]; \
401 uint8_t *const halfH = (uint8_t *) half + 256; \
402 uint8_t *const halfHV = (uint8_t *) half; \
403 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
405 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
407 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, \
411 static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \
414 uint64_t half[16 * 2 + 17 * 2]; \
415 uint8_t *const halfH = (uint8_t *) half + 256; \
416 uint8_t *const halfHV = (uint8_t *) half; \
417 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
419 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
421 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH + 16, halfHV, \
425 static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \
428 uint64_t half[17 * 2]; \
429 uint8_t *const halfH = (uint8_t *) half; \
430 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
432 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \
434 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \
438 static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \
441 uint64_t half[17 * 2]; \
442 uint8_t *const halfH = (uint8_t *) half; \
443 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
445 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \
447 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \
451 static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
454 uint64_t half[17 * 2]; \
455 uint8_t *const halfH = (uint8_t *) half; \
456 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
458 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \
462 QPEL_OP(put_, _, mmxext)
463 QPEL_OP(avg_, _, mmxext)
464 QPEL_OP(put_no_rnd_, _no_rnd_, mmxext)
468 #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX) \
470 c->PFX ## _pixels_tab[IDX][ 0] = PREFIX ## PFX ## SIZE ## _mc00_ ## CPU; \
471 c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \
472 c->PFX ## _pixels_tab[IDX][ 2] = PREFIX ## PFX ## SIZE ## _mc20_ ## CPU; \
473 c->PFX ## _pixels_tab[IDX][ 3] = PREFIX ## PFX ## SIZE ## _mc30_ ## CPU; \
474 c->PFX ## _pixels_tab[IDX][ 4] = PREFIX ## PFX ## SIZE ## _mc01_ ## CPU; \
475 c->PFX ## _pixels_tab[IDX][ 5] = PREFIX ## PFX ## SIZE ## _mc11_ ## CPU; \
476 c->PFX ## _pixels_tab[IDX][ 6] = PREFIX ## PFX ## SIZE ## _mc21_ ## CPU; \
477 c->PFX ## _pixels_tab[IDX][ 7] = PREFIX ## PFX ## SIZE ## _mc31_ ## CPU; \
478 c->PFX ## _pixels_tab[IDX][ 8] = PREFIX ## PFX ## SIZE ## _mc02_ ## CPU; \
479 c->PFX ## _pixels_tab[IDX][ 9] = PREFIX ## PFX ## SIZE ## _mc12_ ## CPU; \
480 c->PFX ## _pixels_tab[IDX][10] = PREFIX ## PFX ## SIZE ## _mc22_ ## CPU; \
481 c->PFX ## _pixels_tab[IDX][11] = PREFIX ## PFX ## SIZE ## _mc32_ ## CPU; \
482 c->PFX ## _pixels_tab[IDX][12] = PREFIX ## PFX ## SIZE ## _mc03_ ## CPU; \
483 c->PFX ## _pixels_tab[IDX][13] = PREFIX ## PFX ## SIZE ## _mc13_ ## CPU; \
484 c->PFX ## _pixels_tab[IDX][14] = PREFIX ## PFX ## SIZE ## _mc23_ ## CPU; \
485 c->PFX ## _pixels_tab[IDX][15] = PREFIX ## PFX ## SIZE ## _mc33_ ## CPU; \
493 #if HAVE_MMXEXT_EXTERNAL