OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
9 */ | 9 */ |
10 | 10 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
46 vp9_fht4x4_c(in, out, stride, tx_type); | 46 vp9_fht4x4_c(in, out, stride, tx_type); |
47 } | 47 } |
48 | 48 |
49 void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride, | 49 void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride, |
50 int tx_type) { | 50 int tx_type) { |
51 vp9_fwht4x4_c(in, out, stride); | 51 vp9_fwht4x4_c(in, out, stride); |
52 } | 52 } |
53 | 53 |
54 #if CONFIG_VP9_HIGHBITDEPTH | 54 #if CONFIG_VP9_HIGHBITDEPTH |
55 void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) { | 55 void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) { |
56 vp9_high_idct4x4_16_add_c(in, out, stride, 10); | 56 vp9_highbd_idct4x4_16_add_c(in, out, stride, 10); |
57 } | 57 } |
58 | 58 |
59 void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) { | 59 void idct4x4_12(const tran_low_t *in, uint8_t *out, int stride) { |
60 vp9_high_idct4x4_16_add_c(in, out, stride, 12); | 60 vp9_highbd_idct4x4_16_add_c(in, out, stride, 12); |
61 } | 61 } |
62 | 62 |
63 void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { | 63 void iht4x4_10(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { |
64 vp9_high_iht4x4_16_add_c(in, out, stride, tx_type, 10); | 64 vp9_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 10); |
65 } | 65 } |
66 | 66 |
67 void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { | 67 void iht4x4_12(const tran_low_t *in, uint8_t *out, int stride, int tx_type) { |
68 vp9_high_iht4x4_16_add_c(in, out, stride, tx_type, 12); | 68 vp9_highbd_iht4x4_16_add_c(in, out, stride, tx_type, 12); |
69 } | 69 } |
70 | 70 |
71 void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) { | 71 void iwht4x4_10(const tran_low_t *in, uint8_t *out, int stride) { |
72 vp9_high_iwht4x4_16_add_c(in, out, stride, 10); | 72 vp9_highbd_iwht4x4_16_add_c(in, out, stride, 10); |
73 } | 73 } |
74 | 74 |
75 void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) { | 75 void iwht4x4_12(const tran_low_t *in, uint8_t *out, int stride) { |
76 vp9_high_iwht4x4_16_add_c(in, out, stride, 12); | 76 vp9_highbd_iwht4x4_16_add_c(in, out, stride, 12); |
77 } | 77 } |
78 #endif | 78 #endif |
79 | 79 |
80 class Trans4x4TestBase { | 80 class Trans4x4TestBase { |
81 public: | 81 public: |
82 virtual ~Trans4x4TestBase() {} | 82 virtual ~Trans4x4TestBase() {} |
83 | 83 |
84 protected: | 84 protected: |
85 virtual void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) = 0; | 85 virtual void RunFwdTxfm(const int16_t *in, tran_low_t *out, int stride) = 0; |
86 | 86 |
(...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
401 | 401 |
402 TEST_P(Trans4x4WHT, InvAccuracyCheck) { | 402 TEST_P(Trans4x4WHT, InvAccuracyCheck) { |
403 RunInvAccuracyCheck(0); | 403 RunInvAccuracyCheck(0); |
404 } | 404 } |
405 using std::tr1::make_tuple; | 405 using std::tr1::make_tuple; |
406 | 406 |
407 #if CONFIG_VP9_HIGHBITDEPTH | 407 #if CONFIG_VP9_HIGHBITDEPTH |
408 INSTANTIATE_TEST_CASE_P( | 408 INSTANTIATE_TEST_CASE_P( |
409 C, Trans4x4DCT, | 409 C, Trans4x4DCT, |
410 ::testing::Values( | 410 ::testing::Values( |
411 make_tuple(&vp9_high_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10), | 411 make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_10, 0, VPX_BITS_10), |
412 make_tuple(&vp9_high_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12), | 412 make_tuple(&vp9_highbd_fdct4x4_c, &idct4x4_12, 0, VPX_BITS_12), |
413 make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8))); | 413 make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8))); |
414 #else | 414 #else |
415 INSTANTIATE_TEST_CASE_P( | 415 INSTANTIATE_TEST_CASE_P( |
416 C, Trans4x4DCT, | 416 C, Trans4x4DCT, |
417 ::testing::Values( | 417 ::testing::Values( |
418 make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8))); | 418 make_tuple(&vp9_fdct4x4_c, &vp9_idct4x4_16_add_c, 0, VPX_BITS_8))); |
419 #endif | 419 #endif |
420 | 420 |
421 #if CONFIG_VP9_HIGHBITDEPTH | 421 #if CONFIG_VP9_HIGHBITDEPTH |
422 INSTANTIATE_TEST_CASE_P( | 422 INSTANTIATE_TEST_CASE_P( |
423 C, Trans4x4HT, | 423 C, Trans4x4HT, |
424 ::testing::Values( | 424 ::testing::Values( |
425 make_tuple(&vp9_high_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10), | 425 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 0, VPX_BITS_10), |
426 make_tuple(&vp9_high_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10), | 426 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 1, VPX_BITS_10), |
427 make_tuple(&vp9_high_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10), | 427 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 2, VPX_BITS_10), |
428 make_tuple(&vp9_high_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10), | 428 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_10, 3, VPX_BITS_10), |
429 make_tuple(&vp9_high_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12), | 429 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 0, VPX_BITS_12), |
430 make_tuple(&vp9_high_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12), | 430 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 1, VPX_BITS_12), |
431 make_tuple(&vp9_high_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12), | 431 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 2, VPX_BITS_12), |
432 make_tuple(&vp9_high_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12), | 432 make_tuple(&vp9_highbd_fht4x4_c, &iht4x4_12, 3, VPX_BITS_12), |
433 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8), | 433 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8), |
434 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8), | 434 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8), |
435 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8), | 435 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8), |
436 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8))); | 436 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8))); |
437 #else | 437 #else |
438 INSTANTIATE_TEST_CASE_P( | 438 INSTANTIATE_TEST_CASE_P( |
439 C, Trans4x4HT, | 439 C, Trans4x4HT, |
440 ::testing::Values( | 440 ::testing::Values( |
441 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8), | 441 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 0, VPX_BITS_8), |
442 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8), | 442 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 1, VPX_BITS_8), |
443 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8), | 443 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 2, VPX_BITS_8), |
444 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8))); | 444 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_c, 3, VPX_BITS_8))); |
445 #endif | 445 #endif |
446 | 446 |
447 #if CONFIG_VP9_HIGHBITDEPTH | 447 #if CONFIG_VP9_HIGHBITDEPTH |
448 INSTANTIATE_TEST_CASE_P( | 448 INSTANTIATE_TEST_CASE_P( |
449 C, Trans4x4WHT, | 449 C, Trans4x4WHT, |
450 ::testing::Values( | 450 ::testing::Values( |
451 make_tuple(&vp9_high_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10), | 451 make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_10, 0, VPX_BITS_10), |
452 make_tuple(&vp9_high_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12), | 452 make_tuple(&vp9_highbd_fwht4x4_c, &iwht4x4_12, 0, VPX_BITS_12), |
453 make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8))); | 453 make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8))); |
454 #else | 454 #else |
455 INSTANTIATE_TEST_CASE_P( | 455 INSTANTIATE_TEST_CASE_P( |
456 C, Trans4x4WHT, | 456 C, Trans4x4WHT, |
457 ::testing::Values( | 457 ::testing::Values( |
458 make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8))); | 458 make_tuple(&vp9_fwht4x4_c, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8))); |
459 #endif | 459 #endif |
460 | 460 |
461 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH | 461 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
462 INSTANTIATE_TEST_CASE_P( | 462 INSTANTIATE_TEST_CASE_P( |
463 NEON, Trans4x4DCT, | 463 NEON, Trans4x4DCT, |
464 ::testing::Values( | 464 ::testing::Values( |
465 make_tuple(&vp9_fdct4x4_c, | 465 make_tuple(&vp9_fdct4x4_c, |
466 &vp9_idct4x4_16_add_neon, 0, VPX_BITS_8))); | 466 &vp9_idct4x4_16_add_neon, 0, VPX_BITS_8))); |
467 INSTANTIATE_TEST_CASE_P( | 467 INSTANTIATE_TEST_CASE_P( |
468 DISABLED_NEON, Trans4x4HT, | 468 DISABLED_NEON, Trans4x4HT, |
469 ::testing::Values( | 469 ::testing::Values( |
470 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 0, VPX_BITS_8), | 470 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 0, VPX_BITS_8), |
471 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 1, VPX_BITS_8), | 471 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 1, VPX_BITS_8), |
472 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 2, VPX_BITS_8), | 472 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 2, VPX_BITS_8), |
473 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, VPX_BITS_8))); | 473 make_tuple(&vp9_fht4x4_c, &vp9_iht4x4_16_add_neon, 3, VPX_BITS_8))); |
474 #endif | 474 #endif |
475 | 475 |
476 #if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_VP9_HIGHBITDEPTH | 476 #if CONFIG_USE_X86INC && HAVE_MMX && !CONFIG_VP9_HIGHBITDEPTH && \ |
| 477 !CONFIG_EMULATE_HARDWARE |
477 INSTANTIATE_TEST_CASE_P( | 478 INSTANTIATE_TEST_CASE_P( |
478 MMX, Trans4x4WHT, | 479 MMX, Trans4x4WHT, |
479 ::testing::Values( | 480 ::testing::Values( |
480 make_tuple(&vp9_fwht4x4_mmx, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8))); | 481 make_tuple(&vp9_fwht4x4_mmx, &vp9_iwht4x4_16_add_c, 0, VPX_BITS_8))); |
481 #endif | 482 #endif |
482 | 483 |
483 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH | 484 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
484 INSTANTIATE_TEST_CASE_P( | 485 INSTANTIATE_TEST_CASE_P( |
485 SSE2, Trans4x4DCT, | 486 SSE2, Trans4x4DCT, |
486 ::testing::Values( | 487 ::testing::Values( |
487 make_tuple(&vp9_fdct4x4_sse2, | 488 make_tuple(&vp9_fdct4x4_sse2, |
488 &vp9_idct4x4_16_add_sse2, 0, VPX_BITS_8))); | 489 &vp9_idct4x4_16_add_sse2, 0, VPX_BITS_8))); |
489 INSTANTIATE_TEST_CASE_P( | 490 INSTANTIATE_TEST_CASE_P( |
490 SSE2, Trans4x4HT, | 491 SSE2, Trans4x4HT, |
491 ::testing::Values( | 492 ::testing::Values( |
492 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 0, VPX_BITS_8), | 493 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 0, VPX_BITS_8), |
493 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 1, VPX_BITS_8), | 494 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 1, VPX_BITS_8), |
494 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 2, VPX_BITS_8), | 495 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 2, VPX_BITS_8), |
495 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 3, VPX_BITS_8))); | 496 make_tuple(&vp9_fht4x4_sse2, &vp9_iht4x4_16_add_sse2, 3, VPX_BITS_8))); |
496 #endif | 497 #endif |
497 | 498 |
498 } // namespace | 499 } // namespace |
OLD | NEW |