36 int stride,
int h,
int x,
int y);
38 int stride,
int h,
int x,
int y);
40 int stride,
int h,
int x,
int y);
43 int stride,
int h,
int x,
int y);
45 int stride,
int h,
int x,
int y);
47 int stride,
int h,
int x,
int y);
49 #define DECLARE_WEIGHT(opt) \
50 void ff_rv40_weight_func_rnd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
51 int w1, int w2, ptrdiff_t stride); \
52 void ff_rv40_weight_func_rnd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
53 int w1, int w2, ptrdiff_t stride); \
54 void ff_rv40_weight_func_nornd_16_##opt(uint8_t *dst, uint8_t *src1, uint8_t *src2, \
55 int w1, int w2, ptrdiff_t stride); \
56 void ff_rv40_weight_func_nornd_8_##opt (uint8_t *dst, uint8_t *src1, uint8_t *src2, \
57 int w1, int w2, ptrdiff_t stride);
58 DECLARE_WEIGHT(mmxext)
70 #define QPEL_FUNC_DECL(OP, SIZE, PH, PV, OPT) \
71 static void OP ## rv40_qpel ##SIZE ##_mc ##PH ##PV ##OPT(uint8_t *dst, \
77 DECLARE_ALIGNED(16, uint8_t, tmp)[SIZE * (SIZE + 5)]; \
78 uint8_t *tmpptr = tmp + SIZE * 2; \
81 for (i = 0; i < SIZE; i += LOOPSIZE) \
82 ff_put_rv40_qpel_h ##OPT(tmp + i, SIZE, src + i, stride, \
83 SIZE + 5, HCOFF(PH)); \
84 for (i = 0; i < SIZE; i += LOOPSIZE) \
85 ff_ ##OP ##rv40_qpel_v ##OPT(dst + i, stride, tmpptr + i, \
86 SIZE, SIZE, VCOFF(PV)); \
88 for (i = 0; i < SIZE; i += LOOPSIZE) \
89 ff_ ##OP ##rv40_qpel_v ## OPT(dst + i, stride, src + i, \
90 stride, SIZE, VCOFF(PV)); \
92 for (i = 0; i < SIZE; i += LOOPSIZE) \
93 ff_ ##OP ##rv40_qpel_h ## OPT(dst + i, stride, src + i, \
94 stride, SIZE, HCOFF(PH)); \
100 #define QPEL_FUNCS_DECL(OP, PH, PV, OPT) \
101 QPEL_FUNC_DECL(OP, 8, PH, PV, OPT) \
102 QPEL_FUNC_DECL(OP, 16, PH, PV, OPT)
105 #define QPEL_MC_DECL(OP, OPT) \
106 void ff_ ##OP ##rv40_qpel_h ##OPT(uint8_t *dst, ptrdiff_t dstStride, \
107 const uint8_t *src, \
108 ptrdiff_t srcStride, \
110 void ff_ ##OP ##rv40_qpel_v ##OPT(uint8_t *dst, ptrdiff_t dstStride, \
111 const uint8_t *src, \
112 ptrdiff_t srcStride, \
114 QPEL_FUNCS_DECL(OP, 0, 1, OPT) \
115 QPEL_FUNCS_DECL(OP, 0, 3, OPT) \
116 QPEL_FUNCS_DECL(OP, 1, 0, OPT) \
117 QPEL_FUNCS_DECL(OP, 1, 1, OPT) \
118 QPEL_FUNCS_DECL(OP, 1, 2, OPT) \
119 QPEL_FUNCS_DECL(OP, 1, 3, OPT) \
120 QPEL_FUNCS_DECL(OP, 2, 1, OPT) \
121 QPEL_FUNCS_DECL(OP, 2, 2, OPT) \
122 QPEL_FUNCS_DECL(OP, 2, 3, OPT) \
123 QPEL_FUNCS_DECL(OP, 3, 0, OPT) \
124 QPEL_FUNCS_DECL(OP, 3, 1, OPT) \
125 QPEL_FUNCS_DECL(OP, 3, 2, OPT)
129 #define HCOFF(x) (32 * (x - 1))
130 #define VCOFF(x) (32 * (x - 1))
131 QPEL_MC_DECL(put_, _ssse3)
132 QPEL_MC_DECL(avg_, _ssse3)
138 #define HCOFF(x) (64 * (x - 1))
139 #define VCOFF(x) (64 * (x - 1))
140 QPEL_MC_DECL(put_, _sse2)
141 QPEL_MC_DECL(avg_, _sse2)
148 #define HCOFF(x) (64 * (x - 1))
149 #define VCOFF(x) (64 * (x - 1))
151 QPEL_MC_DECL(put_, _mmx)
153 #define ff_put_rv40_qpel_h_mmxext ff_put_rv40_qpel_h_mmx
154 #define ff_put_rv40_qpel_v_mmxext ff_put_rv40_qpel_v_mmx
155 QPEL_MC_DECL(avg_, _mmxext)
157 #define ff_put_rv40_qpel_h_3dnow ff_put_rv40_qpel_h_mmx
158 #define ff_put_rv40_qpel_v_3dnow ff_put_rv40_qpel_v_mmx
159 QPEL_MC_DECL(avg_, _3dnow)
164 #define QPEL_FUNC_SET(OP, SIZE, PH, PV, OPT) \
165 c-> OP ## pixels_tab[2 - SIZE / 8][4 * PV + PH] = OP ## rv40_qpel ##SIZE ## _mc ##PH ##PV ##OPT;
168 #define QPEL_FUNCS_SET(OP, PH, PV, OPT) \
169 QPEL_FUNC_SET(OP, 8, PH, PV, OPT) \
170 QPEL_FUNC_SET(OP, 16, PH, PV, OPT)
173 #define QPEL_MC_SET(OP, OPT) \
174 QPEL_FUNCS_SET (OP, 0, 1, OPT) \
175 QPEL_FUNCS_SET (OP, 0, 3, OPT) \
176 QPEL_FUNCS_SET (OP, 1, 0, OPT) \
177 QPEL_FUNCS_SET (OP, 1, 1, OPT) \
178 QPEL_FUNCS_SET (OP, 1, 2, OPT) \
179 QPEL_FUNCS_SET (OP, 1, 3, OPT) \
180 QPEL_FUNCS_SET (OP, 2, 1, OPT) \
181 QPEL_FUNCS_SET (OP, 2, 2, OPT) \
182 QPEL_FUNCS_SET (OP, 2, 3, OPT) \
183 QPEL_FUNCS_SET (OP, 3, 0, OPT) \
184 QPEL_FUNCS_SET (OP, 3, 1, OPT) \
185 QPEL_FUNCS_SET (OP, 3, 2, OPT)
205 QPEL_MC_SET(put_, _mmx)
216 QPEL_MC_SET(avg_, _mmxext)
222 QPEL_MC_SET(avg_, _3dnow)
230 QPEL_MC_SET(put_, _sse2)
231 QPEL_MC_SET(avg_, _sse2)
238 QPEL_MC_SET(put_, _ssse3)
239 QPEL_MC_SET(avg_, _ssse3)