From 04c24078748dc062b97bbb1b2cadb35c1a09703e Mon Sep 17 00:00:00 2001 From: John Koleszar Date: Wed, 20 Feb 2013 16:32:02 -0800 Subject: [PATCH] convolve test: validate 1D filters are 1D Since the 8-tap lowpass filter is non-interpolating, the results are different between applying it at whole-pel values and not. This means that 1D-only versions are requried to be implemented, as opposed to being an optimization of the 2D case. Calling the 2D filter instead of the horizontal-only filter is not equivalent in this case. Update the test to pass invalid filters to the unused stage of the 1D-only calls, to verify they're unused. Change-Id: Idc1c490f059adadd4cc80dbe770c1ccefe628b0a --- test/convolve_test.cc | 16 ++++------------ 1 file changed, 4 insertions(+), 12 deletions(-) diff --git a/test/convolve_test.cc b/test/convolve_test.cc index 88ae6846b..35065a41f 100644 --- a/test/convolve_test.cc +++ b/test/convolve_test.cc @@ -309,6 +309,8 @@ const int16_t (*kTestFilterList[])[8] = { vp9_sub_pel_filters_8lp }; +const int16_t kInvalidFilter[8] = { 0 }; + TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) { uint8_t* const in = input(); uint8_t* const out = output(); @@ -336,12 +338,12 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) { else if (filter_y) REGISTER_STATE_CHECK( UUT_->v8_(in, kInputStride, out, kOutputStride, - filters[filter_x], 16, filters[filter_y], 16, + kInvalidFilter, 16, filters[filter_y], 16, Width(), Height())); else REGISTER_STATE_CHECK( UUT_->h8_(in, kInputStride, out, kOutputStride, - filters[filter_x], 16, filters[filter_y], 16, + filters[filter_x], 16, kInvalidFilter, 16, Width(), Height())); CheckGuardBlocks(); @@ -479,22 +481,12 @@ TEST_P(ConvolveTest, ChangeFilterWorks) { using std::tr1::make_tuple; -const ConvolveFunctions convolve8_2d_only_c( - vp9_convolve8_c, vp9_convolve8_avg_c, - vp9_convolve8_c, vp9_convolve8_avg_c, - vp9_convolve8_c, vp9_convolve8_avg_c); - const ConvolveFunctions convolve8_c( vp9_convolve8_horiz_c, vp9_convolve8_avg_horiz_c, vp9_convolve8_vert_c, vp9_convolve8_avg_vert_c, vp9_convolve8_c, vp9_convolve8_avg_c); INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values( - make_tuple(4, 4, &convolve8_2d_only_c), - make_tuple(8, 4, &convolve8_2d_only_c), - make_tuple(8, 8, &convolve8_2d_only_c), - make_tuple(16, 8, &convolve8_2d_only_c), - make_tuple(16, 16, &convolve8_2d_only_c), make_tuple(4, 4, &convolve8_c), make_tuple(8, 4, &convolve8_c), make_tuple(8, 8, &convolve8_c), -- 2.50.1