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_copy/op_copy_mask_color_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_copy/op_copy_mask_color_neon.c')
-rw-r--r-- | libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c | 170 |
1 files changed, 170 insertions, 0 deletions
diff --git a/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c new file mode 100644 index 0000000..dc7f78f --- /dev/null +++ b/libraries/evas/src/lib/engines/common/evas_op_copy/op_copy_mask_color_neon.c | |||
@@ -0,0 +1,170 @@ | |||
1 | /* copy mask x color -> dst */ | ||
2 | |||
3 | #ifdef BUILD_NEON | ||
4 | static void | ||
5 | _op_copy_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { | ||
6 | // FIXME: neon-it | ||
7 | DATA32 *e; | ||
8 | int color; | ||
9 | UNROLL8_PLD_WHILE(d, l, e, | ||
10 | { | ||
11 | color = *m; | ||
12 | switch(color) | ||
13 | { | ||
14 | case 0: | ||
15 | break; | ||
16 | case 255: | ||
17 | *d = c; | ||
18 | break; | ||
19 | default: | ||
20 | color++; | ||
21 | *d = INTERP_256(color, c, *d); | ||
22 | break; | ||
23 | } | ||
24 | m++; d++; | ||
25 | }); | ||
26 | } | ||
27 | |||
28 | #define _op_copy_mas_cn_dp_neon _op_copy_mas_c_dp_neon | ||
29 | #define _op_copy_mas_can_dp_neon _op_copy_mas_c_dp_neon | ||
30 | #define _op_copy_mas_caa_dp_neon _op_copy_mas_c_dp_neon | ||
31 | |||
32 | #define _op_copy_mas_c_dpan_neon _op_copy_mas_c_dp_neon | ||
33 | #define _op_copy_mas_cn_dpan_neon _op_copy_mas_c_dpan_neon | ||
34 | #define _op_copy_mas_can_dpan_neon _op_copy_mas_c_dpan_neon | ||
35 | #define _op_copy_mas_caa_dpan_neon _op_copy_mas_c_dpan_neon | ||
36 | |||
37 | static void | ||
38 | init_copy_mask_color_span_funcs_neon(void) | ||
39 | { | ||
40 | op_copy_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_mas_cn_dp_neon; | ||
41 | op_copy_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_mas_c_dp_neon; | ||
42 | op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_mas_can_dp_neon; | ||
43 | op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_mas_caa_dp_neon; | ||
44 | |||
45 | op_copy_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_mas_cn_dpan_neon; | ||
46 | op_copy_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_mas_c_dpan_neon; | ||
47 | op_copy_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_mas_can_dpan_neon; | ||
48 | op_copy_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_mas_caa_dpan_neon; | ||
49 | } | ||
50 | #endif | ||
51 | |||
52 | #ifdef BUILD_NEON | ||
53 | static void | ||
54 | _op_copy_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { | ||
55 | *d = INTERP_256(m + 1, c, *d); | ||
56 | } | ||
57 | |||
58 | #define _op_copy_pt_mas_cn_dp_neon _op_copy_pt_mas_c_dp_neon | ||
59 | #define _op_copy_pt_mas_can_dp_neon _op_copy_pt_mas_c_dp_neon | ||
60 | #define _op_copy_pt_mas_caa_dp_neon _op_copy_pt_mas_c_dp_neon | ||
61 | |||
62 | #define _op_copy_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dp_neon | ||
63 | #define _op_copy_pt_mas_cn_dpan_neon _op_copy_pt_mas_c_dpan_neon | ||
64 | #define _op_copy_pt_mas_can_dpan_neon _op_copy_pt_mas_c_dpan_neon | ||
65 | #define _op_copy_pt_mas_caa_dpan_neon _op_copy_pt_mas_c_dpan_neon | ||
66 | |||
67 | static void | ||
68 | init_copy_mask_color_pt_funcs_neon(void) | ||
69 | { | ||
70 | op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_pt_mas_cn_dp_neon; | ||
71 | op_copy_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_pt_mas_c_dp_neon; | ||
72 | op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_pt_mas_can_dp_neon; | ||
73 | op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_pt_mas_caa_dp_neon; | ||
74 | |||
75 | op_copy_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_pt_mas_cn_dpan_neon; | ||
76 | op_copy_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_pt_mas_c_dpan_neon; | ||
77 | op_copy_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_pt_mas_can_dpan_neon; | ||
78 | op_copy_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_pt_mas_caa_dpan_neon; | ||
79 | } | ||
80 | #endif | ||
81 | |||
82 | /*-----*/ | ||
83 | |||
84 | /* copy_rel mask x color -> dst */ | ||
85 | |||
86 | #ifdef BUILD_NEON | ||
87 | static void | ||
88 | _op_copy_rel_mas_c_dp_neon(DATA32 *s __UNUSED__, DATA8 *m, DATA32 c, DATA32 *d, int l) { | ||
89 | // FIXME: neon-it | ||
90 | DATA32 *e; | ||
91 | int color; | ||
92 | UNROLL8_PLD_WHILE(d, l, e, | ||
93 | { | ||
94 | color = *m; | ||
95 | switch(color) | ||
96 | { | ||
97 | case 0: | ||
98 | break; | ||
99 | case 255: | ||
100 | color = 1 + (*d >> 24); | ||
101 | *d = MUL_256(color, c); | ||
102 | break; | ||
103 | default: | ||
104 | { | ||
105 | DATA32 da = 1 + (*d >> 24); | ||
106 | da = MUL_256(da, c); | ||
107 | color++; | ||
108 | *d = INTERP_256(color, da, *d); | ||
109 | } | ||
110 | break; | ||
111 | } | ||
112 | m++; d++; | ||
113 | }); | ||
114 | } | ||
115 | |||
116 | #define _op_copy_rel_mas_cn_dp_neon _op_copy_rel_mas_c_dp_neon | ||
117 | #define _op_copy_rel_mas_can_dp_neon _op_copy_rel_mas_c_dp_neon | ||
118 | #define _op_copy_rel_mas_caa_dp_neon _op_copy_rel_mas_c_dp_neon | ||
119 | |||
120 | #define _op_copy_rel_mas_c_dpan_neon _op_copy_mas_c_dpan_neon | ||
121 | #define _op_copy_rel_mas_cn_dpan_neon _op_copy_mas_cn_dpan_neon | ||
122 | #define _op_copy_rel_mas_can_dpan_neon _op_copy_mas_can_dpan_neon | ||
123 | #define _op_copy_rel_mas_caa_dpan_neon _op_copy_mas_caa_dpan_neon | ||
124 | |||
125 | static void | ||
126 | init_copy_rel_mask_color_span_funcs_neon(void) | ||
127 | { | ||
128 | op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_mas_cn_dp_neon; | ||
129 | op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_mas_c_dp_neon; | ||
130 | op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_mas_can_dp_neon; | ||
131 | op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_mas_caa_dp_neon; | ||
132 | |||
133 | op_copy_rel_span_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_mas_cn_dpan_neon; | ||
134 | op_copy_rel_span_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_mas_c_dpan_neon; | ||
135 | op_copy_rel_span_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_mas_can_dpan_neon; | ||
136 | op_copy_rel_span_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_mas_caa_dpan_neon; | ||
137 | } | ||
138 | #endif | ||
139 | |||
140 | #ifdef BUILD_NEON | ||
141 | static void | ||
142 | _op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { | ||
143 | s = 1 + (*d >> 24); | ||
144 | s = MUL_256(s, c); | ||
145 | *d = INTERP_256(m + 1, s, *d); | ||
146 | } | ||
147 | |||
148 | #define _op_copy_rel_pt_mas_cn_dp_neon _op_copy_rel_pt_mas_c_dp_neon | ||
149 | #define _op_copy_rel_pt_mas_can_dp_neon _op_copy_rel_pt_mas_c_dp_neon | ||
150 | #define _op_copy_rel_pt_mas_caa_dp_neon _op_copy_rel_pt_mas_c_dp_neon | ||
151 | |||
152 | #define _op_copy_rel_pt_mas_c_dpan_neon _op_copy_pt_mas_c_dpan_neon | ||
153 | #define _op_copy_rel_pt_mas_cn_dpan_neon _op_copy_pt_mas_cn_dpan_neon | ||
154 | #define _op_copy_rel_pt_mas_can_dpan_neon _op_copy_pt_mas_can_dpan_neon | ||
155 | #define _op_copy_rel_pt_mas_caa_dpan_neon _op_copy_pt_mas_caa_dpan_neon | ||
156 | |||
157 | static void | ||
158 | init_copy_rel_mask_color_pt_funcs_neon(void) | ||
159 | { | ||
160 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP][CPU_NEON] = _op_copy_rel_pt_mas_cn_dp_neon; | ||
161 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP][CPU_NEON] = _op_copy_rel_pt_mas_c_dp_neon; | ||
162 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP][CPU_NEON] = _op_copy_rel_pt_mas_can_dp_neon; | ||
163 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP][CPU_NEON] = _op_copy_rel_pt_mas_caa_dp_neon; | ||
164 | |||
165 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC_N][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_cn_dpan_neon; | ||
166 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_c_dpan_neon; | ||
167 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AN][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_can_dpan_neon; | ||
168 | op_copy_rel_pt_funcs[SP_N][SM_AS][SC_AA][DP_AN][CPU_NEON] = _op_copy_rel_pt_mas_caa_dpan_neon; | ||
169 | } | ||
170 | #endif | ||