From 7a92a785f233138dcb88c789ada16adec38fb0d2 Mon Sep 17 00:00:00 2001 From: Jerome Jiang Date: Tue, 21 Jul 2020 16:13:39 -0700 Subject: [PATCH] Silience warnings about uninitiated test cases BUG=b/159031848 Change-Id: I6bb88c24bd08e0590ec6b8ebfb696fd9b07ed011 --- test/avg_test.cc | 4 ++++ test/dct16x16_test.cc | 2 ++ test/fdct8x8_test.cc | 2 ++ test/lpf_test.cc | 8 ++++++++ test/test.mk | 10 +++++++++- test/variance_test.cc | 6 +++--- test/vp9_intrapred_test.cc | 3 ++- 7 files changed, 30 insertions(+), 5 deletions(-) diff --git a/test/avg_test.cc b/test/avg_test.cc index 601fb19..3b06aa8 100644 --- a/test/avg_test.cc +++ b/test/avg_test.cc @@ -152,6 +152,7 @@ class AverageTestHBD : public AverageTestBase, }; #endif // CONFIG_VP9_HIGHBITDEPTH +#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA typedef void (*IntProRowFunc)(int16_t hbuf[16], uint8_t const *ref, const int ref_stride, const int height); @@ -226,6 +227,7 @@ class IntProColTest : public AverageTestBase, int16_t sum_asm_; int16_t sum_c_; }; +#endif // HAVE_NEON || HAVE_SSE2 || HAVE_MSA typedef int (*SatdFunc)(const tran_low_t *coeffs, int length); typedef std::tuple SatdTestParam; @@ -378,6 +380,7 @@ TEST_P(AverageTestHBD, Random) { } #endif // CONFIG_VP9_HIGHBITDEPTH +#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA TEST_P(IntProRowTest, MinValue) { FillConstant(0); RunComparison(); @@ -407,6 +410,7 @@ TEST_P(IntProColTest, Random) { FillRandom(); RunComparison(); } +#endif TEST_P(SatdLowbdTest, MinValue) { const int kMin = -32640; diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc index d586db7..321c66e 100644 --- a/test/dct16x16_test.cc +++ b/test/dct16x16_test.cc @@ -714,6 +714,7 @@ TEST_P(Trans16x16HT, QuantCheck) { RunQuantCheck(429, 729); } +#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE class InvTrans16x16DCT : public Trans16x16TestBase, public ::testing::TestWithParam { public: @@ -743,6 +744,7 @@ class InvTrans16x16DCT : public Trans16x16TestBase, TEST_P(InvTrans16x16DCT, CompareReference) { CompareInvReference(ref_txfm_, thresh_); } +#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE using std::make_tuple; diff --git a/test/fdct8x8_test.cc b/test/fdct8x8_test.cc index fd9fdff..770337d 100644 --- a/test/fdct8x8_test.cc +++ b/test/fdct8x8_test.cc @@ -598,6 +598,7 @@ TEST_P(FwdTrans8x8HT, RoundTripErrorCheck) { RunRoundTripErrorCheck(); } TEST_P(FwdTrans8x8HT, ExtremalCheck) { RunExtremalCheck(); } +#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE class InvTrans8x8DCT : public FwdTrans8x8TestBase, public ::testing::TestWithParam { public: @@ -628,6 +629,7 @@ class InvTrans8x8DCT : public FwdTrans8x8TestBase, TEST_P(InvTrans8x8DCT, CompareReference) { CompareInvReference(ref_txfm_, thresh_); } +#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE using std::make_tuple; diff --git a/test/lpf_test.cc b/test/lpf_test.cc index 25bba74..2c632a5 100644 --- a/test/lpf_test.cc +++ b/test/lpf_test.cc @@ -146,6 +146,8 @@ class Loop8Test6Param : public ::testing::TestWithParam { loop_op_t ref_loopfilter_op_; }; +#if HAVE_NEON || HAVE_SSE2 || \ + (HAVE_DSPR2 || HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH) class Loop8Test9Param : public ::testing::TestWithParam { public: virtual ~Loop8Test9Param() {} @@ -164,6 +166,8 @@ class Loop8Test9Param : public ::testing::TestWithParam { dual_loop_op_t loopfilter_op_; dual_loop_op_t ref_loopfilter_op_; }; +#endif // HAVE_NEON || HAVE_SSE2 || (HAVE_DSPR2 || HAVE_MSA && + // (!CONFIG_VP9_HIGHBITDEPTH)) TEST_P(Loop8Test6Param, OperationCheck) { ACMRandom rnd(ACMRandom::DeterministicSeed()); @@ -275,6 +279,8 @@ TEST_P(Loop8Test6Param, ValueCheck) { << "First failed at test case " << first_failure; } +#if HAVE_NEON || HAVE_SSE2 || \ + (HAVE_DSPR2 || HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)) TEST_P(Loop8Test9Param, OperationCheck) { ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count_test_block = number_of_iterations; @@ -402,6 +408,8 @@ TEST_P(Loop8Test9Param, ValueCheck) { "loopfilter output. " << "First failed at test case " << first_failure; } +#endif // HAVE_NEON || HAVE_SSE2 || (HAVE_DSPR2 || HAVE_MSA && + // (!CONFIG_VP9_HIGHBITDEPTH)) using std::make_tuple; diff --git a/test/test.mk b/test/test.mk index 5aecb01..c12fb78 100644 --- a/test/test.mk +++ b/test/test.mk @@ -121,11 +121,13 @@ ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes) LIBVPX_TEST_SRCS-yes += vp8_boolcoder_test.cc LIBVPX_TEST_SRCS-yes += vp8_fragments_test.cc endif - LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += add_noise_test.cc LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc +ifneq (, $(filter yes, $(HAVE_SSE2) $(HAVE_SSSE3) $(HAVE_SSE4_1) $(HAVE_NEON) \ + $(HAVE_MSA) $(HAVE_MMI))) LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc +endif LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc @@ -174,7 +176,9 @@ ifneq ($(CONFIG_REALTIME_ONLY),yes) LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += yuv_temporal_filter_test.cc endif LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc +ifneq (, $(filter yes, $(HAVE_SSE2) $(HAVE_AVX2))) LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_block_error_test.cc +endif LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc @@ -188,8 +192,10 @@ LIBVPX_TEST_SRCS-$(CONFIG_NON_GREEDY_MV) += non_greedy_mv_test.cc endif ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes) +ifneq (, $(filter yes, $(HAVE_SSE2) $(HAVE_AVX2))) LIBVPX_TEST_SRCS-yes += vp9_denoiser_test.cc endif +endif LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc ifeq ($(CONFIG_VP9_ENCODER),yes) @@ -201,7 +207,9 @@ endif # VP9 ## Multi-codec / unconditional whitebox tests. LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc +ifneq (, $(filter yes, $(HAVE_NEON) $(HAVE_SSE2) $(HAVE_MSA))) LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sum_squares_test.cc +endif TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c diff --git a/test/variance_test.cc b/test/variance_test.cc index a6db9cf..3a220a8 100644 --- a/test/variance_test.cc +++ b/test/variance_test.cc @@ -807,14 +807,11 @@ INSTANTIATE_TEST_SUITE_P( SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_c, 0))); #if CONFIG_VP9_HIGHBITDEPTH -typedef MainTestClass VpxHBDMseTest; typedef MainTestClass VpxHBDVarianceTest; typedef SubpelVarianceTest VpxHBDSubpelVarianceTest; typedef SubpelVarianceTest VpxHBDSubpelAvgVarianceTest; -TEST_P(VpxHBDMseTest, RefMse) { RefTestMse(); } -TEST_P(VpxHBDMseTest, MaxMse) { MaxTestMse(); } TEST_P(VpxHBDVarianceTest, Zero) { ZeroTest(); } TEST_P(VpxHBDVarianceTest, Ref) { RefTest(); } TEST_P(VpxHBDVarianceTest, RefStride) { RefStrideTest(); } @@ -825,6 +822,9 @@ TEST_P(VpxHBDSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); } TEST_P(VpxHBDSubpelAvgVarianceTest, Ref) { RefTest(); } /* TODO(debargha): This test does not support the highbd version +typedef MainTestClass VpxHBDMseTest; +TEST_P(VpxHBDMseTest, RefMse) { RefTestMse(); } +TEST_P(VpxHBDMseTest, MaxMse) { MaxTestMse(); } INSTANTIATE_TEST_SUITE_P( C, VpxHBDMseTest, ::testing::Values(MseParams(4, 4, &vpx_highbd_12_mse16x16_c), diff --git a/test/vp9_intrapred_test.cc b/test/vp9_intrapred_test.cc index 29f689f..62e1771 100644 --- a/test/vp9_intrapred_test.cc +++ b/test/vp9_intrapred_test.cc @@ -457,6 +457,7 @@ struct HighbdIntraPredParam { int bit_depth; }; +#if HAVE_SSSE3 || HAVE_NEON || HAVE_SSE2 template <> void IntraPredTest::Predict() { const int bit_depth = params_.bit_depth; @@ -466,7 +467,6 @@ void IntraPredTest::Predict() { } typedef IntraPredTest VP9HighbdIntraPredTest; - TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) { // max block size is 32 DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]); @@ -475,6 +475,7 @@ TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) { DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]); RunTest(left_col, above_data, dst, ref_dst); } +#endif #if HAVE_SSSE3 INSTANTIATE_TEST_SUITE_P( -- 2.7.4