Index: src/opts/SkNx_sse.h |
diff --git a/src/opts/SkNx_sse.h b/src/opts/SkNx_sse.h |
index c6163b6a8034d5035d910f66fda05094a17973a2..a17d988ee7f29e4b2c6460ad8e4f3a96b151f257 100644 |
--- a/src/opts/SkNx_sse.h |
+++ b/src/opts/SkNx_sse.h |
@@ -379,6 +379,14 @@ static inline void Sk4f_ToBytes(uint8_t bytes[16], |
_mm_cvttps_epi32(d.fVec)))); |
} |
+template<> inline Sk4h SkNx_cast<uint16_t, uint8_t, 4>(const Sk4b& src) { |
+ return _mm_unpacklo_epi8(src.fVec, _mm_setzero_si128()); |
+} |
+ |
+template<> inline Sk4b SkNx_cast<uint8_t, uint16_t, 4>(const Sk4h& src) { |
+ return _mm_packus_epi16(src.fVec, src.fVec); |
+} |
+ |
} // namespace |