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

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

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.10.2.3 - (view) (download)

1 : edgomez 1.10.2.2 /*****************************************************************************
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 : syskin 1.10.2.3 * $Id: interpolate8x8.h,v 1.10.2.2 2003/06/09 13:54:07 edgomez Exp $
23 : edgomez 1.10.2.2 *
24 :     ****************************************************************************/
25 :    
26 : edgomez 1.10 #ifndef _INTERPOLATE8X8_H_
27 :     #define _INTERPOLATE8X8_H_
28 : chl 1.6
29 : Isibaar 1.1 #include "../utils/mem_transfer.h"
30 :    
31 : edgomez 1.3 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 1.1
37 : edgomez 1.10 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 1.1 extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_h;
77 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v;
78 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv;
79 :    
80 : edgomez 1.10 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 1.1 INTERPOLATE8X8 interpolate8x8_halfpel_h_c;
96 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_c;
97 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_c;
98 :    
99 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_mmx;
100 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_mmx;
101 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_mmx;
102 :    
103 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_xmm;
104 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_xmm;
105 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_xmm;
106 :    
107 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_3dn;
108 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn;
109 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn;
110 :    
111 : edgomez 1.10 INTERPOLATE8X8 interpolate8x8_halfpel_h_3dne;
112 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_3dne;
113 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dne;
114 :    
115 : Isibaar 1.4 INTERPOLATE8X8 interpolate8x8_halfpel_h_ia64;
116 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_ia64;
117 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_ia64;
118 :    
119 : edgomez 1.10 INTERPOLATE8X8_AVG2 interpolate8x8_avg2_c;
120 :     INTERPOLATE8X8_AVG4 interpolate8x8_avg4_c;
121 :    
122 :     INTERPOLATE8X8_AVG2 interpolate8x8_avg2_mmx;
123 :     INTERPOLATE8X8_AVG4 interpolate8x8_avg4_mmx;
124 :    
125 :     INTERPOLATE_LOWPASS interpolate8x8_lowpass_h_c;
126 :     INTERPOLATE_LOWPASS interpolate8x8_lowpass_v_c;
127 :    
128 :     INTERPOLATE_LOWPASS interpolate16x16_lowpass_h_c;
129 :     INTERPOLATE_LOWPASS interpolate16x16_lowpass_v_c;
130 :    
131 :     INTERPOLATE_LOWPASS_HV interpolate8x8_lowpass_hv_c;
132 :     INTERPOLATE_LOWPASS_HV interpolate16x16_lowpass_hv_c;
133 :    
134 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_c;
135 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_v_c;
136 :    
137 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_mmx;
138 :     INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_v_mmx;
139 : Isibaar 1.5
140 : edgomez 1.3 static __inline void
141 :     interpolate8x8_switch(uint8_t * const cur,
142 :     const uint8_t * const refn,
143 :     const uint32_t x,
144 :     const uint32_t y,
145 :     const int32_t dx,
146 :     const int dy,
147 :     const uint32_t stride,
148 :     const uint32_t rounding)
149 : Isibaar 1.1 {
150 :    
151 : syskin 1.10.2.3 const uint8_t * const src = refn + (y + (dy>>1)) * stride + x + (dx>>1);
152 :     uint8_t * const dst = cur + y * stride + x;
153 :    
154 :     switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */
155 : edgomez 1.3 case 0:
156 : syskin 1.10.2.3 transfer8x8_copy(dst, src, stride);
157 : Isibaar 1.1 break;
158 : edgomez 1.3 case 1:
159 : syskin 1.10.2.3 interpolate8x8_halfpel_v(dst, src, stride, rounding);
160 : Isibaar 1.1 break;
161 : edgomez 1.3 case 2:
162 : syskin 1.10.2.3 interpolate8x8_halfpel_h(dst, src, stride, rounding);
163 : Isibaar 1.1 break;
164 : edgomez 1.3 default:
165 : syskin 1.10.2.3 interpolate8x8_halfpel_hv(dst, src, stride, rounding);
166 : Isibaar 1.1 break;
167 : edgomez 1.3 }
168 : Isibaar 1.1 }
169 : chenm001 1.2
170 : edgomez 1.10
171 :     static __inline void
172 :     interpolate16x16_switch(uint8_t * const cur,
173 :     const uint8_t * const refn,
174 :     const uint32_t x,
175 :     const uint32_t y,
176 :     const int32_t dx,
177 :     const int dy,
178 :     const uint32_t stride,
179 :     const uint32_t rounding)
180 :     {
181 :     interpolate8x8_switch(cur, refn, x, y, dx, dy, stride, rounding);
182 :     interpolate8x8_switch(cur, refn, x+8, y, dx, dy, stride, rounding);
183 :     interpolate8x8_switch(cur, refn, x, y+8, dx, dy, stride, rounding);
184 :     interpolate8x8_switch(cur, refn, x+8, y+8, dx, dy, stride, rounding);
185 :     }
186 :    
187 :    
188 :     static __inline void
189 :     interpolate32x32_switch(uint8_t * const cur,
190 :     const uint8_t * const refn,
191 :     const uint32_t x,
192 :     const uint32_t y,
193 :     const int32_t dx,
194 :     const int dy,
195 :     const uint32_t stride,
196 :     const uint32_t rounding)
197 :     {
198 :     interpolate16x16_switch(cur, refn, x, y, dx, dy, stride, rounding);
199 :     interpolate16x16_switch(cur, refn, x+16, y, dx, dy, stride, rounding);
200 :     interpolate16x16_switch(cur, refn, x, y+16, dx, dy, stride, rounding);
201 :     interpolate16x16_switch(cur, refn, x+16, y+16, dx, dy, stride, rounding);
202 :     }
203 :    
204 :    
205 :     static __inline uint8_t *
206 :     interpolate8x8_switch2(uint8_t * const buffer,
207 :     const uint8_t * const refn,
208 : syskin 1.10.2.3 const int x,
209 :     const int y,
210 :     const int dx,
211 : edgomez 1.10 const int dy,
212 :     const uint32_t stride,
213 :     const uint32_t rounding)
214 :     {
215 :    
216 : syskin 1.10.2.3 const uint8_t * const src = refn + (y + (dy>>1)) * stride + x + (dx>>1);
217 : edgomez 1.10
218 : syskin 1.10.2.3 switch (((dx & 1) << 1) + (dy & 1)) { /* ((dx%2)?2:0)+((dy%2)?1:0) */
219 :     case 0:
220 :     return (uint8_t *)src;
221 : edgomez 1.10 case 1:
222 : syskin 1.10.2.3 interpolate8x8_halfpel_v(buffer, src, stride, rounding);
223 : edgomez 1.10 break;
224 :     case 2:
225 : syskin 1.10.2.3 interpolate8x8_halfpel_h(buffer, src, stride, rounding);
226 : edgomez 1.10 break;
227 :     default:
228 : syskin 1.10.2.3 interpolate8x8_halfpel_hv(buffer, src, stride, rounding);
229 : edgomez 1.10 break;
230 :     }
231 :     return buffer;
232 :     }
233 :    
234 :     static __inline void interpolate8x8_quarterpel(uint8_t * const cur,
235 :     uint8_t * const refn,
236 :     uint8_t * const refh,
237 :     uint8_t * const refv,
238 :     uint8_t * const refhv,
239 :     const uint32_t x, const uint32_t y,
240 :     const int32_t dx, const int dy,
241 :     const uint32_t stride,
242 :     const uint32_t rounding)
243 :     {
244 :     const int32_t xRef = x*4 + dx;
245 :     const int32_t yRef = y*4 + dy;
246 :    
247 :     uint8_t *src, *dst;
248 :     uint8_t *halfpel_h, *halfpel_v, *halfpel_hv;
249 :     int32_t x_int, y_int, x_frac, y_frac;
250 :    
251 :     x_int = xRef/4;
252 :     if (xRef < 0 && xRef % 4)
253 :     x_int--;
254 :    
255 :     x_frac = xRef - (4*x_int);
256 :    
257 :     y_int = yRef/4;
258 :     if (yRef < 0 && yRef % 4)
259 :     y_int--;
260 :    
261 :     y_frac = yRef - (4*y_int);
262 :    
263 :     src = refn + y_int * stride + x_int;
264 :     halfpel_h = refh;
265 :     halfpel_v = refv;
266 :     halfpel_hv = refhv;
267 :    
268 :     dst = cur + y * stride + x;
269 :    
270 :     switch((y_frac << 2) | (x_frac)) {
271 :    
272 :     case 0:
273 :     transfer8x8_copy(dst, src, stride);
274 :     break;
275 :    
276 :     case 1:
277 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
278 :     interpolate8x8_avg2(dst, src, halfpel_h, stride, rounding, 8);
279 :     break;
280 :    
281 :     case 2:
282 :     interpolate8x8_lowpass_h(dst, src, stride, rounding);
283 :     break;
284 :    
285 :     case 3:
286 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
287 :     interpolate8x8_avg2(dst, src + 1, halfpel_h, stride, rounding, 8);
288 :     break;
289 :    
290 :     case 4:
291 :     interpolate8x8_lowpass_v(halfpel_v, src, stride, rounding);
292 :     interpolate8x8_avg2(dst, src, halfpel_v, stride, rounding, 8);
293 :     break;
294 :    
295 :     case 5:
296 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
297 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
298 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
299 :     interpolate8x8_avg2(dst, halfpel_v, halfpel_hv, stride, rounding, 8);
300 :     break;
301 :    
302 :     case 6:
303 :     interpolate8x8_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
304 :     interpolate8x8_avg2(dst, halfpel_h, halfpel_hv, stride, rounding, 8);
305 :     break;
306 :    
307 :     case 7:
308 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
309 :     interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
310 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
311 :     interpolate8x8_avg2(dst, halfpel_v, halfpel_hv, stride, rounding, 8);
312 :     break;
313 :    
314 :     case 8:
315 :     interpolate8x8_lowpass_v(dst, src, stride, rounding);
316 :     break;
317 :    
318 :     case 9:
319 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
320 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
321 :     interpolate8x8_lowpass_v(dst, halfpel_v, stride, rounding);
322 :     break;
323 :    
324 :     case 10:
325 :     interpolate8x8_lowpass_hv(dst, halfpel_h, src, stride, rounding);
326 :     break;
327 :    
328 :     case 11:
329 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
330 :     interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
331 :     interpolate8x8_lowpass_v(dst, halfpel_v, stride, rounding);
332 :     break;
333 :    
334 :     case 12:
335 :     interpolate8x8_lowpass_v(halfpel_v, src, stride, rounding);
336 :     interpolate8x8_avg2(dst, src+stride, halfpel_v, stride, rounding, 8);
337 :     break;
338 :    
339 :     case 13:
340 :     interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
341 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
342 :     interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
343 :     interpolate8x8_avg2(dst, halfpel_v+stride, halfpel_hv, stride, rounding, 8);
344 :     break;
345 :    
346 :     case 14:
347 :     interpolate8x8_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
348 :     interpolate8x8_avg2(dst, halfpel_h+stride, halfpel_hv, stride, rounding, 8);
349 :     break;
350 :    
351 :     case 15:
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(halfpel_hv, halfpel_v, stride, rounding);
355 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v + stride, stride, rounding, 8);
356 :     break;
357 :     }
358 :     }
359 :    
360 :     static __inline void interpolate16x16_quarterpel(uint8_t * const cur,
361 :     uint8_t * const refn,
362 :     uint8_t * const refh,
363 :     uint8_t * const refv,
364 :     uint8_t * const refhv,
365 :     const uint32_t x, const uint32_t y,
366 :     const int32_t dx, const int dy,
367 :     const uint32_t stride,
368 :     const uint32_t rounding)
369 :     {
370 :     const int32_t xRef = x*4 + dx;
371 :     const int32_t yRef = y*4 + dy;
372 :    
373 :     uint8_t *src, *dst;
374 :     uint8_t *halfpel_h, *halfpel_v, *halfpel_hv;
375 :     int32_t x_int, y_int, x_frac, y_frac;
376 :    
377 :     x_int = xRef/4;
378 :     if (xRef < 0 && xRef % 4)
379 :     x_int--;
380 :    
381 :     x_frac = xRef - (4*x_int);
382 :    
383 :     y_int = yRef/4;
384 :     if (yRef < 0 && yRef % 4)
385 :     y_int--;
386 :    
387 :     y_frac = yRef - (4*y_int);
388 :    
389 :     src = refn + y_int * stride + x_int;
390 :     halfpel_h = refh;
391 :     halfpel_v = refv;
392 :     halfpel_hv = refhv;
393 :    
394 :     dst = cur + y * stride + x;
395 :    
396 :     switch((y_frac << 2) | (x_frac)) {
397 :    
398 :     case 0:
399 :     transfer16x16_copy(dst, src, stride);
400 :     break;
401 :    
402 :     case 1:
403 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
404 :     interpolate8x8_avg2(dst, src, halfpel_h, stride, rounding, 8);
405 :     interpolate8x8_avg2(dst+8, src+8, halfpel_h+8, stride, rounding, 8);
406 :     interpolate8x8_avg2(dst+8*stride, src+8*stride, halfpel_h+8*stride, stride, rounding, 8);
407 :     interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 8);
408 :     break;
409 :    
410 :     case 2:
411 :     interpolate16x16_lowpass_h(dst, src, stride, rounding);
412 :     break;
413 :    
414 :     case 3:
415 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
416 :     interpolate8x8_avg2(dst, src + 1, halfpel_h, stride, rounding, 8);
417 :     interpolate8x8_avg2(dst+8, src + 8 + 1, halfpel_h+8, stride, rounding, 8);
418 :     interpolate8x8_avg2(dst+8*stride, src + 8*stride + 1, halfpel_h+8*stride, stride, rounding, 8);
419 :     interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8 + 1, halfpel_h+8*stride+8, stride, rounding, 8);
420 :     break;
421 :    
422 :     case 4:
423 :     interpolate16x16_lowpass_v(halfpel_v, src, stride, rounding);
424 :     interpolate8x8_avg2(dst, src, halfpel_v, stride, rounding, 8);
425 :     interpolate8x8_avg2(dst+8, src+8, halfpel_v+8, stride, rounding, 8);
426 :     interpolate8x8_avg2(dst+8*stride, src+8*stride, halfpel_v+8*stride, stride, rounding, 8);
427 :     interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
428 :     break;
429 :    
430 :     case 5:
431 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
432 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
433 :     interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
434 :     interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
435 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
436 :    
437 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
438 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v, stride, rounding, 8);
439 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+8, stride, rounding, 8);
440 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+8*stride, stride, rounding, 8);
441 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
442 :     break;
443 :    
444 :     case 6:
445 :     interpolate16x16_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
446 :     interpolate8x8_avg2(dst, halfpel_h, halfpel_hv, stride, rounding, 8);
447 :     interpolate8x8_avg2(dst+8, halfpel_h+8, halfpel_hv+8, stride, rounding, 8);
448 :     interpolate8x8_avg2(dst+8*stride, halfpel_h+8*stride, halfpel_hv+8*stride, stride, rounding, 8);
449 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_h+8*stride+8, halfpel_hv+8*stride+8, stride, rounding, 8);
450 :     break;
451 :    
452 :     case 7:
453 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
454 :     interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
455 :     interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
456 :     interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
457 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
458 :    
459 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
460 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v, stride, rounding, 8);
461 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+8, stride, rounding, 8);
462 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+8*stride, stride, rounding, 8);
463 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
464 :     break;
465 :    
466 :     case 8:
467 :     interpolate16x16_lowpass_v(dst, src, stride, rounding);
468 :     break;
469 :    
470 :     case 9:
471 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
472 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
473 :     interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
474 :     interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
475 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
476 :     interpolate16x16_lowpass_v(dst, halfpel_v, stride, rounding);
477 :     break;
478 :    
479 :     case 10:
480 :     interpolate16x16_lowpass_hv(dst, halfpel_h, src, stride, rounding);
481 :     break;
482 :    
483 :     case 11:
484 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
485 :     interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
486 :     interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
487 :     interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
488 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
489 :     interpolate16x16_lowpass_v(dst, halfpel_v, stride, rounding);
490 :     break;
491 :    
492 :     case 12:
493 :     interpolate16x16_lowpass_v(halfpel_v, src, stride, rounding);
494 :     interpolate8x8_avg2(dst, src+stride, halfpel_v, stride, rounding, 8);
495 :     interpolate8x8_avg2(dst+8, src+stride+8, halfpel_v+8, stride, rounding, 8);
496 :     interpolate8x8_avg2(dst+8*stride, src+stride+8*stride, halfpel_v+8*stride, stride, rounding, 8);
497 :     interpolate8x8_avg2(dst+8*stride+8, src+stride+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
498 :     break;
499 :    
500 :     case 13:
501 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
502 :     interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
503 :     interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
504 :     interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
505 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
506 :    
507 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
508 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v+stride, stride, rounding, 8);
509 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+stride+8, stride, rounding, 8);
510 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+stride+8*stride, stride, rounding, 8);
511 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+stride+8*stride+8, stride, rounding, 8);
512 :     break;
513 :    
514 :     case 14:
515 :     interpolate16x16_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
516 :     interpolate8x8_avg2(dst, halfpel_h+stride, halfpel_hv, stride, rounding, 8);
517 :     interpolate8x8_avg2(dst+8, halfpel_h+stride+8, halfpel_hv+8, stride, rounding, 8);
518 :     interpolate8x8_avg2(dst+8*stride, halfpel_h+stride+8*stride, halfpel_hv+8*stride, stride, rounding, 8);
519 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_h+stride+8*stride+8, halfpel_hv+8*stride+8, stride, rounding, 8);
520 :     break;
521 :    
522 :     case 15:
523 :     interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
524 :     interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
525 :     interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
526 :     interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
527 :     interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
528 :    
529 :     interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
530 :     interpolate8x8_avg2(dst, halfpel_hv, halfpel_v+stride, stride, rounding, 8);
531 :     interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+stride+8, stride, rounding, 8);
532 :     interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+stride+8*stride, stride, rounding, 8);
533 :     interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+stride+8*stride+8, stride, rounding, 8);
534 :     break;
535 :     }
536 :     }
537 :    
538 :     #endif

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