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_mmxext
74 #define ff_put_no_rnd_pixels8_mmxext ff_put_pixels8_mmxext
95 int *left,
int *left_top);
112 PIXELS16(
static, ff_avg, , , _mmxext)
113 PIXELS16(static, ff_put, , , _mmxext)
115 #define QPEL_OP(OPNAME, RND, MMX) \
116 static void OPNAME ## qpel8_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \
119 ff_ ## OPNAME ## pixels8_ ## MMX(dst, src, stride, 8); \
122 static void OPNAME ## qpel8_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \
126 uint8_t * const half = (uint8_t*)temp; \
127 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \
129 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \
130 stride, stride, 8); \
133 static void OPNAME ## qpel8_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \
136 ff_ ## OPNAME ## mpeg4_qpel8_h_lowpass_ ## MMX(dst, src, stride, \
140 static void OPNAME ## qpel8_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \
144 uint8_t * const half = (uint8_t*)temp; \
145 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(half, src, 8, \
147 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + 1, half, stride, \
151 static void OPNAME ## qpel8_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \
155 uint8_t * const half = (uint8_t*)temp; \
156 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \
158 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src, half, \
159 stride, stride, 8); \
162 static void OPNAME ## qpel8_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \
165 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, src, \
169 static void OPNAME ## qpel8_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \
173 uint8_t * const half = (uint8_t*)temp; \
174 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(half, src, \
176 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, src + stride, half, stride,\
180 static void OPNAME ## qpel8_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \
183 uint64_t half[8 + 9]; \
184 uint8_t * const halfH = ((uint8_t*)half) + 64; \
185 uint8_t * const halfHV = ((uint8_t*)half); \
186 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
188 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, \
190 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
191 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, \
195 static void OPNAME ## qpel8_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \
198 uint64_t half[8 + 9]; \
199 uint8_t * const halfH = ((uint8_t*)half) + 64; \
200 uint8_t * const halfHV = ((uint8_t*)half); \
201 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
203 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \
205 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
206 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, \
210 static void OPNAME ## qpel8_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \
213 uint64_t half[8 + 9]; \
214 uint8_t * const halfH = ((uint8_t*)half) + 64; \
215 uint8_t * const halfHV = ((uint8_t*)half); \
216 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
218 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, 8, \
220 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
221 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH + 8, halfHV, \
225 static void OPNAME ## qpel8_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \
228 uint64_t half[8 + 9]; \
229 uint8_t * const halfH = ((uint8_t*)half) + 64; \
230 uint8_t * const halfHV = ((uint8_t*)half); \
231 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
233 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \
235 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
236 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH + 8, halfHV, \
240 static void OPNAME ## qpel8_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \
243 uint64_t half[8 + 9]; \
244 uint8_t * const halfH = ((uint8_t*)half) + 64; \
245 uint8_t * const halfHV = ((uint8_t*)half); \
246 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
248 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
249 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH, halfHV, \
253 static void OPNAME ## qpel8_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \
256 uint64_t half[8 + 9]; \
257 uint8_t * const halfH = ((uint8_t*)half) + 64; \
258 uint8_t * const halfHV = ((uint8_t*)half); \
259 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
261 ff_put ## RND ## mpeg4_qpel8_v_lowpass_ ## MMX(halfHV, halfH, 8, 8);\
262 ff_ ## OPNAME ## pixels8_l2_ ## MMX(dst, halfH + 8, halfHV, \
266 static void OPNAME ## qpel8_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \
269 uint64_t half[8 + 9]; \
270 uint8_t * const halfH = ((uint8_t*)half); \
271 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
273 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src, halfH, \
275 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \
279 static void OPNAME ## qpel8_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \
282 uint64_t half[8 + 9]; \
283 uint8_t * const halfH = ((uint8_t*)half); \
284 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
286 ff_put ## RND ## pixels8_l2_ ## MMX(halfH, src + 1, halfH, 8, \
288 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \
292 static void OPNAME ## qpel8_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
296 uint8_t * const halfH = ((uint8_t*)half); \
297 ff_put ## RND ## mpeg4_qpel8_h_lowpass_ ## MMX(halfH, src, 8, \
299 ff_ ## OPNAME ## mpeg4_qpel8_v_lowpass_ ## MMX(dst, halfH, \
303 static void OPNAME ## qpel16_mc00_ ## MMX (uint8_t *dst, uint8_t *src, \
306 ff_ ## OPNAME ## pixels16_ ## MMX(dst, src, stride, 16); \
309 static void OPNAME ## qpel16_mc10_ ## MMX(uint8_t *dst, uint8_t *src, \
313 uint8_t * const half = (uint8_t*)temp; \
314 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, \
316 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, \
320 static void OPNAME ## qpel16_mc20_ ## MMX(uint8_t *dst, uint8_t *src, \
323 ff_ ## OPNAME ## mpeg4_qpel16_h_lowpass_ ## MMX(dst, src, \
324 stride, stride, 16);\
327 static void OPNAME ## qpel16_mc30_ ## MMX(uint8_t *dst, uint8_t *src, \
331 uint8_t * const half = (uint8_t*)temp; \
332 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(half, src, 16, \
334 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src + 1, half, \
335 stride, stride, 16); \
338 static void OPNAME ## qpel16_mc01_ ## MMX(uint8_t *dst, uint8_t *src, \
342 uint8_t * const half = (uint8_t*)temp; \
343 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, \
345 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src, half, stride, \
349 static void OPNAME ## qpel16_mc02_ ## MMX(uint8_t *dst, uint8_t *src, \
352 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, src, \
356 static void OPNAME ## qpel16_mc03_ ## MMX(uint8_t *dst, uint8_t *src, \
360 uint8_t * const half = (uint8_t*)temp; \
361 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(half, src, 16, \
363 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, src+stride, half, \
364 stride, stride, 16); \
367 static void OPNAME ## qpel16_mc11_ ## MMX(uint8_t *dst, uint8_t *src, \
370 uint64_t half[16 * 2 + 17 * 2]; \
371 uint8_t * const halfH = ((uint8_t*)half) + 256; \
372 uint8_t * const halfHV = ((uint8_t*)half); \
373 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
375 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \
377 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
379 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, \
383 static void OPNAME ## qpel16_mc31_ ## MMX(uint8_t *dst, uint8_t *src, \
386 uint64_t half[16 * 2 + 17 * 2]; \
387 uint8_t * const halfH = ((uint8_t*)half) + 256; \
388 uint8_t * const halfHV = ((uint8_t*)half); \
389 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
391 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \
393 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
395 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, \
399 static void OPNAME ## qpel16_mc13_ ## MMX(uint8_t *dst, uint8_t *src, \
402 uint64_t half[16 * 2 + 17 * 2]; \
403 uint8_t * const halfH = ((uint8_t*)half) + 256; \
404 uint8_t * const halfHV = ((uint8_t*)half); \
405 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
407 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \
409 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
411 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH + 16, halfHV, \
415 static void OPNAME ## qpel16_mc33_ ## MMX(uint8_t *dst, uint8_t *src, \
418 uint64_t half[16 * 2 + 17 * 2]; \
419 uint8_t * const halfH = ((uint8_t*)half) + 256; \
420 uint8_t * const halfHV = ((uint8_t*)half); \
421 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
423 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \
425 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
427 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH + 16, halfHV, \
431 static void OPNAME ## qpel16_mc21_ ## MMX(uint8_t *dst, uint8_t *src, \
434 uint64_t half[16 * 2 + 17 * 2]; \
435 uint8_t * const halfH = ((uint8_t*)half) + 256; \
436 uint8_t * const halfHV = ((uint8_t*)half); \
437 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
439 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
441 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH, halfHV, \
445 static void OPNAME ## qpel16_mc23_ ## MMX(uint8_t *dst, uint8_t *src, \
448 uint64_t half[16 * 2 + 17 * 2]; \
449 uint8_t * const halfH = ((uint8_t*)half) + 256; \
450 uint8_t * const halfHV = ((uint8_t*)half); \
451 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
453 ff_put ## RND ## mpeg4_qpel16_v_lowpass_ ## MMX(halfHV, halfH, \
455 ff_ ## OPNAME ## pixels16_l2_ ## MMX(dst, halfH + 16, halfHV, \
459 static void OPNAME ## qpel16_mc12_ ## MMX(uint8_t *dst, uint8_t *src, \
462 uint64_t half[17 * 2]; \
463 uint8_t * const halfH = ((uint8_t*)half); \
464 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
466 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src, halfH, 16, \
468 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \
472 static void OPNAME ## qpel16_mc32_ ## MMX(uint8_t *dst, uint8_t *src, \
475 uint64_t half[17 * 2]; \
476 uint8_t * const halfH = ((uint8_t*)half); \
477 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
479 ff_put ## RND ## pixels16_l2_ ## MMX(halfH, src + 1, halfH, 16, \
481 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \
485 static void OPNAME ## qpel16_mc22_ ## MMX(uint8_t *dst, uint8_t *src, \
488 uint64_t half[17 * 2]; \
489 uint8_t * const halfH = ((uint8_t*)half); \
490 ff_put ## RND ## mpeg4_qpel16_h_lowpass_ ## MMX(halfH, src, 16, \
492 ff_ ## OPNAME ## mpeg4_qpel16_v_lowpass_ ## MMX(dst, halfH, \
496 QPEL_OP(put_, _, mmxext)
497 QPEL_OP(avg_, _, mmxext)
498 QPEL_OP(put_no_rnd_, _no_rnd_, mmxext)
501 #define SET_QPEL_FUNCS(PFX, IDX, SIZE, CPU, PREFIX) \
503 c->PFX ## _pixels_tab[IDX][ 0] = PREFIX ## PFX ## SIZE ## _mc00_ ## CPU; \
504 c->PFX ## _pixels_tab[IDX][ 1] = PREFIX ## PFX ## SIZE ## _mc10_ ## CPU; \
505 c->PFX ## _pixels_tab[IDX][ 2] = PREFIX ## PFX ## SIZE ## _mc20_ ## CPU; \
506 c->PFX ## _pixels_tab[IDX][ 3] = PREFIX ## PFX ## SIZE ## _mc30_ ## CPU; \
507 c->PFX ## _pixels_tab[IDX][ 4] = PREFIX ## PFX ## SIZE ## _mc01_ ## CPU; \
508 c->PFX ## _pixels_tab[IDX][ 5] = PREFIX ## PFX ## SIZE ## _mc11_ ## CPU; \
509 c->PFX ## _pixels_tab[IDX][ 6] = PREFIX ## PFX ## SIZE ## _mc21_ ## CPU; \
510 c->PFX ## _pixels_tab[IDX][ 7] = PREFIX ## PFX ## SIZE ## _mc31_ ## CPU; \
511 c->PFX ## _pixels_tab[IDX][ 8] = PREFIX ## PFX ## SIZE ## _mc02_ ## CPU; \
512 c->PFX ## _pixels_tab[IDX][ 9] = PREFIX ## PFX ## SIZE ## _mc12_ ## CPU; \
513 c->PFX ## _pixels_tab[IDX][10] = PREFIX ## PFX ## SIZE ## _mc22_ ## CPU; \
514 c->PFX ## _pixels_tab[IDX][11] = PREFIX ## PFX ## SIZE ## _mc32_ ## CPU; \
515 c->PFX ## _pixels_tab[IDX][12] = PREFIX ## PFX ## SIZE ## _mc03_ ## CPU; \
516 c->PFX ## _pixels_tab[IDX][13] = PREFIX ## PFX ## SIZE ## _mc13_ ## CPU; \
517 c->PFX ## _pixels_tab[IDX][14] = PREFIX ## PFX ## SIZE ## _mc23_ ## CPU; \
518 c->PFX ## _pixels_tab[IDX][15] = PREFIX ## PFX ## SIZE ## _mc33_ ## CPU; \
531 if (!high_bit_depth) {
537 #if CONFIG_VIDEODSP && (ARCH_X86_32 || !HAVE_YASM)
544 #if HAVE_MMX_EXTERNAL
552 #if HAVE_MMXEXT_INLINE
562 #if HAVE_MMXEXT_EXTERNAL
592 if (!high_bit_depth) {
599 #if HAVE_INLINE_ASM && CONFIG_VIDEODSP
619 #if HAVE_SSE2_EXTERNAL
634 #if HAVE_SSSE3_EXTERNAL
648 #if HAVE_SSE4_EXTERNAL
657 #if HAVE_7REGS && HAVE_INLINE_ASM