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

Unified Diff: include/libyuv/macros_msa.h

Issue 2421843002: Add MSA optimized ARGB4444ToI420 and ARGB4444ToARGB functions (Closed)
Patch Set: Created 4 years, 2 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 | « no previous file | include/libyuv/row.h » ('j') | source/convert.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/libyuv/macros_msa.h
diff --git a/include/libyuv/macros_msa.h b/include/libyuv/macros_msa.h
index 8a81e8213afba38737e1d8def52ac7c47b25139f..5b6f9f7a3fbe0827a166edef5cdf970315336ed8 100644
--- a/include/libyuv/macros_msa.h
+++ b/include/libyuv/macros_msa.h
@@ -18,6 +18,8 @@
#define LD_B(RTYPE, psrc) *((RTYPE*)(psrc)) /* NOLINT */
#define LD_UB(...) LD_B(v16u8, __VA_ARGS__)
+#define LD_H(RTYPE, psrc) *((RTYPE *) (psrc))
+
#define ST_B(RTYPE, in, pdst) *((RTYPE*)(pdst)) = (in) /* NOLINT */
#define ST_UB(...) ST_B(v16u8, __VA_ARGS__)
@@ -40,6 +42,18 @@
}
#define LD_UB4(...) LD_B4(v16u8, __VA_ARGS__)
+/* Description : Load vectors with 8 halfword elements with stride
+ Arguments : Inputs - psrc, stride
+ Outputs - out0, out1
+ Details : Load 8 halfword elements in 'out0' from (psrc)
+ Load 8 halfword elements in 'out1' from (psrc + stride)
+*/
+#define LD_H2(RTYPE, psrc, stride, out0, out1) { \
fbarchard1 2016/10/14 21:35:16 would it more clear in the calling code to do the
manojkumar.bhosale 2016/10/19 11:56:27 Removed this macro
+ out0 = LD_H(RTYPE, (psrc)); \
+ out1 = LD_H(RTYPE, (psrc) + (stride)); \
+}
+#define LD_UH2(...) LD_H2(v8u16, __VA_ARGS__)
+
/* Description : Store two vectors with stride each having 16 'byte' sized
elements
Arguments : Inputs - in0, in1, pdst, stride
« no previous file with comments | « no previous file | include/libyuv/row.h » ('j') | source/convert.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698