diff options
Diffstat (limited to 'third_party/aom/test/dct16x16_test.cc')
-rw-r--r-- | third_party/aom/test/dct16x16_test.cc | 115 |
1 files changed, 66 insertions, 49 deletions
diff --git a/third_party/aom/test/dct16x16_test.cc b/third_party/aom/test/dct16x16_test.cc index c2c072494..3cc0ed8c0 100644 --- a/third_party/aom/test/dct16x16_test.cc +++ b/third_party/aom/test/dct16x16_test.cc @@ -230,9 +230,11 @@ typedef void (*FhtFunc)(const int16_t *in, tran_low_t *out, int stride, typedef void (*IhtFunc)(const tran_low_t *in, uint8_t *out, int stride, const TxfmParam *txfm_param); -typedef std::tr1::tuple<FdctFunc, IdctFunc, int, aom_bit_depth_t> Dct16x16Param; -typedef std::tr1::tuple<FhtFunc, IhtFunc, int, aom_bit_depth_t> Ht16x16Param; -typedef std::tr1::tuple<IdctFunc, IdctFunc, int, aom_bit_depth_t> +typedef std::tr1::tuple<FdctFunc, IdctFunc, TX_TYPE, aom_bit_depth_t> + Dct16x16Param; +typedef std::tr1::tuple<FhtFunc, IhtFunc, TX_TYPE, aom_bit_depth_t> + Ht16x16Param; +typedef std::tr1::tuple<IdctFunc, IdctFunc, TX_TYPE, aom_bit_depth_t> Idct16x16Param; void fdct16x16_ref(const int16_t *in, tran_low_t *out, int stride, @@ -510,8 +512,8 @@ class Trans16x16TestBase { const int diff = dst[j] - src[j]; #endif // CONFIG_HIGHBITDEPTH const uint32_t error = diff * diff; - EXPECT_GE(1u, error) << "Error: 16x16 IDCT has error " << error - << " at index " << j; + EXPECT_GE(1u, error) + << "Error: 16x16 IDCT has error " << error << " at index " << j; } } } @@ -778,94 +780,109 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P(C, Trans16x16DCT, ::testing::Values(make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, - 0, AOM_BITS_8))); + DCT_DCT, AOM_BITS_8))); #else INSTANTIATE_TEST_CASE_P(C, Trans16x16DCT, ::testing::Values(make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_c, - 0, AOM_BITS_8))); + DCT_DCT, AOM_BITS_8))); #endif // CONFIG_HIGHBITDEPTH #if CONFIG_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P( C, Trans16x16HT, ::testing::Values( - make_tuple(&fht16x16_10, &iht16x16_10, 0, AOM_BITS_10), - make_tuple(&fht16x16_10, &iht16x16_10, 1, AOM_BITS_10), - make_tuple(&fht16x16_10, &iht16x16_10, 2, AOM_BITS_10), - make_tuple(&fht16x16_10, &iht16x16_10, 3, AOM_BITS_10), - make_tuple(&fht16x16_12, &iht16x16_12, 0, AOM_BITS_12), - make_tuple(&fht16x16_12, &iht16x16_12, 1, AOM_BITS_12), - make_tuple(&fht16x16_12, &iht16x16_12, 2, AOM_BITS_12), - make_tuple(&fht16x16_12, &iht16x16_12, 3, AOM_BITS_12), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 0, AOM_BITS_8), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 1, AOM_BITS_8), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 2, AOM_BITS_8), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 3, AOM_BITS_8))); + make_tuple(&fht16x16_10, &iht16x16_10, DCT_DCT, AOM_BITS_10), + make_tuple(&fht16x16_10, &iht16x16_10, ADST_DCT, AOM_BITS_10), + make_tuple(&fht16x16_10, &iht16x16_10, DCT_ADST, AOM_BITS_10), + make_tuple(&fht16x16_10, &iht16x16_10, ADST_ADST, AOM_BITS_10), + make_tuple(&fht16x16_12, &iht16x16_12, DCT_DCT, AOM_BITS_12), + make_tuple(&fht16x16_12, &iht16x16_12, ADST_DCT, AOM_BITS_12), + make_tuple(&fht16x16_12, &iht16x16_12, DCT_ADST, AOM_BITS_12), + make_tuple(&fht16x16_12, &iht16x16_12, ADST_ADST, AOM_BITS_12), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, DCT_DCT, + AOM_BITS_8), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, ADST_DCT, + AOM_BITS_8), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, DCT_ADST, + AOM_BITS_8), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, ADST_ADST, + AOM_BITS_8))); #else INSTANTIATE_TEST_CASE_P( C, Trans16x16HT, - ::testing::Values( - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 0, AOM_BITS_8), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 1, AOM_BITS_8), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 2, AOM_BITS_8), - make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, 3, AOM_BITS_8))); + ::testing::Values(make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, + DCT_DCT, AOM_BITS_8), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, + ADST_DCT, AOM_BITS_8), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, + DCT_ADST, AOM_BITS_8), + make_tuple(&av1_fht16x16_c, &av1_iht16x16_256_add_c, + ADST_ADST, AOM_BITS_8))); #endif // CONFIG_HIGHBITDEPTH #if HAVE_NEON_ASM && !CONFIG_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P( NEON, Trans16x16DCT, ::testing::Values(make_tuple(&aom_fdct16x16_c, &aom_idct16x16_256_add_neon, - 0, AOM_BITS_8))); + DCT_DCT, AOM_BITS_8))); #endif #if HAVE_SSE2 && !CONFIG_HIGHBITDEPTH -INSTANTIATE_TEST_CASE_P( - SSE2, Trans16x16DCT, - ::testing::Values(make_tuple(&aom_fdct16x16_sse2, - &aom_idct16x16_256_add_sse2, 0, AOM_BITS_8))); +INSTANTIATE_TEST_CASE_P(SSE2, Trans16x16DCT, + ::testing::Values(make_tuple( + &aom_fdct16x16_sse2, &aom_idct16x16_256_add_sse2, + DCT_DCT, AOM_BITS_8))); +#if !CONFIG_DAALA_DCT16 INSTANTIATE_TEST_CASE_P( SSE2, Trans16x16HT, ::testing::Values(make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_sse2, - 0, AOM_BITS_8), + DCT_DCT, AOM_BITS_8), make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_sse2, - 1, AOM_BITS_8), + ADST_DCT, AOM_BITS_8), make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_sse2, - 2, AOM_BITS_8), + DCT_ADST, AOM_BITS_8), make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_sse2, - 3, AOM_BITS_8))); + ADST_ADST, AOM_BITS_8))); +#endif // CONFIG_DAALA_DCT16 #endif // HAVE_SSE2 && !CONFIG_HIGHBITDEPTH #if HAVE_SSE2 && CONFIG_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P(SSE2, Trans16x16DCT, ::testing::Values(make_tuple(&aom_fdct16x16_sse2, &aom_idct16x16_256_add_c, - 0, AOM_BITS_8))); + DCT_DCT, AOM_BITS_8))); +#if !CONFIG_DAALA_DCT16 INSTANTIATE_TEST_CASE_P( SSE2, Trans16x16HT, - ::testing::Values( - make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, 0, AOM_BITS_8), - make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, 1, AOM_BITS_8), - make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, 2, AOM_BITS_8), - make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, 3, - AOM_BITS_8))); + ::testing::Values(make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, + DCT_DCT, AOM_BITS_8), + make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, + ADST_DCT, AOM_BITS_8), + make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, + DCT_ADST, AOM_BITS_8), + make_tuple(&av1_fht16x16_sse2, &av1_iht16x16_256_add_c, + ADST_ADST, AOM_BITS_8))); +#endif #endif // HAVE_SSE2 && CONFIG_HIGHBITDEPTH #if HAVE_MSA && !CONFIG_HIGHBITDEPTH INSTANTIATE_TEST_CASE_P(MSA, Trans16x16DCT, ::testing::Values(make_tuple(&aom_fdct16x16_msa, &aom_idct16x16_256_add_msa, - 0, AOM_BITS_8))); -#if !CONFIG_EXT_TX + DCT_DCT, AOM_BITS_8))); +#if !CONFIG_EXT_TX && !CONFIG_DAALA_DCT16 // TODO(yaowu): re-enable this after msa versions are updated to match C. INSTANTIATE_TEST_CASE_P( DISABLED_MSA, Trans16x16HT, - ::testing::Values( - make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, 0, AOM_BITS_8), - make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, 1, AOM_BITS_8), - make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, 2, AOM_BITS_8), - make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, 3, - AOM_BITS_8))); -#endif // !CONFIG_EXT_TX + ::testing::Values(make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, + DCT_DCT, AOM_BITS_8), + make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, + ADST_DCT, AOM_BITS_8), + make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, + DCT_ADST, AOM_BITS_8), + make_tuple(&av1_fht16x16_msa, &av1_iht16x16_256_add_msa, + ADST_ADST, AOM_BITS_8))); +#endif // !CONFIG_EXT_TX && !CONFIG_DAALA_DCT16 #endif // HAVE_MSA && !CONFIG_HIGHBITDEPTH } // namespace |