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

Unified Diff: source/row_common.cc

Issue 1355733002: scale test (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: move abgr support to its own 32 bit intel specific ifdefs Created 5 years, 3 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 | « source/row_any.cc ('k') | source/row_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/row_common.cc
diff --git a/source/row_common.cc b/source/row_common.cc
index 5f4aa3714a33d73463223bc91cec7cfc9a254191..13195684cabc130e0da3d8728caa8d9fecce7112 100644
--- a/source/row_common.cc
+++ b/source/row_common.cc
@@ -1149,6 +1149,30 @@ void I444ToARGBRow_C(const uint8* src_y,
rgb_buf + 0, rgb_buf + 1, rgb_buf + 2);
}
}
+
+void I444ToABGRRow_C(const uint8* src_y,
+ const uint8* src_u,
+ const uint8* src_v,
+ uint8* rgb_buf,
+ int width) {
+ int x;
+ for (x = 0; x < width - 1; x += 2) {
+ uint8 u = (src_u[0] + src_u[1] + 1) >> 1;
+ uint8 v = (src_v[0] + src_v[1] + 1) >> 1;
+ YuvPixel(src_y[0], u, v, rgb_buf + 2, rgb_buf + 1, rgb_buf + 0);
+ rgb_buf[3] = 255;
+ YuvPixel(src_y[1], u, v, rgb_buf + 6, rgb_buf + 5, rgb_buf + 4);
+ rgb_buf[7] = 255;
+ src_y += 2;
+ src_u += 2;
+ src_v += 2;
+ rgb_buf += 8; // Advance 2 pixels.
+ }
+ if (width & 1) {
+ YuvPixel(src_y[0], src_u[0], src_v[0],
+ rgb_buf + 2, rgb_buf + 1, rgb_buf + 0);
+ }
+}
#else
void I444ToARGBRow_C(const uint8* src_y,
const uint8* src_u,
@@ -1166,6 +1190,23 @@ void I444ToARGBRow_C(const uint8* src_y,
rgb_buf += 4; // Advance 1 pixel.
}
}
+
+void I444ToABGRRow_C(const uint8* src_y,
+ const uint8* src_u,
+ const uint8* src_v,
+ uint8* rgb_buf,
+ int width) {
+ int x;
+ for (x = 0; x < width; ++x) {
+ YuvPixel(src_y[0], src_u[0], src_v[0],
+ rgb_buf + 2, rgb_buf + 1, rgb_buf + 0);
+ rgb_buf[3] = 255;
+ src_y += 1;
+ src_u += 1;
+ src_v += 1;
+ rgb_buf += 4; // Advance 1 pixel.
+ }
+}
#endif
// Also used for 420
@@ -2319,6 +2360,19 @@ ANYYUV(I422ToABGRRow_AVX2, I422ToABGRMatrixRow_AVX2, kYuvConstants)
ANYYUV(J422ToABGRRow_AVX2, I422ToABGRMatrixRow_AVX2, kYuvJConstants)
ANYYUV(H422ToABGRRow_AVX2, I422ToABGRMatrixRow_AVX2, kYuvHConstants)
#endif
+// TODO(fbarchard): Neon, J444, H444 versions.
+#ifdef HAS_I444TOARGBMATRIXROW_SSSE3
+ANYYUV(I444ToARGBRow_SSSE3, I444ToARGBMatrixRow_SSSE3, kYuvConstants)
+#endif
+#ifdef HAS_I444TOARGBMATRIXROW_AVX2
+ANYYUV(I444ToARGBRow_AVX2, I444ToARGBMatrixRow_AVX2, kYuvConstants)
+#endif
+#ifdef HAS_I444TOABGRMATRIXROW_SSSE3
+ANYYUV(I444ToABGRRow_SSSE3, I444ToABGRMatrixRow_SSSE3, kYuvConstants)
+#endif
+#ifdef HAS_I444TOABGRMATRIXROW_AVX2
+ANYYUV(I444ToABGRRow_AVX2, I444ToABGRMatrixRow_AVX2, kYuvConstants)
+#endif
// Maximum temporary width for wrappers to process at a time, in pixels.
#define MAXTWIDTH 2048
« no previous file with comments | « source/row_any.cc ('k') | source/row_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698