Commit c96bb800 authored by Parag Salasakar's avatar Parag Salasakar Committed by Gerrit Code Review

Merge "mips msa vpx_dsp variance optimization"

parents fc5f3b8f 2d730a28
......@@ -2011,4 +2011,52 @@ INSTANTIATE_TEST_CASE_P(
::testing::Values(make_tuple(4, 4, variance16x16_media, 0),
make_tuple(3, 3, variance8x8_media, 0)));
#endif // HAVE_MEDIA
#if HAVE_MSA
INSTANTIATE_TEST_CASE_P(MSA, SumOfSquaresTest,
::testing::Values(vpx_get_mb_ss_msa));
const Get4x4SseFunc get4x4sse_cs_msa = vpx_get4x4sse_cs_msa;
INSTANTIATE_TEST_CASE_P(MSA, VpxSseTest,
::testing::Values(make_tuple(2, 2, get4x4sse_cs_msa)));
const VarianceMxNFunc mse16x16_msa = vpx_mse16x16_msa;
const VarianceMxNFunc mse16x8_msa = vpx_mse16x8_msa;
const VarianceMxNFunc mse8x16_msa = vpx_mse8x16_msa;
const VarianceMxNFunc mse8x8_msa = vpx_mse8x8_msa;
INSTANTIATE_TEST_CASE_P(MSA, VpxMseTest,
::testing::Values(make_tuple(4, 4, mse16x16_msa),
make_tuple(4, 3, mse16x8_msa),
make_tuple(3, 4, mse8x16_msa),
make_tuple(3, 3, mse8x8_msa)));
const VarianceMxNFunc variance64x64_msa = vpx_variance64x64_msa;
const VarianceMxNFunc variance64x32_msa = vpx_variance64x32_msa;
const VarianceMxNFunc variance32x64_msa = vpx_variance32x64_msa;
const VarianceMxNFunc variance32x32_msa = vpx_variance32x32_msa;
const VarianceMxNFunc variance32x16_msa = vpx_variance32x16_msa;
const VarianceMxNFunc variance16x32_msa = vpx_variance16x32_msa;
const VarianceMxNFunc variance16x16_msa = vpx_variance16x16_msa;
const VarianceMxNFunc variance16x8_msa = vpx_variance16x8_msa;
const VarianceMxNFunc variance8x16_msa = vpx_variance8x16_msa;
const VarianceMxNFunc variance8x8_msa = vpx_variance8x8_msa;
const VarianceMxNFunc variance8x4_msa = vpx_variance8x4_msa;
const VarianceMxNFunc variance4x8_msa = vpx_variance4x8_msa;
const VarianceMxNFunc variance4x4_msa = vpx_variance4x4_msa;
INSTANTIATE_TEST_CASE_P(
MSA, VpxVarianceTest,
::testing::Values(make_tuple(6, 6, variance64x64_msa, 0),
make_tuple(6, 5, variance64x32_msa, 0),
make_tuple(5, 6, variance32x64_msa, 0),
make_tuple(5, 5, variance32x32_msa, 0),
make_tuple(5, 4, variance32x16_msa, 0),
make_tuple(4, 5, variance16x32_msa, 0),
make_tuple(4, 4, variance16x16_msa, 0),
make_tuple(4, 3, variance16x8_msa, 0),
make_tuple(3, 4, variance8x16_msa, 0),
make_tuple(3, 3, variance8x8_msa, 0),
make_tuple(3, 2, variance8x4_msa, 0),
make_tuple(2, 3, variance4x8_msa, 0),
make_tuple(2, 2, variance4x4_msa, 0)));
#endif // HAVE_MSA
} // namespace
This diff is collapsed.
This diff is collapsed.
......@@ -27,6 +27,8 @@ DSP_SRCS-$(HAVE_SSE4_1) += x86/sad_sse4.asm
DSP_SRCS-$(HAVE_AVX2) += x86/sad4d_avx2.c
DSP_SRCS-$(HAVE_AVX2) += x86/sad_avx2.c
DSP_SRCS-$(HAVE_MSA) += mips/macros_msa.h
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad4d_sse2.asm
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_sad_sse2.asm
......@@ -46,6 +48,8 @@ DSP_SRCS-$(HAVE_SSE2) += x86/variance_sse2.c
DSP_SRCS-$(HAVE_AVX2) += x86/variance_avx2.c
DSP_SRCS-$(HAVE_AVX2) += x86/variance_impl_avx2.c
DSP_SRCS-$(HAVE_MSA) += mips/variance_msa.c
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_sse2.c
DSP_SRCS-$(HAVE_SSE2) += x86/highbd_variance_impl_sse2.asm
......
......@@ -395,68 +395,68 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_ENCODERS") eq "yes" || vpx_config("CONFIG_POSTPROC") eq "yes" || vpx_config("CONFIG_VP9_POSTPROC") eq "yes") {
add_proto qw/unsigned int vpx_variance64x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance64x64 sse2 avx2 neon/;
specialize qw/vpx_variance64x64 sse2 avx2 neon msa/;
add_proto qw/unsigned int vpx_variance64x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance64x32 sse2 avx2 neon/;
specialize qw/vpx_variance64x32 sse2 avx2 neon msa/;
add_proto qw/unsigned int vpx_variance32x64/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance32x64 sse2 neon/;
specialize qw/vpx_variance32x64 sse2 neon msa/;
add_proto qw/unsigned int vpx_variance32x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance32x32 sse2 avx2 neon/;
specialize qw/vpx_variance32x32 sse2 avx2 neon msa/;
add_proto qw/unsigned int vpx_variance32x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance32x16 sse2 avx2/;
specialize qw/vpx_variance32x16 sse2 avx2 msa/;
add_proto qw/unsigned int vpx_variance16x32/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance16x32 sse2/;
specialize qw/vpx_variance16x32 sse2 msa/;
add_proto qw/unsigned int vpx_variance16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance16x16 mmx sse2 avx2 media neon/;
specialize qw/vpx_variance16x16 mmx sse2 avx2 media neon msa/;
add_proto qw/unsigned int vpx_variance16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance16x8 mmx sse2 neon/;
specialize qw/vpx_variance16x8 mmx sse2 neon msa/;
add_proto qw/unsigned int vpx_variance8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance8x16 mmx sse2 neon/;
specialize qw/vpx_variance8x16 mmx sse2 neon msa/;
add_proto qw/unsigned int vpx_variance8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance8x8 mmx sse2 media neon/;
specialize qw/vpx_variance8x8 mmx sse2 media neon msa/;
add_proto qw/unsigned int vpx_variance8x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance8x4 sse2/;
specialize qw/vpx_variance8x4 sse2 msa/;
add_proto qw/unsigned int vpx_variance4x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance4x8 sse2/;
specialize qw/vpx_variance4x8 sse2 msa/;
add_proto qw/unsigned int vpx_variance4x4/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse";
specialize qw/vpx_variance4x4 mmx sse2/;
specialize qw/vpx_variance4x4 mmx sse2 msa/;
add_proto qw/void vpx_get16x16var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
specialize qw/vpx_get16x16var sse2 avx2 neon/;
specialize qw/vpx_get16x16var sse2 avx2 neon msa/;
add_proto qw/void vpx_get8x8var/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int ref_stride, unsigned int *sse, int *sum";
specialize qw/vpx_get8x8var mmx sse2 neon/;
specialize qw/vpx_get8x8var mmx sse2 neon msa/;
add_proto qw/unsigned int vpx_mse16x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse";
specialize qw/vpx_mse16x16 mmx sse2 avx2 media neon/;
specialize qw/vpx_mse16x16 mmx sse2 avx2 media neon msa/;
add_proto qw/unsigned int vpx_mse16x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse";
specialize qw/vpx_mse16x8 sse2/;
specialize qw/vpx_mse16x8 sse2 msa/;
add_proto qw/unsigned int vpx_mse8x16/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse";
specialize qw/vpx_mse8x16 sse2/;
specialize qw/vpx_mse8x16 sse2 msa/;
add_proto qw/unsigned int vpx_mse8x8/, "const uint8_t *src_ptr, int source_stride, const uint8_t *ref_ptr, int recon_stride, unsigned int *sse";
specialize qw/vpx_mse8x8 sse2/;
specialize qw/vpx_mse8x8 sse2 msa/;
add_proto qw/unsigned int vpx_get_mb_ss/, "const int16_t *";
specialize qw/vpx_get_mb_ss mmx sse2/;
specialize qw/vpx_get_mb_ss mmx sse2 msa/;
add_proto qw/unsigned int vpx_get4x4sse_cs/, "const unsigned char *src_ptr, int source_stride, const unsigned char *ref_ptr, int ref_stride";
specialize qw/vpx_get4x4sse_cs neon/;
specialize qw/vpx_get4x4sse_cs neon msa/;
add_proto qw/void vpx_comp_avg_pred/, "uint8_t *comp_pred, const uint8_t *pred, int width, int height, const uint8_t *ref, int ref_stride";
......
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