diff options
author | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
---|---|---|
committer | David Walter Seikel | 2012-01-04 18:41:13 +1000 |
commit | dd7595a3475407a7fa96a97393bae8c5220e8762 (patch) | |
tree | e341e911d7eb911a51684a7412ef7f7c7605d28e /libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c | |
parent | Add the skeleton. (diff) | |
download | SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.zip SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.gz SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.bz2 SledjHamr-dd7595a3475407a7fa96a97393bae8c5220e8762.tar.xz |
Add the base Enlightenment Foundation Libraries - eina, eet, evas, ecore, embryo, and edje.
Note that embryo wont be used, but I'm not sure yet if you can build edje without it.
Diffstat (limited to 'libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c | 129 |
1 files changed, 129 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c new file mode 100644 index 0000000..b252a67 --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_blend/op_blend_pixel_mask_neon.c | |||
@@ -0,0 +1,129 @@ | |||
1 | /* blend pixel x mask --> dst */ | ||
2 | |||
3 | #ifdef BUILD_NEON | ||
4 | static void | ||
5 | _op_blend_pas_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { | ||
6 | DATA32 *e; | ||
7 | int alpha; | ||
8 | UNROLL8_PLD_WHILE(d, l, e, | ||
9 | { | ||
10 | alpha = *m; | ||
11 | switch(alpha) | ||
12 | { | ||
13 | case 0: | ||
14 | break; | ||
15 | case 255: | ||
16 | *d = *s; | ||
17 | break; | ||
18 | default: | ||
19 | alpha++; | ||
20 | *d = INTERP_256(alpha, *s, *d); | ||
21 | break; | ||
22 | } | ||
23 | m++; s++; d++; | ||
24 | }); | ||
25 | } | ||
26 | |||
27 | static void | ||
28 | _op_blend_pan_mas_dp_neon(DATA32 *s, DATA8 *m, DATA32 c __UNUSED__, DATA32 *d, int l) { | ||
29 | DATA32 *e; | ||
30 | int alpha; | ||
31 | UNROLL8_PLD_WHILE(d, l, e, | ||
32 | { | ||
33 | alpha = *m; | ||
34 | switch(alpha) | ||
35 | { | ||
36 | case 0: | ||
37 | break; | ||
38 | case 255: | ||
39 | *d = *s; | ||
40 | break; | ||
41 | default: | ||
42 | alpha++; | ||
43 | *d = INTERP_256(alpha, *s, *d); | ||
44 | break; | ||
45 | } | ||
46 | m++; s++; d++; | ||
47 | }); | ||
48 | } | ||
49 | |||
50 | #define _op_blend_p_mas_dp_neon _op_blend_pas_mas_dp_neon | ||
51 | |||
52 | #define _op_blend_p_mas_dpan_neon _op_blend_p_mas_dp_neon | ||
53 | #define _op_blend_pan_mas_dpan_neon _op_blend_pan_mas_dp_neon | ||
54 | #define _op_blend_pas_mas_dpan_neon _op_blend_pas_mas_dp_neon | ||
55 | |||
56 | static void | ||
57 | init_blend_pixel_mask_span_funcs_neon(void) | ||
58 | { | ||
59 | op_blend_span_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_p_mas_dp_neon; | ||
60 | op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pas_mas_dp_neon; | ||
61 | op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pan_mas_dp_neon; | ||
62 | |||
63 | op_blend_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_p_mas_dpan_neon; | ||
64 | op_blend_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pas_mas_dpan_neon; | ||
65 | op_blend_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pan_mas_dpan_neon; | ||
66 | } | ||
67 | #endif | ||
68 | |||
69 | #ifdef BUILD_NEON | ||
70 | static void | ||
71 | _op_blend_pt_p_mas_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { | ||
72 | s = MUL_SYM(m, s); | ||
73 | c = 256 - (s >> 24); | ||
74 | *d = s + MUL_256(c, *d); | ||
75 | } | ||
76 | |||
77 | #define _op_blend_pt_pan_mas_dp_neon _op_blend_pt_p_mas_dp_neon | ||
78 | #define _op_blend_pt_pas_mas_dp_neon _op_blend_pt_p_mas_dp_neon | ||
79 | |||
80 | #define _op_blend_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dp_neon | ||
81 | #define _op_blend_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dp_neon | ||
82 | #define _op_blend_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dp_neon | ||
83 | |||
84 | static void | ||
85 | init_blend_pixel_mask_pt_funcs_neon(void) | ||
86 | { | ||
87 | op_blend_pt_funcs[SP][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_p_mas_dp_neon; | ||
88 | op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pas_mas_dp_neon; | ||
89 | op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP][CPU_NEON] = _op_blend_pt_pan_mas_dp_neon; | ||
90 | |||
91 | op_blend_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_p_mas_dpan_neon; | ||
92 | op_blend_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pas_mas_dpan_neon; | ||
93 | op_blend_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_pt_pan_mas_dpan_neon; | ||
94 | } | ||
95 | #endif | ||
96 | |||
97 | /*-----*/ | ||
98 | |||
99 | /* blend_rel pixel x mask -> dst */ | ||
100 | |||
101 | #ifdef BUILD_NEON | ||
102 | |||
103 | #define _op_blend_rel_p_mas_dpan_neon _op_blend_p_mas_dpan_neon | ||
104 | #define _op_blend_rel_pas_mas_dpan_neon _op_blend_pas_mas_dpan_neon | ||
105 | #define _op_blend_rel_pan_mas_dpan_neon _op_blend_pan_mas_dpan_neon | ||
106 | |||
107 | static void | ||
108 | init_blend_rel_pixel_mask_span_funcs_neon(void) | ||
109 | { | ||
110 | op_blend_rel_span_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_p_mas_dpan_neon; | ||
111 | op_blend_rel_span_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pas_mas_dpan_neon; | ||
112 | op_blend_rel_span_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pan_mas_dpan_neon; | ||
113 | } | ||
114 | #endif | ||
115 | |||
116 | #ifdef BUILD_NEON | ||
117 | |||
118 | #define _op_blend_rel_pt_p_mas_dpan_neon _op_blend_pt_p_mas_dpan_neon | ||
119 | #define _op_blend_rel_pt_pas_mas_dpan_neon _op_blend_pt_pas_mas_dpan_neon | ||
120 | #define _op_blend_rel_pt_pan_mas_dpan_neon _op_blend_pt_pan_mas_dpan_neon | ||
121 | |||
122 | static void | ||
123 | init_blend_rel_pixel_mask_pt_funcs_neon(void) | ||
124 | { | ||
125 | op_blend_rel_pt_funcs[SP][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_p_mas_dpan_neon; | ||
126 | op_blend_rel_pt_funcs[SP_AS][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pas_mas_dpan_neon; | ||
127 | op_blend_rel_pt_funcs[SP_AN][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_blend_rel_pt_pan_mas_dpan_neon; | ||
128 | } | ||
129 | #endif | ||