From 803605858775b3854196f59a8706c508d60c46b5 Mon Sep 17 00:00:00 2001 From: Yunqing Wang Date: Tue, 28 Mar 2017 17:17:23 -0700 Subject: [PATCH] Enable/disable unit tests correctly in decoder-only build case While building the decoder-only AV1, the unit tests need to be the ones that only call decoder functions. BUG=aomedia:395 Change-Id: Iac7b464aa222a177c06b2e037faa6717305cd59d --- av1/common/av1_rtcd_defs.pl | 26 ++++++++++++++------------ test/av1_txfm_test.h | 2 ++ test/test.mk | 10 ++++++---- 3 files changed, 22 insertions(+), 16 deletions(-) diff --git a/av1/common/av1_rtcd_defs.pl b/av1/common/av1_rtcd_defs.pl index e8a3341b0..8247523b2 100644 --- a/av1/common/av1_rtcd_defs.pl +++ b/av1/common/av1_rtcd_defs.pl @@ -393,6 +393,20 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") { specialize qw/av1_highbd_iht16x16_256_add/; } +if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") { + #inv txfm + add_proto qw/void av1_inv_txfm2d_add_4x4/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; + specialize qw/av1_inv_txfm2d_add_4x4 sse4_1/; + add_proto qw/void av1_inv_txfm2d_add_8x8/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; + specialize qw/av1_inv_txfm2d_add_8x8 sse4_1/; + add_proto qw/void av1_inv_txfm2d_add_16x16/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; + specialize qw/av1_inv_txfm2d_add_16x16 sse4_1/; + add_proto qw/void av1_inv_txfm2d_add_32x32/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; + specialize qw/av1_inv_txfm2d_add_32x32 avx2/; + add_proto qw/void av1_inv_txfm2d_add_64x64/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; + specialize qw/av1_inv_txfm2d_add_64x64/; +} + # # Encoder functions below this point. # @@ -560,18 +574,6 @@ if (aom_config("CONFIG_AOM_HIGHBITDEPTH") eq "yes") { specialize qw/av1_fwd_txfm2d_32x32 sse4_1/; add_proto qw/void av1_fwd_txfm2d_64x64/, "const int16_t *input, int32_t *output, int stride, int tx_type, int bd"; specialize qw/av1_fwd_txfm2d_64x64 sse4_1/; - - #inv txfm - add_proto qw/void av1_inv_txfm2d_add_4x4/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; - specialize qw/av1_inv_txfm2d_add_4x4 sse4_1/; - add_proto qw/void av1_inv_txfm2d_add_8x8/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; - specialize qw/av1_inv_txfm2d_add_8x8 sse4_1/; - add_proto qw/void av1_inv_txfm2d_add_16x16/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; - specialize qw/av1_inv_txfm2d_add_16x16 sse4_1/; - add_proto qw/void av1_inv_txfm2d_add_32x32/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; - specialize qw/av1_inv_txfm2d_add_32x32 avx2/; - add_proto qw/void av1_inv_txfm2d_add_64x64/, "const int32_t *input, uint16_t *output, int stride, int tx_type, int bd"; - specialize qw/av1_inv_txfm2d_add_64x64/; } # diff --git a/test/av1_txfm_test.h b/test/av1_txfm_test.h index a62d0603f..6d547863a 100644 --- a/test/av1_txfm_test.h +++ b/test/av1_txfm_test.h @@ -77,10 +77,12 @@ static const int bd = 10; static const int input_base = (1 << bd); #if CONFIG_AOM_HIGHBITDEPTH +#if CONFIG_AV1_ENCODER static const Fwd_Txfm2d_Func fwd_txfm_func_ls[TX_SIZES] = { av1_fwd_txfm2d_4x4_c, av1_fwd_txfm2d_8x8_c, av1_fwd_txfm2d_16x16_c, av1_fwd_txfm2d_32x32_c }; +#endif static const Inv_Txfm2d_Func inv_txfm_func_ls[TX_SIZES] = { av1_inv_txfm2d_add_4x4_c, av1_inv_txfm2d_add_8x8_c, diff --git a/test/test.mk b/test/test.mk index b77e479af..0a4a28867 100644 --- a/test/test.mk +++ b/test/test.mk @@ -188,8 +188,10 @@ LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += obmc_variance_test.cc endif ifeq ($(CONFIG_AOM_HIGHBITDEPTH),yes) +ifeq ($(CONFIG_AV1_ENCODER),yes) LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_quantize_test.cc LIBAOM_TEST_SRCS-$(HAVE_SSE4_1) += av1_highbd_iht_test.cc +endif endif # CONFIG_AOM_HIGHBITDEPTH endif # AV1 @@ -204,10 +206,10 @@ endif LIBAOM_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_txfm_test.h LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_txfm_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_fwd_txfm1d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_inv_txfm1d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_fwd_txfm2d_test.cc -LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_inv_txfm2d_test.cc +LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fwd_txfm1d_test.cc +LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm1d_test.cc +LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_fwd_txfm2d_test.cc +LIBAOM_TEST_SRCS-$(CONFIG_AV1_ENCODER) += av1_inv_txfm2d_test.cc LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_convolve_test.cc LIBAOM_TEST_SRCS-$(CONFIG_AV1) += av1_convolve_optimz_test.cc ifneq ($(findstring yes,$(CONFIG_GLOBAL_MOTION) $(CONFIG_WARPED_MOTION)),) -- GitLab