Remove unit tests for no-op filter in convolutions Unit tests loop across the whole list of filters for each filter type, which includes the no-op filter when sub_x or sub_y = 0. In practice, however, the convolution functions are never called for such filters (convolve_copy will be used instead), so remove these test cases. The code accommodating this special no-op filter in the Neon paths will be removed in a subsequent patch. Change-Id: Ib363f15b35b1bdec796e4e8f490b9fae45328f54
diff --git a/test/av1_convolve_test.cc b/test/av1_convolve_test.cc index 26a4b5e..382a2fe 100644 --- a/test/av1_convolve_test.cc +++ b/test/av1_convolve_test.cc
@@ -325,7 +325,8 @@ class AV1ConvolveXTest : public AV1ConvolveTest<convolve_x_func> { public: void RunTest() { - for (int sub_x = 0; sub_x < 16; ++sub_x) { + // Do not test the no-op filter. + for (int sub_x = 1; sub_x < 16; ++sub_x) { for (int filter = EIGHTTAP_REGULAR; filter <= INTERP_FILTERS_ALL; ++filter) { InterpFilter f = static_cast<InterpFilter>(filter); @@ -530,7 +531,8 @@ class AV1ConvolveXHighbdTest : public AV1ConvolveTest<highbd_convolve_x_func> { public: void RunTest() { - for (int sub_x = 0; sub_x < 16; ++sub_x) { + // Do not test the no-op filter. + for (int sub_x = 1; sub_x < 16; ++sub_x) { for (int filter = EIGHTTAP_REGULAR; filter <= INTERP_FILTERS_ALL; ++filter) { InterpFilter f = static_cast<InterpFilter>(filter); @@ -737,7 +739,8 @@ class AV1ConvolveYTest : public AV1ConvolveTest<convolve_y_func> { public: void RunTest() { - for (int sub_y = 0; sub_y < 16; ++sub_y) { + // Do not test the no-op filter. + for (int sub_y = 1; sub_y < 16; ++sub_y) { for (int filter = EIGHTTAP_REGULAR; filter <= INTERP_FILTERS_ALL; ++filter) { InterpFilter f = static_cast<InterpFilter>(filter); @@ -923,7 +926,8 @@ class AV1ConvolveYHighbdTest : public AV1ConvolveTest<highbd_convolve_y_func> { public: void RunTest() { - for (int sub_y = 0; sub_y < 16; ++sub_y) { + // Do not test the no-op filter. + for (int sub_y = 1; sub_y < 16; ++sub_y) { for (int filter = EIGHTTAP_REGULAR; filter <= INTERP_FILTERS_ALL; ++filter) { InterpFilter f = static_cast<InterpFilter>(filter); @@ -1203,8 +1207,9 @@ class AV1Convolve2DTest : public AV1ConvolveTest<convolve_2d_func> { public: void RunTest() { - for (int sub_x = 0; sub_x < 16; ++sub_x) { - for (int sub_y = 0; sub_y < 16; ++sub_y) { + // Do not test the no-op filter. + for (int sub_x = 1; sub_x < 16; ++sub_x) { + for (int sub_y = 1; sub_y < 16; ++sub_y) { for (int h_f = EIGHTTAP_REGULAR; h_f <= INTERP_FILTERS_ALL; ++h_f) { for (int v_f = EIGHTTAP_REGULAR; v_f <= INTERP_FILTERS_ALL; ++v_f) { if (((h_f == MULTITAP_SHARP2) && (v_f < MULTITAP_SHARP2)) || @@ -1429,8 +1434,9 @@ : public AV1ConvolveTest<highbd_convolve_2d_func> { public: void RunTest() { - for (int sub_x = 0; sub_x < 16; ++sub_x) { - for (int sub_y = 0; sub_y < 16; ++sub_y) { + // Do not test the no-op filter. + for (int sub_x = 1; sub_x < 16; ++sub_x) { + for (int sub_y = 1; sub_y < 16; ++sub_y) { for (int h_f = EIGHTTAP_REGULAR; h_f <= INTERP_FILTERS_ALL; ++h_f) { for (int v_f = EIGHTTAP_REGULAR; v_f <= INTERP_FILTERS_ALL; ++v_f) { if (((h_f == MULTITAP_SHARP2) && (v_f < MULTITAP_SHARP2)) || @@ -1781,7 +1787,8 @@ public: void RunTest() { auto compound_params = GetCompoundParams(); - for (int sub_pix = 0; sub_pix < 16; ++sub_pix) { + // Do not test the no-op filter. + for (int sub_pix = 1; sub_pix < 16; ++sub_pix) { for (int f = EIGHTTAP_REGULAR; f < INTERP_FILTERS_ALL; ++f) { for (const auto &c : compound_params) { TestConvolve(sub_pix, static_cast<InterpFilter>(f), c); @@ -1883,7 +1890,8 @@ public: void RunTest() { auto compound_params = GetCompoundParams(); - for (int sub_pix = 0; sub_pix < 16; ++sub_pix) { + // Do not test the no-op filter. + for (int sub_pix = 1; sub_pix < 16; ++sub_pix) { for (int f = EIGHTTAP_REGULAR; f < INTERP_FILTERS_ALL; ++f) { for (const auto &c : compound_params) { TestConvolve(sub_pix, static_cast<InterpFilter>(f), c); @@ -2282,8 +2290,9 @@ auto compound_params = GetCompoundParams(); for (int h_f = EIGHTTAP_REGULAR; h_f < INTERP_FILTERS_ALL; ++h_f) { for (int v_f = EIGHTTAP_REGULAR; v_f < INTERP_FILTERS_ALL; ++v_f) { - for (int sub_x = 0; sub_x < 16; ++sub_x) { - for (int sub_y = 0; sub_y < 16; ++sub_y) { + // Do not test the no-op filter. + for (int sub_x = 1; sub_x < 16; ++sub_x) { + for (int sub_y = 1; sub_y < 16; ++sub_y) { for (const auto &compound : compound_params) { TestConvolve(static_cast<InterpFilter>(h_f), static_cast<InterpFilter>(v_f), sub_x, sub_y, @@ -2388,8 +2397,9 @@ auto compound_params = GetCompoundParams(); for (int h_f = EIGHTTAP_REGULAR; h_f < INTERP_FILTERS_ALL; ++h_f) { for (int v_f = EIGHTTAP_REGULAR; v_f < INTERP_FILTERS_ALL; ++v_f) { - for (int sub_x = 0; sub_x < 16; ++sub_x) { - for (int sub_y = 0; sub_y < 16; ++sub_y) { + // Do not test the no-op filter. + for (int sub_x = 1; sub_x < 16; ++sub_x) { + for (int sub_y = 1; sub_y < 16; ++sub_y) { for (const auto &compound : compound_params) { TestConvolve(static_cast<InterpFilter>(h_f), static_cast<InterpFilter>(v_f), sub_x, sub_y,