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 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 Loading... |
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 |
OLD | NEW |