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

Unified Diff: unit_test/planar_test.cc

Issue 1507683003: Add support for odd height YUVA alpha blending. (Closed) Base URL: https://chromium.googlesource.com/libyuv/libyuv@master
Patch Set: add any and invert blend tests Created 5 years 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/planar_functions.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: unit_test/planar_test.cc
diff --git a/unit_test/planar_test.cc b/unit_test/planar_test.cc
index f5a8b2129f35909d66e61d4afd78a1c3ec5b64fb..271e0cc5e75b89bc1a1b0393fd471c7889597425 100644
--- a/unit_test/planar_test.cc
+++ b/unit_test/planar_test.cc
@@ -1164,7 +1164,6 @@ TEST_F(LibYUVPlanarTest, ARGBBlend_Opt) {
}
#ifdef HAS_BLENDPLANEROW_AVX2
-// TODO(fbarchard): Switch to I420Blend.
static void TestBlendPlaneRow(int width, int height, int benchmark_iterations,
int invert, int off) {
int has_ssse3 = TestCpuFlag(kCpuHasSSSE3);
@@ -1348,6 +1347,14 @@ TEST_F(LibYUVPlanarTest, BlendPlane_Unaligned) {
TestBlendPlane(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 1);
}
+TEST_F(LibYUVPlanarTest, BlendPlane_Any) {
+ TestBlendPlane(benchmark_width_ - 4, benchmark_height_, benchmark_iterations_,
+ disable_cpu_flags_, benchmark_cpu_info_, +1, 1);
+}
+TEST_F(LibYUVPlanarTest, BlendPlane_Invert) {
+ TestBlendPlane(benchmark_width_, benchmark_height_, benchmark_iterations_,
+ disable_cpu_flags_, benchmark_cpu_info_, -1, 1);
+}
#define SUBSAMPLE(v, a) ((((v) + (a) - 1)) / (a))
@@ -1442,6 +1449,14 @@ TEST_F(LibYUVPlanarTest, I420Blend_Unaligned) {
TestI420Blend(benchmark_width_, benchmark_height_, benchmark_iterations_,
disable_cpu_flags_, benchmark_cpu_info_, +1, 1);
}
+TEST_F(LibYUVPlanarTest, I420Blend_Any) {
+ TestI420Blend(benchmark_width_ - 4, benchmark_height_, benchmark_iterations_,
+ disable_cpu_flags_, benchmark_cpu_info_, +1, 0);
+}
+TEST_F(LibYUVPlanarTest, I420Blend_Invert) {
+ TestI420Blend(benchmark_width_, benchmark_height_, benchmark_iterations_,
+ disable_cpu_flags_, benchmark_cpu_info_, -1, 0);
+}
TEST_F(LibYUVPlanarTest, TestAffine) {
SIMD_ALIGNED(uint8 orig_pixels_0[1280][4]);
« no previous file with comments | « source/planar_functions.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698