Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(230)

Unified Diff: src/opts/SkNx_sse.h

Issue 1606013003: SkNx miplevel building (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: refine note Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/opts/SkNx_neon.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « src/opts/SkNx_neon.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698