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

Unified Diff: source/convert_argb.cc

Issue 2636483002: Add MSA optimized NV12/21 To RGB row functions (Closed)
Patch Set: Incorporated review comments Created 3 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 | « include/libyuv/row.h ('k') | source/planar_functions.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/convert_argb.cc
diff --git a/source/convert_argb.cc b/source/convert_argb.cc
index ccb3766c57d8ef11671fc24b6efb8df4be4240ed..f7d0765e036324c3a5498581d1ca16195a8f2881 100644
--- a/source/convert_argb.cc
+++ b/source/convert_argb.cc
@@ -1326,6 +1326,14 @@ int NV12ToARGB(const uint8* src_y,
}
}
#endif
+#if defined(HAS_NV12TOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ NV12ToARGBRow = NV12ToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ NV12ToARGBRow = NV12ToARGBRow_MSA;
+ }
+ }
+#endif
for (y = 0; y < height; ++y) {
NV12ToARGBRow(src_y, src_uv, dst_argb, &kYuvI601Constants, width);
@@ -1385,6 +1393,14 @@ int NV21ToARGB(const uint8* src_y,
}
}
#endif
+#if defined(HAS_NV21TOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ NV21ToARGBRow = NV21ToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ NV21ToARGBRow = NV21ToARGBRow_MSA;
+ }
+ }
+#endif
for (y = 0; y < height; ++y) {
NV21ToARGBRow(src_y, src_uv, dst_argb, &kYuvI601Constants, width);
@@ -1450,6 +1466,14 @@ int M420ToARGB(const uint8* src_m420,
}
}
#endif
+#if defined(HAS_NV12TOARGBROW_MSA)
+ if (TestCpuFlag(kCpuHasMSA)) {
+ NV12ToARGBRow = NV12ToARGBRow_Any_MSA;
+ if (IS_ALIGNED(width, 8)) {
+ NV12ToARGBRow = NV12ToARGBRow_MSA;
+ }
+ }
+#endif
for (y = 0; y < height - 1; y += 2) {
NV12ToARGBRow(src_m420, src_m420 + src_stride_m420 * 2, dst_argb,
« no previous file with comments | « include/libyuv/row.h ('k') | source/planar_functions.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698