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

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

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

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

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.10.2.6

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