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

Unified Diff: source/convert_argb.cc

Issue 2430313005: Add MSA optimized I422ToARGBRow_MSA and I422ToRGBARow_MSA 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
Index: source/convert_argb.cc
diff --git a/source/convert_argb.cc b/source/convert_argb.cc
index da48b185985237716f4d0d188ebdbf57944239d7..6e23cf7437e34d46302739b362c61e7a2f95e9b0 100644
--- a/source/convert_argb.cc
+++ b/source/convert_argb.cc
@@ -102,6 +102,14 @@ static int I420ToARGBMatrix(const uint8* src_y, int src_stride_y,
I422ToARGBRow = I422ToARGBRow_DSPR2;
}
#endif
+#if defined(HAS_I422TOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ I422ToARGBRow = I422ToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ I422ToARGBRow = I422ToARGBRow_MSA;
+ }
+ }
+#endif
for (y = 0; y < height; ++y) {
I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);
@@ -272,6 +280,14 @@ static int I422ToARGBMatrix(const uint8* src_y, int src_stride_y,
I422ToARGBRow = I422ToARGBRow_DSPR2;
}
#endif
+#if defined(HAS_I422TOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ I422ToARGBRow = I422ToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ I422ToARGBRow = I422ToARGBRow_MSA;
+ }
+ }
+#endif
for (y = 0; y < height; ++y) {
I422ToARGBRow(src_y, src_u, src_v, dst_argb, yuvconstants, width);

Powered by Google App Engine
This is Rietveld 408576698