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 |
11 #include <string.h> | 11 #include <string.h> |
12 #include "test/acm_random.h" | 12 #include "test/acm_random.h" |
| 13 #include "test/clear_system_state.h" |
13 #include "test/register_state_check.h" | 14 #include "test/register_state_check.h" |
14 #include "test/util.h" | 15 #include "test/util.h" |
15 #include "third_party/googletest/src/include/gtest/gtest.h" | 16 #include "third_party/googletest/src/include/gtest/gtest.h" |
16 | 17 |
17 #include "./vpx_config.h" | 18 #include "./vpx_config.h" |
18 #include "./vp9_rtcd.h" | 19 #include "./vp9_rtcd.h" |
| 20 #include "vp9/common/vp9_common.h" |
19 #include "vp9/common/vp9_filter.h" | 21 #include "vp9/common/vp9_filter.h" |
20 #include "vpx_mem/vpx_mem.h" | 22 #include "vpx_mem/vpx_mem.h" |
21 #include "vpx_ports/mem.h" | 23 #include "vpx_ports/mem.h" |
22 | 24 |
23 namespace { | 25 namespace { |
24 | 26 |
25 static const unsigned int kMaxDimension = 64; | 27 static const unsigned int kMaxDimension = 64; |
26 | 28 |
27 typedef void (*ConvolveFunc)(const uint8_t *src, ptrdiff_t src_stride, | 29 typedef void (*ConvolveFunc)(const uint8_t *src, ptrdiff_t src_stride, |
28 uint8_t *dst, ptrdiff_t dst_stride, | 30 uint8_t *dst, ptrdiff_t dst_stride, |
29 const int16_t *filter_x, int filter_x_stride, | 31 const int16_t *filter_x, int filter_x_stride, |
30 const int16_t *filter_y, int filter_y_stride, | 32 const int16_t *filter_y, int filter_y_stride, |
31 int w, int h); | 33 int w, int h); |
32 | 34 |
33 struct ConvolveFunctions { | 35 struct ConvolveFunctions { |
34 ConvolveFunctions(ConvolveFunc h8, ConvolveFunc h8_avg, | 36 ConvolveFunctions(ConvolveFunc copy, ConvolveFunc avg, |
| 37 ConvolveFunc h8, ConvolveFunc h8_avg, |
35 ConvolveFunc v8, ConvolveFunc v8_avg, | 38 ConvolveFunc v8, ConvolveFunc v8_avg, |
36 ConvolveFunc hv8, ConvolveFunc hv8_avg, | 39 ConvolveFunc hv8, ConvolveFunc hv8_avg, |
37 int bd) | 40 int bd) |
38 : h8_(h8), v8_(v8), hv8_(hv8), h8_avg_(h8_avg), v8_avg_(v8_avg), | 41 : copy_(copy), avg_(avg), h8_(h8), v8_(v8), hv8_(hv8), h8_avg_(h8_avg), |
39 hv8_avg_(hv8_avg), use_highbd_(bd) {} | 42 v8_avg_(v8_avg), hv8_avg_(hv8_avg), use_highbd_(bd) {} |
40 | 43 |
| 44 ConvolveFunc copy_; |
| 45 ConvolveFunc avg_; |
41 ConvolveFunc h8_; | 46 ConvolveFunc h8_; |
42 ConvolveFunc v8_; | 47 ConvolveFunc v8_; |
43 ConvolveFunc hv8_; | 48 ConvolveFunc hv8_; |
44 ConvolveFunc h8_avg_; | 49 ConvolveFunc h8_avg_; |
45 ConvolveFunc v8_avg_; | 50 ConvolveFunc v8_avg_; |
46 ConvolveFunc hv8_avg_; | 51 ConvolveFunc hv8_avg_; |
47 int use_highbd_; // 0 if high bitdepth not used, else the actual bit depth. | 52 int use_highbd_; // 0 if high bitdepth not used, else the actual bit depth. |
48 }; | 53 }; |
49 | 54 |
50 typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam; | 55 typedef std::tr1::tuple<int, int, const ConvolveFunctions *> ConvolveParam; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
291 #endif // CONFIG_VP9_HIGHBITDEPTH | 296 #endif // CONFIG_VP9_HIGHBITDEPTH |
292 | 297 |
293 class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { | 298 class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { |
294 public: | 299 public: |
295 static void SetUpTestCase() { | 300 static void SetUpTestCase() { |
296 // Force input_ to be unaligned, output to be 16 byte aligned. | 301 // Force input_ to be unaligned, output to be 16 byte aligned. |
297 input_ = reinterpret_cast<uint8_t*>( | 302 input_ = reinterpret_cast<uint8_t*>( |
298 vpx_memalign(kDataAlignment, kInputBufferSize + 1)) + 1; | 303 vpx_memalign(kDataAlignment, kInputBufferSize + 1)) + 1; |
299 output_ = reinterpret_cast<uint8_t*>( | 304 output_ = reinterpret_cast<uint8_t*>( |
300 vpx_memalign(kDataAlignment, kOutputBufferSize)); | 305 vpx_memalign(kDataAlignment, kOutputBufferSize)); |
| 306 output_ref_ = reinterpret_cast<uint8_t*>( |
| 307 vpx_memalign(kDataAlignment, kOutputBufferSize)); |
301 #if CONFIG_VP9_HIGHBITDEPTH | 308 #if CONFIG_VP9_HIGHBITDEPTH |
302 input16_ = reinterpret_cast<uint16_t*>( | 309 input16_ = reinterpret_cast<uint16_t*>( |
303 vpx_memalign(kDataAlignment, | 310 vpx_memalign(kDataAlignment, |
304 (kInputBufferSize + 1) * sizeof(uint16_t))) + 1; | 311 (kInputBufferSize + 1) * sizeof(uint16_t))) + 1; |
305 output16_ = reinterpret_cast<uint16_t*>( | 312 output16_ = reinterpret_cast<uint16_t*>( |
306 vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); | 313 vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); |
| 314 output16_ref_ = reinterpret_cast<uint16_t*>( |
| 315 vpx_memalign(kDataAlignment, (kOutputBufferSize) * sizeof(uint16_t))); |
307 #endif | 316 #endif |
308 } | 317 } |
309 | 318 |
| 319 virtual void TearDown() { libvpx_test::ClearSystemState(); } |
| 320 |
310 static void TearDownTestCase() { | 321 static void TearDownTestCase() { |
311 vpx_free(input_ - 1); | 322 vpx_free(input_ - 1); |
312 input_ = NULL; | 323 input_ = NULL; |
313 vpx_free(output_); | 324 vpx_free(output_); |
314 output_ = NULL; | 325 output_ = NULL; |
| 326 vpx_free(output_ref_); |
| 327 output_ref_ = NULL; |
315 #if CONFIG_VP9_HIGHBITDEPTH | 328 #if CONFIG_VP9_HIGHBITDEPTH |
316 vpx_free(input16_ - 1); | 329 vpx_free(input16_ - 1); |
317 input16_ = NULL; | 330 input16_ = NULL; |
318 vpx_free(output16_); | 331 vpx_free(output16_); |
319 output16_ = NULL; | 332 output16_ = NULL; |
| 333 vpx_free(output16_ref_); |
| 334 output16_ref_ = NULL; |
320 #endif | 335 #endif |
321 } | 336 } |
322 | 337 |
323 protected: | 338 protected: |
324 static const int kDataAlignment = 16; | 339 static const int kDataAlignment = 16; |
325 static const int kOuterBlockSize = 256; | 340 static const int kOuterBlockSize = 256; |
326 static const int kInputStride = kOuterBlockSize; | 341 static const int kInputStride = kOuterBlockSize; |
327 static const int kOutputStride = kOuterBlockSize; | 342 static const int kOutputStride = kOuterBlockSize; |
328 static const int kInputBufferSize = kOuterBlockSize * kOuterBlockSize; | 343 static const int kInputBufferSize = kOuterBlockSize * kOuterBlockSize; |
329 static const int kOutputBufferSize = kOuterBlockSize * kOuterBlockSize; | 344 static const int kOutputBufferSize = kOuterBlockSize * kOuterBlockSize; |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
375 } | 390 } |
376 } | 391 } |
377 | 392 |
378 void SetConstantInput(int value) { | 393 void SetConstantInput(int value) { |
379 memset(input_, value, kInputBufferSize); | 394 memset(input_, value, kInputBufferSize); |
380 #if CONFIG_VP9_HIGHBITDEPTH | 395 #if CONFIG_VP9_HIGHBITDEPTH |
381 vpx_memset16(input16_, value, kInputBufferSize); | 396 vpx_memset16(input16_, value, kInputBufferSize); |
382 #endif | 397 #endif |
383 } | 398 } |
384 | 399 |
| 400 void CopyOutputToRef() { |
| 401 vpx_memcpy(output_ref_, output_, kOutputBufferSize); |
| 402 #if CONFIG_VP9_HIGHBITDEPTH |
| 403 vpx_memcpy(output16_ref_, output16_, kOutputBufferSize); |
| 404 #endif |
| 405 } |
| 406 |
385 void CheckGuardBlocks() { | 407 void CheckGuardBlocks() { |
386 for (int i = 0; i < kOutputBufferSize; ++i) { | 408 for (int i = 0; i < kOutputBufferSize; ++i) { |
387 if (IsIndexInBorder(i)) | 409 if (IsIndexInBorder(i)) |
388 EXPECT_EQ(255, output_[i]); | 410 EXPECT_EQ(255, output_[i]); |
389 } | 411 } |
390 } | 412 } |
391 | 413 |
392 uint8_t *input() const { | 414 uint8_t *input() const { |
393 #if CONFIG_VP9_HIGHBITDEPTH | 415 #if CONFIG_VP9_HIGHBITDEPTH |
394 if (UUT_->use_highbd_ == 0) { | 416 if (UUT_->use_highbd_ == 0) { |
(...skipping 13 matching lines...) Expand all Loading... |
408 return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); | 430 return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
409 } else { | 431 } else { |
410 return CONVERT_TO_BYTEPTR(output16_ + BorderTop() * kOuterBlockSize + | 432 return CONVERT_TO_BYTEPTR(output16_ + BorderTop() * kOuterBlockSize + |
411 BorderLeft()); | 433 BorderLeft()); |
412 } | 434 } |
413 #else | 435 #else |
414 return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); | 436 return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
415 #endif | 437 #endif |
416 } | 438 } |
417 | 439 |
| 440 uint8_t *output_ref() const { |
| 441 #if CONFIG_VP9_HIGHBITDEPTH |
| 442 if (UUT_->use_highbd_ == 0) { |
| 443 return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
| 444 } else { |
| 445 return CONVERT_TO_BYTEPTR(output16_ref_ + BorderTop() * kOuterBlockSize + |
| 446 BorderLeft()); |
| 447 } |
| 448 #else |
| 449 return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft(); |
| 450 #endif |
| 451 } |
| 452 |
418 uint16_t lookup(uint8_t *list, int index) const { | 453 uint16_t lookup(uint8_t *list, int index) const { |
419 #if CONFIG_VP9_HIGHBITDEPTH | 454 #if CONFIG_VP9_HIGHBITDEPTH |
420 if (UUT_->use_highbd_ == 0) { | 455 if (UUT_->use_highbd_ == 0) { |
421 return list[index]; | 456 return list[index]; |
422 } else { | 457 } else { |
423 return CONVERT_TO_SHORTPTR(list)[index]; | 458 return CONVERT_TO_SHORTPTR(list)[index]; |
424 } | 459 } |
425 #else | 460 #else |
426 return list[index]; | 461 return list[index]; |
427 #endif | 462 #endif |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
486 } | 521 } |
487 #else | 522 #else |
488 filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, | 523 filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, |
489 dst_ptr, dst_stride, output_width, output_height); | 524 dst_ptr, dst_stride, output_width, output_height); |
490 #endif | 525 #endif |
491 } | 526 } |
492 | 527 |
493 const ConvolveFunctions* UUT_; | 528 const ConvolveFunctions* UUT_; |
494 static uint8_t* input_; | 529 static uint8_t* input_; |
495 static uint8_t* output_; | 530 static uint8_t* output_; |
| 531 static uint8_t* output_ref_; |
496 #if CONFIG_VP9_HIGHBITDEPTH | 532 #if CONFIG_VP9_HIGHBITDEPTH |
497 static uint16_t* input16_; | 533 static uint16_t* input16_; |
498 static uint16_t* output16_; | 534 static uint16_t* output16_; |
| 535 static uint16_t* output16_ref_; |
499 int mask_; | 536 int mask_; |
500 #endif | 537 #endif |
501 }; | 538 }; |
502 | 539 |
503 uint8_t* ConvolveTest::input_ = NULL; | 540 uint8_t* ConvolveTest::input_ = NULL; |
504 uint8_t* ConvolveTest::output_ = NULL; | 541 uint8_t* ConvolveTest::output_ = NULL; |
| 542 uint8_t* ConvolveTest::output_ref_ = NULL; |
505 #if CONFIG_VP9_HIGHBITDEPTH | 543 #if CONFIG_VP9_HIGHBITDEPTH |
506 uint16_t* ConvolveTest::input16_ = NULL; | 544 uint16_t* ConvolveTest::input16_ = NULL; |
507 uint16_t* ConvolveTest::output16_ = NULL; | 545 uint16_t* ConvolveTest::output16_ = NULL; |
| 546 uint16_t* ConvolveTest::output16_ref_ = NULL; |
508 #endif | 547 #endif |
509 | 548 |
510 TEST_P(ConvolveTest, GuardBlocks) { | 549 TEST_P(ConvolveTest, GuardBlocks) { |
511 CheckGuardBlocks(); | 550 CheckGuardBlocks(); |
512 } | 551 } |
513 | 552 |
| 553 TEST_P(ConvolveTest, Copy) { |
| 554 uint8_t* const in = input(); |
| 555 uint8_t* const out = output(); |
| 556 |
| 557 ASM_REGISTER_STATE_CHECK( |
| 558 UUT_->copy_(in, kInputStride, out, kOutputStride, NULL, 0, NULL, 0, |
| 559 Width(), Height())); |
| 560 |
| 561 CheckGuardBlocks(); |
| 562 |
| 563 for (int y = 0; y < Height(); ++y) |
| 564 for (int x = 0; x < Width(); ++x) |
| 565 ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 566 lookup(in, y * kInputStride + x)) |
| 567 << "(" << x << "," << y << ")"; |
| 568 } |
| 569 |
| 570 TEST_P(ConvolveTest, Avg) { |
| 571 uint8_t* const in = input(); |
| 572 uint8_t* const out = output(); |
| 573 uint8_t* const out_ref = output_ref(); |
| 574 CopyOutputToRef(); |
| 575 |
| 576 ASM_REGISTER_STATE_CHECK( |
| 577 UUT_->avg_(in, kInputStride, out, kOutputStride, NULL, 0, NULL, 0, |
| 578 Width(), Height())); |
| 579 |
| 580 CheckGuardBlocks(); |
| 581 |
| 582 for (int y = 0; y < Height(); ++y) |
| 583 for (int x = 0; x < Width(); ++x) |
| 584 ASSERT_EQ(lookup(out, y * kOutputStride + x), |
| 585 ROUND_POWER_OF_TWO(lookup(in, y * kInputStride + x) + |
| 586 lookup(out_ref, y * kOutputStride + x), 1)) |
| 587 << "(" << x << "," << y << ")"; |
| 588 } |
| 589 |
514 TEST_P(ConvolveTest, CopyHoriz) { | 590 TEST_P(ConvolveTest, CopyHoriz) { |
515 uint8_t* const in = input(); | 591 uint8_t* const in = input(); |
516 uint8_t* const out = output(); | 592 uint8_t* const out = output(); |
517 DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; | 593 DECLARE_ALIGNED(256, const int16_t, filter8[8]) = {0, 0, 0, 128, 0, 0, 0, 0}; |
518 | 594 |
519 ASM_REGISTER_STATE_CHECK( | 595 ASM_REGISTER_STATE_CHECK( |
520 UUT_->h8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, | 596 UUT_->h8_(in, kInputStride, out, kOutputStride, filter8, 16, filter8, 16, |
521 Width(), Height())); | 597 Width(), Height())); |
522 | 598 |
523 CheckGuardBlocks(); | 599 CheckGuardBlocks(); |
(...skipping 657 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1181 int filter_x_stride, | 1257 int filter_x_stride, |
1182 const int16_t *filter_y, | 1258 const int16_t *filter_y, |
1183 int filter_y_stride, | 1259 int filter_y_stride, |
1184 int w, int h) { | 1260 int w, int h) { |
1185 vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride, | 1261 vp9_highbd_convolve8_avg_sse2(src, src_stride, dst, dst_stride, |
1186 filter_x, filter_x_stride, | 1262 filter_x, filter_x_stride, |
1187 filter_y, filter_y_stride, w, h, 12); | 1263 filter_y, filter_y_stride, w, h, 12); |
1188 } | 1264 } |
1189 #endif // HAVE_SSE2 && ARCH_X86_64 | 1265 #endif // HAVE_SSE2 && ARCH_X86_64 |
1190 | 1266 |
| 1267 void wrap_convolve_copy_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1268 uint8_t *dst, ptrdiff_t dst_stride, |
| 1269 const int16_t *filter_x, |
| 1270 int filter_x_stride, |
| 1271 const int16_t *filter_y, |
| 1272 int filter_y_stride, |
| 1273 int w, int h) { |
| 1274 vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride, |
| 1275 filter_x, filter_x_stride, |
| 1276 filter_y, filter_y_stride, w, h, 8); |
| 1277 } |
| 1278 |
| 1279 void wrap_convolve_avg_c_8(const uint8_t *src, ptrdiff_t src_stride, |
| 1280 uint8_t *dst, ptrdiff_t dst_stride, |
| 1281 const int16_t *filter_x, |
| 1282 int filter_x_stride, |
| 1283 const int16_t *filter_y, |
| 1284 int filter_y_stride, |
| 1285 int w, int h) { |
| 1286 vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride, |
| 1287 filter_x, filter_x_stride, |
| 1288 filter_y, filter_y_stride, w, h, 8); |
| 1289 } |
| 1290 |
1191 void wrap_convolve8_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride, | 1291 void wrap_convolve8_horiz_c_8(const uint8_t *src, ptrdiff_t src_stride, |
1192 uint8_t *dst, ptrdiff_t dst_stride, | 1292 uint8_t *dst, ptrdiff_t dst_stride, |
1193 const int16_t *filter_x, | 1293 const int16_t *filter_x, |
1194 int filter_x_stride, | 1294 int filter_x_stride, |
1195 const int16_t *filter_y, | 1295 const int16_t *filter_y, |
1196 int filter_y_stride, | 1296 int filter_y_stride, |
1197 int w, int h) { | 1297 int w, int h) { |
1198 vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, | 1298 vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, |
1199 filter_x, filter_x_stride, | 1299 filter_x, filter_x_stride, |
1200 filter_y, filter_y_stride, w, h, 8); | 1300 filter_y, filter_y_stride, w, h, 8); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1253 const int16_t *filter_x, | 1353 const int16_t *filter_x, |
1254 int filter_x_stride, | 1354 int filter_x_stride, |
1255 const int16_t *filter_y, | 1355 const int16_t *filter_y, |
1256 int filter_y_stride, | 1356 int filter_y_stride, |
1257 int w, int h) { | 1357 int w, int h) { |
1258 vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, | 1358 vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, |
1259 filter_x, filter_x_stride, | 1359 filter_x, filter_x_stride, |
1260 filter_y, filter_y_stride, w, h, 8); | 1360 filter_y, filter_y_stride, w, h, 8); |
1261 } | 1361 } |
1262 | 1362 |
| 1363 void wrap_convolve_copy_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1364 uint8_t *dst, ptrdiff_t dst_stride, |
| 1365 const int16_t *filter_x, |
| 1366 int filter_x_stride, |
| 1367 const int16_t *filter_y, |
| 1368 int filter_y_stride, |
| 1369 int w, int h) { |
| 1370 vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride, |
| 1371 filter_x, filter_x_stride, |
| 1372 filter_y, filter_y_stride, w, h, 10); |
| 1373 } |
| 1374 |
| 1375 void wrap_convolve_avg_c_10(const uint8_t *src, ptrdiff_t src_stride, |
| 1376 uint8_t *dst, ptrdiff_t dst_stride, |
| 1377 const int16_t *filter_x, |
| 1378 int filter_x_stride, |
| 1379 const int16_t *filter_y, |
| 1380 int filter_y_stride, |
| 1381 int w, int h) { |
| 1382 vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride, |
| 1383 filter_x, filter_x_stride, |
| 1384 filter_y, filter_y_stride, w, h, 10); |
| 1385 } |
| 1386 |
1263 void wrap_convolve8_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride, | 1387 void wrap_convolve8_horiz_c_10(const uint8_t *src, ptrdiff_t src_stride, |
1264 uint8_t *dst, ptrdiff_t dst_stride, | 1388 uint8_t *dst, ptrdiff_t dst_stride, |
1265 const int16_t *filter_x, | 1389 const int16_t *filter_x, |
1266 int filter_x_stride, | 1390 int filter_x_stride, |
1267 const int16_t *filter_y, | 1391 const int16_t *filter_y, |
1268 int filter_y_stride, | 1392 int filter_y_stride, |
1269 int w, int h) { | 1393 int w, int h) { |
1270 vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, | 1394 vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, |
1271 filter_x, filter_x_stride, | 1395 filter_x, filter_x_stride, |
1272 filter_y, filter_y_stride, w, h, 10); | 1396 filter_y, filter_y_stride, w, h, 10); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1325 const int16_t *filter_x, | 1449 const int16_t *filter_x, |
1326 int filter_x_stride, | 1450 int filter_x_stride, |
1327 const int16_t *filter_y, | 1451 const int16_t *filter_y, |
1328 int filter_y_stride, | 1452 int filter_y_stride, |
1329 int w, int h) { | 1453 int w, int h) { |
1330 vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, | 1454 vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, |
1331 filter_x, filter_x_stride, | 1455 filter_x, filter_x_stride, |
1332 filter_y, filter_y_stride, w, h, 10); | 1456 filter_y, filter_y_stride, w, h, 10); |
1333 } | 1457 } |
1334 | 1458 |
| 1459 void wrap_convolve_copy_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1460 uint8_t *dst, ptrdiff_t dst_stride, |
| 1461 const int16_t *filter_x, |
| 1462 int filter_x_stride, |
| 1463 const int16_t *filter_y, |
| 1464 int filter_y_stride, |
| 1465 int w, int h) { |
| 1466 vp9_highbd_convolve_copy_c(src, src_stride, dst, dst_stride, |
| 1467 filter_x, filter_x_stride, |
| 1468 filter_y, filter_y_stride, w, h, 12); |
| 1469 } |
| 1470 |
| 1471 void wrap_convolve_avg_c_12(const uint8_t *src, ptrdiff_t src_stride, |
| 1472 uint8_t *dst, ptrdiff_t dst_stride, |
| 1473 const int16_t *filter_x, |
| 1474 int filter_x_stride, |
| 1475 const int16_t *filter_y, |
| 1476 int filter_y_stride, |
| 1477 int w, int h) { |
| 1478 vp9_highbd_convolve_avg_c(src, src_stride, dst, dst_stride, |
| 1479 filter_x, filter_x_stride, |
| 1480 filter_y, filter_y_stride, w, h, 12); |
| 1481 } |
| 1482 |
1335 void wrap_convolve8_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride, | 1483 void wrap_convolve8_horiz_c_12(const uint8_t *src, ptrdiff_t src_stride, |
1336 uint8_t *dst, ptrdiff_t dst_stride, | 1484 uint8_t *dst, ptrdiff_t dst_stride, |
1337 const int16_t *filter_x, | 1485 const int16_t *filter_x, |
1338 int filter_x_stride, | 1486 int filter_x_stride, |
1339 const int16_t *filter_y, | 1487 const int16_t *filter_y, |
1340 int filter_y_stride, | 1488 int filter_y_stride, |
1341 int w, int h) { | 1489 int w, int h) { |
1342 vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, | 1490 vp9_highbd_convolve8_horiz_c(src, src_stride, dst, dst_stride, |
1343 filter_x, filter_x_stride, | 1491 filter_x, filter_x_stride, |
1344 filter_y, filter_y_stride, w, h, 12); | 1492 filter_y, filter_y_stride, w, h, 12); |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1398 int filter_x_stride, | 1546 int filter_x_stride, |
1399 const int16_t *filter_y, | 1547 const int16_t *filter_y, |
1400 int filter_y_stride, | 1548 int filter_y_stride, |
1401 int w, int h) { | 1549 int w, int h) { |
1402 vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, | 1550 vp9_highbd_convolve8_avg_c(src, src_stride, dst, dst_stride, |
1403 filter_x, filter_x_stride, | 1551 filter_x, filter_x_stride, |
1404 filter_y, filter_y_stride, w, h, 12); | 1552 filter_y, filter_y_stride, w, h, 12); |
1405 } | 1553 } |
1406 | 1554 |
1407 const ConvolveFunctions convolve8_c( | 1555 const ConvolveFunctions convolve8_c( |
| 1556 wrap_convolve_copy_c_8, wrap_convolve_avg_c_8, |
1408 wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8, | 1557 wrap_convolve8_horiz_c_8, wrap_convolve8_avg_horiz_c_8, |
1409 wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8, | 1558 wrap_convolve8_vert_c_8, wrap_convolve8_avg_vert_c_8, |
1410 wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8); | 1559 wrap_convolve8_c_8, wrap_convolve8_avg_c_8, 8); |
1411 INSTANTIATE_TEST_CASE_P(C_8, ConvolveTest, ::testing::Values( | 1560 INSTANTIATE_TEST_CASE_P(C_8, ConvolveTest, ::testing::Values( |
1412 make_tuple(4, 4, &convolve8_c), | 1561 make_tuple(4, 4, &convolve8_c), |
1413 make_tuple(8, 4, &convolve8_c), | 1562 make_tuple(8, 4, &convolve8_c), |
1414 make_tuple(4, 8, &convolve8_c), | 1563 make_tuple(4, 8, &convolve8_c), |
1415 make_tuple(8, 8, &convolve8_c), | 1564 make_tuple(8, 8, &convolve8_c), |
1416 make_tuple(16, 8, &convolve8_c), | 1565 make_tuple(16, 8, &convolve8_c), |
1417 make_tuple(8, 16, &convolve8_c), | 1566 make_tuple(8, 16, &convolve8_c), |
1418 make_tuple(16, 16, &convolve8_c), | 1567 make_tuple(16, 16, &convolve8_c), |
1419 make_tuple(32, 16, &convolve8_c), | 1568 make_tuple(32, 16, &convolve8_c), |
1420 make_tuple(16, 32, &convolve8_c), | 1569 make_tuple(16, 32, &convolve8_c), |
1421 make_tuple(32, 32, &convolve8_c), | 1570 make_tuple(32, 32, &convolve8_c), |
1422 make_tuple(64, 32, &convolve8_c), | 1571 make_tuple(64, 32, &convolve8_c), |
1423 make_tuple(32, 64, &convolve8_c), | 1572 make_tuple(32, 64, &convolve8_c), |
1424 make_tuple(64, 64, &convolve8_c))); | 1573 make_tuple(64, 64, &convolve8_c))); |
1425 const ConvolveFunctions convolve10_c( | 1574 const ConvolveFunctions convolve10_c( |
| 1575 wrap_convolve_copy_c_10, wrap_convolve_avg_c_10, |
1426 wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10, | 1576 wrap_convolve8_horiz_c_10, wrap_convolve8_avg_horiz_c_10, |
1427 wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10, | 1577 wrap_convolve8_vert_c_10, wrap_convolve8_avg_vert_c_10, |
1428 wrap_convolve8_c_10, wrap_convolve8_avg_c_10, 10); | 1578 wrap_convolve8_c_10, wrap_convolve8_avg_c_10, 10); |
1429 INSTANTIATE_TEST_CASE_P(C_10, ConvolveTest, ::testing::Values( | 1579 INSTANTIATE_TEST_CASE_P(C_10, ConvolveTest, ::testing::Values( |
1430 make_tuple(4, 4, &convolve10_c), | 1580 make_tuple(4, 4, &convolve10_c), |
1431 make_tuple(8, 4, &convolve10_c), | 1581 make_tuple(8, 4, &convolve10_c), |
1432 make_tuple(4, 8, &convolve10_c), | 1582 make_tuple(4, 8, &convolve10_c), |
1433 make_tuple(8, 8, &convolve10_c), | 1583 make_tuple(8, 8, &convolve10_c), |
1434 make_tuple(16, 8, &convolve10_c), | 1584 make_tuple(16, 8, &convolve10_c), |
1435 make_tuple(8, 16, &convolve10_c), | 1585 make_tuple(8, 16, &convolve10_c), |
1436 make_tuple(16, 16, &convolve10_c), | 1586 make_tuple(16, 16, &convolve10_c), |
1437 make_tuple(32, 16, &convolve10_c), | 1587 make_tuple(32, 16, &convolve10_c), |
1438 make_tuple(16, 32, &convolve10_c), | 1588 make_tuple(16, 32, &convolve10_c), |
1439 make_tuple(32, 32, &convolve10_c), | 1589 make_tuple(32, 32, &convolve10_c), |
1440 make_tuple(64, 32, &convolve10_c), | 1590 make_tuple(64, 32, &convolve10_c), |
1441 make_tuple(32, 64, &convolve10_c), | 1591 make_tuple(32, 64, &convolve10_c), |
1442 make_tuple(64, 64, &convolve10_c))); | 1592 make_tuple(64, 64, &convolve10_c))); |
1443 const ConvolveFunctions convolve12_c( | 1593 const ConvolveFunctions convolve12_c( |
| 1594 wrap_convolve_copy_c_12, wrap_convolve_avg_c_12, |
1444 wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12, | 1595 wrap_convolve8_horiz_c_12, wrap_convolve8_avg_horiz_c_12, |
1445 wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12, | 1596 wrap_convolve8_vert_c_12, wrap_convolve8_avg_vert_c_12, |
1446 wrap_convolve8_c_12, wrap_convolve8_avg_c_12, 12); | 1597 wrap_convolve8_c_12, wrap_convolve8_avg_c_12, 12); |
1447 INSTANTIATE_TEST_CASE_P(C_12, ConvolveTest, ::testing::Values( | 1598 INSTANTIATE_TEST_CASE_P(C_12, ConvolveTest, ::testing::Values( |
1448 make_tuple(4, 4, &convolve12_c), | 1599 make_tuple(4, 4, &convolve12_c), |
1449 make_tuple(8, 4, &convolve12_c), | 1600 make_tuple(8, 4, &convolve12_c), |
1450 make_tuple(4, 8, &convolve12_c), | 1601 make_tuple(4, 8, &convolve12_c), |
1451 make_tuple(8, 8, &convolve12_c), | 1602 make_tuple(8, 8, &convolve12_c), |
1452 make_tuple(16, 8, &convolve12_c), | 1603 make_tuple(16, 8, &convolve12_c), |
1453 make_tuple(8, 16, &convolve12_c), | 1604 make_tuple(8, 16, &convolve12_c), |
1454 make_tuple(16, 16, &convolve12_c), | 1605 make_tuple(16, 16, &convolve12_c), |
1455 make_tuple(32, 16, &convolve12_c), | 1606 make_tuple(32, 16, &convolve12_c), |
1456 make_tuple(16, 32, &convolve12_c), | 1607 make_tuple(16, 32, &convolve12_c), |
1457 make_tuple(32, 32, &convolve12_c), | 1608 make_tuple(32, 32, &convolve12_c), |
1458 make_tuple(64, 32, &convolve12_c), | 1609 make_tuple(64, 32, &convolve12_c), |
1459 make_tuple(32, 64, &convolve12_c), | 1610 make_tuple(32, 64, &convolve12_c), |
1460 make_tuple(64, 64, &convolve12_c))); | 1611 make_tuple(64, 64, &convolve12_c))); |
1461 | 1612 |
1462 #else | 1613 #else |
1463 | 1614 |
1464 const ConvolveFunctions convolve8_c( | 1615 const ConvolveFunctions convolve8_c( |
| 1616 vp9_convolve_copy_c, vp9_convolve_avg_c, |
1465 vp9_convolve8_horiz_c, vp9_convolve8_avg_horiz_c, | 1617 vp9_convolve8_horiz_c, vp9_convolve8_avg_horiz_c, |
1466 vp9_convolve8_vert_c, vp9_convolve8_avg_vert_c, | 1618 vp9_convolve8_vert_c, vp9_convolve8_avg_vert_c, |
1467 vp9_convolve8_c, vp9_convolve8_avg_c, 0); | 1619 vp9_convolve8_c, vp9_convolve8_avg_c, 0); |
1468 | 1620 |
1469 INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values( | 1621 INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values( |
1470 make_tuple(4, 4, &convolve8_c), | 1622 make_tuple(4, 4, &convolve8_c), |
1471 make_tuple(8, 4, &convolve8_c), | 1623 make_tuple(8, 4, &convolve8_c), |
1472 make_tuple(4, 8, &convolve8_c), | 1624 make_tuple(4, 8, &convolve8_c), |
1473 make_tuple(8, 8, &convolve8_c), | 1625 make_tuple(8, 8, &convolve8_c), |
1474 make_tuple(16, 8, &convolve8_c), | 1626 make_tuple(16, 8, &convolve8_c), |
1475 make_tuple(8, 16, &convolve8_c), | 1627 make_tuple(8, 16, &convolve8_c), |
1476 make_tuple(16, 16, &convolve8_c), | 1628 make_tuple(16, 16, &convolve8_c), |
1477 make_tuple(32, 16, &convolve8_c), | 1629 make_tuple(32, 16, &convolve8_c), |
1478 make_tuple(16, 32, &convolve8_c), | 1630 make_tuple(16, 32, &convolve8_c), |
1479 make_tuple(32, 32, &convolve8_c), | 1631 make_tuple(32, 32, &convolve8_c), |
1480 make_tuple(64, 32, &convolve8_c), | 1632 make_tuple(64, 32, &convolve8_c), |
1481 make_tuple(32, 64, &convolve8_c), | 1633 make_tuple(32, 64, &convolve8_c), |
1482 make_tuple(64, 64, &convolve8_c))); | 1634 make_tuple(64, 64, &convolve8_c))); |
1483 #endif | 1635 #endif |
1484 | 1636 |
1485 #if HAVE_SSE2 && ARCH_X86_64 | 1637 #if HAVE_SSE2 && ARCH_X86_64 |
1486 #if CONFIG_VP9_HIGHBITDEPTH | 1638 #if CONFIG_VP9_HIGHBITDEPTH |
1487 const ConvolveFunctions convolve8_sse2( | 1639 const ConvolveFunctions convolve8_sse2( |
| 1640 wrap_convolve_copy_c_8, wrap_convolve_avg_c_8, |
1488 wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8, | 1641 wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8, |
1489 wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8, | 1642 wrap_convolve8_vert_sse2_8, wrap_convolve8_avg_vert_sse2_8, |
1490 wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8); | 1643 wrap_convolve8_sse2_8, wrap_convolve8_avg_sse2_8, 8); |
1491 const ConvolveFunctions convolve10_sse2( | 1644 const ConvolveFunctions convolve10_sse2( |
| 1645 wrap_convolve_copy_c_10, wrap_convolve_avg_c_10, |
1492 wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10, | 1646 wrap_convolve8_horiz_sse2_10, wrap_convolve8_avg_horiz_sse2_10, |
1493 wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10, | 1647 wrap_convolve8_vert_sse2_10, wrap_convolve8_avg_vert_sse2_10, |
1494 wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10); | 1648 wrap_convolve8_sse2_10, wrap_convolve8_avg_sse2_10, 10); |
1495 const ConvolveFunctions convolve12_sse2( | 1649 const ConvolveFunctions convolve12_sse2( |
| 1650 wrap_convolve_copy_c_12, wrap_convolve_avg_c_12, |
1496 wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12, | 1651 wrap_convolve8_horiz_sse2_12, wrap_convolve8_avg_horiz_sse2_12, |
1497 wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12, | 1652 wrap_convolve8_vert_sse2_12, wrap_convolve8_avg_vert_sse2_12, |
1498 wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12, 12); | 1653 wrap_convolve8_sse2_12, wrap_convolve8_avg_sse2_12, 12); |
1499 INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values( | 1654 INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values( |
1500 make_tuple(4, 4, &convolve8_sse2), | 1655 make_tuple(4, 4, &convolve8_sse2), |
1501 make_tuple(8, 4, &convolve8_sse2), | 1656 make_tuple(8, 4, &convolve8_sse2), |
1502 make_tuple(4, 8, &convolve8_sse2), | 1657 make_tuple(4, 8, &convolve8_sse2), |
1503 make_tuple(8, 8, &convolve8_sse2), | 1658 make_tuple(8, 8, &convolve8_sse2), |
1504 make_tuple(16, 8, &convolve8_sse2), | 1659 make_tuple(16, 8, &convolve8_sse2), |
1505 make_tuple(8, 16, &convolve8_sse2), | 1660 make_tuple(8, 16, &convolve8_sse2), |
(...skipping 25 matching lines...) Expand all Loading... |
1531 make_tuple(8, 16, &convolve12_sse2), | 1686 make_tuple(8, 16, &convolve12_sse2), |
1532 make_tuple(16, 16, &convolve12_sse2), | 1687 make_tuple(16, 16, &convolve12_sse2), |
1533 make_tuple(32, 16, &convolve12_sse2), | 1688 make_tuple(32, 16, &convolve12_sse2), |
1534 make_tuple(16, 32, &convolve12_sse2), | 1689 make_tuple(16, 32, &convolve12_sse2), |
1535 make_tuple(32, 32, &convolve12_sse2), | 1690 make_tuple(32, 32, &convolve12_sse2), |
1536 make_tuple(64, 32, &convolve12_sse2), | 1691 make_tuple(64, 32, &convolve12_sse2), |
1537 make_tuple(32, 64, &convolve12_sse2), | 1692 make_tuple(32, 64, &convolve12_sse2), |
1538 make_tuple(64, 64, &convolve12_sse2))); | 1693 make_tuple(64, 64, &convolve12_sse2))); |
1539 #else | 1694 #else |
1540 const ConvolveFunctions convolve8_sse2( | 1695 const ConvolveFunctions convolve8_sse2( |
| 1696 vp9_convolve_copy_sse2, vp9_convolve_avg_sse2, |
1541 vp9_convolve8_horiz_sse2, vp9_convolve8_avg_horiz_sse2, | 1697 vp9_convolve8_horiz_sse2, vp9_convolve8_avg_horiz_sse2, |
1542 vp9_convolve8_vert_sse2, vp9_convolve8_avg_vert_sse2, | 1698 vp9_convolve8_vert_sse2, vp9_convolve8_avg_vert_sse2, |
1543 vp9_convolve8_sse2, vp9_convolve8_avg_sse2, 0); | 1699 vp9_convolve8_sse2, vp9_convolve8_avg_sse2, 0); |
1544 | 1700 |
1545 INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values( | 1701 INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values( |
1546 make_tuple(4, 4, &convolve8_sse2), | 1702 make_tuple(4, 4, &convolve8_sse2), |
1547 make_tuple(8, 4, &convolve8_sse2), | 1703 make_tuple(8, 4, &convolve8_sse2), |
1548 make_tuple(4, 8, &convolve8_sse2), | 1704 make_tuple(4, 8, &convolve8_sse2), |
1549 make_tuple(8, 8, &convolve8_sse2), | 1705 make_tuple(8, 8, &convolve8_sse2), |
1550 make_tuple(16, 8, &convolve8_sse2), | 1706 make_tuple(16, 8, &convolve8_sse2), |
1551 make_tuple(8, 16, &convolve8_sse2), | 1707 make_tuple(8, 16, &convolve8_sse2), |
1552 make_tuple(16, 16, &convolve8_sse2), | 1708 make_tuple(16, 16, &convolve8_sse2), |
1553 make_tuple(32, 16, &convolve8_sse2), | 1709 make_tuple(32, 16, &convolve8_sse2), |
1554 make_tuple(16, 32, &convolve8_sse2), | 1710 make_tuple(16, 32, &convolve8_sse2), |
1555 make_tuple(32, 32, &convolve8_sse2), | 1711 make_tuple(32, 32, &convolve8_sse2), |
1556 make_tuple(64, 32, &convolve8_sse2), | 1712 make_tuple(64, 32, &convolve8_sse2), |
1557 make_tuple(32, 64, &convolve8_sse2), | 1713 make_tuple(32, 64, &convolve8_sse2), |
1558 make_tuple(64, 64, &convolve8_sse2))); | 1714 make_tuple(64, 64, &convolve8_sse2))); |
1559 #endif // CONFIG_VP9_HIGHBITDEPTH | 1715 #endif // CONFIG_VP9_HIGHBITDEPTH |
1560 #endif | 1716 #endif |
1561 | 1717 |
1562 #if HAVE_SSSE3 | 1718 #if HAVE_SSSE3 |
1563 const ConvolveFunctions convolve8_ssse3( | 1719 const ConvolveFunctions convolve8_ssse3( |
| 1720 vp9_convolve_copy_c, vp9_convolve_avg_c, |
1564 vp9_convolve8_horiz_ssse3, vp9_convolve8_avg_horiz_ssse3, | 1721 vp9_convolve8_horiz_ssse3, vp9_convolve8_avg_horiz_ssse3, |
1565 vp9_convolve8_vert_ssse3, vp9_convolve8_avg_vert_ssse3, | 1722 vp9_convolve8_vert_ssse3, vp9_convolve8_avg_vert_ssse3, |
1566 vp9_convolve8_ssse3, vp9_convolve8_avg_ssse3, 0); | 1723 vp9_convolve8_ssse3, vp9_convolve8_avg_ssse3, 0); |
1567 | 1724 |
1568 INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values( | 1725 INSTANTIATE_TEST_CASE_P(SSSE3, ConvolveTest, ::testing::Values( |
1569 make_tuple(4, 4, &convolve8_ssse3), | 1726 make_tuple(4, 4, &convolve8_ssse3), |
1570 make_tuple(8, 4, &convolve8_ssse3), | 1727 make_tuple(8, 4, &convolve8_ssse3), |
1571 make_tuple(4, 8, &convolve8_ssse3), | 1728 make_tuple(4, 8, &convolve8_ssse3), |
1572 make_tuple(8, 8, &convolve8_ssse3), | 1729 make_tuple(8, 8, &convolve8_ssse3), |
1573 make_tuple(16, 8, &convolve8_ssse3), | 1730 make_tuple(16, 8, &convolve8_ssse3), |
1574 make_tuple(8, 16, &convolve8_ssse3), | 1731 make_tuple(8, 16, &convolve8_ssse3), |
1575 make_tuple(16, 16, &convolve8_ssse3), | 1732 make_tuple(16, 16, &convolve8_ssse3), |
1576 make_tuple(32, 16, &convolve8_ssse3), | 1733 make_tuple(32, 16, &convolve8_ssse3), |
1577 make_tuple(16, 32, &convolve8_ssse3), | 1734 make_tuple(16, 32, &convolve8_ssse3), |
1578 make_tuple(32, 32, &convolve8_ssse3), | 1735 make_tuple(32, 32, &convolve8_ssse3), |
1579 make_tuple(64, 32, &convolve8_ssse3), | 1736 make_tuple(64, 32, &convolve8_ssse3), |
1580 make_tuple(32, 64, &convolve8_ssse3), | 1737 make_tuple(32, 64, &convolve8_ssse3), |
1581 make_tuple(64, 64, &convolve8_ssse3))); | 1738 make_tuple(64, 64, &convolve8_ssse3))); |
1582 #endif | 1739 #endif |
1583 | 1740 |
1584 #if HAVE_AVX2 && HAVE_SSSE3 | 1741 #if HAVE_AVX2 && HAVE_SSSE3 |
1585 const ConvolveFunctions convolve8_avx2( | 1742 const ConvolveFunctions convolve8_avx2( |
| 1743 vp9_convolve_copy_c, vp9_convolve_avg_c, |
1586 vp9_convolve8_horiz_avx2, vp9_convolve8_avg_horiz_ssse3, | 1744 vp9_convolve8_horiz_avx2, vp9_convolve8_avg_horiz_ssse3, |
1587 vp9_convolve8_vert_avx2, vp9_convolve8_avg_vert_ssse3, | 1745 vp9_convolve8_vert_avx2, vp9_convolve8_avg_vert_ssse3, |
1588 vp9_convolve8_avx2, vp9_convolve8_avg_ssse3, 0); | 1746 vp9_convolve8_avx2, vp9_convolve8_avg_ssse3, 0); |
1589 | 1747 |
1590 INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values( | 1748 INSTANTIATE_TEST_CASE_P(AVX2, ConvolveTest, ::testing::Values( |
1591 make_tuple(4, 4, &convolve8_avx2), | 1749 make_tuple(4, 4, &convolve8_avx2), |
1592 make_tuple(8, 4, &convolve8_avx2), | 1750 make_tuple(8, 4, &convolve8_avx2), |
1593 make_tuple(4, 8, &convolve8_avx2), | 1751 make_tuple(4, 8, &convolve8_avx2), |
1594 make_tuple(8, 8, &convolve8_avx2), | 1752 make_tuple(8, 8, &convolve8_avx2), |
1595 make_tuple(8, 16, &convolve8_avx2), | 1753 make_tuple(8, 16, &convolve8_avx2), |
1596 make_tuple(16, 8, &convolve8_avx2), | 1754 make_tuple(16, 8, &convolve8_avx2), |
1597 make_tuple(16, 16, &convolve8_avx2), | 1755 make_tuple(16, 16, &convolve8_avx2), |
1598 make_tuple(32, 16, &convolve8_avx2), | 1756 make_tuple(32, 16, &convolve8_avx2), |
1599 make_tuple(16, 32, &convolve8_avx2), | 1757 make_tuple(16, 32, &convolve8_avx2), |
1600 make_tuple(32, 32, &convolve8_avx2), | 1758 make_tuple(32, 32, &convolve8_avx2), |
1601 make_tuple(64, 32, &convolve8_avx2), | 1759 make_tuple(64, 32, &convolve8_avx2), |
1602 make_tuple(32, 64, &convolve8_avx2), | 1760 make_tuple(32, 64, &convolve8_avx2), |
1603 make_tuple(64, 64, &convolve8_avx2))); | 1761 make_tuple(64, 64, &convolve8_avx2))); |
1604 #endif // HAVE_AVX2 && HAVE_SSSE3 | 1762 #endif // HAVE_AVX2 && HAVE_SSSE3 |
1605 | 1763 |
| 1764 #if HAVE_NEON |
1606 #if HAVE_NEON_ASM | 1765 #if HAVE_NEON_ASM |
1607 const ConvolveFunctions convolve8_neon( | 1766 const ConvolveFunctions convolve8_neon( |
| 1767 vp9_convolve_copy_neon, vp9_convolve_avg_neon, |
1608 vp9_convolve8_horiz_neon, vp9_convolve8_avg_horiz_neon, | 1768 vp9_convolve8_horiz_neon, vp9_convolve8_avg_horiz_neon, |
1609 vp9_convolve8_vert_neon, vp9_convolve8_avg_vert_neon, | 1769 vp9_convolve8_vert_neon, vp9_convolve8_avg_vert_neon, |
1610 vp9_convolve8_neon, vp9_convolve8_avg_neon, 0); | 1770 vp9_convolve8_neon, vp9_convolve8_avg_neon, 0); |
| 1771 #else // HAVE_NEON |
| 1772 const ConvolveFunctions convolve8_neon( |
| 1773 vp9_convolve_copy_neon, vp9_convolve_avg_neon, |
| 1774 vp9_convolve8_horiz_neon, vp9_convolve8_avg_horiz_neon, |
| 1775 vp9_convolve8_vert_neon, vp9_convolve8_avg_vert_neon, |
| 1776 vp9_convolve8_neon, vp9_convolve8_avg_neon, 0); |
| 1777 #endif // HAVE_NEON_ASM |
1611 | 1778 |
1612 INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, ::testing::Values( | 1779 INSTANTIATE_TEST_CASE_P(NEON, ConvolveTest, ::testing::Values( |
1613 make_tuple(4, 4, &convolve8_neon), | 1780 make_tuple(4, 4, &convolve8_neon), |
1614 make_tuple(8, 4, &convolve8_neon), | 1781 make_tuple(8, 4, &convolve8_neon), |
1615 make_tuple(4, 8, &convolve8_neon), | 1782 make_tuple(4, 8, &convolve8_neon), |
1616 make_tuple(8, 8, &convolve8_neon), | 1783 make_tuple(8, 8, &convolve8_neon), |
1617 make_tuple(16, 8, &convolve8_neon), | 1784 make_tuple(16, 8, &convolve8_neon), |
1618 make_tuple(8, 16, &convolve8_neon), | 1785 make_tuple(8, 16, &convolve8_neon), |
1619 make_tuple(16, 16, &convolve8_neon), | 1786 make_tuple(16, 16, &convolve8_neon), |
1620 make_tuple(32, 16, &convolve8_neon), | 1787 make_tuple(32, 16, &convolve8_neon), |
1621 make_tuple(16, 32, &convolve8_neon), | 1788 make_tuple(16, 32, &convolve8_neon), |
1622 make_tuple(32, 32, &convolve8_neon), | 1789 make_tuple(32, 32, &convolve8_neon), |
1623 make_tuple(64, 32, &convolve8_neon), | 1790 make_tuple(64, 32, &convolve8_neon), |
1624 make_tuple(32, 64, &convolve8_neon), | 1791 make_tuple(32, 64, &convolve8_neon), |
1625 make_tuple(64, 64, &convolve8_neon))); | 1792 make_tuple(64, 64, &convolve8_neon))); |
1626 #endif | 1793 #endif // HAVE_NEON |
1627 | 1794 |
1628 #if HAVE_DSPR2 | 1795 #if HAVE_DSPR2 |
1629 const ConvolveFunctions convolve8_dspr2( | 1796 const ConvolveFunctions convolve8_dspr2( |
| 1797 vp9_convolve_copy_dspr2, vp9_convolve_avg_dspr2, |
1630 vp9_convolve8_horiz_dspr2, vp9_convolve8_avg_horiz_dspr2, | 1798 vp9_convolve8_horiz_dspr2, vp9_convolve8_avg_horiz_dspr2, |
1631 vp9_convolve8_vert_dspr2, vp9_convolve8_avg_vert_dspr2, | 1799 vp9_convolve8_vert_dspr2, vp9_convolve8_avg_vert_dspr2, |
1632 vp9_convolve8_dspr2, vp9_convolve8_avg_dspr2, 0); | 1800 vp9_convolve8_dspr2, vp9_convolve8_avg_dspr2, 0); |
1633 | 1801 |
1634 INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values( | 1802 INSTANTIATE_TEST_CASE_P(DSPR2, ConvolveTest, ::testing::Values( |
1635 make_tuple(4, 4, &convolve8_dspr2), | 1803 make_tuple(4, 4, &convolve8_dspr2), |
1636 make_tuple(8, 4, &convolve8_dspr2), | 1804 make_tuple(8, 4, &convolve8_dspr2), |
1637 make_tuple(4, 8, &convolve8_dspr2), | 1805 make_tuple(4, 8, &convolve8_dspr2), |
1638 make_tuple(8, 8, &convolve8_dspr2), | 1806 make_tuple(8, 8, &convolve8_dspr2), |
1639 make_tuple(16, 8, &convolve8_dspr2), | 1807 make_tuple(16, 8, &convolve8_dspr2), |
1640 make_tuple(8, 16, &convolve8_dspr2), | 1808 make_tuple(8, 16, &convolve8_dspr2), |
1641 make_tuple(16, 16, &convolve8_dspr2), | 1809 make_tuple(16, 16, &convolve8_dspr2), |
1642 make_tuple(32, 16, &convolve8_dspr2), | 1810 make_tuple(32, 16, &convolve8_dspr2), |
1643 make_tuple(16, 32, &convolve8_dspr2), | 1811 make_tuple(16, 32, &convolve8_dspr2), |
1644 make_tuple(32, 32, &convolve8_dspr2), | 1812 make_tuple(32, 32, &convolve8_dspr2), |
1645 make_tuple(64, 32, &convolve8_dspr2), | 1813 make_tuple(64, 32, &convolve8_dspr2), |
1646 make_tuple(32, 64, &convolve8_dspr2), | 1814 make_tuple(32, 64, &convolve8_dspr2), |
1647 make_tuple(64, 64, &convolve8_dspr2))); | 1815 make_tuple(64, 64, &convolve8_dspr2))); |
1648 #endif | 1816 #endif |
1649 } // namespace | 1817 } // namespace |
OLD | NEW |