hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=aede29e2d4cd49c370b5225196fd267a712d3593

commit aede29e2d4cd49c370b5225196fd267a712d3593
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Sat May 31 14:32:46 2014 +0900

    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.
---
 configure.ac                                          |  2 +-
 .../common/evas_op_blend/op_blend_pixel_color_neon.c  | 19 ++++++++++++++++++-
 2 files changed, 19 insertions(+), 2 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9dd0675..e409c11 100644
--- a/configure.ac
+++ b/configure.ac
@@ -556,7 +556,7 @@ case $host_cpu in
        build_cpu_neon="yes"
        AC_MSG_CHECKING([whether to use NEON instructions])
        CFLAGS_save="${CFLAGS}"
-       CFLAGS="${CFLAGS} -mfpu=neon"
+       CFLAGS="${CFLAGS} -mfpu=neon -ftree-vectorize"
        AC_TRY_COMPILE([#include <arm_neon.h>],
          [asm volatile ("vqadd.u8 d0, d1, d0\n")],
                 [
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 6af4cb4..a2f256c 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 @@
 /* blend pixel x color --> dst */
 #ifdef BUILD_NEON
+
+#include <arm_neon.h>
+
 /* Note: Optimisation is based on keeping _dest_ aligned: else it's a pair of
  * reads, then two writes, a miss on read is 'just' two reads */
 static void
-_op_blend_p_c_dp_neon(DATA32 *s, DATA8 *m EINA_UNUSED, DATA32 c, DATA32 *d, 
int l) {
+_op_blend_p_c_dp_neon(DATA32 * __restrict s, DATA8 *m EINA_UNUSED, DATA32 c, 
DATA32 * __restrict d, int l) {
+
+/* Current this neon code is a little buggy, color blending won't be done
+       correctly. So leave the code depend on the compilier optimization. */
+#if 1
+   int i = 0;
+
+   for (i = 0; i < l; i++)
+     {
+        DATA32 sc = MUL4_SYM(c, s[i]);
+        alpha = 256 - (sc >> 24);
+        d[i] = sc + MUL_256(alpha, d[i]);
+     }
+#else
 #define AP     "blend_p_c_dp_"
    asm volatile (
                ".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
                : "q0","q1","q2","q3","q4","q5","q6","q7","memory"
        );
 #undef AP
+#endif
 }
 
 static void

-- 


Reply via email to