From 1ec0853d171edbfa5e2e61da6881c4b951f542f7 Mon Sep 17 00:00:00 2001 From: Scott LaVarnway Date: Wed, 22 Jul 2015 09:05:17 -0700 Subject: [PATCH] Delete ChangeFilterWorks test This test places 128 in positions that would not be found in the VP9 filter tables. The ssse3 code packs this table into chars and uses the pmaddubsw instruction, which treats the value as signed. The ssse3 code checks for 128 in position 3, skipping the ssse3 code if found, and calls vp9_convolve8_c(). vp9_convolve8_c() is also used for scaling. ChangeFilterWorks breaks the ssse3 scaling code found in other commits. Change-Id: I1f5a76834bc35180b9094c48f9421bdb19d3d1cb --- test/convolve_test.cc | 110 -------------------------------------------------- 1 file changed, 110 deletions(-) diff --git a/test/convolve_test.cc b/test/convolve_test.cc index db7e961123..c1c5d77b24 100644 --- a/test/convolve_test.cc +++ b/test/convolve_test.cc @@ -902,116 +902,6 @@ TEST_P(ConvolveTest, FilterExtremes) { } } -DECLARE_ALIGNED(256, const int16_t, kChangeFilters[16][8]) = { - { 0, 0, 0, 0, 0, 0, 0, 128}, - { 0, 0, 0, 0, 0, 0, 128}, - { 0, 0, 0, 0, 0, 128}, - { 0, 0, 0, 0, 128}, - { 0, 0, 0, 128}, - { 0, 0, 128}, - { 0, 128}, - { 128}, - { 0, 0, 0, 0, 0, 0, 0, 128}, - { 0, 0, 0, 0, 0, 0, 128}, - { 0, 0, 0, 0, 0, 128}, - { 0, 0, 0, 0, 128}, - { 0, 0, 0, 128}, - { 0, 0, 128}, - { 0, 128}, - { 128} -}; - -/* This test exercises the horizontal and vertical filter functions. */ -TEST_P(ConvolveTest, ChangeFilterWorks) { - uint8_t* const in = input(); - uint8_t* const out = output(); - - /* Assume that the first input sample is at the 8/16th position. */ - const int kInitialSubPelOffset = 8; - - /* Filters are 8-tap, so the first filter tap will be applied to the pixel - * at position -3 with respect to the current filtering position. Since - * kInitialSubPelOffset is set to 8, we first select sub-pixel filter 8, - * which is non-zero only in the last tap. So, applying the filter at the - * current input position will result in an output equal to the pixel at - * offset +4 (-3 + 7) with respect to the current filtering position. - */ - const int kPixelSelected = 4; - - /* Assume that each output pixel requires us to step on by 17/16th pixels in - * the input. - */ - const int kInputPixelStep = 17; - - /* The filters are setup in such a way that the expected output produces - * sets of 8 identical output samples. As the filter position moves to the - * next 1/16th pixel position the only active (=128) filter tap moves one - * position to the left, resulting in the same input pixel being replicated - * in to the output for 8 consecutive samples. After each set of 8 positions - * the filters select a different input pixel. kFilterPeriodAdjust below - * computes which input pixel is written to the output for a specified - * x or y position. - */ - - /* Test the horizontal filter. */ - ASM_REGISTER_STATE_CHECK( - UUT_->h8_(in, kInputStride, out, kOutputStride, - kChangeFilters[kInitialSubPelOffset], - kInputPixelStep, NULL, 0, Width(), Height())); - - for (int x = 0; x < Width(); ++x) { - const int kFilterPeriodAdjust = (x >> 3) << 3; - const int ref_x = - kPixelSelected + ((kInitialSubPelOffset - + kFilterPeriodAdjust * kInputPixelStep) - >> SUBPEL_BITS); - ASSERT_EQ(lookup(in, ref_x), lookup(out, x)) - << "x == " << x << "width = " << Width(); - } - - /* Test the vertical filter. */ - ASM_REGISTER_STATE_CHECK( - UUT_->v8_(in, kInputStride, out, kOutputStride, - NULL, 0, kChangeFilters[kInitialSubPelOffset], - kInputPixelStep, Width(), Height())); - - for (int y = 0; y < Height(); ++y) { - const int kFilterPeriodAdjust = (y >> 3) << 3; - const int ref_y = - kPixelSelected + ((kInitialSubPelOffset - + kFilterPeriodAdjust * kInputPixelStep) - >> SUBPEL_BITS); - ASSERT_EQ(lookup(in, ref_y * kInputStride), lookup(out, y * kInputStride)) - << "y == " << y; - } - - /* Test the horizontal and vertical filters in combination. */ - ASM_REGISTER_STATE_CHECK( - UUT_->hv8_(in, kInputStride, out, kOutputStride, - kChangeFilters[kInitialSubPelOffset], kInputPixelStep, - kChangeFilters[kInitialSubPelOffset], kInputPixelStep, - Width(), Height())); - - for (int y = 0; y < Height(); ++y) { - const int kFilterPeriodAdjustY = (y >> 3) << 3; - const int ref_y = - kPixelSelected + ((kInitialSubPelOffset - + kFilterPeriodAdjustY * kInputPixelStep) - >> SUBPEL_BITS); - for (int x = 0; x < Width(); ++x) { - const int kFilterPeriodAdjustX = (x >> 3) << 3; - const int ref_x = - kPixelSelected + ((kInitialSubPelOffset - + kFilterPeriodAdjustX * kInputPixelStep) - >> SUBPEL_BITS); - - ASSERT_EQ(lookup(in, ref_y * kInputStride + ref_x), - lookup(out, y * kOutputStride + x)) - << "x == " << x << ", y == " << y; - } - } -} - /* This test exercises that enough rows and columns are filtered with every possible initial fractional positions and scaling steps. */ TEST_P(ConvolveTest, CheckScalingFiltering) { -- 2.11.4.GIT