remove unused aom_get4x4sse_cs
this was inherited from libvpx (VP8), is unused in the library and only
called from variance_test.cc
Bug: aomedia:3416
Change-Id: I475774a5d72862ed51411ce4886b93ac8a0dbd61
(cherry picked from commit 1d9f6897e669cef65ddcf238bfaa2960270a5001)
diff --git a/aom_dsp/aom_dsp_rtcd_defs.pl b/aom_dsp/aom_dsp_rtcd_defs.pl
index b3f8ec7..35e8181 100755
--- a/aom_dsp/aom_dsp_rtcd_defs.pl
+++ b/aom_dsp/aom_dsp_rtcd_defs.pl
@@ -1340,10 +1340,7 @@
#
#
add_proto qw/unsigned int aom_get_mb_ss/, "const int16_t *";
- add_proto qw/unsigned int aom_get4x4sse_cs/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride";
-
specialize qw/aom_get_mb_ss sse2/;
- specialize qw/aom_get4x4sse_cs neon/;
#
# Variance / Subpixel Variance / Subpixel Avg Variance
diff --git a/aom_dsp/arm/variance_neon.c b/aom_dsp/arm/variance_neon.c
index 40e40f0..075d714 100644
--- a/aom_dsp/arm/variance_neon.c
+++ b/aom_dsp/arm/variance_neon.c
@@ -461,18 +461,6 @@
return horizontal_add_u32x4(vaddq_u32(sse_u32[0], sse_u32[1]));
}
-unsigned int aom_get4x4sse_cs_neon(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride) {
- uint8x16_t s = load_unaligned_u8q(src, src_stride);
- uint8x16_t r = load_unaligned_u8q(ref, ref_stride);
-
- uint8x16_t abs_diff = vabdq_u8(s, r);
-
- uint32x4_t sse = vdotq_u32(vdupq_n_u32(0), abs_diff, abs_diff);
-
- return horizontal_add_u32x4(sse);
-}
-
#else // !defined(__ARM_FEATURE_DOTPROD)
static INLINE unsigned int mse8xh_neon(const uint8_t *src, int src_stride,
@@ -572,40 +560,6 @@
return horizontal_add_u32x4(vreinterpretq_u32_s32(sse_s32[0]));
}
-unsigned int aom_get4x4sse_cs_neon(const uint8_t *src, int src_stride,
- const uint8_t *ref, int ref_stride) {
- uint8x8_t s[4], r[4];
- int16x4_t diff[4];
- int32x4_t sse;
-
- s[0] = vld1_u8(src);
- src += src_stride;
- r[0] = vld1_u8(ref);
- ref += ref_stride;
- s[1] = vld1_u8(src);
- src += src_stride;
- r[1] = vld1_u8(ref);
- ref += ref_stride;
- s[2] = vld1_u8(src);
- src += src_stride;
- r[2] = vld1_u8(ref);
- ref += ref_stride;
- s[3] = vld1_u8(src);
- r[3] = vld1_u8(ref);
-
- diff[0] = vget_low_s16(vreinterpretq_s16_u16(vsubl_u8(s[0], r[0])));
- diff[1] = vget_low_s16(vreinterpretq_s16_u16(vsubl_u8(s[1], r[1])));
- diff[2] = vget_low_s16(vreinterpretq_s16_u16(vsubl_u8(s[2], r[2])));
- diff[3] = vget_low_s16(vreinterpretq_s16_u16(vsubl_u8(s[3], r[3])));
-
- sse = vmull_s16(diff[0], diff[0]);
- sse = vmlal_s16(sse, diff[1], diff[1]);
- sse = vmlal_s16(sse, diff[2], diff[2]);
- sse = vmlal_s16(sse, diff[3], diff[3]);
-
- return horizontal_add_u32x4(vreinterpretq_u32_s32(sse));
-}
-
#endif // defined(__ARM_FEATURE_DOTPROD)
#define MSE_WXH_NEON(w, h) \
diff --git a/aom_dsp/variance.c b/aom_dsp/variance.c
index f72feea..47178cc 100644
--- a/aom_dsp/variance.c
+++ b/aom_dsp/variance.c
@@ -25,24 +25,6 @@
#include "av1/common/filter.h"
#include "av1/common/reconinter.h"
-uint32_t aom_get4x4sse_cs_c(const uint8_t *a, int a_stride, const uint8_t *b,
- int b_stride) {
- int distortion = 0;
- int r, c;
-
- for (r = 0; r < 4; ++r) {
- for (c = 0; c < 4; ++c) {
- int diff = a[c] - b[c];
- distortion += diff * diff;
- }
-
- a += a_stride;
- b += b_stride;
- }
-
- return distortion;
-}
-
uint32_t aom_get_mb_ss_c(const int16_t *a) {
unsigned int i, sum = 0;
diff --git a/test/variance_test.cc b/test/variance_test.cc
index 25b8c8d..7dcddbb 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -51,8 +51,6 @@
const uint8_t *b, int b_stride,
uint32_t *sse,
const uint8_t *second_pred);
-typedef unsigned int (*Get4x4SseFunc)(const uint8_t *a, int a_stride,
- const uint8_t *b, int b_stride);
typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src);
typedef unsigned int (*DistWtdSubpixAvgVarMxNFunc)(
const uint8_t *a, int a_stride, int xoffset, int yoffset, const uint8_t *b,
@@ -1496,7 +1494,6 @@
typedef MseWxHTestClass<MseWxH16bitFunc> MseWxHTest;
typedef Mse16xHTestClass<Mse16xH16bitFunc> Mse16xHTest;
-typedef MainTestClass<Get4x4SseFunc> AvxSseTest;
typedef MainTestClass<VarianceMxNFunc> AvxMseTest;
typedef MainTestClass<VarianceMxNFunc> AvxVarianceTest;
typedef MainTestClass<GetSseSum8x8QuadFunc> GetSseSum8x8QuadTest;
@@ -1510,8 +1507,6 @@
typedef TestParams<MseWxH16bitFunc> MseWxHParams;
typedef TestParams<Mse16xH16bitFunc> Mse16xHParams;
-TEST_P(AvxSseTest, RefSse) { RefTestSse(); }
-TEST_P(AvxSseTest, MaxSse) { MaxTestSse(); }
TEST_P(MseWxHTest, RefMse) { RefMatchTestMse(); }
TEST_P(MseWxHTest, DISABLED_SpeedMse) { SpeedTest(); }
TEST_P(Mse16xHTest, RefMse) { RefMatchTestMse(); }
@@ -1558,11 +1553,6 @@
INSTANTIATE_TEST_SUITE_P(C, SumOfSquaresTest,
::testing::Values(aom_get_mb_ss_c));
-typedef TestParams<Get4x4SseFunc> SseParams;
-INSTANTIATE_TEST_SUITE_P(C, AvxSseTest,
- ::testing::Values(SseParams(2, 2,
- &aom_get4x4sse_cs_c)));
-
typedef TestParams<VarianceMxNFunc> MseParams;
INSTANTIATE_TEST_SUITE_P(C, AvxMseTest,
::testing::Values(MseParams(4, 4, &aom_mse16x16_c),
@@ -3015,10 +3005,6 @@
MseWxHParams(2, 3, &aom_mse_wxh_16bit_neon, 8),
MseWxHParams(2, 2, &aom_mse_wxh_16bit_neon, 8)));
-INSTANTIATE_TEST_SUITE_P(NEON, AvxSseTest,
- ::testing::Values(SseParams(2, 2,
- &aom_get4x4sse_cs_neon)));
-
INSTANTIATE_TEST_SUITE_P(NEON, AvxMseTest,
::testing::Values(MseParams(3, 3, &aom_mse8x8_neon),
MseParams(3, 4, &aom_mse8x16_neon),