From 98701eeffe82b6af84e26edc6e48779252502815 Mon Sep 17 00:00:00 2001 From: Hermet Park Date: Mon, 9 Aug 2021 20:53:27 +0900 Subject: [PATCH] sw_engine raster: move neon implementation to the neon domained file. --- src/lib/sw_engine/tvgSwCommon.h | 8 -------- src/lib/sw_engine/tvgSwRasterNeon.h | 6 ++++++ 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/src/lib/sw_engine/tvgSwCommon.h b/src/lib/sw_engine/tvgSwCommon.h index e77424cf..b90b5236 100644 --- a/src/lib/sw_engine/tvgSwCommon.h +++ b/src/lib/sw_engine/tvgSwCommon.h @@ -267,14 +267,6 @@ static inline uint32_t ALPHA_BLEND(uint32_t c, uint32_t a) ((((c & 0x00ff00ff) * a + 0x00ff00ff) >> 8) & 0x00ff00ff)); } -#if defined(THORVG_NEON_VECTOR_SUPPORT) -static inline uint8x8_t ALPHA_BLEND_NEON(uint8x8_t c, uint8x8_t a) -{ - uint16x8_t t = vmull_u8(c, a); - return vshrn_n_u16(t, 8); -} -#endif - static inline uint32_t COLOR_INTERPOLATE(uint32_t c1, uint32_t a1, uint32_t c2, uint32_t a2) { auto t = (((c1 & 0xff00ff) * a1 + (c2 & 0xff00ff) * a2) >> 8) & 0xff00ff; diff --git a/src/lib/sw_engine/tvgSwRasterNeon.h b/src/lib/sw_engine/tvgSwRasterNeon.h index 7fccbb01..0ca8304e 100644 --- a/src/lib/sw_engine/tvgSwRasterNeon.h +++ b/src/lib/sw_engine/tvgSwRasterNeon.h @@ -24,6 +24,12 @@ #include +static inline uint8x8_t ALPHA_BLEND_NEON(uint8x8_t c, uint8x8_t a) +{ + uint16x8_t t = vmull_u8(c, a); + return vshrn_n_u16(t, 8); +} + static inline void neonRasterRGBA32(uint32_t *dst, uint32_t val, uint32_t offset, int32_t len) {