[svn] / trunk / xvidcore / src / image / interpolate8x8.h Repository:
ViewVC logotype

Annotation of /trunk/xvidcore/src/image/interpolate8x8.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1412 - (view) (download)

1 : edgomez 1382 /*****************************************************************************
2 :     *
3 :     * XVID MPEG-4 VIDEO CODEC
4 :     * - Interpolation related header -
5 :     *
6 :     * Copyright(C) 2001-2003 Peter Ross <pross@xvid.org>
7 :     *
8 :     * This program is free software ; you can redistribute it and/or modify
9 :     * it under the terms of the GNU General Public License as published by
10 :     * the Free Software Foundation ; either version 2 of the License, or
11 :     * (at your option) any later version.
12 :     *
13 :     * This program is distributed in the hope that it will be useful,
14 :     * but WITHOUT ANY WARRANTY ; without even the implied warranty of
15 :     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 :     * GNU General Public License for more details.
17 :     *
18 :     * You should have received a copy of the GNU General Public License
19 :     * along with this program ; if not, write to the Free Software
20 :     * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
21 :     *
22 : edgomez 1412 * $Id: interpolate8x8.h,v 1.12 2004-04-05 20:36:36 edgomez Exp $
23 : edgomez 1382 *
24 :     ****************************************************************************/
25 :    
26 : edgomez 851 #ifndef _INTERPOLATE8X8_H_
27 :     #define _INTERPOLATE8X8_H_
28 : chl 433
29 : Isibaar 3 #include "../utils/mem_transfer.h"
30 :    
31 : edgomez 195 typedef void (INTERPOLATE8X8) (uint8_t * const dst,
32 :     const uint8_t * const src,
33 :     const uint32_t stride,
34 :     const uint32_t rounding);
35 :     typedef INTERPOLATE8X8 *INTERPOLATE8X8_PTR;
36 : Isibaar 3
37 : edgomez 851 typedef void (INTERPOLATE8X8_AVG2) (uint8_t *dst,
38 :     const uint8_t *src1,
39 :     const uint8_t *src2,
40 :     const uint32_t stride,
41 :     const uint32_t rounding,
42 :     const uint32_t height);
43 :     typedef INTERPOLATE8X8_AVG2 *INTERPOLATE8X8_AVG2_PTR;
44 :    
45 :     typedef void (INTERPOLATE8X8_AVG4) (uint8_t *dst,
46 :     const uint8_t *src1,
47 :     const uint8_t *src2,
48 :     const uint8_t *src3,
49 :     const uint8_t *src4,
50 :     const uint32_t stride,
51 :     const uint32_t rounding);
52 :     typedef INTERPOLATE8X8_AVG4 *INTERPOLATE8X8_AVG4_PTR;
53 :    
54 :     typedef void (INTERPOLATE_LOWPASS) (uint8_t *dst,
55 :     uint8_t *src,
56 :     int32_t stride,
57 :     int32_t rounding);
58 :    
59 :     typedef INTERPOLATE_LOWPASS *INTERPOLATE_LOWPASS_PTR;
60 :    
61 :     typedef void (INTERPOLATE_LOWPASS_HV) (uint8_t *dst1,
62 :     uint8_t *dst2,
63 :     uint8_t *src,
64 :     int32_t stride,
65 :     int32_t rounding);
66 :    
67 :     typedef INTERPOLATE_LOWPASS_HV *INTERPOLATE_LOWPASS_HV_PTR;
68 :    
69 :     typedef void (INTERPOLATE8X8_6TAP_LOWPASS) (uint8_t *dst,
70 :     uint8_t *src,
71 :     int32_t stride,
72 :     int32_t rounding);
73 :    
74 :     typedef INTERPOLATE8X8_6TAP_LOWPASS *INTERPOLATE8X8_6TAP_LOWPASS_PTR;
75 :    
76 : Isibaar 3 extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_h;
77 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v;
78 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv;
79 :    
80 : edgomez 851 extern INTERPOLATE8X8_AVG2_PTR interpolate8x8_avg2;
81 :     extern INTERPOLATE8X8_AVG4_PTR interpolate8x8_avg4;
82 :    
83 :     extern INTERPOLATE_LOWPASS_PTR interpolate8x8_lowpass_h;
84 :     extern INTERPOLATE_LOWPASS_PTR interpolate8x8_lowpass_v;
85 :    
86 :     extern INTERPOLATE_LOWPASS_PTR interpolate16x16_lowpass_h;
87 :     extern INTERPOLATE_LOWPASS_PTR interpolate16x16_lowpass_v;
88 :    
89 :     extern INTERPOLATE_LOWPASS_HV_PTR interpolate8x8_lowpass_hv;
90 :     extern INTERPOLATE_LOWPASS_HV_PTR interpolate16x16_lowpass_hv;
91 :    
92 :     extern INTERPOLATE8X8_6TAP_LOWPASS_PTR interpolate8x8_6tap_lowpass_h;
93 :     extern INTERPOLATE8X8_6TAP_LOWPASS_PTR interpolate8x8_6tap_lowpass_v;
94 :    
95 : Isibaar 3 INTERPOLATE8X8 interpolate8x8_halfpel_h_c;
96 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_c;
97 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_c;
98 :    
99 : edgomez 1382 #ifdef ARCH_IS_IA32
100 : Isibaar 3 INTERPOLATE8X8 interpolate8x8_halfpel_h_mmx;
101 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_mmx;
102 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_mmx;
103 :    
104 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_xmm;
105 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_xmm;
106 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_xmm;
107 :    
108 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_3dn;
109 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn;
110 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn;
111 :    
112 : edgomez 851 INTERPOLATE8X8 interpolate8x8_halfpel_h_3dne;
113 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_3dne;
114 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dne;
115 : edgomez 1382 #endif
116 : edgomez 851
117 : edgomez 1382 #ifdef ARCH_IS_IA64
118 : Isibaar 209 INTERPOLATE8X8 interpolate8x8_halfpel_h_ia64;
119 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_ia64;
120 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_ia64;
121 : edgomez 1382 #endif
122 : Isibaar 209
123 : edgomez 1412 #ifdef ARCH_IS_PPC
124 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_altivec_c;
125 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_altivec_c;
126 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_altivec_c;
127 :     #endif
128 :    
129 : edgomez 851 INTERPOLATE8X8_AVG2 interpolate8x8_avg2_c;
130 :     INTERPOLATE8X8_AVG4 interpolate8x8_avg4_c;
131 : Isibaar 333
132 : edgomez 1382 #ifdef ARCH_IS_IA32
133 : edgomez 851 INTERPOLATE8X8_AVG2 interpolate8x8_avg2_mmx;
134 :     INTERPOLATE8X8_AVG4 interpolate8x8_avg4_mmx;
135 : edgomez 1382 #endif
136 : edgomez 851
137 : edgomez 1412 #ifdef ARCH_IS_PPC
138 :     INTERPOLATE8X8_AVG2 interpolate8x8_avg2_altivec_c;
139 :     INTERPOLATE8X8_AVG4 interpolate8x8_avg4_altivec_c;
140 :     #endif
141 :    
142 : edgomez 851 INTERPOLATE_LOWPASS interpolate8x8_lowpass_h_c;
143 :     INTERPOLATE_LOWPASS interpolate8x8_lowpass_v_c;
144 :    
145 :     INTERPOLATE_LOWPASS interpolate16x16_lowpass_h_c;
146 :     INTERPOLATE_LOWPASS interpolate16x16_lowpass_v_c;
147 :    
148 :     INTERPOLATE_LOWPASS_HV interpolate8x8_lowpass_hv_c;
149 :     INTERPOLATE_LOWPASS_HV interpolate16x16_lowpass_hv_c;
150 :    
151 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_c;
152 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_v_c;
153 :    
154 : edgomez 1382 #ifdef ARCH_IS_IA32
155 : edgomez 851 INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_mmx;
156 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_v_mmx;
157 : edgomez 1382 #endif
158 : edgomez 851
159 : edgomez 1412 #ifdef ARCH_IS_PPC
160 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_altivec_c;
161 :     #endif
162 :    
163 : edgomez 195 static __inline void
164 :     interpolate8x8_switch(uint8_t * const cur,
165 :     const uint8_t * const refn,
166 :     const uint32_t x,
167 :     const uint32_t y,
168 :     const int32_t dx,
169 :     const int dy,
170 :     const uint32_t stride,
171 :     const uint32_t rounding)
172 : Isibaar 3 {
173 :    
174 : edgomez 1382 const uint8_t * const src = refn + (int)((y + (dy>>1)) * stride + x + (dx>>1));
175 :     uint8_t * const dst = cur + (int)(y * stride + x);
176 :    
177 :     switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */
178 : edgomez 195 case 0:
179 : edgomez 1382 transfer8x8_copy(dst, src, stride);
180 : Isibaar 3 break;
181 : edgomez 195 case 1:
182 : edgomez 1382 interpolate8x8_halfpel_v(dst, src, stride, rounding);
183 : Isibaar 3 break;
184 : edgomez 195 case 2:
185 : edgomez 1382 interpolate8x8_halfpel_h(dst, src, stride, rounding);
186 : Isibaar 3 break;
187 : edgomez 195 default:
188 : edgomez 1382 interpolate8x8_halfpel_hv(dst, src, stride, rounding);
189 : Isibaar 3 break;
190 : edgomez 195 }
191 : Isibaar 3 }
192 : chenm001 156
193 : edgomez 851
194 :     static __inline void
195 :     interpolate16x16_switch(uint8_t * const cur,
196 :     const uint8_t * const refn,
197 :     const uint32_t x,
198 :     const uint32_t y,
199 :     const int32_t dx,
200 :     const int dy,
201 :     const uint32_t stride,
202 :     const uint32_t rounding)
203 :     {
204 :     interpolate8x8_switch(cur, refn, x, y, dx, dy, stride, rounding);
205 :     interpolate8x8_switch(cur, refn, x+8, y, dx, dy, stride, rounding);
206 :     interpolate8x8_switch(cur, refn, x, y+8, dx, dy, stride, rounding);
207 :     interpolate8x8_switch(cur, refn, x+8, y+8, dx, dy, stride, rounding);
208 :     }
209 :    
210 :    
211 :     static __inline void
212 :     interpolate32x32_switch(uint8_t * const cur,
213 :     const uint8_t * const refn,
214 :     const uint32_t x,
215 :     const uint32_t y,
216 :     const int32_t dx,
217 :     const int dy,
218 :     const uint32_t stride,
219 :     const uint32_t rounding)
220 :     {
221 :     interpolate16x16_switch(cur, refn, x, y, dx, dy, stride, rounding);
222 :     interpolate16x16_switch(cur, refn, x+16, y, dx, dy, stride, rounding);
223 :     interpolate16x16_switch(cur, refn, x, y+16, dx, dy, stride, rounding);
224 :     interpolate16x16_switch(cur, refn, x+16, y+16, dx, dy, stride, rounding);
225 :     }
226 :    
227 :    
228 :     static __inline uint8_t *
229 :     interpolate8x8_switch2(uint8_t * const buffer,
230 :     const uint8_t * const refn,
231 : edgomez 1382 const int x,
232 :     const int y,
233 :     const int dx,
234 : edgomez 851 const int dy,
235 :     const uint32_t stride,
236 :     const uint32_t rounding)
237 :     {
238 :    
239 : edgomez 1382 const uint8_t * const src = refn + (int)((y + (dy>>1)) * stride + x + (dx>>1));
240 :    
241 :     switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */
242 : edgomez 851 case 0:
243 : edgomez 1382 return (uint8_t *)src;
244 : edgomez 851 case 1:
245 : edgomez 1382 interpolate8x8_halfpel_v(buffer, src, stride, rounding);
246 : edgomez 851 break;
247 :     case 2:
248 : edgomez 1382 interpolate8x8_halfpel_h(buffer, src, stride, rounding);
249 : edgomez 851 break;
250 :     default:
251 : edgomez 1382 interpolate8x8_halfpel_hv(buffer, src, stride, rounding);
252 : edgomez 851 break;
253 :     }
254 :     return buffer;
255 :     }
256 :    
257 :     static __inline void interpolate8x8_quarterpel(uint8_t * const cur,
258 :     uint8_t * const refn,
259 :     uint8_t * const refh,
260 :     uint8_t * const refv,
261 :     uint8_t * const refhv,
262 :     const uint32_t x, const uint32_t y,
263 :     const int32_t dx, const int dy,
264 :     const uint32_t stride,
265 :     const uint32_t rounding)
266 :     {
267 :     const int32_t xRef = x*4 + dx;
268 :     const int32_t yRef = y*4 + dy;
269 :    
270 :     uint8_t *src, *dst;
271 :     uint8_t *halfpel_h, *halfpel_v, *halfpel_hv;
272 :     int32_t x_int, y_int, x_frac, y_frac;
273 :    
274 :     x_int = xRef/4;
275 : edgomez 1382 if (xRef < 0 && xRef % 4)
276 : edgomez 851 x_int--;
277 :    
278 : edgomez 1382 x_frac = xRef - (4*x_int);
279 : edgomez 851
280 :     y_int = yRef/4;
281 :     if (yRef < 0 && yRef % 4)
282 :     y_int--;
283 :    
284 :     y_frac = yRef - (4*y_int);
285 : edgomez 1382
286 : edgomez 851 src = refn + y_int * stride + x_int;
287 :     halfpel_h = refh;
288 :     halfpel_v = refv;
289 :     halfpel_hv = refhv;
290 :    
291 :     dst = cur + y * stride + x;
292 : edgomez 1382
293 : edgomez 851 switch((y_frac << 2) | (x_frac)) {
294 :    
295 :     case 0:
296 :     transfer8x8_copy(dst, src, stride);
297 :     break;
298 :    
299 :     case 1:
300 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
301 :     interpolate8x8_avg2(dst, src, halfpel_h, stride, rounding, 8);
302 :     break;
303 : edgomez 1382
304 : edgomez 851 case 2:
305 :     interpolate8x8_lowpass_h(dst, src, stride, rounding);
306 :     break;
307 : edgomez 1382
308 : edgomez 851 case 3:
309 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
310 :     interpolate8x8_avg2(dst, src + 1, halfpel_h, stride, rounding, 8);
311 :     break;
312 : edgomez 1382
313 : edgomez 851 case 4:
314 :     interpolate8x8_lowpass_v(halfpel_v, src, stride, rounding);
315 :     interpolate8x8_avg2(dst, src, halfpel_v, stride, rounding, 8);
316 :     break;
317 : edgomez 1382
318 : edgomez 851 case 5:
319 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
320 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
321 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
322 :     interpolate8x8_avg2(dst, halfpel_v, halfpel_hv, stride, rounding, 8);
323 :     break;
324 : edgomez 1382
325 : edgomez 851 case 6:
326 :     interpolate8x8_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
327 :     interpolate8x8_avg2(dst, halfpel_h, halfpel_hv, stride, rounding, 8);
328 :     break;
329 : edgomez 1382
330 : edgomez 851 case 7:
331 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
332 :     interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
333 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
334 :     interpolate8x8_avg2(dst, halfpel_v, halfpel_hv, stride, rounding, 8);
335 :     break;
336 : edgomez 1382
337 : edgomez 851 case 8:
338 :     interpolate8x8_lowpass_v(dst, src, stride, rounding);
339 :     break;
340 :    
341 :     case 9:
342 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
343 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
344 :     interpolate8x8_lowpass_v(dst, halfpel_v, stride, rounding);
345 :     break;
346 : edgomez 1382
347 : edgomez 851 case 10:
348 :     interpolate8x8_lowpass_hv(dst, halfpel_h, src, stride, rounding);
349 :     break;
350 : edgomez 1382
351 : edgomez 851 case 11:
352 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
353 :     interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
354 :     interpolate8x8_lowpass_v(dst, halfpel_v, stride, rounding);
355 :     break;
356 : edgomez 1382
357 : edgomez 851 case 12:
358 :     interpolate8x8_lowpass_v(halfpel_v, src, stride, rounding);
359 :     interpolate8x8_avg2(dst, src+stride, halfpel_v, stride, rounding, 8);
360 :     break;
361 : edgomez 1382
362 : edgomez 851 case 13:
363 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
364 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
365 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
366 :     interpolate8x8_avg2(dst, halfpel_v+stride, halfpel_hv, stride, rounding, 8);
367 :     break;
368 : edgomez 1382
369 : edgomez 851 case 14:
370 :     interpolate8x8_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
371 :     interpolate8x8_avg2(dst, halfpel_h+stride, halfpel_hv, stride, rounding, 8);
372 :     break;
373 : edgomez 1382
374 : edgomez 851 case 15:
375 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
376 :     interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
377 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
378 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v + stride, stride, rounding, 8);
379 :     break;
380 :     }
381 :     }
382 :    
383 :     static __inline void interpolate16x16_quarterpel(uint8_t * const cur,
384 :     uint8_t * const refn,
385 :     uint8_t * const refh,
386 :     uint8_t * const refv,
387 :     uint8_t * const refhv,
388 :     const uint32_t x, const uint32_t y,
389 :     const int32_t dx, const int dy,
390 :     const uint32_t stride,
391 :     const uint32_t rounding)
392 :     {
393 :     const int32_t xRef = x*4 + dx;
394 :     const int32_t yRef = y*4 + dy;
395 :    
396 :     uint8_t *src, *dst;
397 :     uint8_t *halfpel_h, *halfpel_v, *halfpel_hv;
398 :     int32_t x_int, y_int, x_frac, y_frac;
399 :    
400 :     x_int = xRef/4;
401 : edgomez 1382 if (xRef < 0 && xRef % 4)
402 : edgomez 851 x_int--;
403 :    
404 : edgomez 1382 x_frac = xRef - (4*x_int);
405 : edgomez 851
406 :     y_int = yRef/4;
407 :     if (yRef < 0 && yRef % 4)
408 :     y_int--;
409 :    
410 :     y_frac = yRef - (4*y_int);
411 : edgomez 1382
412 : edgomez 851 src = refn + y_int * stride + x_int;
413 :     halfpel_h = refh;
414 :     halfpel_v = refv;
415 :     halfpel_hv = refhv;
416 :    
417 :     dst = cur + y * stride + x;
418 :    
419 :     switch((y_frac << 2) | (x_frac)) {
420 :    
421 :     case 0:
422 :     transfer16x16_copy(dst, src, stride);
423 :     break;
424 :    
425 :     case 1:
426 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
427 :     interpolate8x8_avg2(dst, src, halfpel_h, stride, rounding, 8);
428 :     interpolate8x8_avg2(dst+8, src+8, halfpel_h+8, stride, rounding, 8);
429 :     interpolate8x8_avg2(dst+8*stride, src+8*stride, halfpel_h+8*stride, stride, rounding, 8);
430 :     interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 8);
431 :     break;
432 :    
433 :     case 2:
434 :     interpolate16x16_lowpass_h(dst, src, stride, rounding);
435 :     break;
436 : edgomez 1382
437 : edgomez 851 case 3:
438 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
439 :     interpolate8x8_avg2(dst, src + 1, halfpel_h, stride, rounding, 8);
440 :     interpolate8x8_avg2(dst+8, src + 8 + 1, halfpel_h+8, stride, rounding, 8);
441 :     interpolate8x8_avg2(dst+8*stride, src + 8*stride + 1, halfpel_h+8*stride, stride, rounding, 8);
442 :     interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8 + 1, halfpel_h+8*stride+8, stride, rounding, 8);
443 :     break;
444 :    
445 :     case 4:
446 :     interpolate16x16_lowpass_v(halfpel_v, src, stride, rounding);
447 :     interpolate8x8_avg2(dst, src, halfpel_v, stride, rounding, 8);
448 :     interpolate8x8_avg2(dst+8, src+8, halfpel_v+8, stride, rounding, 8);
449 :     interpolate8x8_avg2(dst+8*stride, src+8*stride, halfpel_v+8*stride, stride, rounding, 8);
450 :     interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
451 :     break;
452 : edgomez 1382
453 : edgomez 851 case 5:
454 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
455 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
456 :     interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
457 :     interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
458 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
459 :    
460 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
461 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v, stride, rounding, 8);
462 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+8, stride, rounding, 8);
463 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+8*stride, stride, rounding, 8);
464 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
465 :     break;
466 : edgomez 1382
467 : edgomez 851 case 6:
468 :     interpolate16x16_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
469 :     interpolate8x8_avg2(dst, halfpel_h, halfpel_hv, stride, rounding, 8);
470 :     interpolate8x8_avg2(dst+8, halfpel_h+8, halfpel_hv+8, stride, rounding, 8);
471 :     interpolate8x8_avg2(dst+8*stride, halfpel_h+8*stride, halfpel_hv+8*stride, stride, rounding, 8);
472 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_h+8*stride+8, halfpel_hv+8*stride+8, stride, rounding, 8);
473 :     break;
474 : edgomez 1382
475 : edgomez 851 case 7:
476 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
477 :     interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
478 :     interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
479 :     interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
480 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
481 :    
482 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
483 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v, stride, rounding, 8);
484 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+8, stride, rounding, 8);
485 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+8*stride, stride, rounding, 8);
486 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
487 :     break;
488 : edgomez 1382
489 : edgomez 851 case 8:
490 :     interpolate16x16_lowpass_v(dst, src, stride, rounding);
491 :     break;
492 :    
493 :     case 9:
494 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
495 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
496 :     interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
497 :     interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
498 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
499 :     interpolate16x16_lowpass_v(dst, halfpel_v, stride, rounding);
500 :     break;
501 : edgomez 1382
502 : edgomez 851 case 10:
503 :     interpolate16x16_lowpass_hv(dst, halfpel_h, src, stride, rounding);
504 :     break;
505 : edgomez 1382
506 : edgomez 851 case 11:
507 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
508 :     interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
509 :     interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
510 :     interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
511 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
512 :     interpolate16x16_lowpass_v(dst, halfpel_v, stride, rounding);
513 :     break;
514 : edgomez 1382
515 : edgomez 851 case 12:
516 :     interpolate16x16_lowpass_v(halfpel_v, src, stride, rounding);
517 :     interpolate8x8_avg2(dst, src+stride, halfpel_v, stride, rounding, 8);
518 :     interpolate8x8_avg2(dst+8, src+stride+8, halfpel_v+8, stride, rounding, 8);
519 :     interpolate8x8_avg2(dst+8*stride, src+stride+8*stride, halfpel_v+8*stride, stride, rounding, 8);
520 :     interpolate8x8_avg2(dst+8*stride+8, src+stride+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
521 :     break;
522 : edgomez 1382
523 : edgomez 851 case 13:
524 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
525 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
526 :     interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
527 :     interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
528 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
529 :    
530 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
531 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v+stride, stride, rounding, 8);
532 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+stride+8, stride, rounding, 8);
533 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+stride+8*stride, stride, rounding, 8);
534 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+stride+8*stride+8, stride, rounding, 8);
535 :     break;
536 : edgomez 1382
537 : edgomez 851 case 14:
538 :     interpolate16x16_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
539 :     interpolate8x8_avg2(dst, halfpel_h+stride, halfpel_hv, stride, rounding, 8);
540 :     interpolate8x8_avg2(dst+8, halfpel_h+stride+8, halfpel_hv+8, stride, rounding, 8);
541 :     interpolate8x8_avg2(dst+8*stride, halfpel_h+stride+8*stride, halfpel_hv+8*stride, stride, rounding, 8);
542 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_h+stride+8*stride+8, halfpel_hv+8*stride+8, stride, rounding, 8);
543 :     break;
544 : edgomez 1382
545 : edgomez 851 case 15:
546 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
547 :     interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
548 :     interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
549 :     interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
550 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
551 :    
552 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
553 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v+stride, stride, rounding, 8);
554 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+stride+8, stride, rounding, 8);
555 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+stride+8*stride, stride, rounding, 8);
556 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+stride+8*stride+8, stride, rounding, 8);
557 :     break;
558 :     }
559 :     }
560 :    
561 :     #endif

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4