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.
This commit is contained in:
ChunEon Park 2014-05-31 14:32:46 +09:00
parent 9f98ddae46
commit aede29e2d4
2 changed files with 19 additions and 2 deletions

View File

@ -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")],
[

View File

@ -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