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

Unified Diff: source/planar_functions.cc

Issue 2529983002: Add MSA optimized ARGB Multiply/Add/Subtract row functions (Closed)
Patch Set: Corrected patchset files Created 4 years, 1 month 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 | « include/libyuv/row.h ('k') | source/row_any.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/planar_functions.cc
diff --git a/source/planar_functions.cc b/source/planar_functions.cc
index 06ac9e3740dea081bcdb641b74af561e91ca7941..86854ae25dcf045ff509455aea824fd3befbe50f 100644
--- a/source/planar_functions.cc
+++ b/source/planar_functions.cc
@@ -1115,6 +1115,14 @@ int ARGBMultiply(const uint8* src_argb0,
}
}
#endif
+#if defined(HAS_ARGBMULTIPLYROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBMultiplyRow = ARGBMultiplyRow_Any_MSA;
+ if (IS_ALIGNED(width, 4)) {
+ ARGBMultiplyRow = ARGBMultiplyRow_MSA;
+ }
+ }
+#endif
// Multiply plane
for (y = 0; y < height; ++y) {
@@ -1184,6 +1192,14 @@ int ARGBAdd(const uint8* src_argb0,
}
}
#endif
+#if defined(HAS_ARGBADDROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBAddRow = ARGBAddRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBAddRow = ARGBAddRow_MSA;
+ }
+ }
+#endif
// Add plane
for (y = 0; y < height; ++y) {
@@ -1248,6 +1264,14 @@ int ARGBSubtract(const uint8* src_argb0,
}
}
#endif
+#if defined(HAS_ARGBSUBTRACTROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ ARGBSubtractRow = ARGBSubtractRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ ARGBSubtractRow = ARGBSubtractRow_MSA;
+ }
+ }
+#endif
// Subtract plane
for (y = 0; y < height; ++y) {
« no previous file with comments | « include/libyuv/row.h ('k') | source/row_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698