| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 302 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 313 } | 313 } |
| 314 | 314 |
| 315 int tx_type_; | 315 int tx_type_; |
| 316 void (*fwd_txfm)(int16_t*, int16_t*, uint8_t*, int, int); | 316 void (*fwd_txfm)(int16_t*, int16_t*, uint8_t*, int, int); |
| 317 void (*inv_txfm)(int16_t*, int16_t*, uint8_t*, int, int); | 317 void (*inv_txfm)(int16_t*, int16_t*, uint8_t*, int, int); |
| 318 }; | 318 }; |
| 319 | 319 |
| 320 TEST_P(FwdTrans16x16Test, AccuracyCheck) { | 320 TEST_P(FwdTrans16x16Test, AccuracyCheck) { |
| 321 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 321 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 322 int max_error = 0; | 322 int max_error = 0; |
| 323 double total_error = 0; | 323 int total_error = 0; |
| 324 const int count_test_block = 10000; | 324 const int count_test_block = 10000; |
| 325 for (int i = 0; i < count_test_block; ++i) { | 325 for (int i = 0; i < count_test_block; ++i) { |
| 326 DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 256); | 326 DECLARE_ALIGNED_ARRAY(16, int16_t, test_input_block, 256); |
| 327 DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, 256); | 327 DECLARE_ALIGNED_ARRAY(16, int16_t, test_temp_block, 256); |
| 328 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 256); | 328 DECLARE_ALIGNED_ARRAY(16, uint8_t, dst, 256); |
| 329 DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 256); | 329 DECLARE_ALIGNED_ARRAY(16, uint8_t, src, 256); |
| 330 | 330 |
| 331 for (int j = 0; j < 256; ++j) { | 331 for (int j = 0; j < 256; ++j) { |
| 332 src[j] = rnd.Rand8(); | 332 src[j] = rnd.Rand8(); |
| 333 dst[j] = rnd.Rand8(); | 333 dst[j] = rnd.Rand8(); |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 415 const int diff = dst[j] - src[j]; | 415 const int diff = dst[j] - src[j]; |
| 416 const int error = diff * diff; | 416 const int error = diff * diff; |
| 417 EXPECT_GE(1, error) | 417 EXPECT_GE(1, error) |
| 418 << "Error: 16x16 IDCT has error " << error | 418 << "Error: 16x16 IDCT has error " << error |
| 419 << " at index " << j; | 419 << " at index " << j; |
| 420 } | 420 } |
| 421 } | 421 } |
| 422 } | 422 } |
| 423 | 423 |
| 424 } // namespace | 424 } // namespace |
| OLD | NEW |