evas-blend-ops: fix off-by-1 in the C MUL3_SYM "simd" multiplier
authorChris Michael <cp.michael@samsung.com>
Tue, 21 Apr 2015 15:23:28 +0000 (11:23 -0400)
committerChris Michael <cp.michael@samsung.com>
Tue, 21 Apr 2015 15:26:03 +0000 (11:26 -0400)
Summary: op_blend functions give off-by-1 using NEON intrinsics in C
MUL3_SYM, this commit fixes that issue with no ill effects on other
platforms.

@fix

Reviewers: raster, cedric

Subscribers: cedric

Projects: #efl

Differential Revision: https://phab.enlightenment.org/D2394

src/lib/evas/include/evas_blend_ops.h

index 560236d60b07b401f8c9bc3e1e2b6d90da865cca..99b949eb976c6cec81da5032b32c247eee24758c 100644 (file)
@@ -111,7 +111,7 @@ extern const DATA32 ALPHA_256;
 
 #define MUL3_SYM(x, y) \
  ( ((((((x) >> 8) & 0xff00) * (((y) >> 16) & 0xff)) + 0xff00) & 0xff0000) + \
-   ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff00) >> 16) & 0xff00) + \
+   ((((((x) & 0xff00) * ((y) & 0xff00)) + 0xff0000) >> 16) & 0xff00) + \
    (((((x) & 0xff) * ((y) & 0xff)) + 0xff) >> 8) )
 
 #define MUL_SYM(a, x) \