Showing the changes to test (1 of 1 file). Show all
Unified · Split
| @@ -85,8 +85,15 @@ void highbd_iht_wrapper(const tran_low_t *in, uint8_t *out, int stride, · 84 unmodified lines | ||
| 85 | 85 | } |
| 86 | 86 | #endif // CONFIG_VP9_HIGHBITDEPTH |
| 87 | 87 | |
| 88 | +struct FuncInfo { | |
| 89 | + FhtFunc ft_func; | |
| 90 | + IhtWithBdFunc it_func; | |
| 91 | + int size; | |
| 92 | + int pixel_size; | |
| 93 | +}; | |
| 94 | + | |
| 88 | 95 | /* forward transform, inverse transform, size, transform type, bit depth */ |
| 89 | −typedef tuple<FhtFunc, IhtWithBdFunc, int, int, vpx_bit_depth_t, int> DctParam; | |
| 96 | +typedef tuple<int, const FuncInfo *, int, vpx_bit_depth_t> DctParam; | |
| 90 | 97 | |
| 91 | 98 | void fdct_ref(const Buffer<int16_t> &in, Buffer<tran_low_t> *out, int size, |
| 92 | 99 | int /*tx_type*/) { |
| @@ -128,12 +135,14 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> { · 35 unmodified lines | ||
| 128 | 135 | public: |
| 129 | 136 | virtual void SetUp() { |
| 130 | 137 | rnd_.Reset(ACMRandom::DeterministicSeed()); |
| 131 | − fwd_txfm_ = GET_PARAM(0); | |
| 132 | − inv_txfm_ = GET_PARAM(1); | |
| 133 | − size_ = GET_PARAM(2); | |
| 134 | − tx_type_ = GET_PARAM(3); | |
| 135 | − bit_depth_ = GET_PARAM(4); | |
| 136 | − pixel_size_ = GET_PARAM(5); | |
| 138 | + const int idx = GET_PARAM(0); | |
| 139 | + const FuncInfo *func_info = &(GET_PARAM(1)[idx]); | |
| 140 | + tx_type_ = GET_PARAM(2); | |
| 141 | + bit_depth_ = GET_PARAM(3); | |
| 142 | + fwd_txfm_ = func_info->ft_func; | |
| 143 | + inv_txfm_ = func_info->it_func; | |
| 144 | + size_ = func_info->size; | |
| 145 | + pixel_size_ = func_info->pixel_size; | |
| 137 | 146 | max_pixel_value_ = (1 << bit_depth_) - 1; |
| 138 | 147 | |
| 139 | 148 | // Randomize stride_ to a value less than or equal to 1024 |
| @@ -165,6 +174,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> { · 25 unmodified lines | ||
| 165 | 174 | } |
| 166 | 175 | |
| 167 | 176 | void InitMem() { |
| 177 | + if (pixel_size_ == 1 && bit_depth_ > VPX_BITS_8) return; | |
| 168 | 178 | if (pixel_size_ == 1) { |
| 169 | 179 | for (int j = 0; j < block_size_; ++j) { |
| 170 | 180 | src_[j] = rnd_.Rand16() & max_pixel_value_; |
| @@ -195,6 +205,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> { · 24 unmodified lines | ||
| 195 | 205 | |
| 196 | 206 | protected: |
| 197 | 207 | void RunAccuracyCheck(int limit) { |
| 208 | + if (pixel_size_ == 1 && bit_depth_ > VPX_BITS_8) return; | |
| 198 | 209 | ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 199 | 210 | Buffer<int16_t> test_input_block = |
| 200 | 211 | Buffer<int16_t>(size_, size_, 8, size_ == 4 ? 0 : 16); |
| @@ -252,6 +263,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> { · 51 unmodified lines | ||
| 252 | 263 | } |
| 253 | 264 | |
| 254 | 265 | void RunCoeffCheck() { |
| 266 | + if (pixel_size_ == 1 && bit_depth_ > VPX_BITS_8) return; | |
| 255 | 267 | ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 256 | 268 | const int count_test_block = 5000; |
| 257 | 269 | Buffer<int16_t> input_block = |
| @@ -281,6 +293,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> { · 23 unmodified lines | ||
| 281 | 293 | } |
| 282 | 294 | |
| 283 | 295 | void RunMemCheck() { |
| 296 | + if (pixel_size_ == 1 && bit_depth_ > VPX_BITS_8) return; | |
| 284 | 297 | ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 285 | 298 | const int count_test_block = 5000; |
| 286 | 299 | Buffer<int16_t> input_extreme_block = |
| @@ -331,6 +344,7 @@ class TransTestBase : public ::testing::TestWithParam<DctParam> { · 44 unmodified lines | ||
| 331 | 344 | } |
| 332 | 345 | |
| 333 | 346 | void RunInvAccuracyCheck(int limit) { |
| 347 | + if (pixel_size_ == 1 && bit_depth_ > VPX_BITS_8) return; | |
| 334 | 348 | ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| 335 | 349 | const int count_test_block = 1000; |
| 336 | 350 | Buffer<int16_t> in = Buffer<int16_t>(size_, size_, 4); |
| @@ -411,7 +425,15 @@ class TransDCT : public TransTestBase { · 74 unmodified lines | ||
| 411 | 425 | TransDCT() { fwd_txfm_ref = fdct_ref; } |
| 412 | 426 | }; |
| 413 | 427 | |
| 414 | −TEST_P(TransDCT, AccuracyCheck) { RunAccuracyCheck(1); } | |
| 428 | +TEST_P(TransDCT, AccuracyCheck) { | |
| 429 | + int t = 1; | |
| 430 | + if (size_ == 16 && bit_depth_ > 10 && pixel_size_ == 2) { | |
| 431 | + t = 2; | |
| 432 | + } else if (size_ == 32 && bit_depth_ > 10 && pixel_size_ == 2) { | |
| 433 | + t = 7; | |
| 434 | + } | |
| 435 | + RunAccuracyCheck(t); | |
| 436 | +} | |
| 415 | 437 | |
| 416 | 438 | TEST_P(TransDCT, CoeffCheck) { RunCoeffCheck(); } |
| 417 | 439 | |
| @@ -419,173 +441,136 @@ TEST_P(TransDCT, MemCheck) { RunMemCheck(); } · 1 unmodified line | ||
| 419 | 441 | |
| 420 | 442 | TEST_P(TransDCT, InvAccuracyCheck) { RunInvAccuracyCheck(1); } |
| 421 | 443 | |
| 422 | −/* TODO:(johannkoenig) Determine why these fail AccuracyCheck | |
| 423 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct32x32_c>, | |
| 424 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_c>, 32, 0, VPX_BITS_12, 2), | |
| 425 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct16x16_c>, | |
| 426 | − &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_c>, 16, 0, VPX_BITS_12, 2), | |
| 427 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct32x32_sse2>, | |
| 428 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, 32, 0, VPX_BITS_12, | |
| 429 | − 2), | |
| 430 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct16x16_sse2>, | |
| 431 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, 16, 0, VPX_BITS_12, | |
| 432 | − 2), | |
| 433 | −*/ | |
| 434 | − | |
| 435 | −const DctParam c_dct_tests[] = { | |
| 444 | +static const FuncInfo dct_c_func_info[] = { | |
| 436 | 445 | #if CONFIG_VP9_HIGHBITDEPTH |
| 437 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct32x32_c>, | |
| 438 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_c>, 32, 0, | |
| 439 | − VPX_BITS_8, 2), | |
| 440 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct32x32_c>, | |
| 441 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_c>, 32, 0, | |
| 442 | − VPX_BITS_10, 2), | |
| 443 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct16x16_c>, | |
| 444 | − &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_c>, 16, 0, | |
| 445 | − VPX_BITS_8, 2), | |
| 446 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct16x16_c>, | |
| 447 | − &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_c>, 16, 0, | |
| 448 | − VPX_BITS_10, 2), | |
| 449 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct8x8_c>, | |
| 450 | − &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_c>, 8, 0, | |
| 451 | − VPX_BITS_8, 2), | |
| 452 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct8x8_c>, | |
| 453 | − &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_c>, 8, 0, | |
| 454 | − VPX_BITS_10, 2), | |
| 455 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct8x8_c>, | |
| 456 | − &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_c>, 8, 0, | |
| 457 | − VPX_BITS_12, 2), | |
| 458 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct4x4_c>, | |
| 459 | − &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_c>, 4, 0, | |
| 460 | − VPX_BITS_8, 2), | |
| 461 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct4x4_c>, | |
| 462 | − &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_c>, 4, 0, | |
| 463 | − VPX_BITS_10, 2), | |
| 464 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct4x4_c>, | |
| 465 | − &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_c>, 4, 0, | |
| 466 | − VPX_BITS_12, 2), | |
| 467 | −#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 468 | − make_tuple(&fdct_wrapper<vpx_fdct32x32_c>, | |
| 469 | − &idct_wrapper<vpx_idct32x32_1024_add_c>, 32, 0, VPX_BITS_8, 1), | |
| 470 | − make_tuple(&fdct_wrapper<vpx_fdct16x16_c>, | |
| 471 | − &idct_wrapper<vpx_idct16x16_256_add_c>, 16, 0, VPX_BITS_8, 1), | |
| 472 | − make_tuple(&fdct_wrapper<vpx_fdct8x8_c>, &idct_wrapper<vpx_idct8x8_64_add_c>, | |
| 473 | − 8, 0, VPX_BITS_8, 1), | |
| 474 | − make_tuple(&fdct_wrapper<vpx_fdct4x4_c>, &idct_wrapper<vpx_idct4x4_16_add_c>, | |
| 475 | − 4, 0, VPX_BITS_8, 1) | |
| 446 | + { &fdct_wrapper<vpx_highbd_fdct4x4_c>, | |
| 447 | + &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_c>, 4, 2 }, | |
| 448 | + { &fdct_wrapper<vpx_highbd_fdct8x8_c>, | |
| 449 | + &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_c>, 8, 2 }, | |
| 450 | + { &fdct_wrapper<vpx_highbd_fdct16x16_c>, | |
| 451 | + &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_c>, 16, 2 }, | |
| 452 | + { &fdct_wrapper<vpx_highbd_fdct32x32_c>, | |
| 453 | + &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_c>, 32, 2 }, | |
| 454 | +#endif | |
| 455 | + { &fdct_wrapper<vpx_fdct4x4_c>, &idct_wrapper<vpx_idct4x4_16_add_c>, 4, 1 }, | |
| 456 | + { &fdct_wrapper<vpx_fdct8x8_c>, &idct_wrapper<vpx_idct8x8_64_add_c>, 8, 1 }, | |
| 457 | + { &fdct_wrapper<vpx_fdct16x16_c>, &idct_wrapper<vpx_idct16x16_256_add_c>, 16, | |
| 458 | + 1 }, | |
| 459 | + { &fdct_wrapper<vpx_fdct32x32_c>, &idct_wrapper<vpx_idct32x32_1024_add_c>, 32, | |
| 460 | + 1 } | |
| 476 | 461 | }; |
| 477 | 462 | |
| 478 | −INSTANTIATE_TEST_CASE_P(C, TransDCT, ::testing::ValuesIn(c_dct_tests)); | |
| 463 | +INSTANTIATE_TEST_CASE_P( | |
| 464 | + C, TransDCT, | |
| 465 | + ::testing::Combine( | |
| 466 | + ::testing::Range(0, static_cast<int>(sizeof(dct_c_func_info) / | |
| 467 | + sizeof(dct_c_func_info[0]))), | |
| 468 | + ::testing::Values(dct_c_func_info), ::testing::Values(0), | |
| 469 | + ::testing::Values(VPX_BITS_8, VPX_BITS_10, VPX_BITS_12))); | |
| 479 | 470 | |
| 480 | 471 | #if !CONFIG_EMULATE_HARDWARE |
| 481 | 472 | |
| 482 | 473 | #if HAVE_SSE2 |
| 483 | −const DctParam sse2_dct_tests[] = { | |
| 474 | +static const FuncInfo dct_sse2_func_info[] = { | |
| 484 | 475 | #if CONFIG_VP9_HIGHBITDEPTH |
| 485 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct32x32_sse2>, | |
| 486 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, 32, 0, | |
| 487 | − VPX_BITS_8, 2), | |
| 488 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct32x32_sse2>, | |
| 489 | − &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, 32, 0, | |
| 490 | − VPX_BITS_10, 2), | |
| 491 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct16x16_sse2>, | |
| 492 | − &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_sse2>, 16, 0, | |
| 493 | − VPX_BITS_8, 2), | |
| 494 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct16x16_sse2>, | |
| 495 | − &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_sse2>, 16, 0, | |
| 496 | − VPX_BITS_10, 2), | |
| 497 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct8x8_sse2>, | |
| 498 | − &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_sse2>, 8, 0, | |
| 499 | − VPX_BITS_8, 2), | |
| 500 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct8x8_sse2>, | |
| 501 | − &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_sse2>, 8, 0, | |
| 502 | − VPX_BITS_10, 2), | |
| 503 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct8x8_sse2>, | |
| 504 | − &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_sse2>, 8, 0, | |
| 505 | − VPX_BITS_12, 2), | |
| 506 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct4x4_sse2>, | |
| 507 | − &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_sse2>, 4, 0, | |
| 508 | − VPX_BITS_8, 2), | |
| 509 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct4x4_sse2>, | |
| 510 | − &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_sse2>, 4, 0, | |
| 511 | − VPX_BITS_10, 2), | |
| 512 | − make_tuple(&fdct_wrapper<vpx_highbd_fdct4x4_sse2>, | |
| 513 | − &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_sse2>, 4, 0, | |
| 514 | − VPX_BITS_12, 2), | |
| 515 | −#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 516 | − make_tuple(&fdct_wrapper<vpx_fdct32x32_sse2>, | |
| 517 | − &idct_wrapper<vpx_idct32x32_1024_add_sse2>, 32, 0, VPX_BITS_8, 1), | |
| 518 | − make_tuple(&fdct_wrapper<vpx_fdct16x16_sse2>, | |
| 519 | − &idct_wrapper<vpx_idct16x16_256_add_sse2>, 16, 0, VPX_BITS_8, 1), | |
| 520 | − make_tuple(&fdct_wrapper<vpx_fdct8x8_sse2>, | |
| 521 | − &idct_wrapper<vpx_idct8x8_64_add_sse2>, 8, 0, VPX_BITS_8, 1), | |
| 522 | − make_tuple(&fdct_wrapper<vpx_fdct4x4_sse2>, | |
| 523 | − &idct_wrapper<vpx_idct4x4_16_add_sse2>, 4, 0, VPX_BITS_8, 1) | |
| 476 | + { &fdct_wrapper<vpx_highbd_fdct4x4_sse2>, | |
| 477 | + &highbd_idct_wrapper<vpx_highbd_idct4x4_16_add_sse2>, 4, 2 }, | |
| 478 | + { &fdct_wrapper<vpx_highbd_fdct8x8_sse2>, | |
| 479 | + &highbd_idct_wrapper<vpx_highbd_idct8x8_64_add_sse2>, 8, 2 }, | |
| 480 | + { &fdct_wrapper<vpx_highbd_fdct16x16_sse2>, | |
| 481 | + &highbd_idct_wrapper<vpx_highbd_idct16x16_256_add_sse2>, 16, 2 }, | |
| 482 | + { &fdct_wrapper<vpx_highbd_fdct32x32_sse2>, | |
| 483 | + &highbd_idct_wrapper<vpx_highbd_idct32x32_1024_add_sse2>, 32, 2 }, | |
| 484 | +#endif | |
| 485 | + { &fdct_wrapper<vpx_fdct4x4_sse2>, &idct_wrapper<vpx_idct4x4_16_add_sse2>, 4, | |
| 486 | + 1 }, | |
| 487 | + { &fdct_wrapper<vpx_fdct8x8_sse2>, &idct_wrapper<vpx_idct8x8_64_add_sse2>, 8, | |
| 488 | + 1 }, | |
| 489 | + { &fdct_wrapper<vpx_fdct16x16_sse2>, | |
| 490 | + &idct_wrapper<vpx_idct16x16_256_add_sse2>, 16, 1 }, | |
| 491 | + { &fdct_wrapper<vpx_fdct32x32_sse2>, | |
| 492 | + &idct_wrapper<vpx_idct32x32_1024_add_sse2>, 32, 1 } | |
| 524 | 493 | }; |
| 525 | 494 | |
| 526 | −INSTANTIATE_TEST_CASE_P(SSE2, TransDCT, ::testing::ValuesIn(sse2_dct_tests)); | |
| 495 | +INSTANTIATE_TEST_CASE_P( | |
| 496 | + SSE2, TransDCT, | |
| 497 | + ::testing::Combine( | |
| 498 | + ::testing::Range(0, static_cast<int>(sizeof(dct_sse2_func_info) / | |
| 499 | + sizeof(dct_sse2_func_info[0]))), | |
| 500 | + ::testing::Values(dct_sse2_func_info), ::testing::Values(0), | |
| 501 | + ::testing::Values(VPX_BITS_8, VPX_BITS_10, VPX_BITS_12))); | |
| 527 | 502 | #endif // HAVE_SSE2 |
| 528 | 503 | |
| 529 | 504 | #if HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && ARCH_X86_64 |
| 505 | +// vpx_fdct8x8_ssse3 is only available in 64 bit builds. | |
| 506 | +static const FuncInfo dct_ssse3_func_info = { | |
| 507 | + &fdct_wrapper<vpx_fdct8x8_ssse3>, &idct_wrapper<vpx_idct8x8_64_add_sse2>, 8, 1 | |
| 508 | +}; | |
| 509 | + | |
| 530 | 510 | // TODO(johannkoenig): high bit depth fdct8x8. |
| 531 | −INSTANTIATE_TEST_CASE_P( | |
| 532 | − SSSE3, TransDCT, | |
| 533 | − ::testing::Values( | |
| 534 | − // vpx_fdct8x8_ssse3 is only available in 64 bit builds. | |
| 535 | − make_tuple(&fdct_wrapper<vpx_fdct8x8_ssse3>, | |
| 536 | − &idct_wrapper<vpx_idct8x8_64_add_sse2>, 8, 0, VPX_BITS_8, | |
| 537 | − 1))); | |
| 511 | +INSTANTIATE_TEST_CASE_P(SSSE3, TransDCT, | |
| 512 | + ::testing::Values(make_tuple(0, &dct_ssse3_func_info, 0, | |
| 513 | + VPX_BITS_8))); | |
| 538 | 514 | #endif // HAVE_SSSE3 && !CONFIG_VP9_HIGHBITDEPTH && ARCH_X86_64 |
| 539 | 515 | |
| 540 | 516 | #if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH |
| 517 | +static const FuncInfo dct_avx2_func_info = { | |
| 518 | + &fdct_wrapper<vpx_fdct32x32_avx2>, &idct_wrapper<vpx_idct32x32_1024_add_sse2>, | |
| 519 | + 32, 1 | |
| 520 | +}; | |
| 521 | + | |
| 541 | 522 | // TODO(johannkoenig): high bit depth fdct32x32. |
| 542 | −INSTANTIATE_TEST_CASE_P( | |
| 543 | − AVX2, TransDCT, | |
| 544 | − ::testing::Values(make_tuple(&fdct_wrapper<vpx_fdct32x32_avx2>, | |
| 545 | − &idct_wrapper<vpx_idct32x32_1024_add_sse2>, 32, | |
| 546 | − 0, VPX_BITS_8, 1))); | |
| 523 | +INSTANTIATE_TEST_CASE_P(AVX2, TransDCT, | |
| 524 | + ::testing::Values(make_tuple(0, &dct_avx2_func_info, 0, | |
| 525 | + VPX_BITS_8))); | |
| 547 | 526 | #endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH |
| 548 | 527 | |
| 549 | 528 | #if HAVE_NEON |
| 529 | +static const FuncInfo dct_neon_func_info[4] = { | |
| 530 | + { &fdct_wrapper<vpx_fdct4x4_neon>, &idct_wrapper<vpx_idct4x4_16_add_neon>, 4, | |
| 531 | + 1 }, | |
| 532 | + { &fdct_wrapper<vpx_fdct8x8_neon>, &idct_wrapper<vpx_idct8x8_64_add_neon>, 8, | |
| 533 | + 1 }, | |
| 534 | + { &fdct_wrapper<vpx_fdct16x16_neon>, | |
| 535 | + &idct_wrapper<vpx_idct16x16_256_add_neon>, 16, 1 }, | |
| 536 | + { &fdct_wrapper<vpx_fdct32x32_neon>, | |
| 537 | + &idct_wrapper<vpx_idct32x32_1024_add_neon>, 32, 1 } | |
| 538 | +}; | |
| 539 | + | |
| 550 | 540 | INSTANTIATE_TEST_CASE_P( |
| 551 | 541 | NEON, TransDCT, |
| 552 | − ::testing::Values(make_tuple(&fdct_wrapper<vpx_fdct32x32_neon>, | |
| 553 | − &idct_wrapper<vpx_idct32x32_1024_add_neon>, 32, | |
| 554 | − 0, VPX_BITS_8, 1), | |
| 555 | − make_tuple(&fdct_wrapper<vpx_fdct16x16_neon>, | |
| 556 | − &idct_wrapper<vpx_idct16x16_256_add_neon>, 16, | |
| 557 | − 0, VPX_BITS_8, 1), | |
| 558 | − make_tuple(&fdct_wrapper<vpx_fdct8x8_neon>, | |
| 559 | − &idct_wrapper<vpx_idct8x8_64_add_neon>, 8, 0, | |
| 560 | − VPX_BITS_8, 1), | |
| 561 | − make_tuple(&fdct_wrapper<vpx_fdct4x4_neon>, | |
| 562 | − &idct_wrapper<vpx_idct4x4_16_add_neon>, 4, 0, | |
| 563 | − VPX_BITS_8, 1))); | |
| 542 | + ::testing::Combine(::testing::Range(0, 4), | |
| 543 | + ::testing::Values(dct_neon_func_info), | |
| 544 | + ::testing::Values(0), ::testing::Values(VPX_BITS_8))); | |
| 564 | 545 | #endif // HAVE_NEON |
| 565 | 546 | |
| 566 | 547 | #if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH |
| 567 | −INSTANTIATE_TEST_CASE_P( | |
| 568 | − MSA, TransDCT, | |
| 569 | − ::testing::Values(make_tuple(&fdct_wrapper<vpx_fdct32x32_msa>, | |
| 570 | − &idct_wrapper<vpx_idct32x32_1024_add_msa>, 32, | |
| 571 | − 0, VPX_BITS_8, 1), | |
| 572 | − make_tuple(&fdct_wrapper<vpx_fdct16x16_msa>, | |
| 573 | − &idct_wrapper<vpx_idct16x16_256_add_msa>, 16, | |
| 574 | − 0, VPX_BITS_8, 1), | |
| 575 | − make_tuple(&fdct_wrapper<vpx_fdct8x8_msa>, | |
| 576 | − &idct_wrapper<vpx_idct8x8_64_add_msa>, 8, 0, | |
| 577 | − VPX_BITS_8, 1), | |
| 578 | − make_tuple(&fdct_wrapper<vpx_fdct4x4_msa>, | |
| 579 | − &idct_wrapper<vpx_idct4x4_16_add_msa>, 4, 0, | |
| 580 | − VPX_BITS_8, 1))); | |
| 548 | +static const FuncInfo dct_msa_func_info[4] = { | |
| 549 | + { &fdct_wrapper<vpx_fdct4x4_msa>, &idct_wrapper<vpx_idct4x4_16_add_msa>, 4, | |
| 550 | + 1 }, | |
| 551 | + { &fdct_wrapper<vpx_fdct8x8_msa>, &idct_wrapper<vpx_idct8x8_64_add_msa>, 8, | |
| 552 | + 1 }, | |
| 553 | + { &fdct_wrapper<vpx_fdct16x16_msa>, &idct_wrapper<vpx_idct16x16_256_add_msa>, | |
| 554 | + 16, 1 }, | |
| 555 | + { &fdct_wrapper<vpx_fdct32x32_msa>, &idct_wrapper<vpx_idct32x32_1024_add_msa>, | |
| 556 | + 32, 1 } | |
| 557 | +}; | |
| 558 | + | |
| 559 | +INSTANTIATE_TEST_CASE_P(MSA, TransDCT, | |
| 560 | + ::testing::Combine(::testing::Range(0, 4), | |
| 561 | + ::testing::Values(dct_msa_func_info), | |
| 562 | + ::testing::Values(0), | |
| 563 | + ::testing::Values(VPX_BITS_8))); | |
| 581 | 564 | #endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH |
| 582 | 565 | |
| 583 | 566 | #if HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH |
| 584 | −INSTANTIATE_TEST_CASE_P( | |
| 585 | − VSX, TransDCT, | |
| 586 | − ::testing::Values(make_tuple(&fdct_wrapper<vpx_fdct4x4_c>, | |
| 587 | − &idct_wrapper<vpx_idct4x4_16_add_vsx>, 4, 0, | |
| 588 | − VPX_BITS_8, 1))); | |
| 567 | +static const FuncInfo dct_vsx_func_info = { | |
| 568 | + &fdct_wrapper<vpx_fdct4x4_c>, &idct_wrapper<vpx_idct4x4_16_add_vsx>, 4, 1 | |
| 569 | +}; | |
| 570 | + | |
| 571 | +INSTANTIATE_TEST_CASE_P(VSX, TransDCT, | |
| 572 | + ::testing::Values(make_tuple(0, &dct_vsx_func_info, 0, | |
| 573 | + VPX_BITS_8))); | |
| 589 | 574 | #endif // HAVE_VSX && !CONFIG_VP9_HIGHBITDEPTH && |
| 590 | 575 | |
| 591 | 576 | #endif // !CONFIG_EMULATE_HARDWARE |
| @@ -598,7 +583,7 @@ class TransHT : public TransTestBase { · 6 unmodified lines | ||
| 598 | 583 | }; |
| 599 | 584 | |
| 600 | 585 | TEST_P(TransHT, AccuracyCheck) { |
| 601 | − RunAccuracyCheck(size_ == 16 && bit_depth_ > 10 ? 2 : 1); | |
| 586 | + RunAccuracyCheck(size_ == 16 && bit_depth_ > 10 && pixel_size_ == 2 ? 2 : 1); | |
| 602 | 587 | } |
| 603 | 588 | |
| 604 | 589 | TEST_P(TransHT, CoeffCheck) { RunCoeffCheck(); } |
| @@ -607,397 +592,84 @@ TEST_P(TransHT, MemCheck) { RunMemCheck(); } · 2 unmodified lines | ||
| 607 | 592 | |
| 608 | 593 | TEST_P(TransHT, InvAccuracyCheck) { RunInvAccuracyCheck(1); } |
| 609 | 594 | |
| 610 | −const DctParam c_ht_tests[] = { | |
| 595 | +static const FuncInfo ht_c_func_info[] = { | |
| 611 | 596 | #if CONFIG_VP9_HIGHBITDEPTH |
| 612 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 613 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 0, | |
| 614 | − VPX_BITS_8, 2), | |
| 615 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 616 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 1, | |
| 617 | − VPX_BITS_8, 2), | |
| 618 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 619 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 2, | |
| 620 | − VPX_BITS_8, 2), | |
| 621 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 622 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 3, | |
| 623 | − VPX_BITS_8, 2), | |
| 624 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 625 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 0, | |
| 626 | − VPX_BITS_10, 2), | |
| 627 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 628 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 1, | |
| 629 | − VPX_BITS_10, 2), | |
| 630 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 631 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 2, | |
| 632 | − VPX_BITS_10, 2), | |
| 633 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 634 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 3, | |
| 635 | − VPX_BITS_10, 2), | |
| 636 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 637 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 0, | |
| 638 | − VPX_BITS_12, 2), | |
| 639 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 640 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 1, | |
| 641 | − VPX_BITS_12, 2), | |
| 642 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 643 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 2, | |
| 644 | − VPX_BITS_12, 2), | |
| 645 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 646 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, 16, 3, | |
| 647 | − VPX_BITS_12, 2), | |
| 648 | − | |
| 649 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 650 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 0, VPX_BITS_8, | |
| 651 | − 2), | |
| 652 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 653 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 1, VPX_BITS_8, | |
| 654 | − 2), | |
| 655 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 656 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 2, VPX_BITS_8, | |
| 657 | − 2), | |
| 658 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 659 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 3, VPX_BITS_8, | |
| 660 | − 2), | |
| 661 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 662 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 0, VPX_BITS_10, | |
| 663 | − 2), | |
| 664 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 665 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 1, VPX_BITS_10, | |
| 666 | − 2), | |
| 667 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 668 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 2, VPX_BITS_10, | |
| 669 | − 2), | |
| 670 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 671 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 3, VPX_BITS_10, | |
| 672 | − 2), | |
| 673 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 674 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 0, VPX_BITS_12, | |
| 675 | − 2), | |
| 676 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 677 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 1, VPX_BITS_12, | |
| 678 | − 2), | |
| 679 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 680 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 2, VPX_BITS_12, | |
| 681 | − 2), | |
| 682 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 683 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, 3, VPX_BITS_12, | |
| 684 | − 2), | |
| 685 | − | |
| 686 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 687 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 0, VPX_BITS_8, | |
| 688 | − 2), | |
| 689 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 690 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 1, VPX_BITS_8, | |
| 691 | − 2), | |
| 692 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 693 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 2, VPX_BITS_8, | |
| 694 | − 2), | |
| 695 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 696 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 3, VPX_BITS_8, | |
| 697 | − 2), | |
| 698 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 699 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 0, VPX_BITS_10, | |
| 700 | − 2), | |
| 701 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 702 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 1, VPX_BITS_10, | |
| 703 | − 2), | |
| 704 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 705 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 2, VPX_BITS_10, | |
| 706 | − 2), | |
| 707 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 708 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 3, VPX_BITS_10, | |
| 709 | − 2), | |
| 710 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 711 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 0, VPX_BITS_12, | |
| 712 | − 2), | |
| 713 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 714 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 1, VPX_BITS_12, | |
| 715 | − 2), | |
| 716 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 717 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 2, VPX_BITS_12, | |
| 718 | − 2), | |
| 719 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 720 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, 3, VPX_BITS_12, | |
| 721 | − 2), | |
| 722 | −#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 723 | − make_tuple(&vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_c>, 16, 0, | |
| 724 | − VPX_BITS_8, 1), | |
| 725 | − make_tuple(&vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_c>, 16, 1, | |
| 726 | − VPX_BITS_8, 1), | |
| 727 | − make_tuple(&vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_c>, 16, 2, | |
| 728 | − VPX_BITS_8, 1), | |
| 729 | − make_tuple(&vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_c>, 16, 3, | |
| 730 | − VPX_BITS_8, 1), | |
| 731 | − | |
| 732 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_c>, 8, 0, VPX_BITS_8, | |
| 733 | − 1), | |
| 734 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_c>, 8, 1, VPX_BITS_8, | |
| 735 | − 1), | |
| 736 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_c>, 8, 2, VPX_BITS_8, | |
| 737 | − 1), | |
| 738 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_c>, 8, 3, VPX_BITS_8, | |
| 739 | − 1), | |
| 740 | − | |
| 741 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_c>, 4, 0, VPX_BITS_8, | |
| 742 | − 1), | |
| 743 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_c>, 4, 1, VPX_BITS_8, | |
| 744 | − 1), | |
| 745 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_c>, 4, 2, VPX_BITS_8, | |
| 746 | − 1), | |
| 747 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_c>, 4, 3, VPX_BITS_8, | |
| 748 | − 1) | |
| 597 | + { &vp9_highbd_fht4x4_c, &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_c>, 4, | |
| 598 | + 2 }, | |
| 599 | + { &vp9_highbd_fht8x8_c, &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_c>, 8, | |
| 600 | + 2 }, | |
| 601 | + { &vp9_highbd_fht16x16_c, &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_c>, | |
| 602 | + 16, 2 }, | |
| 603 | +#endif | |
| 604 | + { &vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_c>, 4, 1 }, | |
| 605 | + { &vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_c>, 8, 1 }, | |
| 606 | + { &vp9_fht16x16_c, &iht_wrapper<vp9_iht16x16_256_add_c>, 16, 1 } | |
| 749 | 607 | }; |
| 750 | 608 | |
| 751 | −INSTANTIATE_TEST_CASE_P(C, TransHT, ::testing::ValuesIn(c_ht_tests)); | |
| 609 | +INSTANTIATE_TEST_CASE_P( | |
| 610 | + C, TransHT, | |
| 611 | + ::testing::Combine( | |
| 612 | + ::testing::Range(0, static_cast<int>(sizeof(ht_c_func_info) / | |
| 613 | + sizeof(ht_c_func_info[0]))), | |
| 614 | + ::testing::Values(ht_c_func_info), ::testing::Range(0, 4), | |
| 615 | + ::testing::Values(VPX_BITS_8, VPX_BITS_10, VPX_BITS_12))); | |
| 752 | 616 | |
| 753 | 617 | #if !CONFIG_EMULATE_HARDWARE |
| 754 | 618 | |
| 755 | 619 | #if HAVE_NEON |
| 756 | 620 | |
| 757 | −const DctParam neon_ht_tests[] = { | |
| 621 | +static const FuncInfo ht_neon_func_info[] = { | |
| 758 | 622 | #if CONFIG_VP9_HIGHBITDEPTH |
| 759 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 760 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 0, | |
| 761 | − VPX_BITS_8, 2), | |
| 762 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 763 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 1, | |
| 764 | − VPX_BITS_8, 2), | |
| 765 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 766 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 2, | |
| 767 | − VPX_BITS_8, 2), | |
| 768 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 769 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 3, | |
| 770 | − VPX_BITS_8, 2), | |
| 771 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 772 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 0, | |
| 773 | − VPX_BITS_10, 2), | |
| 774 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 775 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 1, | |
| 776 | − VPX_BITS_10, 2), | |
| 777 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 778 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 2, | |
| 779 | − VPX_BITS_10, 2), | |
| 780 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 781 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 3, | |
| 782 | − VPX_BITS_10, 2), | |
| 783 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 784 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 0, | |
| 785 | − VPX_BITS_12, 2), | |
| 786 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 787 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 1, | |
| 788 | − VPX_BITS_12, 2), | |
| 789 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 790 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 2, | |
| 791 | − VPX_BITS_12, 2), | |
| 792 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 793 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, 3, | |
| 794 | − VPX_BITS_12, 2), | |
| 795 | − | |
| 796 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 797 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 0, | |
| 798 | − VPX_BITS_8, 2), | |
| 799 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 800 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 1, | |
| 801 | − VPX_BITS_8, 2), | |
| 802 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 803 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 2, | |
| 804 | − VPX_BITS_8, 2), | |
| 805 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 806 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 3, | |
| 807 | − VPX_BITS_8, 2), | |
| 808 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 809 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 0, | |
| 810 | − VPX_BITS_10, 2), | |
| 811 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 812 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 1, | |
| 813 | − VPX_BITS_10, 2), | |
| 814 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 815 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 2, | |
| 816 | − VPX_BITS_10, 2), | |
| 817 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 818 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 3, | |
| 819 | − VPX_BITS_10, 2), | |
| 820 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 821 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 0, | |
| 822 | − VPX_BITS_12, 2), | |
| 823 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 824 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 1, | |
| 825 | − VPX_BITS_12, 2), | |
| 826 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 827 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 2, | |
| 828 | − VPX_BITS_12, 2), | |
| 829 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 830 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, 3, | |
| 831 | − VPX_BITS_12, 2), | |
| 832 | −#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 833 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 0, | |
| 834 | − VPX_BITS_8, 1), | |
| 835 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 1, | |
| 836 | − VPX_BITS_8, 1), | |
| 837 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 2, | |
| 838 | − VPX_BITS_8, 1), | |
| 839 | − make_tuple(&vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 3, | |
| 840 | − VPX_BITS_8, 1), | |
| 841 | − | |
| 842 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 0, | |
| 843 | − VPX_BITS_8, 1), | |
| 844 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 1, | |
| 845 | − VPX_BITS_8, 1), | |
| 846 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 2, | |
| 847 | − VPX_BITS_8, 1), | |
| 848 | − make_tuple(&vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 3, | |
| 849 | − VPX_BITS_8, 1) | |
| 623 | + { &vp9_highbd_fht4x4_c, &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_neon>, 4, | |
| 624 | + 2 }, | |
| 625 | + { &vp9_highbd_fht8x8_c, &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_neon>, 8, | |
| 626 | + 2 }, | |
| 627 | +#endif | |
| 628 | + { &vp9_fht4x4_c, &iht_wrapper<vp9_iht4x4_16_add_neon>, 4, 1 }, | |
| 629 | + { &vp9_fht8x8_c, &iht_wrapper<vp9_iht8x8_64_add_neon>, 8, 1 } | |
| 850 | 630 | }; |
| 851 | 631 | |
| 852 | −INSTANTIATE_TEST_CASE_P(NEON, TransHT, ::testing::ValuesIn(neon_ht_tests)); | |
| 632 | +INSTANTIATE_TEST_CASE_P( | |
| 633 | + NEON, TransHT, | |
| 634 | + ::testing::Combine( | |
| 635 | + ::testing::Range(0, static_cast<int>(sizeof(ht_neon_func_info) / | |
| 636 | + sizeof(ht_neon_func_info[0]))), | |
| 637 | + ::testing::Values(ht_neon_func_info), ::testing::Range(0, 4), | |
| 638 | + ::testing::Values(VPX_BITS_8, VPX_BITS_10, VPX_BITS_12))); | |
| 853 | 639 | #endif // HAVE_NEON |
| 854 | 640 | |
| 855 | 641 | #if HAVE_SSE2 |
| 856 | −INSTANTIATE_TEST_CASE_P( | |
| 857 | − SSE2, TransHT, | |
| 858 | − ::testing::Values( | |
| 859 | − make_tuple(&vp9_fht16x16_sse2, &iht_wrapper<vp9_iht16x16_256_add_sse2>, | |
| 860 | − 16, 0, VPX_BITS_8, 1), | |
| 861 | − make_tuple(&vp9_fht16x16_sse2, &iht_wrapper<vp9_iht16x16_256_add_sse2>, | |
| 862 | − 16, 1, VPX_BITS_8, 1), | |
| 863 | − make_tuple(&vp9_fht16x16_sse2, &iht_wrapper<vp9_iht16x16_256_add_sse2>, | |
| 864 | − 16, 2, VPX_BITS_8, 1), | |
| 865 | − make_tuple(&vp9_fht16x16_sse2, &iht_wrapper<vp9_iht16x16_256_add_sse2>, | |
| 866 | − 16, 3, VPX_BITS_8, 1), | |
| 867 | − | |
| 868 | − make_tuple(&vp9_fht8x8_sse2, &iht_wrapper<vp9_iht8x8_64_add_sse2>, 8, 0, | |
| 869 | − VPX_BITS_8, 1), | |
| 870 | − make_tuple(&vp9_fht8x8_sse2, &iht_wrapper<vp9_iht8x8_64_add_sse2>, 8, 1, | |
| 871 | − VPX_BITS_8, 1), | |
| 872 | − make_tuple(&vp9_fht8x8_sse2, &iht_wrapper<vp9_iht8x8_64_add_sse2>, 8, 2, | |
| 873 | − VPX_BITS_8, 1), | |
| 874 | − make_tuple(&vp9_fht8x8_sse2, &iht_wrapper<vp9_iht8x8_64_add_sse2>, 8, 3, | |
| 875 | − VPX_BITS_8, 1), | |
| 876 | − | |
| 877 | − make_tuple(&vp9_fht4x4_sse2, &iht_wrapper<vp9_iht4x4_16_add_sse2>, 4, 0, | |
| 878 | − VPX_BITS_8, 1), | |
| 879 | − make_tuple(&vp9_fht4x4_sse2, &iht_wrapper<vp9_iht4x4_16_add_sse2>, 4, 1, | |
| 880 | − VPX_BITS_8, 1), | |
| 881 | − make_tuple(&vp9_fht4x4_sse2, &iht_wrapper<vp9_iht4x4_16_add_sse2>, 4, 2, | |
| 882 | − VPX_BITS_8, 1), | |
| 883 | − make_tuple(&vp9_fht4x4_sse2, &iht_wrapper<vp9_iht4x4_16_add_sse2>, 4, 3, | |
| 884 | − VPX_BITS_8, 1))); | |
| 642 | + | |
| 643 | +static const FuncInfo ht_sse2_func_info[3] = { | |
| 644 | + { &vp9_fht4x4_sse2, &iht_wrapper<vp9_iht4x4_16_add_sse2>, 4, 1 }, | |
| 645 | + { &vp9_fht8x8_sse2, &iht_wrapper<vp9_iht8x8_64_add_sse2>, 8, 1 }, | |
| 646 | + { &vp9_fht16x16_sse2, &iht_wrapper<vp9_iht16x16_256_add_sse2>, 16, 1 } | |
| 647 | +}; | |
| 648 | + | |
| 649 | +INSTANTIATE_TEST_CASE_P(SSE2, TransHT, | |
| 650 | + ::testing::Combine(::testing::Range(0, 3), | |
| 651 | + ::testing::Values(ht_sse2_func_info), | |
| 652 | + ::testing::Range(0, 4), | |
| 653 | + ::testing::Values(VPX_BITS_8))); | |
| 885 | 654 | #endif // HAVE_SSE2 |
| 886 | 655 | |
| 887 | 656 | #if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH |
| 657 | +static const FuncInfo ht_sse4_1_func_info[3] = { | |
| 658 | + { &vp9_highbd_fht4x4_c, &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, | |
| 659 | + 4, 2 }, | |
| 660 | + { vp9_highbd_fht8x8_c, &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, | |
| 661 | + 8, 2 }, | |
| 662 | + { &vp9_highbd_fht16x16_c, | |
| 663 | + &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, 2 } | |
| 664 | +}; | |
| 665 | + | |
| 888 | 666 | INSTANTIATE_TEST_CASE_P( |
| 889 | 667 | SSE4_1, TransHT, |
| 890 | − ::testing::Values( | |
| 891 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 892 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 893 | − 0, VPX_BITS_8, 2), | |
| 894 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 895 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 896 | − 1, VPX_BITS_8, 2), | |
| 897 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 898 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 899 | − 2, VPX_BITS_8, 2), | |
| 900 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 901 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 902 | − 3, VPX_BITS_8, 2), | |
| 903 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 904 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 905 | − 0, VPX_BITS_10, 2), | |
| 906 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 907 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 908 | − 1, VPX_BITS_10, 2), | |
| 909 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 910 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 911 | − 2, VPX_BITS_10, 2), | |
| 912 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 913 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 914 | − 3, VPX_BITS_10, 2), | |
| 915 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 916 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 917 | − 0, VPX_BITS_12, 2), | |
| 918 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 919 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 920 | − 1, VPX_BITS_12, 2), | |
| 921 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 922 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 923 | − 2, VPX_BITS_12, 2), | |
| 924 | − make_tuple(&vp9_highbd_fht16x16_c, | |
| 925 | − &highbd_iht_wrapper<vp9_highbd_iht16x16_256_add_sse4_1>, 16, | |
| 926 | − 3, VPX_BITS_12, 2), | |
| 927 | − | |
| 928 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 929 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 0, | |
| 930 | − VPX_BITS_8, 2), | |
| 931 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 932 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 1, | |
| 933 | − VPX_BITS_8, 2), | |
| 934 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 935 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 2, | |
| 936 | − VPX_BITS_8, 2), | |
| 937 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 938 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 3, | |
| 939 | − VPX_BITS_8, 2), | |
| 940 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 941 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 0, | |
| 942 | − VPX_BITS_10, 2), | |
| 943 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 944 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 1, | |
| 945 | − VPX_BITS_10, 2), | |
| 946 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 947 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 2, | |
| 948 | − VPX_BITS_10, 2), | |
| 949 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 950 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 3, | |
| 951 | − VPX_BITS_10, 2), | |
| 952 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 953 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 0, | |
| 954 | − VPX_BITS_12, 2), | |
| 955 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 956 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 1, | |
| 957 | − VPX_BITS_12, 2), | |
| 958 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 959 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 2, | |
| 960 | − VPX_BITS_12, 2), | |
| 961 | − make_tuple(&vp9_highbd_fht8x8_c, | |
| 962 | − &highbd_iht_wrapper<vp9_highbd_iht8x8_64_add_sse4_1>, 8, 3, | |
| 963 | − VPX_BITS_12, 2), | |
| 964 | − | |
| 965 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 966 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 0, | |
| 967 | − VPX_BITS_8, 2), | |
| 968 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 969 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 1, | |
| 970 | − VPX_BITS_8, 2), | |
| 971 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 972 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 2, | |
| 973 | − VPX_BITS_8, 2), | |
| 974 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 975 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 3, | |
| 976 | − VPX_BITS_8, 2), | |
| 977 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 978 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 0, | |
| 979 | − VPX_BITS_10, 2), | |
| 980 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 981 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 1, | |
| 982 | − VPX_BITS_10, 2), | |
| 983 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 984 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 2, | |
| 985 | − VPX_BITS_10, 2), | |
| 986 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 987 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 3, | |
| 988 | − VPX_BITS_10, 2), | |
| 989 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 990 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 0, | |
| 991 | − VPX_BITS_12, 2), | |
| 992 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 993 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 1, | |
| 994 | − VPX_BITS_12, 2), | |
| 995 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 996 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 2, | |
| 997 | − VPX_BITS_12, 2), | |
| 998 | − make_tuple(&vp9_highbd_fht4x4_c, | |
| 999 | − &highbd_iht_wrapper<vp9_highbd_iht4x4_16_add_sse4_1>, 4, 3, | |
| 1000 | − VPX_BITS_12, 2))); | |
| 668 | + ::testing::Combine(::testing::Range(0, 3), | |
| 669 | + ::testing::Values(ht_sse4_1_func_info), | |
| 670 | + ::testing::Range(0, 4), | |
| 671 | + ::testing::Values(VPX_BITS_8, VPX_BITS_10, | |
| 672 | + VPX_BITS_12))); | |
| 1001 | 673 | #endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH |
| 1002 | 674 | |
| 1003 | 675 | #endif // !CONFIG_EMULATE_HARDWARE |
| @@ -1017,29 +689,29 @@ TEST_P(TransWHT, MemCheck) { RunMemCheck(); } · 13 unmodified lines | ||
| 1017 | 689 | |
| 1018 | 690 | TEST_P(TransWHT, InvAccuracyCheck) { RunInvAccuracyCheck(0); } |
| 1019 | 691 | |
| 1020 | −const DctParam c_wht_tests[] = { | |
| 692 | +static const FuncInfo wht_c_func_info[] = { | |
| 1021 | 693 | #if CONFIG_VP9_HIGHBITDEPTH |
| 1022 | − make_tuple(&fdct_wrapper<vp9_highbd_fwht4x4_c>, | |
| 1023 | − &highbd_idct_wrapper<vpx_highbd_iwht4x4_16_add_c>, 4, 0, | |
| 1024 | − VPX_BITS_8, 2), | |
| 1025 | − make_tuple(&fdct_wrapper<vp9_highbd_fwht4x4_c>, | |
| 1026 | − &highbd_idct_wrapper<vpx_highbd_iwht4x4_16_add_c>, 4, 0, | |
| 1027 | − VPX_BITS_10, 2), | |
| 1028 | − make_tuple(&fdct_wrapper<vp9_highbd_fwht4x4_c>, | |
| 1029 | − &highbd_idct_wrapper<vpx_highbd_iwht4x4_16_add_c>, 4, 0, | |
| 1030 | − VPX_BITS_12, 2), | |
| 1031 | −#endif // CONFIG_VP9_HIGHBITDEPTH | |
| 1032 | − make_tuple(&fdct_wrapper<vp9_fwht4x4_c>, &idct_wrapper<vpx_iwht4x4_16_add_c>, | |
| 1033 | − 4, 0, VPX_BITS_8, 1) | |
| 694 | + { &fdct_wrapper<vp9_highbd_fwht4x4_c>, | |
| 695 | + &highbd_idct_wrapper<vpx_highbd_iwht4x4_16_add_c>, 4, 2 }, | |
| 696 | +#endif | |
| 697 | + { &fdct_wrapper<vp9_fwht4x4_c>, &idct_wrapper<vpx_iwht4x4_16_add_c>, 4, 1 } | |
| 1034 | 698 | }; |
| 1035 | 699 | |
| 1036 | −INSTANTIATE_TEST_CASE_P(C, TransWHT, ::testing::ValuesIn(c_wht_tests)); | |
| 700 | +INSTANTIATE_TEST_CASE_P( | |
| 701 | + C, TransWHT, | |
| 702 | + ::testing::Combine( | |
| 703 | + ::testing::Range(0, static_cast<int>(sizeof(wht_c_func_info) / | |
| 704 | + sizeof(wht_c_func_info[0]))), | |
| 705 | + ::testing::Values(wht_c_func_info), ::testing::Values(0), | |
| 706 | + ::testing::Values(VPX_BITS_8, VPX_BITS_10, VPX_BITS_12))); | |
| 1037 | 707 | |
| 1038 | 708 | #if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE |
| 1039 | −INSTANTIATE_TEST_CASE_P( | |
| 1040 | − SSE2, TransWHT, | |
| 1041 | − ::testing::Values(make_tuple(&fdct_wrapper<vp9_fwht4x4_sse2>, | |
| 1042 | − &idct_wrapper<vpx_iwht4x4_16_add_sse2>, 4, 0, | |
| 1043 | − VPX_BITS_8, 1))); | |
| 709 | +static const FuncInfo wht_sse2_func_info = { | |
| 710 | + &fdct_wrapper<vp9_fwht4x4_sse2>, &idct_wrapper<vpx_iwht4x4_16_add_sse2>, 4, 1 | |
| 711 | +}; | |
| 712 | + | |
| 713 | +INSTANTIATE_TEST_CASE_P(SSE2, TransWHT, | |
| 714 | + ::testing::Values(make_tuple(0, &wht_sse2_func_info, 0, | |
| 715 | + VPX_BITS_8))); | |
| 1044 | 716 | #endif // HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE |
| 1045 | 717 | } // namespace |