Commit 12084cd0 authored by Frank Barchard's avatar Frank Barchard Committed by Frank Barchard

SSSE3 scaling test detect SSSE3 before running

Bug: libyuv:755
Test: ~/intelsde/sde -p4p -- out/Release/libyuv_unittest --gtest_filter=LibYUVScaleTest*
Change-Id: Ibb0c908c38efc49dc56e86fa54ae7bd48ced02b5
Reviewed-on: https://chromium-review.googlesource.com/756363Reviewed-by: 's avatarCheng Wang <wangcheng@google.com>
parent 522fd699
......@@ -366,7 +366,7 @@ TEST_SCALETO(Scale, 1280, 720)
#undef TEST_SCALETO
#ifdef HAS_SCALEROWDOWN2_SSSE3
TEST_F(LibYUVScaleTest, TestScaleOdd) {
TEST_F(LibYUVScaleTest, TestScaleRowDown2Box_Odd_SSSE3) {
SIMD_ALIGNED(uint8 orig_pixels[128 * 2]);
SIMD_ALIGNED(uint8 dst_pixels_opt[64]);
SIMD_ALIGNED(uint8 dst_pixels_c[64]);
......@@ -374,6 +374,10 @@ TEST_F(LibYUVScaleTest, TestScaleOdd) {
memset(dst_pixels_opt, 0, sizeof(dst_pixels_opt));
memset(dst_pixels_c, 0, sizeof(dst_pixels_c));
int has_ssse3 = TestCpuFlag(kCpuHasSSSE3);
if (!has_ssse3) {
printf("Warning SSSE3 not detected; Skipping test.\n");
} else {
// TL
orig_pixels[0] = 255u;
orig_pixels[1] = 0u;
......@@ -447,6 +451,7 @@ TEST_F(LibYUVScaleTest, TestScaleOdd) {
for (int i = 0; i < 64; ++i) {
EXPECT_EQ(dst_pixels_c[i], dst_pixels_opt[i]);
}
}
}
#endif // HAS_SCALEROWDOWN2_SSSE3
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment