diff options
author | clang-format <noreply@google.com> | 2016-07-25 22:50:48 -0700 |
---|---|---|
committer | James Zern <jzern@google.com> | 2016-07-27 01:58:52 +0000 |
commit | 33e40cb5db12309b69ef40e84b2ed522a54da09e (patch) | |
tree | d9772b1e118a04162b551bdfd53233725a916ab5 /test/vp9_error_block_test.cc | |
parent | e4290800b21478a3f9548c58b4f15c5ba5393073 (diff) | |
download | libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.tar libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.tar.gz libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.tar.bz2 libvpx-33e40cb5db12309b69ef40e84b2ed522a54da09e.zip |
test: apply clang-format
Change-Id: I0d9ab85855eb723f653a7bb09b3d0d31dd6cfd2f
Diffstat (limited to 'test/vp9_error_block_test.cc')
-rw-r--r-- | test/vp9_error_block_test.cc | 54 |
1 files changed, 26 insertions, 28 deletions
diff --git a/test/vp9_error_block_test.cc b/test/vp9_error_block_test.cc index 7b1d84b45..74436c09e 100644 --- a/test/vp9_error_block_test.cc +++ b/test/vp9_error_block_test.cc @@ -32,11 +32,10 @@ const int kNumIterations = 1000; typedef int64_t (*ErrorBlockFunc)(const tran_low_t *coeff, const tran_low_t *dqcoeff, - intptr_t block_size, - int64_t *ssz, int bps); + intptr_t block_size, int64_t *ssz, int bps); typedef std::tr1::tuple<ErrorBlockFunc, ErrorBlockFunc, vpx_bit_depth_t> - ErrorBlockParam; + ErrorBlockParam; // wrapper for 8-bit block error functions without a 'bps' param. typedef int64_t (*HighBdBlockError8bit)(const tran_low_t *coeff, @@ -51,14 +50,13 @@ int64_t HighBdBlockError8bitWrapper(const tran_low_t *coeff, return fn(coeff, dqcoeff, block_size, ssz); } -class ErrorBlockTest - : public ::testing::TestWithParam<ErrorBlockParam> { +class ErrorBlockTest : public ::testing::TestWithParam<ErrorBlockParam> { public: virtual ~ErrorBlockTest() {} virtual void SetUp() { - error_block_op_ = GET_PARAM(0); + error_block_op_ = GET_PARAM(0); ref_error_block_op_ = GET_PARAM(1); - bit_depth_ = GET_PARAM(2); + bit_depth_ = GET_PARAM(2); } virtual void TearDown() { libvpx_test::ClearSystemState(); } @@ -89,18 +87,18 @@ TEST_P(ErrorBlockTest, OperationCheck) { // can be used for optimization, so generate test input precisely. if (rnd(2)) { // Positive number - coeff[j] = rnd(1 << msb); + coeff[j] = rnd(1 << msb); dqcoeff[j] = rnd(1 << msb); } else { // Negative number - coeff[j] = -rnd(1 << msb); + coeff[j] = -rnd(1 << msb); dqcoeff[j] = -rnd(1 << msb); } } - ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz, - bit_depth_); - ASM_REGISTER_STATE_CHECK(ret = error_block_op_(coeff, dqcoeff, block_size, - &ssz, bit_depth_)); + ref_ret = + ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz, bit_depth_); + ASM_REGISTER_STATE_CHECK( + ret = error_block_op_(coeff, dqcoeff, block_size, &ssz, bit_depth_)); err_count += (ref_ret != ret) | (ref_ssz != ssz); if (err_count && !err_count_total) { first_failure = i; @@ -130,35 +128,35 @@ TEST_P(ErrorBlockTest, ExtremeValues) { int k = (i / 9) % 9; // Change the maximum coeff value, to test different bit boundaries - if ( k == 8 && (i % 9) == 0 ) { + if (k == 8 && (i % 9) == 0) { max_val >>= 1; } block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64 for (int j = 0; j < block_size; j++) { if (k < 4) { // Test at positive maximum values - coeff[j] = k % 2 ? max_val : 0; + coeff[j] = k % 2 ? max_val : 0; dqcoeff[j] = (k >> 1) % 2 ? max_val : 0; } else if (k < 8) { // Test at negative maximum values - coeff[j] = k % 2 ? -max_val : 0; + coeff[j] = k % 2 ? -max_val : 0; dqcoeff[j] = (k >> 1) % 2 ? -max_val : 0; } else { if (rnd(2)) { // Positive number - coeff[j] = rnd(1 << 14); + coeff[j] = rnd(1 << 14); dqcoeff[j] = rnd(1 << 14); } else { // Negative number - coeff[j] = -rnd(1 << 14); + coeff[j] = -rnd(1 << 14); dqcoeff[j] = -rnd(1 << 14); } } } - ref_ret = ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz, - bit_depth_); - ASM_REGISTER_STATE_CHECK(ret = error_block_op_(coeff, dqcoeff, block_size, - &ssz, bit_depth_)); + ref_ret = + ref_error_block_op_(coeff, dqcoeff, block_size, &ref_ssz, bit_depth_); + ASM_REGISTER_STATE_CHECK( + ret = error_block_op_(coeff, dqcoeff, block_size, &ssz, bit_depth_)); err_count += (ref_ret != ret) | (ref_ssz != ssz); if (err_count && !err_count_total) { first_failure = i; @@ -176,12 +174,12 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( SSE2, ErrorBlockTest, ::testing::Values( - make_tuple(&vp9_highbd_block_error_sse2, - &vp9_highbd_block_error_c, VPX_BITS_10), - make_tuple(&vp9_highbd_block_error_sse2, - &vp9_highbd_block_error_c, VPX_BITS_12), - make_tuple(&vp9_highbd_block_error_sse2, - &vp9_highbd_block_error_c, VPX_BITS_8), + make_tuple(&vp9_highbd_block_error_sse2, &vp9_highbd_block_error_c, + VPX_BITS_10), + make_tuple(&vp9_highbd_block_error_sse2, &vp9_highbd_block_error_c, + VPX_BITS_12), + make_tuple(&vp9_highbd_block_error_sse2, &vp9_highbd_block_error_c, + VPX_BITS_8), make_tuple( &HighBdBlockError8bitWrapper<vp9_highbd_block_error_8bit_sse2>, &HighBdBlockError8bitWrapper<vp9_highbd_block_error_8bit_c>, |