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

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

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

revision 850, Sat Feb 15 08:39:17 2003 UTC revision 851, Sat Feb 15 15:22:19 2003 UTC
# Line 1  Line 1 
1  /*****************************************************************************  #ifndef _INTERPOLATE8X8_H_
2   *  #define _INTERPOLATE8X8_H_
  *  XVID MPEG-4 VIDEO CODEC  
  *  - 8x8 block-based halfpel interpolation - headers  
  *  
  *  Copyright(C) 2002 Peter Ross <pross@xvid.org>  
  *  
  *  This file is part of XviD, a free MPEG-4 video encoder/decoder  
  *  
  *  XviD is free software; you can redistribute it and/or modify it  
  *  under the terms of the GNU General Public License as published by  
  *  the Free Software Foundation; either version 2 of the License, or  
  *  (at your option) any later version.  
  *  
  *  This program is distributed in the hope that it will be useful,  
  *  but WITHOUT ANY WARRANTY; without even the implied warranty of  
  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the  
  *  GNU General Public License for more details.  
  *  
  *  You should have received a copy of the GNU General Public License  
  *  along with this program; if not, write to the Free Software  
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA  
  *  
  *  Under section 8 of the GNU General Public License, the copyright  
  *  holders of XVID explicitly forbid distribution in the following  
  *  countries:  
  *  
  *    - Japan  
  *    - United States of America  
  *  
  *  Linking XviD statically or dynamically with other modules is making a  
  *  combined work based on XviD.  Thus, the terms and conditions of the  
  *  GNU General Public License cover the whole combination.  
  *  
  *  As a special exception, the copyright holders of XviD give you  
  *  permission to link XviD with independent modules that communicate with  
  *  XviD solely through the VFW1.1 and DShow interfaces, regardless of the  
  *  license terms of these independent modules, and to copy and distribute  
  *  the resulting combined work under terms of your choice, provided that  
  *  every copy of the combined work is accompanied by a complete copy of  
  *  the source code of XviD (the version of XviD used to produce the  
  *  combined work), being distributed under the terms of the GNU General  
  *  Public License plus this exception.  An independent module is a module  
  *  which is not derived from or based on XviD.  
  *  
  *  Note that people who make modified versions of XviD are not obligated  
  *  to grant this special exception for their modified versions; it is  
  *  their choice whether to do so.  The GNU General Public License gives  
  *  permission to release a modified version without this exception; this  
  *  exception also makes it possible to release a modified version which  
  *  carries forward this exception.  
  *  
  * $Id: interpolate8x8.h,v 1.9 2003-02-11 21:56:31 edgomez Exp $  
  *  
  ****************************************************************************/  
3    
4  #include "../utils/mem_transfer.h"  #include "../utils/mem_transfer.h"
5    
# Line 62  Line 9 
9                                                             const uint32_t rounding);                                                             const uint32_t rounding);
10  typedef INTERPOLATE8X8 *INTERPOLATE8X8_PTR;  typedef INTERPOLATE8X8 *INTERPOLATE8X8_PTR;
11    
12    typedef void (INTERPOLATE8X8_AVG2) (uint8_t *dst,
13                                                                            const uint8_t *src1,
14                                                                            const uint8_t *src2,
15                                                                            const uint32_t stride,
16                                                                            const uint32_t rounding,
17                                                                            const uint32_t height);
18    typedef INTERPOLATE8X8_AVG2 *INTERPOLATE8X8_AVG2_PTR;
19    
20    typedef void (INTERPOLATE8X8_AVG4) (uint8_t *dst,
21                                                                            const uint8_t *src1,
22                                                                            const uint8_t *src2,
23                                                                            const uint8_t *src3,
24                                                                            const uint8_t *src4,
25                                                                            const uint32_t stride,
26                                                                            const uint32_t rounding);
27    typedef INTERPOLATE8X8_AVG4 *INTERPOLATE8X8_AVG4_PTR;
28    
29    typedef void (INTERPOLATE_LOWPASS) (uint8_t *dst,
30                                                                               uint8_t *src,
31                                                                               int32_t stride,
32                                                                               int32_t rounding);
33    
34    typedef INTERPOLATE_LOWPASS *INTERPOLATE_LOWPASS_PTR;
35    
36    typedef void (INTERPOLATE_LOWPASS_HV) (uint8_t *dst1,
37                                                                                      uint8_t *dst2,
38                                                                                      uint8_t *src,
39                                                                                      int32_t stride,
40                                                                                      int32_t rounding);
41    
42    typedef INTERPOLATE_LOWPASS_HV *INTERPOLATE_LOWPASS_HV_PTR;
43    
44    typedef void (INTERPOLATE8X8_6TAP_LOWPASS) (uint8_t *dst,
45                                                                                    uint8_t *src,
46                                                                                    int32_t stride,
47                                                                                    int32_t rounding);
48    
49    typedef INTERPOLATE8X8_6TAP_LOWPASS *INTERPOLATE8X8_6TAP_LOWPASS_PTR;
50    
51  extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_h;  extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_h;
52  extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v;  extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v;
53  extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv;  extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv;
54    
55    extern INTERPOLATE8X8_AVG2_PTR interpolate8x8_avg2;
56    extern INTERPOLATE8X8_AVG4_PTR interpolate8x8_avg4;
57    
58    extern INTERPOLATE_LOWPASS_PTR interpolate8x8_lowpass_h;
59    extern INTERPOLATE_LOWPASS_PTR interpolate8x8_lowpass_v;
60    
61    extern INTERPOLATE_LOWPASS_PTR interpolate16x16_lowpass_h;
62    extern INTERPOLATE_LOWPASS_PTR interpolate16x16_lowpass_v;
63    
64    extern INTERPOLATE_LOWPASS_HV_PTR interpolate8x8_lowpass_hv;
65    extern INTERPOLATE_LOWPASS_HV_PTR interpolate16x16_lowpass_hv;
66    
67    extern INTERPOLATE8X8_6TAP_LOWPASS_PTR interpolate8x8_6tap_lowpass_h;
68    extern INTERPOLATE8X8_6TAP_LOWPASS_PTR interpolate8x8_6tap_lowpass_v;
69    
70  INTERPOLATE8X8 interpolate8x8_halfpel_h_c;  INTERPOLATE8X8 interpolate8x8_halfpel_h_c;
71  INTERPOLATE8X8 interpolate8x8_halfpel_v_c;  INTERPOLATE8X8 interpolate8x8_halfpel_v_c;
72  INTERPOLATE8X8 interpolate8x8_halfpel_hv_c;  INTERPOLATE8X8 interpolate8x8_halfpel_hv_c;
# Line 82  Line 83 
83  INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn;  INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn;
84  INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn;  INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn;
85    
86    INTERPOLATE8X8 interpolate8x8_halfpel_h_3dne;
87    INTERPOLATE8X8 interpolate8x8_halfpel_v_3dne;
88    INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dne;
89    
90  INTERPOLATE8X8 interpolate8x8_halfpel_h_ia64;  INTERPOLATE8X8 interpolate8x8_halfpel_h_ia64;
91  INTERPOLATE8X8 interpolate8x8_halfpel_v_ia64;  INTERPOLATE8X8 interpolate8x8_halfpel_v_ia64;
92  INTERPOLATE8X8 interpolate8x8_halfpel_hv_ia64;  INTERPOLATE8X8 interpolate8x8_halfpel_hv_ia64;
93    
94  void interpolate8x8_c(uint8_t * const dst,  INTERPOLATE8X8_AVG2 interpolate8x8_avg2_c;
95                                            const uint8_t * const src,  INTERPOLATE8X8_AVG4 interpolate8x8_avg4_c;
96                                            const uint32_t x,  
97                                            const uint32_t y,  INTERPOLATE8X8_AVG2 interpolate8x8_avg2_mmx;
98                                            const uint32_t stride);  INTERPOLATE8X8_AVG4 interpolate8x8_avg4_mmx;
99    
100    INTERPOLATE_LOWPASS interpolate8x8_lowpass_h_c;
101    INTERPOLATE_LOWPASS interpolate8x8_lowpass_v_c;
102    
103    INTERPOLATE_LOWPASS interpolate16x16_lowpass_h_c;
104    INTERPOLATE_LOWPASS interpolate16x16_lowpass_v_c;
105    
106    INTERPOLATE_LOWPASS_HV interpolate8x8_lowpass_hv_c;
107    INTERPOLATE_LOWPASS_HV interpolate16x16_lowpass_hv_c;
108    
109    INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_c;
110    INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_v_c;
111    
112    INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_h_mmx;
113    INTERPOLATE8X8_6TAP_LOWPASS interpolate8x8_6tap_lowpass_v_mmx;
114    
115  static __inline void  static __inline void
116  interpolate8x8_switch(uint8_t * const cur,  interpolate8x8_switch(uint8_t * const cur,
# Line 104  Line 124 
124  {  {
125          int32_t ddx, ddy;          int32_t ddx, ddy;
126    
127          switch (((dx & 1) << 1) + (dy & 1))     /* ((dx%2)?2:0)+((dy%2)?1:0) */          switch (((dx & 1) << 1) + (dy & 1))     // ((dx%2)?2:0)+((dy%2)?1:0)
128          {          {
129          case 0:          case 0:
130                  ddx = dx / 2;                  ddx = dx / 2;
# Line 139  Line 159 
159          }          }
160  }  }
161    
162    
163    static __inline void
164    interpolate16x16_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    {
173            interpolate8x8_switch(cur, refn, x,   y,   dx, dy, stride, rounding);
174            interpolate8x8_switch(cur, refn, x+8, y,   dx, dy, stride, rounding);
175            interpolate8x8_switch(cur, refn, x,   y+8, dx, dy, stride, rounding);
176            interpolate8x8_switch(cur, refn, x+8, y+8, dx, dy, stride, rounding);
177    }
178    
179    
180    static __inline void
181    interpolate32x32_switch(uint8_t * const cur,
182                                              const uint8_t * const refn,
183                                              const uint32_t x,
184                                              const uint32_t y,
185                                              const int32_t dx,
186                                              const int dy,
187                                              const uint32_t stride,
188                                              const uint32_t rounding)
189    {
190            interpolate16x16_switch(cur, refn, x,    y,    dx, dy, stride, rounding);
191            interpolate16x16_switch(cur, refn, x+16, y,    dx, dy, stride, rounding);
192            interpolate16x16_switch(cur, refn, x,    y+16, dx, dy, stride, rounding);
193            interpolate16x16_switch(cur, refn, x+16, y+16, dx, dy, stride, rounding);
194    }
195    
196    
197    static __inline uint8_t *
198    interpolate8x8_switch2(uint8_t * const buffer,
199                                              const uint8_t * const refn,
200                                              const uint32_t x,
201                                              const uint32_t y,
202                                              const int32_t dx,
203                                              const int dy,
204                                              const uint32_t stride,
205                                              const uint32_t rounding)
206    {
207            int32_t ddx, ddy;
208    
209            switch (((dx & 1) << 1) + (dy & 1))     // ((dx%2)?2:0)+((dy%2)?1:0)
210            {
211            case 0:
212                    return (uint8_t *)refn + (int)((y + dy/2) * stride + x + dx/2);
213    
214            case 1:
215                    ddx = dx / 2;
216                    ddy = (dy - 1) / 2;
217                    interpolate8x8_halfpel_v(buffer,
218                                                                     refn + (int)((y + ddy) * stride + x + ddx), stride,
219                                                                     rounding);
220                    break;
221    
222            case 2:
223                    ddx = (dx - 1) / 2;
224                    ddy = dy / 2;
225                    interpolate8x8_halfpel_h(buffer,
226                                                                     refn + (int)((y + ddy) * stride + x + ddx), stride,
227                                                                     rounding);
228                    break;
229    
230            default:
231                    ddx = (dx - 1) / 2;
232                    ddy = (dy - 1) / 2;
233                    interpolate8x8_halfpel_hv(buffer,
234                                                                     refn + (int)((y + ddy) * stride + x + ddx), stride,
235                                                                      rounding);
236                    break;
237            }
238            return buffer;
239    }
240    
241    static __inline void interpolate8x8_quarterpel(uint8_t * const cur,
242                                         uint8_t * const refn,
243                                             uint8_t * const refh,
244                                             uint8_t * const refv,
245                                             uint8_t * const refhv,
246                                         const uint32_t x, const uint32_t y,
247                                             const int32_t dx,  const int dy,
248                                             const uint32_t stride,
249                                             const uint32_t rounding)
250    {
251            const int32_t xRef = x*4 + dx;
252            const int32_t yRef = y*4 + dy;
253    
254            uint8_t *src, *dst;
255            uint8_t *halfpel_h, *halfpel_v, *halfpel_hv;
256            int32_t x_int, y_int, x_frac, y_frac;
257    
258            x_int = xRef/4;
259            if (xRef < 0 && xRef % 4)
260                    x_int--;
261    
262            x_frac = xRef - (4*x_int);
263    
264            y_int  = yRef/4;
265            if (yRef < 0 && yRef % 4)
266                    y_int--;
267    
268            y_frac = yRef - (4*y_int);
269    
270            src = refn + y_int * stride + x_int;
271            halfpel_h = refh;
272            halfpel_v = refv;
273            halfpel_hv = refhv;
274    
275            dst = cur + y * stride + x;
276    
277            switch((y_frac << 2) | (x_frac)) {
278    
279            case 0:
280                    transfer8x8_copy(dst, src, stride);
281                    break;
282    
283            case 1:
284                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
285                    interpolate8x8_avg2(dst, src, halfpel_h, stride, rounding, 8);
286                    break;
287    
288            case 2:
289                interpolate8x8_lowpass_h(dst, src, stride, rounding);
290                    break;
291    
292            case 3:
293                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
294                    interpolate8x8_avg2(dst, src + 1, halfpel_h, stride, rounding, 8);
295                    break;
296    
297            case 4:
298                    interpolate8x8_lowpass_v(halfpel_v, src, stride, rounding);
299                    interpolate8x8_avg2(dst, src, halfpel_v, stride, rounding, 8);
300                    break;
301    
302            case 5:
303                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
304                    interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
305                    interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
306                    interpolate8x8_avg2(dst, halfpel_v, halfpel_hv, stride, rounding, 8);
307                    break;
308    
309            case 6:
310                    interpolate8x8_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
311                    interpolate8x8_avg2(dst, halfpel_h, halfpel_hv, stride, rounding, 8);
312                    break;
313    
314            case 7:
315                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
316                    interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
317                    interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
318                    interpolate8x8_avg2(dst, halfpel_v, halfpel_hv, stride, rounding, 8);
319                    break;
320    
321            case 8:
322                interpolate8x8_lowpass_v(dst, src, stride, rounding);
323                    break;
324    
325            case 9:
326                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
327                    interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
328                    interpolate8x8_lowpass_v(dst, halfpel_v, stride, rounding);
329                    break;
330    
331            case 10:
332                    interpolate8x8_lowpass_hv(dst, halfpel_h, src, stride, rounding);
333                    break;
334    
335            case 11:
336                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
337                    interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
338                    interpolate8x8_lowpass_v(dst, halfpel_v, stride, rounding);
339                    break;
340    
341            case 12:
342                    interpolate8x8_lowpass_v(halfpel_v, src, stride, rounding);
343                    interpolate8x8_avg2(dst, src+stride, halfpel_v, stride, rounding, 8);
344                    break;
345    
346            case 13:
347                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
348                    interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
349                    interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
350                    interpolate8x8_avg2(dst, halfpel_v+stride, halfpel_hv, stride, rounding, 8);
351                    break;
352    
353            case 14:
354                    interpolate8x8_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
355                    interpolate8x8_avg2(dst, halfpel_h+stride, halfpel_hv, stride, rounding, 8);
356                    break;
357    
358            case 15:
359                    interpolate8x8_lowpass_h(halfpel_h, src, stride, rounding);
360                    interpolate8x8_avg2(halfpel_v, src + 1, halfpel_h, stride, rounding, 9);
361                    interpolate8x8_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
362                    interpolate8x8_avg2(dst, halfpel_hv, halfpel_v + stride, stride, rounding, 8);
363                    break;
364            }
365    }
366    
367    static __inline void interpolate16x16_quarterpel(uint8_t * const cur,
368                                         uint8_t * const refn,
369                                             uint8_t * const refh,
370                                             uint8_t * const refv,
371                                             uint8_t * const refhv,
372                                         const uint32_t x, const uint32_t y,
373                                             const int32_t dx,  const int dy,
374                                             const uint32_t stride,
375                                             const uint32_t rounding)
376    {
377            const int32_t xRef = x*4 + dx;
378            const int32_t yRef = y*4 + dy;
379    
380            uint8_t *src, *dst;
381            uint8_t *halfpel_h, *halfpel_v, *halfpel_hv;
382            int32_t x_int, y_int, x_frac, y_frac;
383    
384            x_int = xRef/4;
385            if (xRef < 0 && xRef % 4)
386                    x_int--;
387    
388            x_frac = xRef - (4*x_int);
389    
390            y_int  = yRef/4;
391            if (yRef < 0 && yRef % 4)
392                    y_int--;
393    
394            y_frac = yRef - (4*y_int);
395    
396            src = refn + y_int * stride + x_int;
397            halfpel_h = refh;
398            halfpel_v = refv;
399            halfpel_hv = refhv;
400    
401            dst = cur + y * stride + x;
402    
403            switch((y_frac << 2) | (x_frac)) {
404    
405            case 0:
406                    transfer16x16_copy(dst, src, stride);
407                    break;
408    
409            case 1:
410                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
411                    interpolate8x8_avg2(dst, src, halfpel_h, stride, rounding, 8);
412                    interpolate8x8_avg2(dst+8, src+8, halfpel_h+8, stride, rounding, 8);
413                    interpolate8x8_avg2(dst+8*stride, src+8*stride, halfpel_h+8*stride, stride, rounding, 8);
414                    interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 8);
415                    break;
416    
417            case 2:
418                interpolate16x16_lowpass_h(dst, src, stride, rounding);
419                    break;
420    
421            case 3:
422                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
423                    interpolate8x8_avg2(dst, src + 1, halfpel_h, stride, rounding, 8);
424                    interpolate8x8_avg2(dst+8, src + 8 + 1, halfpel_h+8, stride, rounding, 8);
425                    interpolate8x8_avg2(dst+8*stride, src + 8*stride + 1, halfpel_h+8*stride, stride, rounding, 8);
426                    interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8 + 1, halfpel_h+8*stride+8, stride, rounding, 8);
427                    break;
428    
429            case 4:
430                    interpolate16x16_lowpass_v(halfpel_v, src, stride, rounding);
431                    interpolate8x8_avg2(dst, src, halfpel_v, stride, rounding, 8);
432                    interpolate8x8_avg2(dst+8, src+8, halfpel_v+8, stride, rounding, 8);
433                    interpolate8x8_avg2(dst+8*stride, src+8*stride, halfpel_v+8*stride, stride, rounding, 8);
434                    interpolate8x8_avg2(dst+8*stride+8, src+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
435                    break;
436    
437            case 5:
438                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
439                    interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
440                    interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
441                    interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
442                    interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
443    
444                    interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
445                    interpolate8x8_avg2(dst, halfpel_hv, halfpel_v, stride, rounding, 8);
446                    interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+8, stride, rounding, 8);
447                    interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+8*stride, stride, rounding, 8);
448                    interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
449                    break;
450    
451            case 6:
452                    interpolate16x16_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
453                    interpolate8x8_avg2(dst, halfpel_h, halfpel_hv, stride, rounding, 8);
454                    interpolate8x8_avg2(dst+8, halfpel_h+8, halfpel_hv+8, stride, rounding, 8);
455                    interpolate8x8_avg2(dst+8*stride, halfpel_h+8*stride, halfpel_hv+8*stride, stride, rounding, 8);
456                    interpolate8x8_avg2(dst+8*stride+8, halfpel_h+8*stride+8, halfpel_hv+8*stride+8, stride, rounding, 8);
457                    break;
458    
459            case 7:
460                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
461                    interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
462                    interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
463                    interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
464                    interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
465    
466                    interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
467                    interpolate8x8_avg2(dst, halfpel_hv, halfpel_v, stride, rounding, 8);
468                    interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+8, stride, rounding, 8);
469                    interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+8*stride, stride, rounding, 8);
470                    interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
471                    break;
472    
473            case 8:
474                interpolate16x16_lowpass_v(dst, src, stride, rounding);
475                    break;
476    
477            case 9:
478                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
479                    interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
480                    interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
481                    interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
482                    interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
483                    interpolate16x16_lowpass_v(dst, halfpel_v, stride, rounding);
484                    break;
485    
486            case 10:
487                    interpolate16x16_lowpass_hv(dst, halfpel_h, src, stride, rounding);
488                    break;
489    
490            case 11:
491                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
492                    interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
493                    interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
494                    interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
495                    interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
496                    interpolate16x16_lowpass_v(dst, halfpel_v, stride, rounding);
497                    break;
498    
499            case 12:
500                    interpolate16x16_lowpass_v(halfpel_v, src, stride, rounding);
501                    interpolate8x8_avg2(dst, src+stride, halfpel_v, stride, rounding, 8);
502                    interpolate8x8_avg2(dst+8, src+stride+8, halfpel_v+8, stride, rounding, 8);
503                    interpolate8x8_avg2(dst+8*stride, src+stride+8*stride, halfpel_v+8*stride, stride, rounding, 8);
504                    interpolate8x8_avg2(dst+8*stride+8, src+stride+8*stride+8, halfpel_v+8*stride+8, stride, rounding, 8);
505                    break;
506    
507            case 13:
508                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
509                    interpolate8x8_avg2(halfpel_v, src, halfpel_h, stride, rounding, 9);
510                    interpolate8x8_avg2(halfpel_v+8, src + 8, halfpel_h+8, stride, rounding, 9);
511                    interpolate8x8_avg2(halfpel_v+8*stride, src + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
512                    interpolate8x8_avg2(halfpel_v+8*stride+8, src+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
513    
514                    interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
515                    interpolate8x8_avg2(dst, halfpel_hv, halfpel_v+stride, stride, rounding, 8);
516                    interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+stride+8, stride, rounding, 8);
517                    interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+stride+8*stride, stride, rounding, 8);
518                    interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+stride+8*stride+8, stride, rounding, 8);
519                    break;
520    
521            case 14:
522                    interpolate16x16_lowpass_hv(halfpel_hv, halfpel_h, src, stride, rounding);
523                    interpolate8x8_avg2(dst, halfpel_h+stride, halfpel_hv, stride, rounding, 8);
524                    interpolate8x8_avg2(dst+8, halfpel_h+stride+8, halfpel_hv+8, stride, rounding, 8);
525                    interpolate8x8_avg2(dst+8*stride, halfpel_h+stride+8*stride, halfpel_hv+8*stride, stride, rounding, 8);
526                    interpolate8x8_avg2(dst+8*stride+8, halfpel_h+stride+8*stride+8, halfpel_hv+8*stride+8, stride, rounding, 8);
527                    break;
528    
529            case 15:
530                    interpolate16x16_lowpass_h(halfpel_h, src, stride, rounding);
531                    interpolate8x8_avg2(halfpel_v, src+1, halfpel_h, stride, rounding, 9);
532                    interpolate8x8_avg2(halfpel_v+8, src+1 + 8, halfpel_h+8, stride, rounding, 9);
533                    interpolate8x8_avg2(halfpel_v+8*stride, src+1 + 8*stride, halfpel_h+8*stride, stride, rounding, 9);
534                    interpolate8x8_avg2(halfpel_v+8*stride+8, src+1+8*stride+8, halfpel_h+8*stride+8, stride, rounding, 9);
535    
536                    interpolate16x16_lowpass_v(halfpel_hv, halfpel_v, stride, rounding);
537                    interpolate8x8_avg2(dst, halfpel_hv, halfpel_v+stride, stride, rounding, 8);
538                    interpolate8x8_avg2(dst+8, halfpel_hv+8, halfpel_v+stride+8, stride, rounding, 8);
539                    interpolate8x8_avg2(dst+8*stride, halfpel_hv+8*stride, halfpel_v+stride+8*stride, stride, rounding, 8);
540                    interpolate8x8_avg2(dst+8*stride+8, halfpel_hv+8*stride+8, halfpel_v+stride+8*stride+8, stride, rounding, 8);
541                    break;
542            }
543    }
544    
545    #endif

Legend:
Removed from v.850  
changed lines
  Added in v.851

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