[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.3 - (view) (download)

1 : Isibaar 1.1 #include "../utils/mem_transfer.h"
2 :    
3 : edgomez 1.3 typedef void (INTERPOLATE8X8) (uint8_t * const dst,
4 :     const uint8_t * const src,
5 :     const uint32_t stride,
6 :     const uint32_t rounding);
7 :     typedef INTERPOLATE8X8 *INTERPOLATE8X8_PTR;
8 : Isibaar 1.1
9 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_h;
10 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_v;
11 :     extern INTERPOLATE8X8_PTR interpolate8x8_halfpel_hv;
12 :    
13 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_c;
14 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_c;
15 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_c;
16 :    
17 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_mmx;
18 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_mmx;
19 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_mmx;
20 :    
21 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_xmm;
22 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_xmm;
23 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_xmm;
24 :    
25 :     INTERPOLATE8X8 interpolate8x8_halfpel_h_3dn;
26 :     INTERPOLATE8X8 interpolate8x8_halfpel_v_3dn;
27 :     INTERPOLATE8X8 interpolate8x8_halfpel_hv_3dn;
28 :    
29 : edgomez 1.3 static __inline void
30 :     interpolate8x8_switch(uint8_t * const cur,
31 :     const uint8_t * const refn,
32 :     const uint32_t x,
33 :     const uint32_t y,
34 :     const int32_t dx,
35 :     const int dy,
36 :     const uint32_t stride,
37 :     const uint32_t rounding)
38 : Isibaar 1.1 {
39 :     int32_t ddx, ddy;
40 :    
41 : edgomez 1.3 switch (((dx & 1) << 1) + (dy & 1)) // ((dx%2)?2:0)+((dy%2)?1:0)
42 :     {
43 :     case 0:
44 :     ddx = dx / 2;
45 :     ddy = dy / 2;
46 :     transfer8x8_copy(cur + y * stride + x,
47 :     refn + (y + ddy) * stride + x + ddx, stride);
48 : Isibaar 1.1 break;
49 :    
50 : edgomez 1.3 case 1:
51 :     ddx = dx / 2;
52 :     ddy = (dy - 1) / 2;
53 :     interpolate8x8_halfpel_v(cur + y * stride + x,
54 :     refn + (y + ddy) * stride + x + ddx, stride,
55 :     rounding);
56 : Isibaar 1.1 break;
57 :    
58 : edgomez 1.3 case 2:
59 :     ddx = (dx - 1) / 2;
60 :     ddy = dy / 2;
61 :     interpolate8x8_halfpel_h(cur + y * stride + x,
62 :     refn + (y + ddy) * stride + x + ddx, stride,
63 :     rounding);
64 : Isibaar 1.1 break;
65 :    
66 : edgomez 1.3 default:
67 :     ddx = (dx - 1) / 2;
68 :     ddy = (dy - 1) / 2;
69 :     interpolate8x8_halfpel_hv(cur + y * stride + x,
70 :     refn + (y + ddy) * stride + x + ddx, stride,
71 :     rounding);
72 : Isibaar 1.1 break;
73 : edgomez 1.3 }
74 : Isibaar 1.1 }
75 : chenm001 1.2
76 :    
77 :     void interpolate8x8_c(uint8_t * const dst,
78 : edgomez 1.3 const uint8_t * const src,
79 :     const uint32_t x,
80 :     const uint32_t y,
81 :     const uint32_t stride);

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