Commit 7056e3a0 authored by Linfeng Zhang's avatar Linfeng Zhang Committed by James Zern

remove mmx variance functions (from libvpx)

Cherry-pick d0ffae82 remove mmx variance functions

there are sse2 equivalents which is a reasonable modern baseline
Removed mmx variance functions:
vpx_get_mb_ss_mmx()
vpx_get8x8var_mmx()
vpx_get4x4var_mmx()
vpx_variance4x4_mmx()
vpx_variance8x8_mmx()
vpx_mse16x16_mmx()
vpx_variance16x16_mmx()
vpx_variance16x8_mmx()
vpx_variance8x16_mmx()

Change-Id: Ife4e67fe85e0012ca560a98831f69195c852a645
parent c5de1def
......@@ -1414,16 +1414,16 @@ add_proto qw/unsigned int aom_variance16x32/, "const uint8_t *src_ptr, int sourc
specialize qw/aom_variance16x32 sse2 msa/;
add_proto qw/unsigned int aom_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/aom_variance16x16 mmx sse2 avx2 media neon msa/;
specialize qw/aom_variance16x16 sse2 avx2 media neon msa/;
add_proto qw/unsigned int aom_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/aom_variance16x8 mmx sse2 neon msa/;
specialize qw/aom_variance16x8 sse2 neon msa/;
add_proto qw/unsigned int aom_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/aom_variance8x16 mmx sse2 neon msa/;
specialize qw/aom_variance8x16 sse2 neon msa/;
add_proto qw/unsigned int aom_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/aom_variance8x8 mmx sse2 media neon msa/;
specialize qw/aom_variance8x8 sse2 media neon msa/;
add_proto qw/unsigned int aom_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/aom_variance8x4 sse2 msa/;
......@@ -1432,7 +1432,7 @@ add_proto qw/unsigned int aom_variance4x8/, "const uint8_t *src_ptr, int source_
specialize qw/aom_variance4x8 sse2 msa/;
add_proto qw/unsigned int aom_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/aom_variance4x4 mmx sse2 msa/;
specialize qw/aom_variance4x4 sse2 msa/;
#
# Specialty Variance
......@@ -1441,10 +1441,10 @@ add_proto qw/void aom_get16x16var/, "const uint8_t *src_ptr, int source_stride,
specialize qw/aom_get16x16var sse2 avx2 neon msa/;
add_proto qw/void aom_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
specialize qw/aom_get8x8var mmx sse2 neon msa/;
specialize qw/aom_get8x8var sse2 neon msa/;
add_proto qw/unsigned int aom_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse";
specialize qw/aom_mse16x16 mmx sse2 avx2 media neon msa/;
specialize qw/aom_mse16x16 sse2 avx2 media neon msa/;
add_proto qw/unsigned int aom_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse";
specialize qw/aom_mse16x8 sse2 msa/;
......@@ -1456,7 +1456,7 @@ add_proto qw/unsigned int aom_mse8x8/, "const uint8_t *src_ptr, int source_stri
specialize qw/aom_mse8x8 sse2 msa/;
add_proto qw/unsigned int aom_get_mb_ss/, "const int16_t *";
specialize qw/aom_get_mb_ss mmx sse2 msa/;
specialize qw/aom_get_mb_ss sse2 msa/;
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_get4x4sse_cs neon msa/;
......
This diff is collapsed.
......@@ -20,9 +20,6 @@ DECLARE_ALIGNED(16, static const int16_t, bilinear_filters_mmx[8][8]) = {
{ 32, 32, 32, 32, 96, 96, 96, 96 }, { 16, 16, 16, 16, 112, 112, 112, 112 }
};
extern void aom_get4x4var_mmx(const uint8_t *a, int a_stride, const uint8_t *b,
int b_stride, unsigned int *sse, int *sum);
extern void aom_filter_block2d_bil4x4_var_mmx(const unsigned char *ref_ptr,
int ref_pixels_per_line,
const unsigned char *src_ptr,
......@@ -37,98 +34,6 @@ extern void aom_filter_block2d_bil_var_mmx(
const int16_t *HFilter, const int16_t *VFilter, int *sum,
unsigned int *sumsquared);
unsigned int aom_variance4x4_mmx(const unsigned char *a, int a_stride,
const unsigned char *b, int b_stride,
unsigned int *sse) {
unsigned int var;
int avg;
aom_get4x4var_mmx(a, a_stride, b, b_stride, &var, &avg);
*sse = var;
return (var - (((unsigned int)avg * avg) >> 4));
}
unsigned int aom_variance8x8_mmx(const unsigned char *a, int a_stride,
const unsigned char *b, int b_stride,
unsigned int *sse) {
unsigned int var;
int avg;
aom_get8x8var_mmx(a, a_stride, b, b_stride, &var, &avg);
*sse = var;
return (var - (((unsigned int)avg * avg) >> 6));
}
unsigned int aom_mse16x16_mmx(const unsigned char *a, int a_stride,
const unsigned char *b, int b_stride,
unsigned int *sse) {
unsigned int sse0, sse1, sse2, sse3, var;
int sum0, sum1, sum2, sum3;
aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0);
aom_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1);
aom_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride,
&sse2, &sum2);
aom_get8x8var_mmx(a + 8 * a_stride + 8, a_stride, b + 8 * b_stride + 8,
b_stride, &sse3, &sum3);
var = sse0 + sse1 + sse2 + sse3;
*sse = var;
return var;
}
unsigned int aom_variance16x16_mmx(const unsigned char *a, int a_stride,
const unsigned char *b, int b_stride,
unsigned int *sse) {
unsigned int sse0, sse1, sse2, sse3, var;
int sum0, sum1, sum2, sum3, avg;
aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0);
aom_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1);
aom_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride,
&sse2, &sum2);
aom_get8x8var_mmx(a + 8 * a_stride + 8, a_stride, b + 8 * b_stride + 8,
b_stride, &sse3, &sum3);
var = sse0 + sse1 + sse2 + sse3;
avg = sum0 + sum1 + sum2 + sum3;
*sse = var;
return (var - (((unsigned int)avg * avg) >> 8));
}
unsigned int aom_variance16x8_mmx(const unsigned char *a, int a_stride,
const unsigned char *b, int b_stride,
unsigned int *sse) {
unsigned int sse0, sse1, var;
int sum0, sum1, avg;
aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0);
aom_get8x8var_mmx(a + 8, a_stride, b + 8, b_stride, &sse1, &sum1);
var = sse0 + sse1;
avg = sum0 + sum1;
*sse = var;
return (var - (((unsigned int)avg * avg) >> 7));
}
unsigned int aom_variance8x16_mmx(const unsigned char *a, int a_stride,
const unsigned char *b, int b_stride,
unsigned int *sse) {
unsigned int sse0, sse1, var;
int sum0, sum1, avg;
aom_get8x8var_mmx(a, a_stride, b, b_stride, &sse0, &sum0);
aom_get8x8var_mmx(a + 8 * a_stride, a_stride, b + 8 * b_stride, b_stride,
&sse1, &sum1);
var = sse0 + sse1;
avg = sum0 + sum1;
*sse = var;
return (var - (((unsigned int)avg * avg) >> 7));
}
uint32_t aom_sub_pixel_variance4x4_mmx(const uint8_t *a, int a_stride,
int xoffset, int yoffset,
const uint8_t *b, int b_stride,
......
......@@ -951,20 +951,6 @@ INSTANTIATE_TEST_CASE_P(
#endif // CONFIG_AOM_HIGHBITDEPTH
#if HAVE_MMX
INSTANTIATE_TEST_CASE_P(MMX, AvxMseTest,
::testing::Values(make_tuple(4, 4, &aom_mse16x16_mmx)));
INSTANTIATE_TEST_CASE_P(MMX, SumOfSquaresTest,
::testing::Values(aom_get_mb_ss_mmx));
INSTANTIATE_TEST_CASE_P(
MMX, AvxVarianceTest,
::testing::Values(make_tuple(4, 4, &aom_variance16x16_mmx, 0),
make_tuple(4, 3, &aom_variance16x8_mmx, 0),
make_tuple(3, 4, &aom_variance8x16_mmx, 0),
make_tuple(3, 3, &aom_variance8x8_mmx, 0),
make_tuple(2, 2, &aom_variance4x4_mmx, 0)));
INSTANTIATE_TEST_CASE_P(
MMX, AvxSubpelVarianceTest,
::testing::Values(make_tuple(4, 4, &aom_sub_pixel_variance16x16_mmx, 0),
......
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