Index: src/opts/SkNx_neon.h |
diff --git a/src/opts/SkNx_neon.h b/src/opts/SkNx_neon.h |
index bb81cded187ff9c1995d6230d43b000d8ca733ae..6d4cade12e54a18b0efad5a49d92ed3d2b161703 100644 |
--- a/src/opts/SkNx_neon.h |
+++ b/src/opts/SkNx_neon.h |
@@ -450,4 +450,13 @@ template<> inline Sk4b SkNx_cast<uint8_t, uint16_t>(const Sk4h& src) { |
return vmovn_u16(vcombine_u16(src.fVec, src.fVec)); |
} |
+template<> inline Sk4b SkNx_cast<uint8_t, int>(const Sk4i& src) { |
+ uint16x4_t _16 = vqmovun_s32(src.fVec); |
+ return vqmovn_u16(vcombine_u16(_16, _16)); |
+} |
+ |
+static inline Sk4i Sk4f_round(const Sk4f& x) { |
+ return vcvtq_s32_f32((x + 0.5f).fVec); |
+} |
+ |
#endif//SkNx_neon_DEFINED |