Commit 04c24078 authored by John Koleszar's avatar John Koleszar
Browse files

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
parent 557a1b20
......@@ -309,6 +309,8 @@ const int16_t (*kTestFilterList[])[8] = {
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)
UUT_->v8_(in, kInputStride, out, kOutputStride,
filters[filter_x], 16, filters[filter_y], 16,
kInvalidFilter, 16, filters[filter_y], 16,
Width(), Height()));
UUT_->h8_(in, kInputStride, out, kOutputStride,
filters[filter_x], 16, filters[filter_y], 16,
filters[filter_x], 16, kInvalidFilter, 16,
Width(), Height()));
......@@ -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),
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment