summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2014-11-10 18:16:56 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2014-11-12 17:02:26 +0900
commite21a40de9dfdebdcd3f350aa5e5104be35058675 (patch)
tree30c43b9b9e36837c359dcbd38045ed6eaec19a12 /src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c
parent85ecf662d4a93339f57e66c901be3b4b250287e6 (diff)
Evas: Fix COPY op for mask+color
Also, mark some functions with a FIXME as they look just wrong. COPY_REL is never used... MMX and NEON optimizations should be implemented for COPY MASK+COL.
Diffstat (limited to '')
-rw-r--r--src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c b/src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c
index 7d9a44e4b6..e5d6d57f9e 100644
--- a/src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c
+++ b/src/lib/evas/common/evas_op_copy/op_copy_mask_color_neon.c
@@ -5,20 +5,22 @@ static void
5_op_copy_mas_c_dp_neon(DATA32 *s EINA_UNUSED, DATA8 *m, DATA32 c, DATA32 *d, int l) { 5_op_copy_mas_c_dp_neon(DATA32 *s EINA_UNUSED, DATA8 *m, DATA32 c, DATA32 *d, int l) {
6 // FIXME: neon-it 6 // FIXME: neon-it
7 DATA32 *e; 7 DATA32 *e;
8 int color; 8 int alpha;
9 UNROLL8_PLD_WHILE(d, l, e, 9 UNROLL8_PLD_WHILE(d, l, e,
10 { 10 {
11 color = *m; 11 /* d = m*c */
12 switch(color) 12 alpha = *m;
13 switch(alpha)
13 { 14 {
14 case 0: 15 case 0:
16 *d = 0;
15 break; 17 break;
16 case 255: 18 case 255:
17 *d = c; 19 *d = c;
18 break; 20 break;
19 default: 21 default:
20 color++; 22 alpha++;
21 *d = INTERP_256(color, c, *d); 23 *d = MUL_256(alpha, c);
22 break; 24 break;
23 } 25 }
24 m++; d++; 26 m++; d++;
@@ -86,6 +88,7 @@ init_copy_mask_color_pt_funcs_neon(void)
86#ifdef BUILD_NEON 88#ifdef BUILD_NEON
87static void 89static void
88_op_copy_rel_mas_c_dp_neon(DATA32 *s EINA_UNUSED, DATA8 *m, DATA32 c, DATA32 *d, int l) { 90_op_copy_rel_mas_c_dp_neon(DATA32 *s EINA_UNUSED, DATA8 *m, DATA32 c, DATA32 *d, int l) {
91 /* FIXME: THIS FUNCTION HAS PROBABLY NEVER BEEN TESTED */
89 // FIXME: neon-it 92 // FIXME: neon-it
90 DATA32 *e; 93 DATA32 *e;
91 int color; 94 int color;
@@ -140,6 +143,7 @@ init_copy_rel_mask_color_span_funcs_neon(void)
140#ifdef BUILD_NEON 143#ifdef BUILD_NEON
141static void 144static void
142_op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) { 145_op_copy_rel_pt_mas_c_dp_neon(DATA32 s, DATA8 m, DATA32 c, DATA32 *d) {
146 /* FIXME: THIS FUNCTION HAS PROBABLY NEVER BEEN TESTED */
143 s = 1 + (*d >> 24); 147 s = 1 + (*d >> 24);
144 s = MUL_256(s, c); 148 s = MUL_256(s, c);
145 *d = INTERP_256(m + 1, s, *d); 149 *d = INTERP_256(m + 1, s, *d);