Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(136)

Side by Side Diff: source/libvpx/test/vp9_denoiser_sse2_test.cc

Issue 1124333011: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: only update to last nights LKGR Created 5 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 45
46 TEST_P(VP9DenoiserTest, BitexactCheck) { 46 TEST_P(VP9DenoiserTest, BitexactCheck) {
47 ACMRandom rnd(ACMRandom::DeterministicSeed()); 47 ACMRandom rnd(ACMRandom::DeterministicSeed());
48 const int count_test_block = 4000; 48 const int count_test_block = 4000;
49 49
50 // Allocate the space for input and output, 50 // Allocate the space for input and output,
51 // where sig_block is the block to be denoised, 51 // where sig_block is the block to be denoised,
52 // mc_avg_block is the denoised reference block, 52 // mc_avg_block is the denoised reference block,
53 // avg_block_c is the denoised result from C code, 53 // avg_block_c is the denoised result from C code,
54 // avg_block_sse2 is the denoised result from SSE2 code. 54 // avg_block_sse2 is the denoised result from SSE2 code.
55 DECLARE_ALIGNED_ARRAY(16, uint8_t, sig_block, kNumPixels); 55 DECLARE_ALIGNED(16, uint8_t, sig_block[kNumPixels]);
56 DECLARE_ALIGNED_ARRAY(16, uint8_t, mc_avg_block, kNumPixels); 56 DECLARE_ALIGNED(16, uint8_t, mc_avg_block[kNumPixels]);
57 DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_c, kNumPixels); 57 DECLARE_ALIGNED(16, uint8_t, avg_block_c[kNumPixels]);
58 DECLARE_ALIGNED_ARRAY(16, uint8_t, avg_block_sse2, kNumPixels); 58 DECLARE_ALIGNED(16, uint8_t, avg_block_sse2[kNumPixels]);
59 59
60 for (int i = 0; i < count_test_block; ++i) { 60 for (int i = 0; i < count_test_block; ++i) {
61 // Generate random motion magnitude, 20% of which exceed the threshold. 61 // Generate random motion magnitude, 20% of which exceed the threshold.
62 const int motion_magnitude_random = 62 const int motion_magnitude_random =
63 rnd.Rand8() % static_cast<int>(MOTION_MAGNITUDE_THRESHOLD * 1.2); 63 rnd.Rand8() % static_cast<int>(MOTION_MAGNITUDE_THRESHOLD * 1.2);
64 64
65 // Initialize a test block with random number in range [0, 255]. 65 // Initialize a test block with random number in range [0, 255].
66 for (int j = 0; j < kNumPixels; ++j) { 66 for (int j = 0; j < kNumPixels; ++j) {
67 int temp = 0; 67 int temp = 0;
68 sig_block[j] = rnd.Rand8(); 68 sig_block[j] = rnd.Rand8();
(...skipping 23 matching lines...) Expand all
92 } 92 }
93 93
94 // Test for all block size. 94 // Test for all block size.
95 INSTANTIATE_TEST_CASE_P( 95 INSTANTIATE_TEST_CASE_P(
96 SSE2, VP9DenoiserTest, 96 SSE2, VP9DenoiserTest,
97 ::testing::Values(BLOCK_4X4, BLOCK_4X8, BLOCK_8X4, BLOCK_8X8, 97 ::testing::Values(BLOCK_4X4, BLOCK_4X8, BLOCK_8X4, BLOCK_8X8,
98 BLOCK_8X16, BLOCK_16X8, BLOCK_16X16, BLOCK_16X32, 98 BLOCK_8X16, BLOCK_16X8, BLOCK_16X16, BLOCK_16X32,
99 BLOCK_32X16, BLOCK_32X32, BLOCK_32X64, BLOCK_64X32, 99 BLOCK_32X16, BLOCK_32X32, BLOCK_32X64, BLOCK_64X32,
100 BLOCK_64X64)); 100 BLOCK_64X64));
101 } // namespace 101 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/vp8_denoiser_sse2_test.cc ('k') | source/libvpx/test/vp9_error_block_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698