summaryrefslogtreecommitdiff
path: root/src/lib/evas/common/evas_op_blend
diff options
context:
space:
mode:
authorChunEon Park <hermet@hermet.pe.kr>2014-05-31 14:32:46 +0900
committerChunEon Park <hermet@hermet.pe.kr>2014-05-31 14:33:55 +0900
commitaede29e2d4cd49c370b5225196fd267a712d3593 (patch)
tree43c69d2c9c60dbeee74336a90895b722556dcd6e /src/lib/evas/common/evas_op_blend
parent9f98ddae4661d50d74d88210fc66c253b598277c (diff)
evas/blend - disable neon code.
Current neon code is a little buggy, the blend won't be done correctly. so leave the c code depends on the compiler optimization.
Diffstat (limited to 'src/lib/evas/common/evas_op_blend')
-rw-r--r--src/lib/evas/common/evas_op_blend/op_blend_pixel_color_neon.c19
1 files changed, 18 insertions, 1 deletions
diff --git a/src/lib/evas/common/evas_op_blend/op_blend_pixel_color_neon.c b/src/lib/evas/common/evas_op_blend/op_blend_pixel_color_neon.c
index 6af4cb4ad9..a2f256c972 100644
--- a/src/lib/evas/common/evas_op_blend/op_blend_pixel_color_neon.c
+++ b/src/lib/evas/common/evas_op_blend/op_blend_pixel_color_neon.c
@@ -1,9 +1,25 @@
1/* blend pixel x color --> dst */ 1/* blend pixel x color --> dst */
2#ifdef BUILD_NEON 2#ifdef BUILD_NEON
3
4#include <arm_neon.h>
5
3/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of 6/* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
4 * reads, then two writes, a miss on read is 'just' two reads */ 7 * reads, then two writes, a miss on read is 'just' two reads */
5static void 8static void
6_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 *d, int l) { 9_op_blend_p_c_dp_neon(DATA32 * __restrict s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 * __restrict d, int l) {
10
11/* Current this neon code is a little buggy, color blending won't be done
12 correctly. So leave the code depend on the compilier optimization. */
13#if 1
14 int i = 0;
15
16 for (i = 0; i < l; i++)
17 {
18 DATA32 sc = MUL4_SYM(c, s[i]);
19 alpha = 256 - (sc >> 24);
20 d[i] = sc + MUL_256(alpha, d[i]);
21 }
22#else
7#define AP "blend_p_c_dp_" 23#define AP "blend_p_c_dp_"
8 asm volatile ( 24 asm volatile (
9 ".fpu neon \n\t" 25 ".fpu neon \n\t"
@@ -186,6 +202,7 @@ _op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 *d, int
186 : "q0","q1","q2","q3","q4","q5","q6","q7","memory" 202 : "q0","q1","q2","q3","q4","q5","q6","q7","memory"
187 ); 203 );
188#undef AP 204#undef AP
205#endif
189} 206}
190 207
191static void 208static void