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

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

Issue 390713002: libvpx: Pull from upstream (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/deps/third_party/libvpx/
Patch Set: libvpx: Pull from upstream Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « source/libvpx/test/sixtap_predict_test.cc ('k') | source/libvpx/test/test.mk » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 75
76 // set predictor 76 // set predictor
77 uint8_t *predictor = bd.predictor; 77 uint8_t *predictor = bd.predictor;
78 for (int r = 0; r < kBlockHeight; ++r) { 78 for (int r = 0; r < kBlockHeight; ++r) {
79 for (int c = 0; c < kBlockWidth; ++c) { 79 for (int c = 0; c < kBlockWidth; ++c) {
80 predictor[c] = rnd.Rand8(); 80 predictor[c] = rnd.Rand8();
81 } 81 }
82 predictor += kDiffPredStride; 82 predictor += kDiffPredStride;
83 } 83 }
84 84
85 REGISTER_STATE_CHECK(GetParam()(&be, &bd, kDiffPredStride)); 85 ASM_REGISTER_STATE_CHECK(GetParam()(&be, &bd, kDiffPredStride));
86 86
87 base_src = *be.base_src; 87 base_src = *be.base_src;
88 src_diff = be.src_diff; 88 src_diff = be.src_diff;
89 predictor = bd.predictor; 89 predictor = bd.predictor;
90 for (int r = 0; r < kBlockHeight; ++r) { 90 for (int r = 0; r < kBlockHeight; ++r) {
91 for (int c = 0; c < kBlockWidth; ++c) { 91 for (int c = 0; c < kBlockWidth; ++c) {
92 EXPECT_EQ(base_src[c], (src_diff[c] + predictor[c])) << "r = " << r 92 EXPECT_EQ(base_src[c], (src_diff[c] + predictor[c])) << "r = " << r
93 << ", c = " << c; 93 << ", c = " << c;
94 } 94 }
95 src_diff += kDiffPredStride; 95 src_diff += kDiffPredStride;
(...skipping 18 matching lines...) Expand all
114 INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest, 114 INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest,
115 ::testing::Values(vp8_subtract_b_mmx)); 115 ::testing::Values(vp8_subtract_b_mmx));
116 #endif 116 #endif
117 117
118 #if HAVE_SSE2 118 #if HAVE_SSE2
119 INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest, 119 INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest,
120 ::testing::Values(vp8_subtract_b_sse2)); 120 ::testing::Values(vp8_subtract_b_sse2));
121 #endif 121 #endif
122 122
123 } // namespace 123 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/sixtap_predict_test.cc ('k') | source/libvpx/test/test.mk » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698