| 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 reference_8x8_dct_1d(temp_in, temp_out, 1); | 55 reference_8x8_dct_1d(temp_in, temp_out, 1); |
| 56 // Scale by some magic number | 56 // Scale by some magic number |
| 57 for (int j = 0; j < 8; ++j) | 57 for (int j = 0; j < 8; ++j) |
| 58 output[j + i * 8] = temp_out[j] * 2; | 58 output[j + i * 8] = temp_out[j] * 2; |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 using libvpx_test::ACMRandom; | 62 using libvpx_test::ACMRandom; |
| 63 | 63 |
| 64 namespace { | 64 namespace { |
| 65 |
| 66 const int kSignBiasMaxDiff255 = 1500; |
| 67 const int kSignBiasMaxDiff15 = 10000; |
| 68 |
| 65 typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride); | 69 typedef void (*FdctFunc)(const int16_t *in, tran_low_t *out, int stride); |
| 66 typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride); | 70 typedef void (*IdctFunc)(const tran_low_t *in, uint8_t *out, int stride); |
| 67 typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, | 71 typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, |
| 68 int tx_type); | 72 int tx_type); |
| 69 typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, | 73 typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, |
| 70 int tx_type); | 74 int tx_type); |
| 71 | 75 |
| 72 typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param; | 76 typedef std::tr1::tuple<FdctFunc, IdctFunc, int, vpx_bit_depth_t> Dct8x8Param; |
| 73 typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param; | 77 typedef std::tr1::tuple<FhtFunc, IhtFunc, int, vpx_bit_depth_t> Ht8x8Param; |
| 74 typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param; | 78 typedef std::tr1::tuple<IdctFunc, IdctFunc, int, vpx_bit_depth_t> Idct8x8Param; |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 for (int j = 0; j < 64; ++j) { | 157 for (int j = 0; j < 64; ++j) { |
| 154 if (test_output_block[j] < 0) | 158 if (test_output_block[j] < 0) |
| 155 ++count_sign_block[j][0]; | 159 ++count_sign_block[j][0]; |
| 156 else if (test_output_block[j] > 0) | 160 else if (test_output_block[j] > 0) |
| 157 ++count_sign_block[j][1]; | 161 ++count_sign_block[j][1]; |
| 158 } | 162 } |
| 159 } | 163 } |
| 160 | 164 |
| 161 for (int j = 0; j < 64; ++j) { | 165 for (int j = 0; j < 64; ++j) { |
| 162 const int diff = abs(count_sign_block[j][0] - count_sign_block[j][1]); | 166 const int diff = abs(count_sign_block[j][0] - count_sign_block[j][1]); |
| 163 const int max_diff = 1125; | 167 const int max_diff = kSignBiasMaxDiff255; |
| 164 EXPECT_LT(diff, max_diff << (bit_depth_ - 8)) | 168 EXPECT_LT(diff, max_diff << (bit_depth_ - 8)) |
| 165 << "Error: 8x8 FDCT/FHT has a sign bias > " | 169 << "Error: 8x8 FDCT/FHT has a sign bias > " |
| 166 << 1. * max_diff / count_test_block * 100 << "%" | 170 << 1. * max_diff / count_test_block * 100 << "%" |
| 167 << " for input range [-255, 255] at index " << j | 171 << " for input range [-255, 255] at index " << j |
| 168 << " count0: " << count_sign_block[j][0] | 172 << " count0: " << count_sign_block[j][0] |
| 169 << " count1: " << count_sign_block[j][1] | 173 << " count1: " << count_sign_block[j][1] |
| 170 << " diff: " << diff; | 174 << " diff: " << diff; |
| 171 } | 175 } |
| 172 | 176 |
| 173 memset(count_sign_block, 0, sizeof(count_sign_block)); | 177 memset(count_sign_block, 0, sizeof(count_sign_block)); |
| 174 | 178 |
| 175 for (int i = 0; i < count_test_block; ++i) { | 179 for (int i = 0; i < count_test_block; ++i) { |
| 176 // Initialize a test block with input range [-mask_ / 16, mask_ / 16]. | 180 // Initialize a test block with input range [-mask_ / 16, mask_ / 16]. |
| 177 for (int j = 0; j < 64; ++j) | 181 for (int j = 0; j < 64; ++j) |
| 178 test_input_block[j] = ((rnd.Rand16() & mask_) >> 4) - | 182 test_input_block[j] = ((rnd.Rand16() & mask_) >> 4) - |
| 179 ((rnd.Rand16() & mask_) >> 4); | 183 ((rnd.Rand16() & mask_) >> 4); |
| 180 ASM_REGISTER_STATE_CHECK( | 184 ASM_REGISTER_STATE_CHECK( |
| 181 RunFwdTxfm(test_input_block, test_output_block, pitch_)); | 185 RunFwdTxfm(test_input_block, test_output_block, pitch_)); |
| 182 | 186 |
| 183 for (int j = 0; j < 64; ++j) { | 187 for (int j = 0; j < 64; ++j) { |
| 184 if (test_output_block[j] < 0) | 188 if (test_output_block[j] < 0) |
| 185 ++count_sign_block[j][0]; | 189 ++count_sign_block[j][0]; |
| 186 else if (test_output_block[j] > 0) | 190 else if (test_output_block[j] > 0) |
| 187 ++count_sign_block[j][1]; | 191 ++count_sign_block[j][1]; |
| 188 } | 192 } |
| 189 } | 193 } |
| 190 | 194 |
| 191 for (int j = 0; j < 64; ++j) { | 195 for (int j = 0; j < 64; ++j) { |
| 192 const int diff = abs(count_sign_block[j][0] - count_sign_block[j][1]); | 196 const int diff = abs(count_sign_block[j][0] - count_sign_block[j][1]); |
| 193 const int max_diff = 10000; | 197 const int max_diff = kSignBiasMaxDiff15; |
| 194 EXPECT_LT(diff, max_diff << (bit_depth_ - 8)) | 198 EXPECT_LT(diff, max_diff << (bit_depth_ - 8)) |
| 195 << "Error: 4x4 FDCT/FHT has a sign bias > " | 199 << "Error: 8x8 FDCT/FHT has a sign bias > " |
| 196 << 1. * max_diff / count_test_block * 100 << "%" | 200 << 1. * max_diff / count_test_block * 100 << "%" |
| 197 << " for input range [-15, 15] at index " << j | 201 << " for input range [-15, 15] at index " << j |
| 198 << " count0: " << count_sign_block[j][0] | 202 << " count0: " << count_sign_block[j][0] |
| 199 << " count1: " << count_sign_block[j][1] | 203 << " count1: " << count_sign_block[j][1] |
| 200 << " diff: " << diff; | 204 << " diff: " << diff; |
| 201 } | 205 } |
| 202 } | 206 } |
| 203 | 207 |
| 204 void RunRoundTripErrorCheck() { | 208 void RunRoundTripErrorCheck() { |
| 205 ACMRandom rnd(ACMRandom::DeterministicSeed()); | 209 ACMRandom rnd(ACMRandom::DeterministicSeed()); |
| (...skipping 433 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 639 int thresh_; | 643 int thresh_; |
| 640 }; | 644 }; |
| 641 | 645 |
| 642 TEST_P(InvTrans8x8DCT, CompareReference) { | 646 TEST_P(InvTrans8x8DCT, CompareReference) { |
| 643 CompareInvReference(ref_txfm_, thresh_); | 647 CompareInvReference(ref_txfm_, thresh_); |
| 644 } | 648 } |
| 645 | 649 |
| 646 using std::tr1::make_tuple; | 650 using std::tr1::make_tuple; |
| 647 | 651 |
| 648 #if CONFIG_VP9_HIGHBITDEPTH | 652 #if CONFIG_VP9_HIGHBITDEPTH |
| 649 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] | |
| 650 // returned from Rand16(). | |
| 651 INSTANTIATE_TEST_CASE_P( | |
| 652 DISABLED_C, FwdTrans8x8DCT, | |
| 653 ::testing::Values( | |
| 654 make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8))); | |
| 655 INSTANTIATE_TEST_CASE_P( | 653 INSTANTIATE_TEST_CASE_P( |
| 656 C, FwdTrans8x8DCT, | 654 C, FwdTrans8x8DCT, |
| 657 ::testing::Values( | 655 ::testing::Values( |
| 656 make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8), |
| 658 make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10), | 657 make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_10, 0, VPX_BITS_10), |
| 659 make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12))); | 658 make_tuple(&vp9_highbd_fdct8x8_c, &idct8x8_12, 0, VPX_BITS_12))); |
| 660 #else | 659 #else |
| 661 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] | |
| 662 // returned from Rand16(). | |
| 663 INSTANTIATE_TEST_CASE_P( | 660 INSTANTIATE_TEST_CASE_P( |
| 664 DISABLED_C, FwdTrans8x8DCT, | 661 C, FwdTrans8x8DCT, |
| 665 ::testing::Values( | 662 ::testing::Values( |
| 666 make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8))); | 663 make_tuple(&vp9_fdct8x8_c, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8))); |
| 667 #endif // CONFIG_VP9_HIGHBITDEPTH | 664 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 668 | 665 |
| 669 #if CONFIG_VP9_HIGHBITDEPTH | 666 #if CONFIG_VP9_HIGHBITDEPTH |
| 670 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] | |
| 671 // returned from Rand16(). | |
| 672 INSTANTIATE_TEST_CASE_P( | |
| 673 DISABLED_C, FwdTrans8x8HT, | |
| 674 ::testing::Values( | |
| 675 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8))); | |
| 676 INSTANTIATE_TEST_CASE_P( | 667 INSTANTIATE_TEST_CASE_P( |
| 677 C, FwdTrans8x8HT, | 668 C, FwdTrans8x8HT, |
| 678 ::testing::Values( | 669 ::testing::Values( |
| 670 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8), |
| 679 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10), | 671 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 0, VPX_BITS_10), |
| 680 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10), | 672 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 1, VPX_BITS_10), |
| 681 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10), | 673 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 2, VPX_BITS_10), |
| 682 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10), | 674 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_10, 3, VPX_BITS_10), |
| 683 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12), | 675 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 0, VPX_BITS_12), |
| 684 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12), | 676 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 1, VPX_BITS_12), |
| 685 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12), | 677 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 2, VPX_BITS_12), |
| 686 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12), | 678 make_tuple(&vp9_highbd_fht8x8_c, &iht8x8_12, 3, VPX_BITS_12), |
| 687 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), | 679 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), |
| 688 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), | 680 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), |
| 689 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); | 681 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); |
| 690 #else | 682 #else |
| 691 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] | 683 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] |
| 692 // returned from Rand16(). | 684 // returned from Rand16(). |
| 693 INSTANTIATE_TEST_CASE_P( | 685 INSTANTIATE_TEST_CASE_P( |
| 694 DISABLED_C, FwdTrans8x8HT, | |
| 695 ::testing::Values( | |
| 696 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8))); | |
| 697 INSTANTIATE_TEST_CASE_P( | |
| 698 C, FwdTrans8x8HT, | 686 C, FwdTrans8x8HT, |
| 699 ::testing::Values( | 687 ::testing::Values( |
| 688 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8), |
| 700 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), | 689 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), |
| 701 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), | 690 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), |
| 702 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); | 691 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); |
| 703 #endif // CONFIG_VP9_HIGHBITDEPTH | 692 #endif // CONFIG_VP9_HIGHBITDEPTH |
| 704 | 693 |
| 705 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 694 #if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 706 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] | 695 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] |
| 707 // returned from Rand16(). | 696 // returned from Rand16(). |
| 708 INSTANTIATE_TEST_CASE_P( | 697 INSTANTIATE_TEST_CASE_P( |
| 709 DISABLED_NEON, FwdTrans8x8DCT, | 698 NEON, FwdTrans8x8DCT, |
| 710 ::testing::Values( | 699 ::testing::Values( |
| 711 make_tuple(&vp9_fdct8x8_neon, &vp9_idct8x8_64_add_neon, 0, | 700 make_tuple(&vp9_fdct8x8_neon, &vp9_idct8x8_64_add_neon, 0, |
| 712 VPX_BITS_8))); | 701 VPX_BITS_8))); |
| 702 #endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 703 |
| 704 #if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 713 INSTANTIATE_TEST_CASE_P( | 705 INSTANTIATE_TEST_CASE_P( |
| 714 DISABLED_NEON, FwdTrans8x8HT, | 706 NEON, FwdTrans8x8HT, |
| 715 ::testing::Values( | 707 ::testing::Values( |
| 716 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 0, VPX_BITS_8), | 708 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 0, VPX_BITS_8), |
| 717 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 1, VPX_BITS_8), | 709 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 1, VPX_BITS_8), |
| 718 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 2, VPX_BITS_8), | 710 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 2, VPX_BITS_8), |
| 719 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, VPX_BITS_8))); | 711 make_tuple(&vp9_fht8x8_c, &vp9_iht8x8_64_add_neon, 3, VPX_BITS_8))); |
| 720 #endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 712 #endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 721 | 713 |
| 722 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 714 #if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 723 // TODO(jingning): re-enable after these handle the expanded range [0, 65535] | 715 // TODO(jingning): re-enable after these handle the expanded range [0, 65535] |
| 724 // returned from Rand16(). | 716 // returned from Rand16(). |
| 725 INSTANTIATE_TEST_CASE_P( | 717 INSTANTIATE_TEST_CASE_P( |
| 726 DISABLED_SSE2, FwdTrans8x8DCT, | 718 SSE2, FwdTrans8x8DCT, |
| 727 ::testing::Values( | 719 ::testing::Values( |
| 728 make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_sse2, 0, | 720 make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_sse2, 0, |
| 729 VPX_BITS_8))); | 721 VPX_BITS_8))); |
| 730 INSTANTIATE_TEST_CASE_P( | 722 INSTANTIATE_TEST_CASE_P( |
| 731 DISABLED_SSE2, FwdTrans8x8HT, | |
| 732 ::testing::Values( | |
| 733 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 0, VPX_BITS_8))); | |
| 734 INSTANTIATE_TEST_CASE_P( | |
| 735 SSE2, FwdTrans8x8HT, | 723 SSE2, FwdTrans8x8HT, |
| 736 ::testing::Values( | 724 ::testing::Values( |
| 725 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 0, VPX_BITS_8), |
| 737 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 1, VPX_BITS_8), | 726 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 1, VPX_BITS_8), |
| 738 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 2, VPX_BITS_8), | 727 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 2, VPX_BITS_8), |
| 739 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, VPX_BITS_8))); | 728 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_sse2, 3, VPX_BITS_8))); |
| 740 #endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 729 #endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 741 | 730 |
| 742 #if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 731 #if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 743 // TODO(jingning): re-enable after these handle the expanded range [0, 65535] | |
| 744 // returned from Rand16(). | |
| 745 INSTANTIATE_TEST_CASE_P( | |
| 746 DISABLED_SSE2, FwdTrans8x8DCT, | |
| 747 ::testing::Values( | |
| 748 make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8))); | |
| 749 INSTANTIATE_TEST_CASE_P( | 732 INSTANTIATE_TEST_CASE_P( |
| 750 SSE2, FwdTrans8x8DCT, | 733 SSE2, FwdTrans8x8DCT, |
| 751 ::testing::Values( | 734 ::testing::Values( |
| 735 make_tuple(&vp9_fdct8x8_sse2, &vp9_idct8x8_64_add_c, 0, VPX_BITS_8), |
| 752 make_tuple(&vp9_highbd_fdct8x8_c, | 736 make_tuple(&vp9_highbd_fdct8x8_c, |
| 753 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), | 737 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), |
| 754 make_tuple(&vp9_highbd_fdct8x8_sse2, | 738 make_tuple(&vp9_highbd_fdct8x8_sse2, |
| 755 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), | 739 &idct8x8_64_add_10_sse2, 12, VPX_BITS_10), |
| 756 make_tuple(&vp9_highbd_fdct8x8_c, | 740 make_tuple(&vp9_highbd_fdct8x8_c, |
| 757 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12), | 741 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12), |
| 758 make_tuple(&vp9_highbd_fdct8x8_sse2, | 742 make_tuple(&vp9_highbd_fdct8x8_sse2, |
| 759 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12))); | 743 &idct8x8_64_add_12_sse2, 12, VPX_BITS_12))); |
| 760 | 744 |
| 761 // TODO(jingning): re-enable after these handle the expanded range [0, 65535] | 745 // TODO(jingning): re-enable after these handle the expanded range [0, 65535] |
| 762 // returned from Rand16(). | 746 // returned from Rand16(). |
| 763 INSTANTIATE_TEST_CASE_P( | 747 INSTANTIATE_TEST_CASE_P( |
| 764 DISABLED_SSE2, FwdTrans8x8HT, | |
| 765 ::testing::Values( | |
| 766 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8))); | |
| 767 INSTANTIATE_TEST_CASE_P( | |
| 768 SSE2, FwdTrans8x8HT, | 748 SSE2, FwdTrans8x8HT, |
| 769 ::testing::Values( | 749 ::testing::Values( |
| 750 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 0, VPX_BITS_8), |
| 770 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), | 751 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 1, VPX_BITS_8), |
| 771 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), | 752 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 2, VPX_BITS_8), |
| 772 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); | 753 make_tuple(&vp9_fht8x8_sse2, &vp9_iht8x8_64_add_c, 3, VPX_BITS_8))); |
| 773 | 754 |
| 774 // Optimizations take effect at a threshold of 6201, so we use a value close to | 755 // Optimizations take effect at a threshold of 6201, so we use a value close to |
| 775 // that to test both branches. | 756 // that to test both branches. |
| 776 INSTANTIATE_TEST_CASE_P( | 757 INSTANTIATE_TEST_CASE_P( |
| 777 SSE2, InvTrans8x8DCT, | 758 SSE2, InvTrans8x8DCT, |
| 778 ::testing::Values( | 759 ::testing::Values( |
| 779 make_tuple(&idct8x8_10_add_10_c, | 760 make_tuple(&idct8x8_10_add_10_c, |
| 780 &idct8x8_10_add_10_sse2, 6225, VPX_BITS_10), | 761 &idct8x8_10_add_10_sse2, 6225, VPX_BITS_10), |
| 781 make_tuple(&idct8x8_10, | 762 make_tuple(&idct8x8_10, |
| 782 &idct8x8_64_add_10_sse2, 6225, VPX_BITS_10), | 763 &idct8x8_64_add_10_sse2, 6225, VPX_BITS_10), |
| 783 make_tuple(&idct8x8_10_add_12_c, | 764 make_tuple(&idct8x8_10_add_12_c, |
| 784 &idct8x8_10_add_12_sse2, 6225, VPX_BITS_12), | 765 &idct8x8_10_add_12_sse2, 6225, VPX_BITS_12), |
| 785 make_tuple(&idct8x8_12, | 766 make_tuple(&idct8x8_12, |
| 786 &idct8x8_64_add_12_sse2, 6225, VPX_BITS_12))); | 767 &idct8x8_64_add_12_sse2, 6225, VPX_BITS_12))); |
| 787 #endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE | 768 #endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE |
| 788 | 769 |
| 789 #if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \ | 770 #if HAVE_SSSE3 && ARCH_X86_64 && !CONFIG_VP9_HIGHBITDEPTH && \ |
| 790 !CONFIG_EMULATE_HARDWARE | 771 !CONFIG_EMULATE_HARDWARE |
| 791 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] | 772 // TODO(jingning): re-enable after this handles the expanded range [0, 65535] |
| 792 // returned from Rand16(). | 773 // returned from Rand16(). |
| 793 INSTANTIATE_TEST_CASE_P( | 774 INSTANTIATE_TEST_CASE_P( |
| 794 DISABLED_SSSE3, FwdTrans8x8DCT, | 775 SSSE3, FwdTrans8x8DCT, |
| 795 ::testing::Values( | 776 ::testing::Values( |
| 796 make_tuple(&vp9_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0, | 777 make_tuple(&vp9_fdct8x8_ssse3, &vp9_idct8x8_64_add_ssse3, 0, |
| 797 VPX_BITS_8))); | 778 VPX_BITS_8))); |
| 798 #endif | 779 #endif |
| 799 } // namespace | 780 } // namespace |
| OLD | NEW |