From: James Zern Date: Wed, 19 Jun 2013 02:15:56 +0000 (-0700) Subject: variance_test: use REGISTER_STATE_CHECK X-Git-Tag: v1.3.0~1046 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=cc774c8bb07ad14b07326e7d13abca17bec05b58;p=platform%2Fupstream%2Flibvpx.git variance_test: use REGISTER_STATE_CHECK Change-Id: Id54ad9a781634f075e990d5bade5be8490959975 --- diff --git a/test/variance_test.cc b/test/variance_test.cc index 0d53bd8..5d4eab0 100644 --- a/test/variance_test.cc +++ b/test/variance_test.cc @@ -13,6 +13,7 @@ #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/clear_system_state.h" +#include "test/register_state_check.h" #include "vpx/vpx_integer.h" #include "vpx_config.h" @@ -151,7 +152,8 @@ void VarianceTest::ZeroTest() { for (int j = 0; j <= 255; ++j) { memset(ref_, j, block_size_); unsigned int sse; - const unsigned int var = variance_(src_, width_, ref_, width_, &sse); + unsigned int var; + REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse)); EXPECT_EQ(0u, var) << "src values: " << i << "ref values: " << j; } } @@ -165,7 +167,8 @@ void VarianceTest::RefTest() { ref_[j] = rnd.Rand8(); } unsigned int sse1, sse2; - const unsigned int var1 = variance_(src_, width_, ref_, width_, &sse1); + unsigned int var1; + REGISTER_STATE_CHECK(var1 = variance_(src_, width_, ref_, width_, &sse1)); const unsigned int var2 = variance_ref(src_, ref_, log2width_, log2height_, &sse2); EXPECT_EQ(sse1, sse2); @@ -180,7 +183,8 @@ void VarianceTest::OneQuarterTest() { memset(ref_, 255, half); memset(ref_ + half, 0, half); unsigned int sse; - const unsigned int var = variance_(src_, width_, ref_, width_, &sse); + unsigned int var; + REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse)); const unsigned int expected = block_size_ * 255 * 255 / 4; EXPECT_EQ(expected, var); } @@ -238,8 +242,9 @@ void SubpelVarianceTest::RefTest() { ref_[j] = rnd.Rand8(); } unsigned int sse1, sse2; - const unsigned int var1 = subpel_variance_(ref_, width_ + 1, x, y, - src_, width_, &sse1); + unsigned int var1; + REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1, x, y, + src_, width_, &sse1)); const unsigned int var2 = subpel_variance_ref(ref_, src_, log2width_, log2height_, x, y, &sse2); EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y; @@ -260,8 +265,9 @@ void SubpelVarianceTest::RefTest() { ref_[j] = rnd.Rand8(); } unsigned int sse1, sse2; - const unsigned int var1 = subpel_variance_(ref_, width_ + 1, x, y, - src_, width_, &sse1, sec_); + unsigned int var1; + REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1, x, y, + src_, width_, &sse1, sec_)); const unsigned int var2 = subpel_avg_variance_ref(ref_, src_, sec_, log2width_, log2height_, x, y, &sse2);