34 |
const uint32_t rounding); |
const uint32_t rounding); |
35 |
typedef INTERPOLATE8X8 *INTERPOLATE8X8_PTR; |
typedef INTERPOLATE8X8 *INTERPOLATE8X8_PTR; |
36 |
|
|
37 |
|
typedef void (INTERPOLATE8X4) (uint8_t * const dst, |
38 |
|
const uint8_t * const src, |
39 |
|
const uint32_t stride, |
40 |
|
const uint32_t rounding); |
41 |
|
typedef INTERPOLATE8X4 *INTERPOLATE8X4_PTR; |
42 |
|
|
43 |
typedef void (INTERPOLATE8X8_AVG2) (uint8_t *dst, |
typedef void (INTERPOLATE8X8_AVG2) (uint8_t *dst, |
44 |
const uint8_t *src1, |
const uint8_t *src1, |
45 |
const uint8_t *src2, |
const uint8_t *src2, |
84 |
extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v; |
extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v; |
85 |
extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv; |
extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv; |
86 |
|
|
87 |
|
extern INTERPOLATE8X4_PTR interpolate8x4_halfpel_h; |
88 |
|
extern INTERPOLATE8X4_PTR interpolate8x4_halfpel_v; |
89 |
|
extern INTERPOLATE8X4_PTR interpolate8x4_halfpel_hv; |
90 |
|
|
91 |
/* These functions do: dst = (dst+interpolate(src) + 1)/2 |
/* These functions do: dst = (dst+interpolate(src) + 1)/2 |
92 |
* Suitable for direct/interpolated bvop prediction block |
* Suitable for direct/interpolated bvop prediction block |
93 |
* building w/o the need for intermediate interpolated result |
* building w/o the need for intermediate interpolated result |
117 |
INTERPOLATE8X8 interpolate8x8_halfpel_h_c; |
INTERPOLATE8X8 interpolate8x8_halfpel_h_c; |
118 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_c; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_c; |
119 |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_c; |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_c; |
120 |
|
|
121 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_h_c; |
122 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_v_c; |
123 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_hv_c; |
124 |
|
|
125 |
INTERPOLATE8X8 interpolate8x8_halfpel_add_c; |
INTERPOLATE8X8 interpolate8x8_halfpel_add_c; |
126 |
INTERPOLATE8X8 interpolate8x8_halfpel_h_add_c; |
INTERPOLATE8X8 interpolate8x8_halfpel_h_add_c; |
127 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_add_c; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_add_c; |
132 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_mmx; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_mmx; |
133 |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_mmx; |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_mmx; |
134 |
|
|
135 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_h_mmx; |
136 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_v_mmx; |
137 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_hv_mmx; |
138 |
|
|
139 |
INTERPOLATE8X8 interpolate8x8_halfpel_add_mmx; |
INTERPOLATE8X8 interpolate8x8_halfpel_add_mmx; |
140 |
INTERPOLATE8X8 interpolate8x8_halfpel_h_add_mmx; |
INTERPOLATE8X8 interpolate8x8_halfpel_h_add_mmx; |
141 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_add_mmx; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_add_mmx; |
145 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_xmm; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_xmm; |
146 |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_xmm; |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_xmm; |
147 |
|
|
148 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_h_xmm; |
149 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_v_xmm; |
150 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_hv_xmm; |
151 |
|
|
152 |
INTERPOLATE8X8 interpolate8x8_halfpel_add_xmm; |
INTERPOLATE8X8 interpolate8x8_halfpel_add_xmm; |
153 |
INTERPOLATE8X8 interpolate8x8_halfpel_h_add_xmm; |
INTERPOLATE8X8 interpolate8x8_halfpel_h_add_xmm; |
154 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_add_xmm; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_add_xmm; |
158 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn; |
159 |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn; |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn; |
160 |
|
|
161 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_h_3dn; |
162 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_v_3dn; |
163 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_hv_3dn; |
164 |
|
|
165 |
INTERPOLATE8X8 interpolate8x8_halfpel_h_3dne; |
INTERPOLATE8X8 interpolate8x8_halfpel_h_3dne; |
166 |
INTERPOLATE8X8 interpolate8x8_halfpel_v_3dne; |
INTERPOLATE8X8 interpolate8x8_halfpel_v_3dne; |
167 |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dne; |
INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dne; |
168 |
|
|
169 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_h_3dne; |
170 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_v_3dne; |
171 |
|
INTERPOLATE8X4 interpolate8x4_halfpel_hv_3dne; |
172 |
#endif |
#endif |
173 |
|
|
174 |
#ifdef ARCH_IS_IA64 |
#ifdef ARCH_IS_IA64 |
244 |
#endif |
#endif |
245 |
|
|
246 |
static __inline void |
static __inline void |
247 |
|
interpolate8x4_switch(uint8_t * const cur, |
248 |
|
const uint8_t * const refn, |
249 |
|
const uint32_t x, |
250 |
|
const uint32_t y, |
251 |
|
const int32_t dx, |
252 |
|
const int dy, |
253 |
|
const uint32_t stride, |
254 |
|
const uint32_t rounding) |
255 |
|
{ |
256 |
|
|
257 |
|
const uint8_t * const src = refn + (int)((y + (dy>>1)) * stride + x + (dx>>1)); |
258 |
|
uint8_t * const dst = cur + (int)(y * stride + x); |
259 |
|
|
260 |
|
switch (((dx & 1) << 1) + (dy & 1)) |
261 |
|
{ /* ((dx%2)?2:0)+((dy%2)?1:0) */ |
262 |
|
case 0: |
263 |
|
transfer8x4_copy(dst, src, stride); |
264 |
|
break; |
265 |
|
case 1: |
266 |
|
interpolate8x4_halfpel_v(dst, src, stride, rounding); |
267 |
|
break; |
268 |
|
case 2: |
269 |
|
interpolate8x4_halfpel_h(dst, src, stride, rounding); |
270 |
|
break; |
271 |
|
default: |
272 |
|
interpolate8x4_halfpel_hv(dst, src, stride, rounding); |
273 |
|
break; |
274 |
|
} |
275 |
|
} |
276 |
|
|
277 |
|
static __inline void |
278 |
interpolate8x8_switch(uint8_t * const cur, |
interpolate8x8_switch(uint8_t * const cur, |
279 |
const uint8_t * const refn, |
const uint8_t * const refn, |
280 |
const uint32_t x, |
const uint32_t x, |