37 int stride,
int h,
int x,
int y);
39 int stride,
int h,
int x,
int y);
41 int stride,
int h,
int x,
int y);
44 int stride,
int h,
int x,
int y);
46 int stride,
int h,
int x,
int y);
48 int stride,
int h,
int x,
int y);
50 #define DECLARE_WEIGHT(opt) \
51 void ff_rv40_weight_func_rnd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
52 int w1, int w2, ptrdiff_t stride); \
53 void ff_rv40_weight_func_rnd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
54 int w1, int w2, ptrdiff_t stride); \
55 void ff_rv40_weight_func_nornd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
56 int w1, int w2, ptrdiff_t stride); \
57 void ff_rv40_weight_func_nornd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
58 int w1, int w2, ptrdiff_t stride);
59 DECLARE_WEIGHT(mmxext)
71 #define QPEL_FUNC_DECL(OP, SIZE, PH, PV, OPT) \
72 static void OP ## rv40_qpel ##SIZE ##_mc ##PH ##PV ##OPT(uint8_t *dst, \
78 DECLARE_ALIGNED(16, uint8_t, tmp)[SIZE * (SIZE + 5)]; \
79 uint8_t *tmpptr = tmp + SIZE * 2; \
82 for (i = 0; i < SIZE; i += LOOPSIZE) \
83 ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride, \
84 SIZE + 5, HCOFF(PH)); \
85 for (i = 0; i < SIZE; i += LOOPSIZE) \
86 ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i, \
87 SIZE, SIZE, VCOFF(PV)); \
89 for (i = 0; i < SIZE; i += LOOPSIZE) \
90 ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i, \
91 stride, SIZE, VCOFF(PV)); \
93 for (i = 0; i < SIZE; i += LOOPSIZE) \
94 ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i, \
95 stride, SIZE, HCOFF(PH)); \
101 #define QPEL_FUNCS_DECL(OP, PH, PV, OPT) \
102 QPEL_FUNC_DECL(OP, 8, PH, PV, OPT) \
103 QPEL_FUNC_DECL(OP, 16, PH, PV, OPT)
106 #define QPEL_MC_DECL(OP, OPT) \
107 void ff_ ##OP ##rv40_qpel_h ##OPT(uint8_t *dst, ptrdiff_t dstStride, \
108 const uint8_t *src, \
109 ptrdiff_t srcStride, \
111 void ff_ ##OP ##rv40_qpel_v ##OPT(uint8_t *dst, ptrdiff_t dstStride, \
112 const uint8_t *src, \
113 ptrdiff_t srcStride, \
115 QPEL_FUNCS_DECL(OP, 0, 1, OPT) \
116 QPEL_FUNCS_DECL(OP, 0, 3, OPT) \
117 QPEL_FUNCS_DECL(OP, 1, 0, OPT) \
118 QPEL_FUNCS_DECL(OP, 1, 1, OPT) \
119 QPEL_FUNCS_DECL(OP, 1, 2, OPT) \
120 QPEL_FUNCS_DECL(OP, 1, 3, OPT) \
121 QPEL_FUNCS_DECL(OP, 2, 1, OPT) \
122 QPEL_FUNCS_DECL(OP, 2, 2, OPT) \
123 QPEL_FUNCS_DECL(OP, 2, 3, OPT) \
124 QPEL_FUNCS_DECL(OP, 3, 0, OPT) \
125 QPEL_FUNCS_DECL(OP, 3, 1, OPT) \
126 QPEL_FUNCS_DECL(OP, 3, 2, OPT)
130 #define HCOFF(x) (32 * (x - 1))
131 #define VCOFF(x) (32 * (x - 1))
132 QPEL_MC_DECL(put_, _ssse3)
133 QPEL_MC_DECL(avg_, _ssse3)
139 #define HCOFF(x) (64 * (x - 1))
140 #define VCOFF(x) (64 * (x - 1))
141 QPEL_MC_DECL(put_, _sse2)
142 QPEL_MC_DECL(avg_, _sse2)
149 #define HCOFF(x) (64 * (x - 1))
150 #define VCOFF(x) (64 * (x - 1))
152 QPEL_MC_DECL(put_, _mmx)
154 #define ff_put_rv40_qpel_h_mmxext ff_put_rv40_qpel_h_mmx
155 #define ff_put_rv40_qpel_v_mmxext ff_put_rv40_qpel_v_mmx
156 QPEL_MC_DECL(avg_, _mmxext)
158 #define ff_put_rv40_qpel_h_3dnow ff_put_rv40_qpel_h_mmx
159 #define ff_put_rv40_qpel_v_3dnow ff_put_rv40_qpel_v_mmx
160 QPEL_MC_DECL(avg_, _3dnow)
165 #define QPEL_FUNC_SET(OP, SIZE, PH, PV, OPT) \
166 c-> OP ## pixels_tab[2 - SIZE / 8][4 * PV + PH] = OP ## rv40_qpel ##SIZE ## _mc ##PH ##PV ##OPT;
169 #define QPEL_FUNCS_SET(OP, PH, PV, OPT) \
170 QPEL_FUNC_SET(OP, 8, PH, PV, OPT) \
171 QPEL_FUNC_SET(OP, 16, PH, PV, OPT)
174 #define QPEL_MC_SET(OP, OPT) \
175 QPEL_FUNCS_SET (OP, 0, 1, OPT) \
176 QPEL_FUNCS_SET (OP, 0, 3, OPT) \
177 QPEL_FUNCS_SET (OP, 1, 0, OPT) \
178 QPEL_FUNCS_SET (OP, 1, 1, OPT) \
179 QPEL_FUNCS_SET (OP, 1, 2, OPT) \
180 QPEL_FUNCS_SET (OP, 1, 3, OPT) \
181 QPEL_FUNCS_SET (OP, 2, 1, OPT) \
182 QPEL_FUNCS_SET (OP, 2, 2, OPT) \
183 QPEL_FUNCS_SET (OP, 2, 3, OPT) \
184 QPEL_FUNCS_SET (OP, 3, 0, OPT) \
185 QPEL_FUNCS_SET (OP, 3, 1, OPT) \
186 QPEL_FUNCS_SET (OP, 3, 2, OPT)
206 QPEL_MC_SET(put_, _mmx)
217 QPEL_MC_SET(avg_, _mmxext)
223 QPEL_MC_SET(avg_, _3dnow)
231 QPEL_MC_SET(put_, _sse2)
232 QPEL_MC_SET(avg_, _sse2)
239 QPEL_MC_SET(put_, _ssse3)
240 QPEL_MC_SET(avg_, _ssse3)