OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2010 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2010 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 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
246 uint8_t* ConvolveTest::input_ = NULL; | 246 uint8_t* ConvolveTest::input_ = NULL; |
247 uint8_t* ConvolveTest::output_ = NULL; | 247 uint8_t* ConvolveTest::output_ = NULL; |
248 | 248 |
249 TEST_P(ConvolveTest, GuardBlocks) { | 249 TEST_P(ConvolveTest, GuardBlocks) { |
250 CheckGuardBlocks(); | 250 CheckGuardBlocks(); |
251 } | 251 } |
252 | 252 |
253 TEST_P(ConvolveTest, CopyHoriz) { | 253 TEST_P(ConvolveTest, CopyHoriz) { |
254 uint8_t* const in = input(); | 254 uint8_t* const in = input(); |
255 uint8_t* const out = output(); | 255 uint8_t* const out = output(); |
256 const int16_t filter8[8] = {0, 0, 0, 128, 0, 0, 0, 0}; | 256 DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
257 | 257 |
258 REGISTER_STATE_CHECK( | 258 REGISTER_STATE_CHECK( |
259 UUT_->h8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, | 259 UUT_->h8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
260 Width(), Height())); | 260 Width(), Height())); |
261 | 261 |
262 CheckGuardBlocks(); | 262 CheckGuardBlocks(); |
263 | 263 |
264 for (int y = 0; y < Height(); ++y) | 264 for (int y = 0; y < Height(); ++y) |
265 for (int x = 0; x < Width(); ++x) | 265 for (int x = 0; x < Width(); ++x) |
266 ASSERT_EQ(out[y * kOutputStride + x], in[y * kInputStride + x]) | 266 ASSERT_EQ(out[y * kOutputStride + x], in[y * kInputStride + x]) |
267 << "(" << x << "," << y << ")"; | 267 << "(" << x << "," << y << ")"; |
268 } | 268 } |
269 | 269 |
270 TEST_P(ConvolveTest, CopyVert) { | 270 TEST_P(ConvolveTest, CopyVert) { |
271 uint8_t* const in = input(); | 271 uint8_t* const in = input(); |
272 uint8_t* const out = output(); | 272 uint8_t* const out = output(); |
273 const int16_t filter8[8] = {0, 0, 0, 128, 0, 0, 0, 0}; | 273 DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
274 | 274 |
275 REGISTER_STATE_CHECK( | 275 REGISTER_STATE_CHECK( |
276 UUT_->v8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, | 276 UUT_->v8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
277 Width(), Height())); | 277 Width(), Height())); |
278 | 278 |
279 CheckGuardBlocks(); | 279 CheckGuardBlocks(); |
280 | 280 |
281 for (int y = 0; y < Height(); ++y) | 281 for (int y = 0; y < Height(); ++y) |
282 for (int x = 0; x < Width(); ++x) | 282 for (int x = 0; x < Width(); ++x) |
283 ASSERT_EQ(out[y * kOutputStride + x], in[y * kInputStride + x]) | 283 ASSERT_EQ(out[y * kOutputStride + x], in[y * kInputStride + x]) |
284 << "(" << x << "," << y << ")"; | 284 << "(" << x << "," << y << ")"; |
285 } | 285 } |
286 | 286 |
287 TEST_P(ConvolveTest, Copy2D) { | 287 TEST_P(ConvolveTest, Copy2D) { |
288 uint8_t* const in = input(); | 288 uint8_t* const in = input(); |
289 uint8_t* const out = output(); | 289 uint8_t* const out = output(); |
290 const int16_t filter8[8] = {0, 0, 0, 128, 0, 0, 0, 0}; | 290 DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
291 | 291 |
292 REGISTER_STATE_CHECK( | 292 REGISTER_STATE_CHECK( |
293 UUT_->hv8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, | 293 UUT_->hv8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
294 Width(), Height())); | 294 Width(), Height())); |
295 | 295 |
296 CheckGuardBlocks(); | 296 CheckGuardBlocks(); |
297 | 297 |
298 for (int y = 0; y < Height(); ++y) | 298 for (int y = 0; y < Height(); ++y) |
299 for (int x = 0; x < Width(); ++x) | 299 for (int x = 0; x < Width(); ++x) |
300 ASSERT_EQ(out[y * kOutputStride + x], in[y * kInputStride + x]) | 300 ASSERT_EQ(out[y * kOutputStride + x], in[y * kInputStride + x]) |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
540 make_tuple(8, 16, &convolve8_ssse3), | 540 make_tuple(8, 16, &convolve8_ssse3), |
541 make_tuple(16, 16, &convolve8_ssse3), | 541 make_tuple(16, 16, &convolve8_ssse3), |
542 make_tuple(32, 16, &convolve8_ssse3), | 542 make_tuple(32, 16, &convolve8_ssse3), |
543 make_tuple(16, 32, &convolve8_ssse3), | 543 make_tuple(16, 32, &convolve8_ssse3), |
544 make_tuple(32, 32, &convolve8_ssse3), | 544 make_tuple(32, 32, &convolve8_ssse3), |
545 make_tuple(64, 32, &convolve8_ssse3), | 545 make_tuple(64, 32, &convolve8_ssse3), |
546 make_tuple(32, 64, &convolve8_ssse3), | 546 make_tuple(32, 64, &convolve8_ssse3), |
547 make_tuple(64, 64, &convolve8_ssse3))); | 547 make_tuple(64, 64, &convolve8_ssse3))); |
548 #endif | 548 #endif |
549 } // namespace | 549 } // namespace |
OLD | NEW |