| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2014 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 virtual void TearDown() { libvpx_test::ClearSystemState(); } | 50 virtual void TearDown() { libvpx_test::ClearSystemState(); } |
| 51 | 51 |
| 52 protected: | 52 protected: |
| 53 vpx_bit_depth_t bit_depth_; | 53 vpx_bit_depth_t bit_depth_; |
| 54 ErrorBlockFunc error_block_op_; | 54 ErrorBlockFunc error_block_op_; |
| 55 ErrorBlockFunc ref_error_block_op_; | 55 ErrorBlockFunc ref_error_block_op_; |
| 56 }; | 56 }; |
| 57 | 57 |
| 58 TEST_P(ErrorBlockTest, OperationCheck) { | 58 TEST_P(ErrorBlockTest, OperationCheck) { |
| 59 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 59 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 60 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, 4096); | 60 DECLARE_ALIGNED(16, tran_low_t, coeff[4096]); |
| 61 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff, 4096); | 61 DECLARE_ALIGNED(16, tran_low_t, dqcoeff[4096]); |
| 62 int err_count_total = 0; | 62 int err_count_total = 0; |
| 63 int first_failure = -1; | 63 int first_failure = -1; |
| 64 intptr_t block_size; | 64 intptr_t block_size; |
| 65 int64_t ssz; | 65 int64_t ssz; |
| 66 int64_t ret; | 66 int64_t ret; |
| 67 int64_t ref_ssz; | 67 int64_t ref_ssz; |
| 68 int64_t ref_ret; | 68 int64_t ref_ret; |
| 69 for (int i = 0; i < kNumIterations; ++i) { | 69 for (int i = 0; i < kNumIterations; ++i) { |
| 70 int err_count = 0; | 70 int err_count = 0; |
| 71 block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64 | 71 block_size = 16 << (i % 9); // All block sizes from 4x4, 8x4 ..64x64 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 83 } | 83 } |
| 84 err_count_total += err_count; | 84 err_count_total += err_count; |
| 85 } | 85 } |
| 86 EXPECT_EQ(0, err_count_total) | 86 EXPECT_EQ(0, err_count_total) |
| 87 << "Error: Error Block Test, C output doesn't match SSE2 output. " | 87 << "Error: Error Block Test, C output doesn't match SSE2 output. " |
| 88 << "First failed at test case " << first_failure; | 88 << "First failed at test case " << first_failure; |
| 89 } | 89 } |
| 90 | 90 |
| 91 TEST_P(ErrorBlockTest, ExtremeValues) { | 91 TEST_P(ErrorBlockTest, ExtremeValues) { |
| 92 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 92 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 93 DECLARE_ALIGNED_ARRAY(16, tran_low_t, coeff, 4096); | 93 DECLARE_ALIGNED(16, tran_low_t, coeff[4096]); |
| 94 DECLARE_ALIGNED_ARRAY(16, tran_low_t, dqcoeff, 4096); | 94 DECLARE_ALIGNED(16, tran_low_t, dqcoeff[4096]); |
| 95 int err_count_total = 0; | 95 int err_count_total = 0; |
| 96 int first_failure = -1; | 96 int first_failure = -1; |
| 97 intptr_t block_size; | 97 intptr_t block_size; |
| 98 int64_t ssz; | 98 int64_t ssz; |
| 99 int64_t ret; | 99 int64_t ret; |
| 100 int64_t ref_ssz; | 100 int64_t ref_ssz; |
| 101 int64_t ref_ret; | 101 int64_t ref_ret; |
| 102 int max_val = ((1 << 20) - 1); | 102 int max_val = ((1 << 20) - 1); |
| 103 for (int i = 0; i < kNumIterations; ++i) { | 103 for (int i = 0; i < kNumIterations; ++i) { |
| 104 int err_count = 0; | 104 int err_count = 0; |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 141 ::testing::Values( | 141 ::testing::Values( |
| 142 make_tuple(&vp9_highbd_block_error_sse2, | 142 make_tuple(&vp9_highbd_block_error_sse2, |
| 143 &vp9_highbd_block_error_c, VPX_BITS_10), | 143 &vp9_highbd_block_error_c, VPX_BITS_10), |
| 144 make_tuple(&vp9_highbd_block_error_sse2, | 144 make_tuple(&vp9_highbd_block_error_sse2, |
| 145 &vp9_highbd_block_error_c, VPX_BITS_12), | 145 &vp9_highbd_block_error_c, VPX_BITS_12), |
| 146 make_tuple(&vp9_highbd_block_error_sse2, | 146 make_tuple(&vp9_highbd_block_error_sse2, |
| 147 &vp9_highbd_block_error_c, VPX_BITS_8))); | 147 &vp9_highbd_block_error_c, VPX_BITS_8))); |
| 148 #endif // HAVE_SSE2 | 148 #endif // HAVE_SSE2 |
| 149 #endif // CONFIG_VP9_HIGHBITDEPTH | 149 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 150 } // namespace | 150 } // namespace |
| OLD | NEW |