Parent Directory
|
Revision Log
Revision 1.4 - (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 : | Isibaar | 1.4 | INTERPOLATE8X8 interpolate8x8_halfpel_h_ia64; |
30 : | INTERPOLATE8X8 interpolate8x8_halfpel_v_ia64; | ||
31 : | INTERPOLATE8X8 interpolate8x8_halfpel_hv_ia64; | ||
32 : | |||
33 : | edgomez | 1.3 | static __inline void |
34 : | interpolate8x8_switch(uint8_t * const cur, | ||
35 : | const uint8_t * const refn, | ||
36 : | const uint32_t x, | ||
37 : | const uint32_t y, | ||
38 : | const int32_t dx, | ||
39 : | const int dy, | ||
40 : | const uint32_t stride, | ||
41 : | const uint32_t rounding) | ||
42 : | Isibaar | 1.1 | { |
43 : | int32_t ddx, ddy; | ||
44 : | |||
45 : | edgomez | 1.3 | switch (((dx & 1) << 1) + (dy & 1)) // ((dx%2)?2:0)+((dy%2)?1:0) |
46 : | { | ||
47 : | case 0: | ||
48 : | ddx = dx / 2; | ||
49 : | ddy = dy / 2; | ||
50 : | transfer8x8_copy(cur + y * stride + x, | ||
51 : | Isibaar | 1.4 | refn + (int)((y + ddy) * stride + x + ddx), stride); |
52 : | Isibaar | 1.1 | break; |
53 : | |||
54 : | edgomez | 1.3 | case 1: |
55 : | ddx = dx / 2; | ||
56 : | ddy = (dy - 1) / 2; | ||
57 : | interpolate8x8_halfpel_v(cur + y * stride + x, | ||
58 : | Isibaar | 1.4 | refn + (int)((y + ddy) * stride + x + ddx), stride, |
59 : | edgomez | 1.3 | rounding); |
60 : | Isibaar | 1.1 | break; |
61 : | |||
62 : | edgomez | 1.3 | case 2: |
63 : | ddx = (dx - 1) / 2; | ||
64 : | ddy = dy / 2; | ||
65 : | interpolate8x8_halfpel_h(cur + y * stride + x, | ||
66 : | Isibaar | 1.4 | refn + (int)((y + ddy) * stride + x + ddx), stride, |
67 : | edgomez | 1.3 | rounding); |
68 : | Isibaar | 1.1 | break; |
69 : | |||
70 : | edgomez | 1.3 | default: |
71 : | ddx = (dx - 1) / 2; | ||
72 : | ddy = (dy - 1) / 2; | ||
73 : | interpolate8x8_halfpel_hv(cur + y * stride + x, | ||
74 : | Isibaar | 1.4 | refn + (int)((y + ddy) * stride + x + ddx), stride, |
75 : | edgomez | 1.3 | rounding); |
76 : | Isibaar | 1.1 | break; |
77 : | edgomez | 1.3 | } |
78 : | Isibaar | 1.1 | } |
79 : | chenm001 | 1.2 | |
80 : | |||
81 : | void interpolate8x8_c(uint8_t * const dst, | ||
82 : | edgomez | 1.3 | const uint8_t * const src, |
83 : | const uint32_t x, | ||
84 : | const uint32_t y, | ||
85 : | const uint32_t stride); |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |