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

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

Issue 168343002: 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, 10 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/resize_test.cc ('k') | source/libvpx/test/svc_test.cc » ('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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 for (int i = 0; kSrcStride[i] > 0; ++i) { 52 for (int i = 0; kSrcStride[i] > 0; ++i) {
53 // start at block0 53 // start at block0
54 be.src = 0; 54 be.src = 0;
55 be.base_src = &source; 55 be.base_src = &source;
56 be.src_stride = kSrcStride[i]; 56 be.src_stride = kSrcStride[i];
57 57
58 // set difference 58 // set difference
59 int16_t *src_diff = be.src_diff; 59 int16_t *src_diff = be.src_diff;
60 for (int r = 0; r < kBlockHeight; ++r) { 60 for (int r = 0; r < kBlockHeight; ++r) {
61 for (int c = 0; c < kBlockWidth; ++c) { 61 for (int c = 0; c < kBlockWidth; ++c) {
62 src_diff[c] = static_cast<int16_t>(0xa5a5); 62 src_diff[c] = static_cast<int16_t>(0xa5a5u);
63 } 63 }
64 src_diff += kDiffPredStride; 64 src_diff += kDiffPredStride;
65 } 65 }
66 66
67 // set destination 67 // set destination
68 uint8_t *base_src = *be.base_src; 68 uint8_t *base_src = *be.base_src;
69 for (int r = 0; r < kBlockHeight; ++r) { 69 for (int r = 0; r < kBlockHeight; ++r) {
70 for (int c = 0; c < kBlockWidth; ++c) { 70 for (int c = 0; c < kBlockWidth; ++c) {
71 base_src[c] = rnd.Rand8(); 71 base_src[c] = rnd.Rand8();
72 } 72 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
109 INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest, 109 INSTANTIATE_TEST_CASE_P(MMX, SubtractBlockTest,
110 ::testing::Values(vp8_subtract_b_mmx)); 110 ::testing::Values(vp8_subtract_b_mmx));
111 #endif 111 #endif
112 112
113 #if HAVE_SSE2 113 #if HAVE_SSE2
114 INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest, 114 INSTANTIATE_TEST_CASE_P(SSE2, SubtractBlockTest,
115 ::testing::Values(vp8_subtract_b_sse2)); 115 ::testing::Values(vp8_subtract_b_sse2));
116 #endif 116 #endif
117 117
118 } // namespace 118 } // namespace
OLDNEW
« no previous file with comments | « source/libvpx/test/resize_test.cc ('k') | source/libvpx/test/svc_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698