ref: 34c4e1d6f9fe8419b0ed2a99deca231304281316
parent: 0fe589f21ea75db7fbee2a84749d24b5666ad232
parent: 1ec0853d171edbfa5e2e61da6881c4b951f542f7
author: Scott LaVarnway <[email protected]>
date: Wed Jul 22 14:39:11 EDT 2015
Merge "Delete ChangeFilterWorks test"
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -902,116 +902,6 @@
}
}
-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) {