28 #define DEF_HPEL(OPNAME, OP) \
29 static inline void FUNC(OPNAME ## _pixels8_l2)(uint8_t *dst, \
30 const uint8_t *src1, \
31 const uint8_t *src2, \
38 for (i = 0; i < h; i++) { \
40 a = AV_RN4P(&src1[i * src_stride1]); \
41 b = AV_RN4P(&src2[i * src_stride2]); \
42 OP(*((pixel4 *) &dst[i * dst_stride]), rnd_avg_pixel4(a, b)); \
43 a = AV_RN4P(&src1[i * src_stride1 + 4 * sizeof(pixel)]); \
44 b = AV_RN4P(&src2[i * src_stride2 + 4 * sizeof(pixel)]); \
45 OP(*((pixel4 *) &dst[i * dst_stride + 4 * sizeof(pixel)]), \
46 rnd_avg_pixel4(a, b)); \
50 static inline void FUNC(OPNAME ## _pixels4_l2)(uint8_t *dst, \
51 const uint8_t *src1, \
52 const uint8_t *src2, \
59 for (i = 0; i < h; i++) { \
61 a = AV_RN4P(&src1[i * src_stride1]); \
62 b = AV_RN4P(&src2[i * src_stride2]); \
63 OP(*((pixel4 *) &dst[i * dst_stride]), rnd_avg_pixel4(a, b)); \
67 static inline void FUNC(OPNAME ## _pixels2_l2)(uint8_t *dst, \
68 const uint8_t *src1, \
69 const uint8_t *src2, \
76 for (i = 0; i < h; i++) { \
78 a = AV_RN2P(&src1[i * src_stride1]); \
79 b = AV_RN2P(&src2[i * src_stride2]); \
80 OP(*((pixel2 *) &dst[i * dst_stride]), rnd_avg_pixel4(a, b)); \
84 static inline void FUNC(OPNAME ## _pixels16_l2)(uint8_t *dst, \
85 const uint8_t *src1, \
86 const uint8_t *src2, \
92 FUNC(OPNAME ## _pixels8_l2)(dst, src1, src2, dst_stride, \
93 src_stride1, src_stride2, h); \
94 FUNC(OPNAME ## _pixels8_l2)(dst + 8 * sizeof(pixel), \
95 src1 + 8 * sizeof(pixel), \
96 src2 + 8 * sizeof(pixel), \
97 dst_stride, src_stride1, \
101 #define op_avg(a, b) a = rnd_avg_pixel4(a, b)
102 #define op_put(a, b) a = b
#define DEF_HPEL(OPNAME, OP)