ref: 04c24078748dc062b97bbb1b2cadb35c1a09703e
parent: 557a1b209e482175fa5684f5f89be27d0ab2cf44
author: John Koleszar <jkoleszar@google.com>
date: Wed Feb 20 11:32:02 EST 2013
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
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -309,6 +309,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 @@
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,11 +481,6 @@
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,
@@ -490,11 +487,6 @@
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),
--
⑨