chromium/third_party/libaom/source/libaom/test/variance_test.cc

/*
 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
 *
 * This source code is subject to the terms of the BSD 2 Clause License and
 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
 * was not distributed with this source code in the LICENSE file, you can
 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
 * Media Patent License 1.0 was not distributed with this source code in the
 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
 */

#include <cstdlib>
#include <new>
#include <ostream>
#include <tuple>

#include "gtest/gtest.h"

#include "config/aom_config.h"
#include "config/aom_dsp_rtcd.h"

#include "test/acm_random.h"
#include "test/register_state_check.h"
#include "aom/aom_codec.h"
#include "aom/aom_integer.h"
#include "aom_mem/aom_mem.h"
#include "aom_ports/aom_timer.h"
#include "aom_ports/mem.h"
#include "av1/common/cdef_block.h"

namespace {

MseWxH16bitFunc;
Mse16xH16bitFunc;
VarianceMxNFunc;
GetSseSum8x8QuadFunc;
GetSseSum16x16DualFunc;
SubpixVarMxNFunc;
SubpixAvgVarMxNFunc;
SumOfSquaresFunction;
DistWtdSubpixAvgVarMxNFunc;

#if !CONFIG_REALTIME_ONLY
typedef uint32_t (*ObmcSubpelVarFunc)(const uint8_t *pre, int pre_stride,
                                      int xoffset, int yoffset,
                                      const int32_t *wsrc, const int32_t *mask,
                                      unsigned int *sse);
#endif

ACMRandom;

// Truncate high bit depth results by downshifting (with rounding) by:
// 2 * (bit_depth - 8) for sse
// (bit_depth - 8) for se
static void RoundHighBitDepth(int bit_depth, int64_t *se, uint64_t *sse) {}

/* Note:
 *  Our codebase calculates the "diff" value in the variance algorithm by
 *  (src - ref).
 */
static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w,
                             int l2h, int src_stride, int ref_stride,
                             uint32_t *sse_ptr, bool use_high_bit_depth_,
                             aom_bit_depth_t bit_depth) {}

/* The subpel reference functions differ from the codec version in one aspect:
 * they calculate the bilinear factors directly instead of using a lookup table
 * and therefore upshift xoff and yoff by 1. Only every other calculated value
 * is used so the codec version shrinks the table to save space.
 */
static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
                                    int l2w, int l2h, int xoff, int yoff,
                                    uint32_t *sse_ptr, bool use_high_bit_depth_,
                                    aom_bit_depth_t bit_depth) {}

static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src,
                                        const uint8_t *second_pred, int l2w,
                                        int l2h, int xoff, int yoff,
                                        uint32_t *sse_ptr,
                                        bool use_high_bit_depth,
                                        aom_bit_depth_t bit_depth) {}

static uint32_t dist_wtd_subpel_avg_variance_ref(
    const uint8_t *ref, const uint8_t *src, const uint8_t *second_pred, int l2w,
    int l2h, int xoff, int yoff, uint32_t *sse_ptr, bool use_high_bit_depth,
    aom_bit_depth_t bit_depth, DIST_WTD_COMP_PARAMS *jcp_param) {}

#if !CONFIG_REALTIME_ONLY
static uint32_t obmc_subpel_variance_ref(const uint8_t *pre, int l2w, int l2h,
                                         int xoff, int yoff,
                                         const int32_t *wsrc,
                                         const int32_t *mask, uint32_t *sse_ptr,
                                         bool use_high_bit_depth_,
                                         aom_bit_depth_t bit_depth) {
  int64_t se = 0;
  uint64_t sse = 0;
  const int w = 1 << l2w;
  const int h = 1 << l2h;

  xoff <<= 1;
  yoff <<= 1;

  for (int y = 0; y < h; y++) {
    for (int x = 0; x < w; x++) {
      // Bilinear interpolation at a 16th pel step.
      if (!use_high_bit_depth_) {
        const int a1 = pre[(w + 1) * (y + 0) + x + 0];
        const int a2 = pre[(w + 1) * (y + 0) + x + 1];
        const int b1 = pre[(w + 1) * (y + 1) + x + 0];
        const int b2 = pre[(w + 1) * (y + 1) + x + 1];
        const int a = a1 + (((a2 - a1) * xoff + 8) >> 4);
        const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
        const int r = a + (((b - a) * yoff + 8) >> 4);
        const int diff = ROUND_POWER_OF_TWO_SIGNED(
            wsrc[w * y + x] - r * mask[w * y + x], 12);
        se += diff;
        sse += diff * diff;
      } else {
        uint16_t *pre16 = CONVERT_TO_SHORTPTR(pre);
        const int a1 = pre16[(w + 1) * (y + 0) + x + 0];
        const int a2 = pre16[(w + 1) * (y + 0) + x + 1];
        const int b1 = pre16[(w + 1) * (y + 1) + x + 0];
        const int b2 = pre16[(w + 1) * (y + 1) + x + 1];
        const int a = a1 + (((a2 - a1) * xoff + 8) >> 4);
        const int b = b1 + (((b2 - b1) * xoff + 8) >> 4);
        const int r = a + (((b - a) * yoff + 8) >> 4);
        const int diff = ROUND_POWER_OF_TWO_SIGNED(
            wsrc[w * y + x] - r * mask[w * y + x], 12);
        se += diff;
        sse += diff * diff;
      }
    }
  }
  RoundHighBitDepth(bit_depth, &se, &sse);
  *sse_ptr = static_cast<uint32_t>(sse);
  return static_cast<uint32_t>(sse - ((se * se) >> (l2w + l2h)));
}
#endif

////////////////////////////////////////////////////////////////////////////////

#if !CONFIG_REALTIME_ONLY
class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> {
 public:
  SumOfSquaresTest() : func_(GetParam()) {}

  ~SumOfSquaresTest() override = default;

 protected:
  void ConstTest();
  void RefTest();

  SumOfSquaresFunction func_;
  ACMRandom rnd_;
};

void SumOfSquaresTest::ConstTest() {
  int16_t mem[256];
  unsigned int res;
  for (int v = 0; v < 256; ++v) {
    for (int i = 0; i < 256; ++i) {
      mem[i] = v;
    }
    API_REGISTER_STATE_CHECK(res = func_(mem));
    EXPECT_EQ(256u * (v * v), res);
  }
}

unsigned int mb_ss_ref(const int16_t *src) {
  unsigned int res = 0;
  for (int i = 0; i < 256; ++i) {
    res += src[i] * src[i];
  }
  return res;
}

void SumOfSquaresTest::RefTest() {
  int16_t mem[256];
  for (int i = 0; i < 100; ++i) {
    for (int j = 0; j < 256; ++j) {
      mem[j] = rnd_.Rand8() - rnd_.Rand8();
    }

    const unsigned int expected = mb_ss_ref(mem);
    unsigned int res;
    API_REGISTER_STATE_CHECK(res = func_(mem));
    EXPECT_EQ(expected, res);
  }
}
#endif  // !CONFIG_REALTIME_ONLY

////////////////////////////////////////////////////////////////////////////////
// Encapsulating struct to store the function to test along with
// some testing context.
// Can be used for MSE, SSE, Variance, etc.

template <typename Func>
struct TestParams {};

template <typename Func>
std::ostream &operator<<(std::ostream &os, const TestParams<Func> &p) {}

// Main class for testing a function type
template <typename FunctionType>
class MseWxHTestClass
    : public ::testing::TestWithParam<TestParams<FunctionType> > {};

template <typename MseWxHFunctionType>
void MseWxHTestClass<MseWxHFunctionType>::SpeedTest() {}

template <typename MseWxHFunctionType>
void MseWxHTestClass<MseWxHFunctionType>::RefMatchTestMse() {}

template <typename FunctionType>
class Mse16xHTestClass
    : public ::testing::TestWithParam<TestParams<FunctionType> > {};

template <typename Mse16xHFunctionType>
void Mse16xHTestClass<Mse16xHFunctionType>::SpeedTest() {}

template <typename Mse16xHFunctionType>
void Mse16xHTestClass<Mse16xHFunctionType>::RefMatchTestMse() {}

template <typename Mse16xHFunctionType>
void Mse16xHTestClass<Mse16xHFunctionType>::RefMatchExtremeTestMse() {}

// Main class for testing a function type
template <typename FunctionType>
class MainTestClass
    : public ::testing::TestWithParam<TestParams<FunctionType> > {};

////////////////////////////////////////////////////////////////////////////////
// Tests related to variance.

template <typename VarianceFunctionType>
void MainTestClass<VarianceFunctionType>::ZeroTest() {}

template <typename VarianceFunctionType>
void MainTestClass<VarianceFunctionType>::RefTest() {}

template <typename VarianceFunctionType>
void MainTestClass<VarianceFunctionType>::RefStrideTest() {}

template <typename VarianceFunctionType>
void MainTestClass<VarianceFunctionType>::OneQuarterTest() {}

template <typename VarianceFunctionType>
void MainTestClass<VarianceFunctionType>::SpeedTest() {}

template <typename GetSseSum8x8QuadFuncType>
void MainTestClass<GetSseSum8x8QuadFuncType>::RefTestSseSum() {}

template <typename GetSseSum8x8QuadFuncType>
void MainTestClass<GetSseSum8x8QuadFuncType>::MinTestSseSum() {}

template <typename GetSseSum8x8QuadFuncType>
void MainTestClass<GetSseSum8x8QuadFuncType>::MaxTestSseSum() {}

template <typename GetSseSum8x8QuadFuncType>
void MainTestClass<GetSseSum8x8QuadFuncType>::SseSum_SpeedTest() {}

template <typename GetSseSum16x16DualFuncType>
void MainTestClass<GetSseSum16x16DualFuncType>::RefTestSseSumDual() {}

template <typename GetSseSum16x16DualFuncType>
void MainTestClass<GetSseSum16x16DualFuncType>::MinTestSseSumDual() {}

template <typename GetSseSum16x16DualFuncType>
void MainTestClass<GetSseSum16x16DualFuncType>::MaxTestSseSumDual() {}

template <typename GetSseSum16x16DualFuncType>
void MainTestClass<GetSseSum16x16DualFuncType>::SseSum_SpeedTestDual() {}

////////////////////////////////////////////////////////////////////////////////
// Tests related to MSE / SSE.

template <typename FunctionType>
void MainTestClass<FunctionType>::RefTestMse() {}

template <typename FunctionType>
void MainTestClass<FunctionType>::RefTestSse() {}

template <typename FunctionType>
void MainTestClass<FunctionType>::MaxTestMse() {}

template <typename FunctionType>
void MainTestClass<FunctionType>::MaxTestSse() {}

////////////////////////////////////////////////////////////////////////////////

get;
make_tuple;
tuple;

template <typename FunctionType>
class SubpelVarianceTest
    : public ::testing::TestWithParam<TestParams<FunctionType> > {};

template <typename SubpelVarianceFunctionType>
void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {}

template <typename SubpelVarianceFunctionType>
void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() {}

template <typename SubpelVarianceFunctionType>
void SubpelVarianceTest<SubpelVarianceFunctionType>::SpeedTest() {}

template <>
void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() {}

template <>
void SubpelVarianceTest<DistWtdSubpixAvgVarMxNFunc>::RefTest() {}

////////////////////////////////////////////////////////////////////////////////

#if !CONFIG_REALTIME_ONLY

static const int kMaskMax = 64;

typedef TestParams<ObmcSubpelVarFunc> ObmcSubpelVarianceParams;

template <typename FunctionType>
class ObmcVarianceTest
    : public ::testing::TestWithParam<TestParams<FunctionType> > {
 public:
  void SetUp() override {
    params_ = this->GetParam();

    rnd_.Reset(ACMRandom::DeterministicSeed());
    if (!use_high_bit_depth()) {
      pre_ = reinterpret_cast<uint8_t *>(
          aom_memalign(32, block_size() + width() + height() + 1));
    } else {
      pre_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(aom_memalign(
          32, (block_size() + width() + height() + 1) * sizeof(uint16_t))));
    }
    wsrc_ = reinterpret_cast<int32_t *>(
        aom_memalign(32, block_size() * sizeof(uint32_t)));
    mask_ = reinterpret_cast<int32_t *>(
        aom_memalign(32, block_size() * sizeof(uint32_t)));
    ASSERT_NE(pre_, nullptr);
    ASSERT_NE(wsrc_, nullptr);
    ASSERT_NE(mask_, nullptr);
  }

  void TearDown() override {
    if (!use_high_bit_depth()) {
      aom_free(pre_);
    } else {
      aom_free(CONVERT_TO_SHORTPTR(pre_));
    }
    aom_free(wsrc_);
    aom_free(mask_);
  }

 protected:
  void RefTest();
  void ExtremeRefTest();
  void SpeedTest();

  ACMRandom rnd_;
  uint8_t *pre_;
  int32_t *wsrc_;
  int32_t *mask_;
  TestParams<FunctionType> params_;

  // some relay helpers
  bool use_high_bit_depth() const { return params_.use_high_bit_depth; }
  int byte_shift() const { return params_.bit_depth - 8; }
  int block_size() const { return params_.block_size; }
  int width() const { return params_.width; }
  int height() const { return params_.height; }
  uint32_t bd_mask() const { return params_.mask; }
};

template <>
void ObmcVarianceTest<ObmcSubpelVarFunc>::RefTest() {
  for (int x = 0; x < 8; ++x) {
    for (int y = 0; y < 8; ++y) {
      if (!use_high_bit_depth())
        for (int j = 0; j < block_size() + width() + height() + 1; j++)
          pre_[j] = rnd_.Rand8();
      else
        for (int j = 0; j < block_size() + width() + height() + 1; j++)
          CONVERT_TO_SHORTPTR(pre_)[j] = rnd_.Rand16() & bd_mask();
      for (int j = 0; j < block_size(); j++) {
        wsrc_[j] = (rnd_.Rand16() & bd_mask()) * rnd_(kMaskMax * kMaskMax + 1);
        mask_[j] = rnd_(kMaskMax * kMaskMax + 1);
      }

      uint32_t sse1, sse2;
      uint32_t var1, var2;
      API_REGISTER_STATE_CHECK(
          var1 = params_.func(pre_, width() + 1, x, y, wsrc_, mask_, &sse1));
      var2 = obmc_subpel_variance_ref(
          pre_, params_.log2width, params_.log2height, x, y, wsrc_, mask_,
          &sse2, use_high_bit_depth(), params_.bit_depth);
      EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
      EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
    }
  }
}

template <>
void ObmcVarianceTest<ObmcSubpelVarFunc>::ExtremeRefTest() {
  // Pre: Set the first half of values to the maximum, the second half to 0.
  // Mask: same as above
  // WSrc: Set the first half of values to 0, the second half to the maximum.
  for (int x = 0; x < 8; ++x) {
    for (int y = 0; y < 8; ++y) {
      const int half = block_size() / 2;
      if (!use_high_bit_depth()) {
        memset(pre_, 255, half);
        memset(pre_ + half, 0, half + width() + height() + 1);
      } else {
        aom_memset16(CONVERT_TO_SHORTPTR(pre_), bd_mask(), half);
        aom_memset16(CONVERT_TO_SHORTPTR(pre_) + half, 0,
                     half + width() + height() + 1);
      }
      for (int j = 0; j < half; j++) {
        wsrc_[j] = bd_mask() * kMaskMax * kMaskMax;
        mask_[j] = 0;
      }
      for (int j = half; j < block_size(); j++) {
        wsrc_[j] = 0;
        mask_[j] = kMaskMax * kMaskMax;
      }

      uint32_t sse1, sse2;
      uint32_t var1, var2;
      API_REGISTER_STATE_CHECK(
          var1 = params_.func(pre_, width() + 1, x, y, wsrc_, mask_, &sse1));
      var2 = obmc_subpel_variance_ref(
          pre_, params_.log2width, params_.log2height, x, y, wsrc_, mask_,
          &sse2, use_high_bit_depth(), params_.bit_depth);
      EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
      EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
    }
  }
}

template <>
void ObmcVarianceTest<ObmcSubpelVarFunc>::SpeedTest() {
  if (!use_high_bit_depth())
    for (int j = 0; j < block_size() + width() + height() + 1; j++)
      pre_[j] = rnd_.Rand8();
  else
    for (int j = 0; j < block_size() + width() + height() + 1; j++)
      CONVERT_TO_SHORTPTR(pre_)[j] = rnd_.Rand16() & bd_mask();
  for (int j = 0; j < block_size(); j++) {
    wsrc_[j] = (rnd_.Rand16() & bd_mask()) * rnd_(kMaskMax * kMaskMax + 1);
    mask_[j] = rnd_(kMaskMax * kMaskMax + 1);
  }
  unsigned int sse1;
  const int stride = width() + 1;
  int run_time = 1000000000 / block_size();
  aom_usec_timer timer;

  aom_usec_timer_start(&timer);
  for (int i = 0; i < run_time; ++i) {
    int x = rnd_(8);
    int y = rnd_(8);
    API_REGISTER_STATE_CHECK(
        params_.func(pre_, stride, x, y, wsrc_, mask_, &sse1));
  }
  aom_usec_timer_mark(&timer);

  const int elapsed_time = static_cast<int>(aom_usec_timer_elapsed(&timer));
  printf("obmc_sub_pixel_variance_%dx%d_%d: %d us\n", width(), height(),
         params_.bit_depth, elapsed_time);
}

#endif  // !CONFIG_REALTIME_ONLY

MseWxHTest;
Mse16xHTest;
AvxMseTest;
AvxVarianceTest;
GetSseSum8x8QuadTest;
GetSseSum16x16DualTest;
AvxSubpelVarianceTest;
AvxSubpelAvgVarianceTest;
AvxDistWtdSubpelAvgVarianceTest;
#if !CONFIG_REALTIME_ONLY
typedef ObmcVarianceTest<ObmcSubpelVarFunc> AvxObmcSubpelVarianceTest;
#endif
MseWxHParams;
Mse16xHParams;

TEST_P(MseWxHTest, RefMse) {}
TEST_P(MseWxHTest, DISABLED_SpeedMse) {}
TEST_P(Mse16xHTest, RefMse) {}
TEST_P(Mse16xHTest, RefMseExtreme) {}
TEST_P(Mse16xHTest, DISABLED_SpeedMse) {}
TEST_P(AvxMseTest, RefMse) {}
TEST_P(AvxMseTest, MaxMse) {}
TEST_P(AvxVarianceTest, Zero) {}
TEST_P(AvxVarianceTest, Ref) {}
TEST_P(AvxVarianceTest, RefStride) {}
TEST_P(AvxVarianceTest, OneQuarter) {}
TEST_P(AvxVarianceTest, DISABLED_Speed) {}
TEST_P(GetSseSum8x8QuadTest, RefMseSum) {}
TEST_P(GetSseSum8x8QuadTest, MinSseSum) {}
TEST_P(GetSseSum8x8QuadTest, MaxMseSum) {}
TEST_P(GetSseSum8x8QuadTest, DISABLED_Speed) {}
TEST_P(GetSseSum16x16DualTest, RefMseSum) {}
TEST_P(GetSseSum16x16DualTest, MinSseSum) {}
TEST_P(GetSseSum16x16DualTest, MaxMseSum) {}
TEST_P(GetSseSum16x16DualTest, DISABLED_Speed) {}
#if !CONFIG_REALTIME_ONLY
TEST_P(SumOfSquaresTest, Const) { ConstTest(); }
TEST_P(SumOfSquaresTest, Ref) { RefTest(); }
#endif  // !CONFIG_REALTIME_ONLY
TEST_P(AvxSubpelVarianceTest, Ref) {}
TEST_P(AvxSubpelVarianceTest, ExtremeRef) {}
TEST_P(AvxSubpelVarianceTest, DISABLED_Speed) {}
TEST_P(AvxSubpelAvgVarianceTest, Ref) {}
TEST_P(AvxDistWtdSubpelAvgVarianceTest, Ref) {}
#if !CONFIG_REALTIME_ONLY
TEST_P(AvxObmcSubpelVarianceTest, Ref) { RefTest(); }
TEST_P(AvxObmcSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
TEST_P(AvxObmcSubpelVarianceTest, DISABLED_Speed) { SpeedTest(); }
#endif

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

#if !CONFIG_REALTIME_ONLY
INSTANTIATE_TEST_SUITE_P(C, SumOfSquaresTest,
                         ::testing::Values(aom_get_mb_ss_c));
#endif  // !CONFIG_REALTIME_ONLY

MseParams;
INSTANTIATE_TEST_SUITE_P();

VarianceParams;
const VarianceParams kArrayVariance_c[] =;
INSTANTIATE_TEST_SUITE_P();

GetSseSumParams;
const GetSseSumParams kArrayGetSseSum8x8Quad_c[] =;
INSTANTIATE_TEST_SUITE_P();

GetSseSumParamsDual;
const GetSseSumParamsDual kArrayGetSseSum16x16Dual_c[] =;

INSTANTIATE_TEST_SUITE_P();

SubpelVarianceParams;
const SubpelVarianceParams kArraySubpelVariance_c[] =;
INSTANTIATE_TEST_SUITE_P();

SubpelAvgVarianceParams;
const SubpelAvgVarianceParams kArraySubpelAvgVariance_c[] =;
INSTANTIATE_TEST_SUITE_P();

DistWtdSubpelAvgVarianceParams;
const DistWtdSubpelAvgVarianceParams kArrayDistWtdSubpelAvgVariance_c[] =;
INSTANTIATE_TEST_SUITE_P();

#if !CONFIG_REALTIME_ONLY
INSTANTIATE_TEST_SUITE_P(
    C, AvxObmcSubpelVarianceTest,
    ::testing::Values(
        ObmcSubpelVarianceParams(7, 7, &aom_obmc_sub_pixel_variance128x128_c,
                                 0),
        ObmcSubpelVarianceParams(7, 6, &aom_obmc_sub_pixel_variance128x64_c, 0),
        ObmcSubpelVarianceParams(6, 7, &aom_obmc_sub_pixel_variance64x128_c, 0),
        ObmcSubpelVarianceParams(6, 6, &aom_obmc_sub_pixel_variance64x64_c, 0),
        ObmcSubpelVarianceParams(6, 5, &aom_obmc_sub_pixel_variance64x32_c, 0),
        ObmcSubpelVarianceParams(5, 6, &aom_obmc_sub_pixel_variance32x64_c, 0),
        ObmcSubpelVarianceParams(5, 5, &aom_obmc_sub_pixel_variance32x32_c, 0),
        ObmcSubpelVarianceParams(5, 4, &aom_obmc_sub_pixel_variance32x16_c, 0),
        ObmcSubpelVarianceParams(4, 5, &aom_obmc_sub_pixel_variance16x32_c, 0),
        ObmcSubpelVarianceParams(4, 4, &aom_obmc_sub_pixel_variance16x16_c, 0),
        ObmcSubpelVarianceParams(4, 3, &aom_obmc_sub_pixel_variance16x8_c, 0),
        ObmcSubpelVarianceParams(3, 4, &aom_obmc_sub_pixel_variance8x16_c, 0),
        ObmcSubpelVarianceParams(3, 3, &aom_obmc_sub_pixel_variance8x8_c, 0),
        ObmcSubpelVarianceParams(3, 2, &aom_obmc_sub_pixel_variance8x4_c, 0),
        ObmcSubpelVarianceParams(2, 3, &aom_obmc_sub_pixel_variance4x8_c, 0),
        ObmcSubpelVarianceParams(2, 2, &aom_obmc_sub_pixel_variance4x4_c, 0),

        ObmcSubpelVarianceParams(6, 4, &aom_obmc_sub_pixel_variance64x16_c, 0),
        ObmcSubpelVarianceParams(4, 6, &aom_obmc_sub_pixel_variance16x64_c, 0),
        ObmcSubpelVarianceParams(5, 3, &aom_obmc_sub_pixel_variance32x8_c, 0),
        ObmcSubpelVarianceParams(3, 5, &aom_obmc_sub_pixel_variance8x32_c, 0),
        ObmcSubpelVarianceParams(4, 2, &aom_obmc_sub_pixel_variance16x4_c, 0),
        ObmcSubpelVarianceParams(2, 4, &aom_obmc_sub_pixel_variance4x16_c, 0)));
#endif

#if CONFIG_AV1_HIGHBITDEPTH
typedef uint64_t (*MseHBDWxH16bitFunc)(uint16_t *dst, int dstride,
                                       uint16_t *src, int sstride, int w,
                                       int h);

template <typename FunctionType>
class MseHBDWxHTestClass
    : public ::testing::TestWithParam<TestParams<FunctionType> > {
 public:
  void SetUp() override {
    params_ = this->GetParam();

    rnd_.Reset(ACMRandom::DeterministicSeed());
    src_ = reinterpret_cast<uint16_t *>(
        aom_memalign(16, block_size() * sizeof(src_)));
    dst_ = reinterpret_cast<uint16_t *>(
        aom_memalign(16, block_size() * sizeof(dst_)));
    ASSERT_NE(src_, nullptr);
    ASSERT_NE(dst_, nullptr);
  }

  void TearDown() override {
    aom_free(src_);
    aom_free(dst_);
    src_ = nullptr;
    dst_ = nullptr;
  }

 protected:
  void RefMatchTestMse();
  void SpeedTest();

 protected:
  ACMRandom rnd_;
  uint16_t *dst_;
  uint16_t *src_;
  TestParams<FunctionType> params_;

  // some relay helpers
  int block_size() const { return params_.block_size; }
  int width() const { return params_.width; }
  int d_stride() const { return params_.width; }  // stride is same as width
  int s_stride() const { return params_.width; }  // stride is same as width
  int height() const { return params_.height; }
  int mask() const { return params_.mask; }
};

template <typename MseHBDWxHFunctionType>
void MseHBDWxHTestClass<MseHBDWxHFunctionType>::SpeedTest() {
  aom_usec_timer ref_timer, test_timer;
  double elapsed_time_c = 0;
  double elapsed_time_simd = 0;
  int run_time = 10000000;
  int w = width();
  int h = height();
  int dstride = d_stride();
  int sstride = s_stride();
  for (int k = 0; k < block_size(); ++k) {
    dst_[k] = rnd_.Rand16() & mask();
    src_[k] = rnd_.Rand16() & mask();
  }
  aom_usec_timer_start(&ref_timer);
  for (int i = 0; i < run_time; i++) {
    aom_mse_wxh_16bit_highbd_c(dst_, dstride, src_, sstride, w, h);
  }
  aom_usec_timer_mark(&ref_timer);
  elapsed_time_c = static_cast<double>(aom_usec_timer_elapsed(&ref_timer));

  aom_usec_timer_start(&test_timer);
  for (int i = 0; i < run_time; i++) {
    params_.func(dst_, dstride, src_, sstride, w, h);
  }
  aom_usec_timer_mark(&test_timer);
  elapsed_time_simd = static_cast<double>(aom_usec_timer_elapsed(&test_timer));

  printf("%dx%d\tc_time=%lf \t simd_time=%lf \t gain=%lf\n", width(), height(),
         elapsed_time_c, elapsed_time_simd,
         (elapsed_time_c / elapsed_time_simd));
}

template <typename MseHBDWxHFunctionType>
void MseHBDWxHTestClass<MseHBDWxHFunctionType>::RefMatchTestMse() {
  uint64_t mse_ref = 0;
  uint64_t mse_mod = 0;
  int w = width();
  int h = height();
  int dstride = d_stride();
  int sstride = s_stride();
  for (int i = 0; i < 10; i++) {
    for (int k = 0; k < block_size(); ++k) {
      dst_[k] = rnd_.Rand16() & mask();
      src_[k] = rnd_.Rand16() & mask();
    }
    API_REGISTER_STATE_CHECK(mse_ref = aom_mse_wxh_16bit_highbd_c(
                                 dst_, dstride, src_, sstride, w, h));
    API_REGISTER_STATE_CHECK(
        mse_mod = params_.func(dst_, dstride, src_, sstride, w, h));
    EXPECT_EQ(mse_ref, mse_mod)
        << "ref mse: " << mse_ref << " mod mse: " << mse_mod;
  }
}

typedef TestParams<MseHBDWxH16bitFunc> MseHBDWxHParams;
typedef MseHBDWxHTestClass<MseHBDWxH16bitFunc> MseHBDWxHTest;
typedef MainTestClass<VarianceMxNFunc> AvxHBDMseTest;
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AvxHBDMseTest);
typedef MainTestClass<VarianceMxNFunc> AvxHBDVarianceTest;
typedef SubpelVarianceTest<SubpixVarMxNFunc> AvxHBDSubpelVarianceTest;
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> AvxHBDSubpelAvgVarianceTest;
typedef SubpelVarianceTest<DistWtdSubpixAvgVarMxNFunc>
    AvxHBDDistWtdSubpelAvgVarianceTest;
#if !CONFIG_REALTIME_ONLY
typedef ObmcVarianceTest<ObmcSubpelVarFunc> AvxHBDObmcSubpelVarianceTest;
#endif
GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(AvxHBDObmcSubpelVarianceTest);

TEST_P(MseHBDWxHTest, RefMse) { RefMatchTestMse(); }
TEST_P(MseHBDWxHTest, DISABLED_SpeedMse) { SpeedTest(); }
TEST_P(AvxHBDMseTest, RefMse) { RefTestMse(); }
TEST_P(AvxHBDMseTest, MaxMse) { MaxTestMse(); }
TEST_P(AvxHBDMseTest, DISABLED_SpeedMse) { SpeedTest(); }
TEST_P(AvxHBDVarianceTest, Zero) { ZeroTest(); }
TEST_P(AvxHBDVarianceTest, Ref) { RefTest(); }
TEST_P(AvxHBDVarianceTest, RefStride) { RefStrideTest(); }
TEST_P(AvxHBDVarianceTest, OneQuarter) { OneQuarterTest(); }
TEST_P(AvxHBDVarianceTest, DISABLED_Speed) { SpeedTest(); }
TEST_P(AvxHBDSubpelVarianceTest, Ref) { RefTest(); }
TEST_P(AvxHBDSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
TEST_P(AvxHBDSubpelVarianceTest, DISABLED_Speed) { SpeedTest(); }
TEST_P(AvxHBDSubpelAvgVarianceTest, Ref) { RefTest(); }
TEST_P(AvxHBDDistWtdSubpelAvgVarianceTest, Ref) { RefTest(); }
#if !CONFIG_REALTIME_ONLY
TEST_P(AvxHBDObmcSubpelVarianceTest, Ref) { RefTest(); }
TEST_P(AvxHBDObmcSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
TEST_P(AvxHBDObmcSubpelVarianceTest, DISABLED_Speed) { SpeedTest(); }
#endif

INSTANTIATE_TEST_SUITE_P(
    C, MseHBDWxHTest,
    ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_c, 10),
                      MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_c, 10),
                      MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_c, 10),
                      MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_c, 10)));

INSTANTIATE_TEST_SUITE_P(
    C, AvxHBDMseTest,
    ::testing::Values(MseParams(4, 4, &aom_highbd_12_mse16x16_c, 12),
                      MseParams(4, 3, &aom_highbd_12_mse16x8_c, 12),
                      MseParams(3, 4, &aom_highbd_12_mse8x16_c, 12),
                      MseParams(3, 3, &aom_highbd_12_mse8x8_c, 12),
                      MseParams(4, 4, &aom_highbd_10_mse16x16_c, 10),
                      MseParams(4, 3, &aom_highbd_10_mse16x8_c, 10),
                      MseParams(3, 4, &aom_highbd_10_mse8x16_c, 10),
                      MseParams(3, 3, &aom_highbd_10_mse8x8_c, 10),
                      MseParams(4, 4, &aom_highbd_8_mse16x16_c, 8),
                      MseParams(4, 3, &aom_highbd_8_mse16x8_c, 8),
                      MseParams(3, 4, &aom_highbd_8_mse8x16_c, 8),
                      MseParams(3, 3, &aom_highbd_8_mse8x8_c, 8)));

#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(
    NEON, MseHBDWxHTest,
    ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_neon, 10),
                      MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_neon, 10),
                      MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_neon, 10),
                      MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_neon,
                                      10)));

INSTANTIATE_TEST_SUITE_P(
    NEON, AvxHBDMseTest,
    ::testing::Values(MseParams(4, 4, &aom_highbd_12_mse16x16_neon, 12),
                      MseParams(4, 3, &aom_highbd_12_mse16x8_neon, 12),
                      MseParams(3, 4, &aom_highbd_12_mse8x16_neon, 12),
                      MseParams(3, 3, &aom_highbd_12_mse8x8_neon, 12),
                      MseParams(4, 4, &aom_highbd_10_mse16x16_neon, 10),
                      MseParams(4, 3, &aom_highbd_10_mse16x8_neon, 10),
                      MseParams(3, 4, &aom_highbd_10_mse8x16_neon, 10),
                      MseParams(3, 3, &aom_highbd_10_mse8x8_neon, 10),
                      MseParams(4, 4, &aom_highbd_8_mse16x16_neon, 8),
                      MseParams(4, 3, &aom_highbd_8_mse16x8_neon, 8),
                      MseParams(3, 4, &aom_highbd_8_mse8x16_neon, 8),
                      MseParams(3, 3, &aom_highbd_8_mse8x8_neon, 8)));
#endif  // HAVE_NEON

#if HAVE_NEON_DOTPROD
INSTANTIATE_TEST_SUITE_P(
    NEON_DOTPROD, AvxHBDMseTest,
    ::testing::Values(MseParams(4, 4, &aom_highbd_8_mse16x16_neon_dotprod, 8),
                      MseParams(4, 3, &aom_highbd_8_mse16x8_neon_dotprod, 8),
                      MseParams(3, 4, &aom_highbd_8_mse8x16_neon_dotprod, 8),
                      MseParams(3, 3, &aom_highbd_8_mse8x8_neon_dotprod, 8)));
#endif  // HAVE_NEON_DOTPROD

#if HAVE_SVE
INSTANTIATE_TEST_SUITE_P(
    SVE, MseHBDWxHTest,
    ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_sve, 10),
                      MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_sve, 10),
                      MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_sve, 10),
                      MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_sve,
                                      10)));

INSTANTIATE_TEST_SUITE_P(
    SVE, AvxHBDMseTest,
    ::testing::Values(MseParams(4, 4, &aom_highbd_12_mse16x16_sve, 12),
                      MseParams(4, 3, &aom_highbd_12_mse16x8_sve, 12),
                      MseParams(3, 4, &aom_highbd_12_mse8x16_sve, 12),
                      MseParams(3, 3, &aom_highbd_12_mse8x8_sve, 12),
                      MseParams(4, 4, &aom_highbd_10_mse16x16_sve, 10),
                      MseParams(4, 3, &aom_highbd_10_mse16x8_sve, 10),
                      MseParams(3, 4, &aom_highbd_10_mse8x16_sve, 10),
                      MseParams(3, 3, &aom_highbd_10_mse8x8_sve, 10)));
#endif  // HAVE_SVE

const VarianceParams kArrayHBDVariance_c[] = {
  VarianceParams(7, 7, &aom_highbd_12_variance128x128_c, 12),
  VarianceParams(7, 6, &aom_highbd_12_variance128x64_c, 12),
  VarianceParams(6, 7, &aom_highbd_12_variance64x128_c, 12),
  VarianceParams(6, 6, &aom_highbd_12_variance64x64_c, 12),
  VarianceParams(6, 5, &aom_highbd_12_variance64x32_c, 12),
  VarianceParams(5, 6, &aom_highbd_12_variance32x64_c, 12),
  VarianceParams(5, 5, &aom_highbd_12_variance32x32_c, 12),
  VarianceParams(5, 4, &aom_highbd_12_variance32x16_c, 12),
  VarianceParams(4, 5, &aom_highbd_12_variance16x32_c, 12),
  VarianceParams(4, 4, &aom_highbd_12_variance16x16_c, 12),
  VarianceParams(4, 3, &aom_highbd_12_variance16x8_c, 12),
  VarianceParams(3, 4, &aom_highbd_12_variance8x16_c, 12),
  VarianceParams(3, 3, &aom_highbd_12_variance8x8_c, 12),
  VarianceParams(3, 2, &aom_highbd_12_variance8x4_c, 12),
  VarianceParams(2, 3, &aom_highbd_12_variance4x8_c, 12),
  VarianceParams(2, 2, &aom_highbd_12_variance4x4_c, 12),
  VarianceParams(7, 7, &aom_highbd_10_variance128x128_c, 10),
  VarianceParams(7, 6, &aom_highbd_10_variance128x64_c, 10),
  VarianceParams(6, 7, &aom_highbd_10_variance64x128_c, 10),
  VarianceParams(6, 6, &aom_highbd_10_variance64x64_c, 10),
  VarianceParams(6, 5, &aom_highbd_10_variance64x32_c, 10),
  VarianceParams(5, 6, &aom_highbd_10_variance32x64_c, 10),
  VarianceParams(5, 5, &aom_highbd_10_variance32x32_c, 10),
  VarianceParams(5, 4, &aom_highbd_10_variance32x16_c, 10),
  VarianceParams(4, 5, &aom_highbd_10_variance16x32_c, 10),
  VarianceParams(4, 4, &aom_highbd_10_variance16x16_c, 10),
  VarianceParams(4, 3, &aom_highbd_10_variance16x8_c, 10),
  VarianceParams(3, 4, &aom_highbd_10_variance8x16_c, 10),
  VarianceParams(3, 3, &aom_highbd_10_variance8x8_c, 10),
  VarianceParams(3, 2, &aom_highbd_10_variance8x4_c, 10),
  VarianceParams(2, 3, &aom_highbd_10_variance4x8_c, 10),
  VarianceParams(2, 2, &aom_highbd_10_variance4x4_c, 10),
  VarianceParams(7, 7, &aom_highbd_8_variance128x128_c, 8),
  VarianceParams(7, 6, &aom_highbd_8_variance128x64_c, 8),
  VarianceParams(6, 7, &aom_highbd_8_variance64x128_c, 8),
  VarianceParams(6, 6, &aom_highbd_8_variance64x64_c, 8),
  VarianceParams(6, 5, &aom_highbd_8_variance64x32_c, 8),
  VarianceParams(5, 6, &aom_highbd_8_variance32x64_c, 8),
  VarianceParams(5, 5, &aom_highbd_8_variance32x32_c, 8),
  VarianceParams(5, 4, &aom_highbd_8_variance32x16_c, 8),
  VarianceParams(4, 5, &aom_highbd_8_variance16x32_c, 8),
  VarianceParams(4, 4, &aom_highbd_8_variance16x16_c, 8),
  VarianceParams(4, 3, &aom_highbd_8_variance16x8_c, 8),
  VarianceParams(3, 4, &aom_highbd_8_variance8x16_c, 8),
  VarianceParams(3, 3, &aom_highbd_8_variance8x8_c, 8),
  VarianceParams(3, 2, &aom_highbd_8_variance8x4_c, 8),
  VarianceParams(2, 3, &aom_highbd_8_variance4x8_c, 8),
  VarianceParams(2, 2, &aom_highbd_8_variance4x4_c, 8),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(6, 4, &aom_highbd_12_variance64x16_c, 12),
  VarianceParams(4, 6, &aom_highbd_12_variance16x64_c, 12),
  VarianceParams(5, 3, &aom_highbd_12_variance32x8_c, 12),
  VarianceParams(3, 5, &aom_highbd_12_variance8x32_c, 12),
  VarianceParams(4, 2, &aom_highbd_12_variance16x4_c, 12),
  VarianceParams(2, 4, &aom_highbd_12_variance4x16_c, 12),
  VarianceParams(6, 4, &aom_highbd_10_variance64x16_c, 10),
  VarianceParams(4, 6, &aom_highbd_10_variance16x64_c, 10),
  VarianceParams(5, 3, &aom_highbd_10_variance32x8_c, 10),
  VarianceParams(3, 5, &aom_highbd_10_variance8x32_c, 10),
  VarianceParams(4, 2, &aom_highbd_10_variance16x4_c, 10),
  VarianceParams(2, 4, &aom_highbd_10_variance4x16_c, 10),
  VarianceParams(6, 4, &aom_highbd_8_variance64x16_c, 8),
  VarianceParams(4, 6, &aom_highbd_8_variance16x64_c, 8),
  VarianceParams(5, 3, &aom_highbd_8_variance32x8_c, 8),
  VarianceParams(3, 5, &aom_highbd_8_variance8x32_c, 8),
  VarianceParams(4, 2, &aom_highbd_8_variance16x4_c, 8),
  VarianceParams(2, 4, &aom_highbd_8_variance4x16_c, 8),
#endif
};
INSTANTIATE_TEST_SUITE_P(C, AvxHBDVarianceTest,
                         ::testing::ValuesIn(kArrayHBDVariance_c));

#if HAVE_SSE4_1
INSTANTIATE_TEST_SUITE_P(
    SSE4_1, AvxHBDVarianceTest,
    ::testing::Values(
        VarianceParams(2, 2, &aom_highbd_8_variance4x4_sse4_1, 8),
        VarianceParams(2, 2, &aom_highbd_10_variance4x4_sse4_1, 10),
        VarianceParams(2, 2, &aom_highbd_12_variance4x4_sse4_1, 12)));
#endif  // HAVE_SSE4_1

const SubpelVarianceParams kArrayHBDSubpelVariance_c[] = {
  SubpelVarianceParams(7, 7, &aom_highbd_8_sub_pixel_variance128x128_c, 8),
  SubpelVarianceParams(7, 6, &aom_highbd_8_sub_pixel_variance128x64_c, 8),
  SubpelVarianceParams(6, 7, &aom_highbd_8_sub_pixel_variance64x128_c, 8),
  SubpelVarianceParams(6, 6, &aom_highbd_8_sub_pixel_variance64x64_c, 8),
  SubpelVarianceParams(6, 5, &aom_highbd_8_sub_pixel_variance64x32_c, 8),
  SubpelVarianceParams(5, 6, &aom_highbd_8_sub_pixel_variance32x64_c, 8),
  SubpelVarianceParams(5, 5, &aom_highbd_8_sub_pixel_variance32x32_c, 8),
  SubpelVarianceParams(5, 4, &aom_highbd_8_sub_pixel_variance32x16_c, 8),
  SubpelVarianceParams(4, 5, &aom_highbd_8_sub_pixel_variance16x32_c, 8),
  SubpelVarianceParams(4, 4, &aom_highbd_8_sub_pixel_variance16x16_c, 8),
  SubpelVarianceParams(4, 3, &aom_highbd_8_sub_pixel_variance16x8_c, 8),
  SubpelVarianceParams(3, 4, &aom_highbd_8_sub_pixel_variance8x16_c, 8),
  SubpelVarianceParams(3, 3, &aom_highbd_8_sub_pixel_variance8x8_c, 8),
  SubpelVarianceParams(3, 2, &aom_highbd_8_sub_pixel_variance8x4_c, 8),
  SubpelVarianceParams(2, 3, &aom_highbd_8_sub_pixel_variance4x8_c, 8),
  SubpelVarianceParams(2, 2, &aom_highbd_8_sub_pixel_variance4x4_c, 8),
  SubpelVarianceParams(7, 7, &aom_highbd_10_sub_pixel_variance128x128_c, 10),
  SubpelVarianceParams(7, 6, &aom_highbd_10_sub_pixel_variance128x64_c, 10),
  SubpelVarianceParams(6, 7, &aom_highbd_10_sub_pixel_variance64x128_c, 10),
  SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_c, 10),
  SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_c, 10),
  SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_c, 10),
  SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_c, 10),
  SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_c, 10),
  SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_c, 10),
  SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_c, 10),
  SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_c, 10),
  SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_c, 10),
  SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_c, 10),
  SubpelVarianceParams(3, 2, &aom_highbd_10_sub_pixel_variance8x4_c, 10),
  SubpelVarianceParams(2, 3, &aom_highbd_10_sub_pixel_variance4x8_c, 10),
  SubpelVarianceParams(2, 2, &aom_highbd_10_sub_pixel_variance4x4_c, 10),
  SubpelVarianceParams(7, 7, &aom_highbd_12_sub_pixel_variance128x128_c, 12),
  SubpelVarianceParams(7, 6, &aom_highbd_12_sub_pixel_variance128x64_c, 12),
  SubpelVarianceParams(6, 7, &aom_highbd_12_sub_pixel_variance64x128_c, 12),
  SubpelVarianceParams(6, 6, &aom_highbd_12_sub_pixel_variance64x64_c, 12),
  SubpelVarianceParams(6, 5, &aom_highbd_12_sub_pixel_variance64x32_c, 12),
  SubpelVarianceParams(5, 6, &aom_highbd_12_sub_pixel_variance32x64_c, 12),
  SubpelVarianceParams(5, 5, &aom_highbd_12_sub_pixel_variance32x32_c, 12),
  SubpelVarianceParams(5, 4, &aom_highbd_12_sub_pixel_variance32x16_c, 12),
  SubpelVarianceParams(4, 5, &aom_highbd_12_sub_pixel_variance16x32_c, 12),
  SubpelVarianceParams(4, 4, &aom_highbd_12_sub_pixel_variance16x16_c, 12),
  SubpelVarianceParams(4, 3, &aom_highbd_12_sub_pixel_variance16x8_c, 12),
  SubpelVarianceParams(3, 4, &aom_highbd_12_sub_pixel_variance8x16_c, 12),
  SubpelVarianceParams(3, 3, &aom_highbd_12_sub_pixel_variance8x8_c, 12),
  SubpelVarianceParams(3, 2, &aom_highbd_12_sub_pixel_variance8x4_c, 12),
  SubpelVarianceParams(2, 3, &aom_highbd_12_sub_pixel_variance4x8_c, 12),
  SubpelVarianceParams(2, 2, &aom_highbd_12_sub_pixel_variance4x4_c, 12),
#if !CONFIG_REALTIME_ONLY
  SubpelVarianceParams(6, 4, &aom_highbd_8_sub_pixel_variance64x16_c, 8),
  SubpelVarianceParams(4, 6, &aom_highbd_8_sub_pixel_variance16x64_c, 8),
  SubpelVarianceParams(5, 3, &aom_highbd_8_sub_pixel_variance32x8_c, 8),
  SubpelVarianceParams(3, 5, &aom_highbd_8_sub_pixel_variance8x32_c, 8),
  SubpelVarianceParams(4, 2, &aom_highbd_8_sub_pixel_variance16x4_c, 8),
  SubpelVarianceParams(2, 4, &aom_highbd_8_sub_pixel_variance4x16_c, 8),
  SubpelVarianceParams(6, 4, &aom_highbd_10_sub_pixel_variance64x16_c, 10),
  SubpelVarianceParams(4, 6, &aom_highbd_10_sub_pixel_variance16x64_c, 10),
  SubpelVarianceParams(5, 3, &aom_highbd_10_sub_pixel_variance32x8_c, 10),
  SubpelVarianceParams(3, 5, &aom_highbd_10_sub_pixel_variance8x32_c, 10),
  SubpelVarianceParams(4, 2, &aom_highbd_10_sub_pixel_variance16x4_c, 10),
  SubpelVarianceParams(2, 4, &aom_highbd_10_sub_pixel_variance4x16_c, 10),
  SubpelVarianceParams(6, 4, &aom_highbd_12_sub_pixel_variance64x16_c, 12),
  SubpelVarianceParams(4, 6, &aom_highbd_12_sub_pixel_variance16x64_c, 12),
  SubpelVarianceParams(5, 3, &aom_highbd_12_sub_pixel_variance32x8_c, 12),
  SubpelVarianceParams(3, 5, &aom_highbd_12_sub_pixel_variance8x32_c, 12),
  SubpelVarianceParams(4, 2, &aom_highbd_12_sub_pixel_variance16x4_c, 12),
  SubpelVarianceParams(2, 4, &aom_highbd_12_sub_pixel_variance4x16_c, 12),
#endif
};
INSTANTIATE_TEST_SUITE_P(C, AvxHBDSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelVariance_c));

const SubpelAvgVarianceParams kArrayHBDSubpelAvgVariance_c[] = {
  SubpelAvgVarianceParams(7, 7, &aom_highbd_8_sub_pixel_avg_variance128x128_c,
                          8),
  SubpelAvgVarianceParams(7, 6, &aom_highbd_8_sub_pixel_avg_variance128x64_c,
                          8),
  SubpelAvgVarianceParams(6, 7, &aom_highbd_8_sub_pixel_avg_variance64x128_c,
                          8),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_c, 8),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_c, 8),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_c, 8),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_c, 8),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_c, 8),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_c, 8),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_c, 8),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_c, 8),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_c, 8),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_c, 8),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_c, 8),
  SubpelAvgVarianceParams(2, 3, &aom_highbd_8_sub_pixel_avg_variance4x8_c, 8),
  SubpelAvgVarianceParams(2, 2, &aom_highbd_8_sub_pixel_avg_variance4x4_c, 8),
  SubpelAvgVarianceParams(7, 7, &aom_highbd_10_sub_pixel_avg_variance128x128_c,
                          10),
  SubpelAvgVarianceParams(7, 6, &aom_highbd_10_sub_pixel_avg_variance128x64_c,
                          10),
  SubpelAvgVarianceParams(6, 7, &aom_highbd_10_sub_pixel_avg_variance64x128_c,
                          10),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_c,
                          10),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_c,
                          10),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_c,
                          10),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_c,
                          10),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_c,
                          10),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_c,
                          10),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_c,
                          10),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_c,
                          10),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_c,
                          10),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_c, 10),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_c, 10),
  SubpelAvgVarianceParams(2, 3, &aom_highbd_10_sub_pixel_avg_variance4x8_c, 10),
  SubpelAvgVarianceParams(2, 2, &aom_highbd_10_sub_pixel_avg_variance4x4_c, 10),
  SubpelAvgVarianceParams(7, 7, &aom_highbd_12_sub_pixel_avg_variance128x128_c,
                          12),
  SubpelAvgVarianceParams(7, 6, &aom_highbd_12_sub_pixel_avg_variance128x64_c,
                          12),
  SubpelAvgVarianceParams(6, 7, &aom_highbd_12_sub_pixel_avg_variance64x128_c,
                          12),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_c,
                          12),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_c,
                          12),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_c,
                          12),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_c,
                          12),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_c,
                          12),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_c,
                          12),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_c,
                          12),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_c,
                          12),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_c,
                          12),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_c, 12),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_c, 12),
  SubpelAvgVarianceParams(2, 3, &aom_highbd_12_sub_pixel_avg_variance4x8_c, 12),
  SubpelAvgVarianceParams(2, 2, &aom_highbd_12_sub_pixel_avg_variance4x4_c, 12),

#if !CONFIG_REALTIME_ONLY
  SubpelAvgVarianceParams(6, 4, &aom_highbd_8_sub_pixel_avg_variance64x16_c, 8),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_8_sub_pixel_avg_variance16x64_c, 8),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_8_sub_pixel_avg_variance32x8_c, 8),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_8_sub_pixel_avg_variance8x32_c, 8),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_8_sub_pixel_avg_variance16x4_c, 8),
  SubpelAvgVarianceParams(2, 4, &aom_highbd_8_sub_pixel_avg_variance4x16_c, 8),
  SubpelAvgVarianceParams(6, 4, &aom_highbd_10_sub_pixel_avg_variance64x16_c,
                          10),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_10_sub_pixel_avg_variance16x64_c,
                          10),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_10_sub_pixel_avg_variance32x8_c,
                          10),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_10_sub_pixel_avg_variance8x32_c,
                          10),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_10_sub_pixel_avg_variance16x4_c,
                          10),
  SubpelAvgVarianceParams(2, 4, &aom_highbd_10_sub_pixel_avg_variance4x16_c,
                          10),
  SubpelAvgVarianceParams(6, 4, &aom_highbd_12_sub_pixel_avg_variance64x16_c,
                          12),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_12_sub_pixel_avg_variance16x64_c,
                          12),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_12_sub_pixel_avg_variance32x8_c,
                          12),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_12_sub_pixel_avg_variance8x32_c,
                          12),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_12_sub_pixel_avg_variance16x4_c,
                          12),
  SubpelAvgVarianceParams(2, 4, &aom_highbd_12_sub_pixel_avg_variance4x16_c,
                          12),
#endif
};
INSTANTIATE_TEST_SUITE_P(C, AvxHBDSubpelAvgVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelAvgVariance_c));

const DistWtdSubpelAvgVarianceParams kArrayHBDDistWtdSubpelAvgVariance_c[] = {
  DistWtdSubpelAvgVarianceParams(
      7, 7, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance128x128_c, 8),
  DistWtdSubpelAvgVarianceParams(
      7, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance128x64_c, 8),
  DistWtdSubpelAvgVarianceParams(
      6, 7, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x128_c, 8),
  DistWtdSubpelAvgVarianceParams(
      6, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x64_c, 8),
  DistWtdSubpelAvgVarianceParams(
      6, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x32_c, 8),
  DistWtdSubpelAvgVarianceParams(
      5, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x64_c, 8),
  DistWtdSubpelAvgVarianceParams(
      5, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x32_c, 8),
  DistWtdSubpelAvgVarianceParams(
      5, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x16_c, 8),
  DistWtdSubpelAvgVarianceParams(
      4, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x32_c, 8),
  DistWtdSubpelAvgVarianceParams(
      4, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x16_c, 8),
  DistWtdSubpelAvgVarianceParams(
      4, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x8_c, 8),
  DistWtdSubpelAvgVarianceParams(
      3, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x16_c, 8),
  DistWtdSubpelAvgVarianceParams(
      3, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x8_c, 8),
  DistWtdSubpelAvgVarianceParams(
      3, 2, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x4_c, 8),
  DistWtdSubpelAvgVarianceParams(
      2, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance4x8_c, 8),
  DistWtdSubpelAvgVarianceParams(
      2, 2, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance4x4_c, 8),
  DistWtdSubpelAvgVarianceParams(
      7, 7, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance128x128_c, 10),
  DistWtdSubpelAvgVarianceParams(
      7, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance128x64_c, 10),
  DistWtdSubpelAvgVarianceParams(
      6, 7, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x128_c, 10),
  DistWtdSubpelAvgVarianceParams(
      6, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x64_c, 10),
  DistWtdSubpelAvgVarianceParams(
      6, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x32_c, 10),
  DistWtdSubpelAvgVarianceParams(
      5, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x64_c, 10),
  DistWtdSubpelAvgVarianceParams(
      5, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x32_c, 10),
  DistWtdSubpelAvgVarianceParams(
      5, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x16_c, 10),
  DistWtdSubpelAvgVarianceParams(
      4, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x32_c, 10),
  DistWtdSubpelAvgVarianceParams(
      4, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x16_c, 10),
  DistWtdSubpelAvgVarianceParams(
      4, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x8_c, 10),
  DistWtdSubpelAvgVarianceParams(
      3, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x16_c, 10),
  DistWtdSubpelAvgVarianceParams(
      3, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x8_c, 10),
  DistWtdSubpelAvgVarianceParams(
      3, 2, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x4_c, 10),
  DistWtdSubpelAvgVarianceParams(
      2, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance4x8_c, 10),
  DistWtdSubpelAvgVarianceParams(
      2, 2, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance4x4_c, 10),
  DistWtdSubpelAvgVarianceParams(
      7, 7, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance128x128_c, 12),
  DistWtdSubpelAvgVarianceParams(
      7, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance128x64_c, 12),
  DistWtdSubpelAvgVarianceParams(
      6, 7, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x128_c, 12),
  DistWtdSubpelAvgVarianceParams(
      6, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x64_c, 12),
  DistWtdSubpelAvgVarianceParams(
      6, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x32_c, 12),
  DistWtdSubpelAvgVarianceParams(
      5, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x64_c, 12),
  DistWtdSubpelAvgVarianceParams(
      5, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x32_c, 12),
  DistWtdSubpelAvgVarianceParams(
      5, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x16_c, 12),
  DistWtdSubpelAvgVarianceParams(
      4, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x32_c, 12),
  DistWtdSubpelAvgVarianceParams(
      4, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x16_c, 12),
  DistWtdSubpelAvgVarianceParams(
      4, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x8_c, 12),
  DistWtdSubpelAvgVarianceParams(
      3, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x16_c, 12),
  DistWtdSubpelAvgVarianceParams(
      3, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x8_c, 12),
  DistWtdSubpelAvgVarianceParams(
      3, 2, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x4_c, 12),
  DistWtdSubpelAvgVarianceParams(
      2, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance4x8_c, 12),
  DistWtdSubpelAvgVarianceParams(
      2, 2, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance4x4_c, 12),

#if !CONFIG_REALTIME_ONLY
  DistWtdSubpelAvgVarianceParams(
      6, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x16_c, 8),
  DistWtdSubpelAvgVarianceParams(
      4, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x64_c, 8),
  DistWtdSubpelAvgVarianceParams(
      5, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x8_c, 8),
  DistWtdSubpelAvgVarianceParams(
      3, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x32_c, 8),
  DistWtdSubpelAvgVarianceParams(
      4, 2, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x4_c, 8),
  DistWtdSubpelAvgVarianceParams(
      2, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance4x16_c, 8),
  DistWtdSubpelAvgVarianceParams(
      6, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x16_c, 10),
  DistWtdSubpelAvgVarianceParams(
      4, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x64_c, 10),
  DistWtdSubpelAvgVarianceParams(
      5, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x8_c, 10),
  DistWtdSubpelAvgVarianceParams(
      3, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x32_c, 10),
  DistWtdSubpelAvgVarianceParams(
      4, 2, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x4_c, 10),
  DistWtdSubpelAvgVarianceParams(
      2, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance4x16_c, 10),
  DistWtdSubpelAvgVarianceParams(
      6, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x16_c, 12),
  DistWtdSubpelAvgVarianceParams(
      4, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x64_c, 12),
  DistWtdSubpelAvgVarianceParams(
      5, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x8_c, 12),
  DistWtdSubpelAvgVarianceParams(
      3, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x32_c, 12),
  DistWtdSubpelAvgVarianceParams(
      4, 2, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x4_c, 12),
  DistWtdSubpelAvgVarianceParams(
      2, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance4x16_c, 12),
#endif
};
INSTANTIATE_TEST_SUITE_P(
    C, AvxHBDDistWtdSubpelAvgVarianceTest,
    ::testing::ValuesIn(kArrayHBDDistWtdSubpelAvgVariance_c));

#if !CONFIG_REALTIME_ONLY
const ObmcSubpelVarianceParams kArrayHBDObmcSubpelVariance_c[] = {
  ObmcSubpelVarianceParams(7, 7, &aom_highbd_8_obmc_sub_pixel_variance128x128_c,
                           8),
  ObmcSubpelVarianceParams(7, 6, &aom_highbd_8_obmc_sub_pixel_variance128x64_c,
                           8),
  ObmcSubpelVarianceParams(6, 7, &aom_highbd_8_obmc_sub_pixel_variance64x128_c,
                           8),
  ObmcSubpelVarianceParams(6, 6, &aom_highbd_8_obmc_sub_pixel_variance64x64_c,
                           8),
  ObmcSubpelVarianceParams(6, 5, &aom_highbd_8_obmc_sub_pixel_variance64x32_c,
                           8),
  ObmcSubpelVarianceParams(5, 6, &aom_highbd_8_obmc_sub_pixel_variance32x64_c,
                           8),
  ObmcSubpelVarianceParams(5, 5, &aom_highbd_8_obmc_sub_pixel_variance32x32_c,
                           8),
  ObmcSubpelVarianceParams(5, 4, &aom_highbd_8_obmc_sub_pixel_variance32x16_c,
                           8),
  ObmcSubpelVarianceParams(4, 5, &aom_highbd_8_obmc_sub_pixel_variance16x32_c,
                           8),
  ObmcSubpelVarianceParams(4, 4, &aom_highbd_8_obmc_sub_pixel_variance16x16_c,
                           8),
  ObmcSubpelVarianceParams(4, 3, &aom_highbd_8_obmc_sub_pixel_variance16x8_c,
                           8),
  ObmcSubpelVarianceParams(3, 4, &aom_highbd_8_obmc_sub_pixel_variance8x16_c,
                           8),
  ObmcSubpelVarianceParams(3, 3, &aom_highbd_8_obmc_sub_pixel_variance8x8_c, 8),
  ObmcSubpelVarianceParams(3, 2, &aom_highbd_8_obmc_sub_pixel_variance8x4_c, 8),
  ObmcSubpelVarianceParams(2, 3, &aom_highbd_8_obmc_sub_pixel_variance4x8_c, 8),
  ObmcSubpelVarianceParams(2, 2, &aom_highbd_8_obmc_sub_pixel_variance4x4_c, 8),
  ObmcSubpelVarianceParams(7, 7,
                           &aom_highbd_10_obmc_sub_pixel_variance128x128_c, 10),
  ObmcSubpelVarianceParams(7, 6, &aom_highbd_10_obmc_sub_pixel_variance128x64_c,
                           10),
  ObmcSubpelVarianceParams(6, 7, &aom_highbd_10_obmc_sub_pixel_variance64x128_c,
                           10),
  ObmcSubpelVarianceParams(6, 6, &aom_highbd_10_obmc_sub_pixel_variance64x64_c,
                           10),
  ObmcSubpelVarianceParams(6, 5, &aom_highbd_10_obmc_sub_pixel_variance64x32_c,
                           10),
  ObmcSubpelVarianceParams(5, 6, &aom_highbd_10_obmc_sub_pixel_variance32x64_c,
                           10),
  ObmcSubpelVarianceParams(5, 5, &aom_highbd_10_obmc_sub_pixel_variance32x32_c,
                           10),
  ObmcSubpelVarianceParams(5, 4, &aom_highbd_10_obmc_sub_pixel_variance32x16_c,
                           10),
  ObmcSubpelVarianceParams(4, 5, &aom_highbd_10_obmc_sub_pixel_variance16x32_c,
                           10),
  ObmcSubpelVarianceParams(4, 4, &aom_highbd_10_obmc_sub_pixel_variance16x16_c,
                           10),
  ObmcSubpelVarianceParams(4, 3, &aom_highbd_10_obmc_sub_pixel_variance16x8_c,
                           10),
  ObmcSubpelVarianceParams(3, 4, &aom_highbd_10_obmc_sub_pixel_variance8x16_c,
                           10),
  ObmcSubpelVarianceParams(3, 3, &aom_highbd_10_obmc_sub_pixel_variance8x8_c,
                           10),
  ObmcSubpelVarianceParams(3, 2, &aom_highbd_10_obmc_sub_pixel_variance8x4_c,
                           10),
  ObmcSubpelVarianceParams(2, 3, &aom_highbd_10_obmc_sub_pixel_variance4x8_c,
                           10),
  ObmcSubpelVarianceParams(2, 2, &aom_highbd_10_obmc_sub_pixel_variance4x4_c,
                           10),
  ObmcSubpelVarianceParams(7, 7,
                           &aom_highbd_12_obmc_sub_pixel_variance128x128_c, 12),
  ObmcSubpelVarianceParams(7, 6, &aom_highbd_12_obmc_sub_pixel_variance128x64_c,
                           12),
  ObmcSubpelVarianceParams(6, 7, &aom_highbd_12_obmc_sub_pixel_variance64x128_c,
                           12),
  ObmcSubpelVarianceParams(6, 6, &aom_highbd_12_obmc_sub_pixel_variance64x64_c,
                           12),
  ObmcSubpelVarianceParams(6, 5, &aom_highbd_12_obmc_sub_pixel_variance64x32_c,
                           12),
  ObmcSubpelVarianceParams(5, 6, &aom_highbd_12_obmc_sub_pixel_variance32x64_c,
                           12),
  ObmcSubpelVarianceParams(5, 5, &aom_highbd_12_obmc_sub_pixel_variance32x32_c,
                           12),
  ObmcSubpelVarianceParams(5, 4, &aom_highbd_12_obmc_sub_pixel_variance32x16_c,
                           12),
  ObmcSubpelVarianceParams(4, 5, &aom_highbd_12_obmc_sub_pixel_variance16x32_c,
                           12),
  ObmcSubpelVarianceParams(4, 4, &aom_highbd_12_obmc_sub_pixel_variance16x16_c,
                           12),
  ObmcSubpelVarianceParams(4, 3, &aom_highbd_12_obmc_sub_pixel_variance16x8_c,
                           12),
  ObmcSubpelVarianceParams(3, 4, &aom_highbd_12_obmc_sub_pixel_variance8x16_c,
                           12),
  ObmcSubpelVarianceParams(3, 3, &aom_highbd_12_obmc_sub_pixel_variance8x8_c,
                           12),
  ObmcSubpelVarianceParams(3, 2, &aom_highbd_12_obmc_sub_pixel_variance8x4_c,
                           12),
  ObmcSubpelVarianceParams(2, 3, &aom_highbd_12_obmc_sub_pixel_variance4x8_c,
                           12),
  ObmcSubpelVarianceParams(2, 2, &aom_highbd_12_obmc_sub_pixel_variance4x4_c,
                           12),

  ObmcSubpelVarianceParams(6, 4, &aom_highbd_8_obmc_sub_pixel_variance64x16_c,
                           8),
  ObmcSubpelVarianceParams(4, 6, &aom_highbd_8_obmc_sub_pixel_variance16x64_c,
                           8),
  ObmcSubpelVarianceParams(5, 3, &aom_highbd_8_obmc_sub_pixel_variance32x8_c,
                           8),
  ObmcSubpelVarianceParams(3, 5, &aom_highbd_8_obmc_sub_pixel_variance8x32_c,
                           8),
  ObmcSubpelVarianceParams(4, 2, &aom_highbd_8_obmc_sub_pixel_variance16x4_c,
                           8),
  ObmcSubpelVarianceParams(2, 4, &aom_highbd_8_obmc_sub_pixel_variance4x16_c,
                           8),
  ObmcSubpelVarianceParams(6, 4, &aom_highbd_10_obmc_sub_pixel_variance64x16_c,
                           10),
  ObmcSubpelVarianceParams(4, 6, &aom_highbd_10_obmc_sub_pixel_variance16x64_c,
                           10),
  ObmcSubpelVarianceParams(5, 3, &aom_highbd_10_obmc_sub_pixel_variance32x8_c,
                           10),
  ObmcSubpelVarianceParams(3, 5, &aom_highbd_10_obmc_sub_pixel_variance8x32_c,
                           10),
  ObmcSubpelVarianceParams(4, 2, &aom_highbd_10_obmc_sub_pixel_variance16x4_c,
                           10),
  ObmcSubpelVarianceParams(2, 4, &aom_highbd_10_obmc_sub_pixel_variance4x16_c,
                           10),
  ObmcSubpelVarianceParams(6, 4, &aom_highbd_12_obmc_sub_pixel_variance64x16_c,
                           12),
  ObmcSubpelVarianceParams(4, 6, &aom_highbd_12_obmc_sub_pixel_variance16x64_c,
                           12),
  ObmcSubpelVarianceParams(5, 3, &aom_highbd_12_obmc_sub_pixel_variance32x8_c,
                           12),
  ObmcSubpelVarianceParams(3, 5, &aom_highbd_12_obmc_sub_pixel_variance8x32_c,
                           12),
  ObmcSubpelVarianceParams(4, 2, &aom_highbd_12_obmc_sub_pixel_variance16x4_c,
                           12),
  ObmcSubpelVarianceParams(2, 4, &aom_highbd_12_obmc_sub_pixel_variance4x16_c,
                           12),
};
INSTANTIATE_TEST_SUITE_P(C, AvxHBDObmcSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayHBDObmcSubpelVariance_c));
#endif  // !CONFIG_REALTIME_ONLY
#endif  // CONFIG_AV1_HIGHBITDEPTH

#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

#if !CONFIG_REALTIME_ONLY
INSTANTIATE_TEST_SUITE_P(SSE2, SumOfSquaresTest,
                         ::testing::Values(aom_get_mb_ss_sse2));
#endif  // !CONFIG_REALTIME_ONLY

INSTANTIATE_TEST_SUITE_P();

const VarianceParams kArrayVariance_sse2[] =;
INSTANTIATE_TEST_SUITE_P();

const GetSseSumParams kArrayGetSseSum8x8Quad_sse2[] =;
INSTANTIATE_TEST_SUITE_P();

const GetSseSumParamsDual kArrayGetSseSum16x16Dual_sse2[] =;
INSTANTIATE_TEST_SUITE_P();

#if CONFIG_AV1_HIGHBITDEPTH
#if HAVE_SSE2
INSTANTIATE_TEST_SUITE_P(
    SSE2, MseHBDWxHTest,
    ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_sse2, 10),
                      MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_sse2, 10),
                      MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_sse2, 10),
                      MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_sse2,
                                      10)));

INSTANTIATE_TEST_SUITE_P(
    SSE2, AvxHBDMseTest,
    ::testing::Values(MseParams(4, 4, &aom_highbd_12_mse16x16_sse2, 12),
                      MseParams(3, 3, &aom_highbd_12_mse8x8_sse2, 12),
                      MseParams(4, 4, &aom_highbd_10_mse16x16_sse2, 10),
                      MseParams(3, 3, &aom_highbd_10_mse8x8_sse2, 10),
                      MseParams(4, 4, &aom_highbd_8_mse16x16_sse2, 8),
                      MseParams(3, 3, &aom_highbd_8_mse8x8_sse2, 8)));
#endif  // HAVE_SSE2
#if HAVE_SSE4_1
INSTANTIATE_TEST_SUITE_P(
    SSE4_1, AvxSubpelVarianceTest,
    ::testing::Values(
        SubpelVarianceParams(2, 2, &aom_highbd_8_sub_pixel_variance4x4_sse4_1,
                             8),
        SubpelVarianceParams(2, 2, &aom_highbd_10_sub_pixel_variance4x4_sse4_1,
                             10),
        SubpelVarianceParams(2, 2, &aom_highbd_12_sub_pixel_variance4x4_sse4_1,
                             12)));

INSTANTIATE_TEST_SUITE_P(
    SSE4_1, AvxSubpelAvgVarianceTest,
    ::testing::Values(
        SubpelAvgVarianceParams(2, 2,
                                &aom_highbd_8_sub_pixel_avg_variance4x4_sse4_1,
                                8),
        SubpelAvgVarianceParams(2, 2,
                                &aom_highbd_10_sub_pixel_avg_variance4x4_sse4_1,
                                10),
        SubpelAvgVarianceParams(2, 2,
                                &aom_highbd_12_sub_pixel_avg_variance4x4_sse4_1,
                                12)));
#endif  // HAVE_SSE4_1

#if HAVE_AVX2
INSTANTIATE_TEST_SUITE_P(
    AVX2, AvxHBDMseTest,
    ::testing::Values(MseParams(4, 4, &aom_highbd_10_mse16x16_avx2, 10)));
#endif  // HAVE_AVX2

const VarianceParams kArrayHBDVariance_sse2[] = {
  VarianceParams(7, 7, &aom_highbd_12_variance128x128_sse2, 12),
  VarianceParams(7, 6, &aom_highbd_12_variance128x64_sse2, 12),
  VarianceParams(6, 7, &aom_highbd_12_variance64x128_sse2, 12),
  VarianceParams(6, 6, &aom_highbd_12_variance64x64_sse2, 12),
  VarianceParams(6, 5, &aom_highbd_12_variance64x32_sse2, 12),
  VarianceParams(5, 6, &aom_highbd_12_variance32x64_sse2, 12),
  VarianceParams(5, 5, &aom_highbd_12_variance32x32_sse2, 12),
  VarianceParams(5, 4, &aom_highbd_12_variance32x16_sse2, 12),
  VarianceParams(4, 5, &aom_highbd_12_variance16x32_sse2, 12),
  VarianceParams(4, 4, &aom_highbd_12_variance16x16_sse2, 12),
  VarianceParams(4, 3, &aom_highbd_12_variance16x8_sse2, 12),
  VarianceParams(3, 4, &aom_highbd_12_variance8x16_sse2, 12),
  VarianceParams(3, 3, &aom_highbd_12_variance8x8_sse2, 12),
  VarianceParams(7, 7, &aom_highbd_10_variance128x128_sse2, 10),
  VarianceParams(7, 6, &aom_highbd_10_variance128x64_sse2, 10),
  VarianceParams(6, 7, &aom_highbd_10_variance64x128_sse2, 10),
  VarianceParams(6, 6, &aom_highbd_10_variance64x64_sse2, 10),
  VarianceParams(6, 5, &aom_highbd_10_variance64x32_sse2, 10),
  VarianceParams(5, 6, &aom_highbd_10_variance32x64_sse2, 10),
  VarianceParams(5, 5, &aom_highbd_10_variance32x32_sse2, 10),
  VarianceParams(5, 4, &aom_highbd_10_variance32x16_sse2, 10),
  VarianceParams(4, 5, &aom_highbd_10_variance16x32_sse2, 10),
  VarianceParams(4, 4, &aom_highbd_10_variance16x16_sse2, 10),
  VarianceParams(4, 3, &aom_highbd_10_variance16x8_sse2, 10),
  VarianceParams(3, 4, &aom_highbd_10_variance8x16_sse2, 10),
  VarianceParams(3, 3, &aom_highbd_10_variance8x8_sse2, 10),
  VarianceParams(7, 7, &aom_highbd_8_variance128x128_sse2, 8),
  VarianceParams(7, 6, &aom_highbd_8_variance128x64_sse2, 8),
  VarianceParams(6, 7, &aom_highbd_8_variance64x128_sse2, 8),
  VarianceParams(6, 6, &aom_highbd_8_variance64x64_sse2, 8),
  VarianceParams(6, 5, &aom_highbd_8_variance64x32_sse2, 8),
  VarianceParams(5, 6, &aom_highbd_8_variance32x64_sse2, 8),
  VarianceParams(5, 5, &aom_highbd_8_variance32x32_sse2, 8),
  VarianceParams(5, 4, &aom_highbd_8_variance32x16_sse2, 8),
  VarianceParams(4, 5, &aom_highbd_8_variance16x32_sse2, 8),
  VarianceParams(4, 4, &aom_highbd_8_variance16x16_sse2, 8),
  VarianceParams(4, 3, &aom_highbd_8_variance16x8_sse2, 8),
  VarianceParams(3, 4, &aom_highbd_8_variance8x16_sse2, 8),
  VarianceParams(3, 3, &aom_highbd_8_variance8x8_sse2, 8),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(6, 4, &aom_highbd_12_variance64x16_sse2, 12),
  VarianceParams(4, 6, &aom_highbd_12_variance16x64_sse2, 12),
  VarianceParams(5, 3, &aom_highbd_12_variance32x8_sse2, 12),
  VarianceParams(3, 5, &aom_highbd_12_variance8x32_sse2, 12),
  // VarianceParams(4, 2, &aom_highbd_12_variance16x4_sse2, 12),
  // VarianceParams(2, 4, &aom_highbd_12_variance4x16_sse2, 12),
  VarianceParams(6, 4, &aom_highbd_10_variance64x16_sse2, 10),
  VarianceParams(4, 6, &aom_highbd_10_variance16x64_sse2, 10),
  VarianceParams(5, 3, &aom_highbd_10_variance32x8_sse2, 10),
  VarianceParams(3, 5, &aom_highbd_10_variance8x32_sse2, 10),
  // VarianceParams(4, 2, &aom_highbd_10_variance16x4_sse2, 10),
  // VarianceParams(2, 4, &aom_highbd_10_variance4x16_sse2, 10),
  VarianceParams(6, 4, &aom_highbd_8_variance64x16_sse2, 8),
  VarianceParams(4, 6, &aom_highbd_8_variance16x64_sse2, 8),
  VarianceParams(5, 3, &aom_highbd_8_variance32x8_sse2, 8),
  VarianceParams(3, 5, &aom_highbd_8_variance8x32_sse2, 8),
// VarianceParams(4, 2, &aom_highbd_8_variance16x4_sse2, 8),
// VarianceParams(2, 4, &aom_highbd_8_variance4x16_sse2, 8),
#endif
};
INSTANTIATE_TEST_SUITE_P(SSE2, AvxHBDVarianceTest,
                         ::testing::ValuesIn(kArrayHBDVariance_sse2));

#if HAVE_AVX2

INSTANTIATE_TEST_SUITE_P(
    AVX2, MseHBDWxHTest,
    ::testing::Values(MseHBDWxHParams(3, 3, &aom_mse_wxh_16bit_highbd_avx2, 10),
                      MseHBDWxHParams(3, 2, &aom_mse_wxh_16bit_highbd_avx2, 10),
                      MseHBDWxHParams(2, 3, &aom_mse_wxh_16bit_highbd_avx2, 10),
                      MseHBDWxHParams(2, 2, &aom_mse_wxh_16bit_highbd_avx2,
                                      10)));

const VarianceParams kArrayHBDVariance_avx2[] = {
  VarianceParams(7, 7, &aom_highbd_10_variance128x128_avx2, 10),
  VarianceParams(7, 6, &aom_highbd_10_variance128x64_avx2, 10),
  VarianceParams(6, 7, &aom_highbd_10_variance64x128_avx2, 10),
  VarianceParams(6, 6, &aom_highbd_10_variance64x64_avx2, 10),
  VarianceParams(6, 5, &aom_highbd_10_variance64x32_avx2, 10),
  VarianceParams(5, 6, &aom_highbd_10_variance32x64_avx2, 10),
  VarianceParams(5, 5, &aom_highbd_10_variance32x32_avx2, 10),
  VarianceParams(5, 4, &aom_highbd_10_variance32x16_avx2, 10),
  VarianceParams(4, 5, &aom_highbd_10_variance16x32_avx2, 10),
  VarianceParams(4, 4, &aom_highbd_10_variance16x16_avx2, 10),
  VarianceParams(4, 3, &aom_highbd_10_variance16x8_avx2, 10),
  VarianceParams(3, 4, &aom_highbd_10_variance8x16_avx2, 10),
  VarianceParams(3, 3, &aom_highbd_10_variance8x8_avx2, 10),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(6, 4, &aom_highbd_10_variance64x16_avx2, 10),
  VarianceParams(5, 3, &aom_highbd_10_variance32x8_avx2, 10),
  VarianceParams(4, 6, &aom_highbd_10_variance16x64_avx2, 10),
  VarianceParams(3, 5, &aom_highbd_10_variance8x32_avx2, 10),
#endif
};

INSTANTIATE_TEST_SUITE_P(AVX2, AvxHBDVarianceTest,
                         ::testing::ValuesIn(kArrayHBDVariance_avx2));

const SubpelVarianceParams kArrayHBDSubpelVariance_avx2[] = {
  SubpelVarianceParams(7, 7, &aom_highbd_10_sub_pixel_variance128x128_avx2, 10),
  SubpelVarianceParams(7, 6, &aom_highbd_10_sub_pixel_variance128x64_avx2, 10),
  SubpelVarianceParams(6, 7, &aom_highbd_10_sub_pixel_variance64x128_avx2, 10),
  SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_avx2, 10),
  SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_avx2, 10),
  SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_avx2, 10),
  SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_avx2, 10),
  SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_avx2, 10),
  SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_avx2, 10),
  SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_avx2, 10),
  SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_avx2, 10),
  SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_avx2, 10),
  SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_avx2, 10),
};

INSTANTIATE_TEST_SUITE_P(AVX2, AvxHBDSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelVariance_avx2));
#endif  // HAVE_AVX2

const SubpelVarianceParams kArrayHBDSubpelVariance_sse2[] = {
  SubpelVarianceParams(7, 7, &aom_highbd_12_sub_pixel_variance128x128_sse2, 12),
  SubpelVarianceParams(7, 6, &aom_highbd_12_sub_pixel_variance128x64_sse2, 12),
  SubpelVarianceParams(6, 7, &aom_highbd_12_sub_pixel_variance64x128_sse2, 12),
  SubpelVarianceParams(6, 6, &aom_highbd_12_sub_pixel_variance64x64_sse2, 12),
  SubpelVarianceParams(6, 5, &aom_highbd_12_sub_pixel_variance64x32_sse2, 12),
  SubpelVarianceParams(5, 6, &aom_highbd_12_sub_pixel_variance32x64_sse2, 12),
  SubpelVarianceParams(5, 5, &aom_highbd_12_sub_pixel_variance32x32_sse2, 12),
  SubpelVarianceParams(5, 4, &aom_highbd_12_sub_pixel_variance32x16_sse2, 12),
  SubpelVarianceParams(4, 5, &aom_highbd_12_sub_pixel_variance16x32_sse2, 12),
  SubpelVarianceParams(4, 4, &aom_highbd_12_sub_pixel_variance16x16_sse2, 12),
  SubpelVarianceParams(4, 3, &aom_highbd_12_sub_pixel_variance16x8_sse2, 12),
  SubpelVarianceParams(3, 4, &aom_highbd_12_sub_pixel_variance8x16_sse2, 12),
  SubpelVarianceParams(3, 3, &aom_highbd_12_sub_pixel_variance8x8_sse2, 12),
  SubpelVarianceParams(3, 2, &aom_highbd_12_sub_pixel_variance8x4_sse2, 12),
  SubpelVarianceParams(7, 7, &aom_highbd_10_sub_pixel_variance128x128_sse2, 10),
  SubpelVarianceParams(7, 6, &aom_highbd_10_sub_pixel_variance128x64_sse2, 10),
  SubpelVarianceParams(6, 7, &aom_highbd_10_sub_pixel_variance64x128_sse2, 10),
  SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_sse2, 10),
  SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_sse2, 10),
  SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_sse2, 10),
  SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_sse2, 10),
  SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_sse2, 10),
  SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_sse2, 10),
  SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_sse2, 10),
  SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_sse2, 10),
  SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_sse2, 10),
  SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_sse2, 10),
  SubpelVarianceParams(3, 2, &aom_highbd_10_sub_pixel_variance8x4_sse2, 10),
  SubpelVarianceParams(7, 7, &aom_highbd_8_sub_pixel_variance128x128_sse2, 8),
  SubpelVarianceParams(7, 6, &aom_highbd_8_sub_pixel_variance128x64_sse2, 8),
  SubpelVarianceParams(6, 7, &aom_highbd_8_sub_pixel_variance64x128_sse2, 8),
  SubpelVarianceParams(6, 6, &aom_highbd_8_sub_pixel_variance64x64_sse2, 8),
  SubpelVarianceParams(6, 5, &aom_highbd_8_sub_pixel_variance64x32_sse2, 8),
  SubpelVarianceParams(5, 6, &aom_highbd_8_sub_pixel_variance32x64_sse2, 8),
  SubpelVarianceParams(5, 5, &aom_highbd_8_sub_pixel_variance32x32_sse2, 8),
  SubpelVarianceParams(5, 4, &aom_highbd_8_sub_pixel_variance32x16_sse2, 8),
  SubpelVarianceParams(4, 5, &aom_highbd_8_sub_pixel_variance16x32_sse2, 8),
  SubpelVarianceParams(4, 4, &aom_highbd_8_sub_pixel_variance16x16_sse2, 8),
  SubpelVarianceParams(4, 3, &aom_highbd_8_sub_pixel_variance16x8_sse2, 8),
  SubpelVarianceParams(3, 4, &aom_highbd_8_sub_pixel_variance8x16_sse2, 8),
  SubpelVarianceParams(3, 3, &aom_highbd_8_sub_pixel_variance8x8_sse2, 8),
  SubpelVarianceParams(3, 2, &aom_highbd_8_sub_pixel_variance8x4_sse2, 8),
#if !CONFIG_REALTIME_ONLY
  SubpelVarianceParams(6, 4, &aom_highbd_12_sub_pixel_variance64x16_sse2, 12),
  SubpelVarianceParams(4, 6, &aom_highbd_12_sub_pixel_variance16x64_sse2, 12),
  SubpelVarianceParams(5, 3, &aom_highbd_12_sub_pixel_variance32x8_sse2, 12),
  SubpelVarianceParams(3, 5, &aom_highbd_12_sub_pixel_variance8x32_sse2, 12),
  SubpelVarianceParams(4, 2, &aom_highbd_12_sub_pixel_variance16x4_sse2, 12),
  // SubpelVarianceParams(2, 4, &aom_highbd_12_sub_pixel_variance4x16_sse2, 12),
  SubpelVarianceParams(6, 4, &aom_highbd_10_sub_pixel_variance64x16_sse2, 10),
  SubpelVarianceParams(4, 6, &aom_highbd_10_sub_pixel_variance16x64_sse2, 10),
  SubpelVarianceParams(5, 3, &aom_highbd_10_sub_pixel_variance32x8_sse2, 10),
  SubpelVarianceParams(3, 5, &aom_highbd_10_sub_pixel_variance8x32_sse2, 10),
  SubpelVarianceParams(4, 2, &aom_highbd_10_sub_pixel_variance16x4_sse2, 10),
  // SubpelVarianceParams(2, 4, &aom_highbd_10_sub_pixel_variance4x16_sse2, 10),
  SubpelVarianceParams(6, 4, &aom_highbd_8_sub_pixel_variance64x16_sse2, 8),
  SubpelVarianceParams(4, 6, &aom_highbd_8_sub_pixel_variance16x64_sse2, 8),
  SubpelVarianceParams(5, 3, &aom_highbd_8_sub_pixel_variance32x8_sse2, 8),
  SubpelVarianceParams(3, 5, &aom_highbd_8_sub_pixel_variance8x32_sse2, 8),
  SubpelVarianceParams(4, 2, &aom_highbd_8_sub_pixel_variance16x4_sse2, 8),
// SubpelVarianceParams(2, 4, &aom_highbd_8_sub_pixel_variance4x16_sse2, 8),
#endif
};
INSTANTIATE_TEST_SUITE_P(SSE2, AvxHBDSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelVariance_sse2));

const SubpelAvgVarianceParams kArrayHBDSubpelAvgVariance_sse2[] = {
  SubpelAvgVarianceParams(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_sse2,
                          12),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_sse2,
                          12),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_sse2,
                          12),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_sse2,
                          12),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_sse2,
                          12),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_sse2,
                          12),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_sse2,
                          12),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_sse2,
                          12),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_sse2,
                          12),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_sse2,
                          12),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_sse2,
                          12),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_sse2,
                          10),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_sse2,
                          10),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_sse2,
                          10),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_sse2,
                          10),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_sse2,
                          10),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_sse2,
                          10),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_sse2,
                          10),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_sse2,
                          10),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_sse2,
                          10),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_sse2,
                          10),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_sse2,
                          10),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_sse2,
                          8),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_sse2,
                          8),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_sse2,
                          8),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_sse2,
                          8),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_sse2,
                          8),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_sse2,
                          8),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_sse2,
                          8),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_sse2,
                          8),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_sse2,
                          8),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_sse2,
                          8),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_sse2,
                          8),

#if !CONFIG_REALTIME_ONLY
  SubpelAvgVarianceParams(6, 4, &aom_highbd_12_sub_pixel_avg_variance64x16_sse2,
                          12),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_12_sub_pixel_avg_variance16x64_sse2,
                          12),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_12_sub_pixel_avg_variance32x8_sse2,
                          12),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_12_sub_pixel_avg_variance8x32_sse2,
                          12),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_12_sub_pixel_avg_variance16x4_sse2,
                          12),
  // SubpelAvgVarianceParams(2, 4,
  // &aom_highbd_12_sub_pixel_avg_variance4x16_sse2, 12),
  SubpelAvgVarianceParams(6, 4, &aom_highbd_10_sub_pixel_avg_variance64x16_sse2,
                          10),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_10_sub_pixel_avg_variance16x64_sse2,
                          10),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_10_sub_pixel_avg_variance32x8_sse2,
                          10),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_10_sub_pixel_avg_variance8x32_sse2,
                          10),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_10_sub_pixel_avg_variance16x4_sse2,
                          10),
  // SubpelAvgVarianceParams(2, 4,
  // &aom_highbd_10_sub_pixel_avg_variance4x16_sse2, 10),
  SubpelAvgVarianceParams(6, 4, &aom_highbd_8_sub_pixel_avg_variance64x16_sse2,
                          8),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_8_sub_pixel_avg_variance16x64_sse2,
                          8),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_8_sub_pixel_avg_variance32x8_sse2,
                          8),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_8_sub_pixel_avg_variance8x32_sse2,
                          8),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_8_sub_pixel_avg_variance16x4_sse2,
                          8),
// SubpelAvgVarianceParams(2, 4,
// &aom_highbd_8_sub_pixel_avg_variance4x16_sse2, 8),
#endif
};

INSTANTIATE_TEST_SUITE_P(SSE2, AvxHBDSubpelAvgVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelAvgVariance_sse2));
#endif  // HAVE_SSE2
#endif  // CONFIG_AV1_HIGHBITDEPTH

#if HAVE_SSSE3
const SubpelVarianceParams kArraySubpelVariance_ssse3[] =;
INSTANTIATE_TEST_SUITE_P();

const SubpelAvgVarianceParams kArraySubpelAvgVariance_ssse3[] =;
INSTANTIATE_TEST_SUITE_P();

const DistWtdSubpelAvgVarianceParams kArrayDistWtdSubpelAvgVariance_ssse3[] =;
INSTANTIATE_TEST_SUITE_P();
#endif  // HAVE_SSSE3

#if HAVE_SSE4_1
#if !CONFIG_REALTIME_ONLY
INSTANTIATE_TEST_SUITE_P(
    SSE4_1, AvxObmcSubpelVarianceTest,
    ::testing::Values(
        ObmcSubpelVarianceParams(7, 7,
                                 &aom_obmc_sub_pixel_variance128x128_sse4_1, 0),
        ObmcSubpelVarianceParams(7, 6,
                                 &aom_obmc_sub_pixel_variance128x64_sse4_1, 0),
        ObmcSubpelVarianceParams(6, 7,
                                 &aom_obmc_sub_pixel_variance64x128_sse4_1, 0),
        ObmcSubpelVarianceParams(6, 6, &aom_obmc_sub_pixel_variance64x64_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(6, 5, &aom_obmc_sub_pixel_variance64x32_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(5, 6, &aom_obmc_sub_pixel_variance32x64_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(5, 5, &aom_obmc_sub_pixel_variance32x32_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(5, 4, &aom_obmc_sub_pixel_variance32x16_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(4, 5, &aom_obmc_sub_pixel_variance16x32_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(4, 4, &aom_obmc_sub_pixel_variance16x16_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(4, 3, &aom_obmc_sub_pixel_variance16x8_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(3, 4, &aom_obmc_sub_pixel_variance8x16_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(3, 3, &aom_obmc_sub_pixel_variance8x8_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(3, 2, &aom_obmc_sub_pixel_variance8x4_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(2, 3, &aom_obmc_sub_pixel_variance4x8_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(2, 2, &aom_obmc_sub_pixel_variance4x4_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(6, 4, &aom_obmc_sub_pixel_variance64x16_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(4, 6, &aom_obmc_sub_pixel_variance16x64_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(5, 3, &aom_obmc_sub_pixel_variance32x8_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(3, 5, &aom_obmc_sub_pixel_variance8x32_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(4, 2, &aom_obmc_sub_pixel_variance16x4_sse4_1,
                                 0),
        ObmcSubpelVarianceParams(2, 4, &aom_obmc_sub_pixel_variance4x16_sse4_1,
                                 0)));
#endif
#endif  // HAVE_SSE4_1

#if HAVE_AVX2

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();

const VarianceParams kArrayVariance_avx2[] =;
INSTANTIATE_TEST_SUITE_P();

const GetSseSumParams kArrayGetSseSum8x8Quad_avx2[] =;
INSTANTIATE_TEST_SUITE_P();

const GetSseSumParamsDual kArrayGetSseSum16x16Dual_avx2[] =;
INSTANTIATE_TEST_SUITE_P();

const SubpelVarianceParams kArraySubpelVariance_avx2[] =;
INSTANTIATE_TEST_SUITE_P();

INSTANTIATE_TEST_SUITE_P();
#endif  // HAVE_AVX2

#if HAVE_NEON
INSTANTIATE_TEST_SUITE_P(
    NEON, MseWxHTest,
    ::testing::Values(MseWxHParams(3, 3, &aom_mse_wxh_16bit_neon, 8),
                      MseWxHParams(3, 2, &aom_mse_wxh_16bit_neon, 8),
                      MseWxHParams(2, 3, &aom_mse_wxh_16bit_neon, 8),
                      MseWxHParams(2, 2, &aom_mse_wxh_16bit_neon, 8)));

INSTANTIATE_TEST_SUITE_P(
    NEON, Mse16xHTest,
    ::testing::Values(Mse16xHParams(3, 3, &aom_mse_16xh_16bit_neon, 8),
                      Mse16xHParams(3, 2, &aom_mse_16xh_16bit_neon, 8),
                      Mse16xHParams(2, 3, &aom_mse_16xh_16bit_neon, 8),
                      Mse16xHParams(2, 2, &aom_mse_16xh_16bit_neon, 8)));

#if !CONFIG_REALTIME_ONLY
INSTANTIATE_TEST_SUITE_P(NEON, SumOfSquaresTest,
                         ::testing::Values(aom_get_mb_ss_neon));
#endif  // !CONFIG_REALTIME_ONLY

INSTANTIATE_TEST_SUITE_P(NEON, AvxMseTest,
                         ::testing::Values(MseParams(3, 3, &aom_mse8x8_neon),
                                           MseParams(3, 4, &aom_mse8x16_neon),
                                           MseParams(4, 4, &aom_mse16x16_neon),
                                           MseParams(4, 3, &aom_mse16x8_neon)));

const VarianceParams kArrayVariance_neon[] = {
  VarianceParams(7, 7, &aom_variance128x128_neon),
  VarianceParams(6, 6, &aom_variance64x64_neon),
  VarianceParams(7, 6, &aom_variance128x64_neon),
  VarianceParams(6, 7, &aom_variance64x128_neon),
  VarianceParams(6, 6, &aom_variance64x64_neon),
  VarianceParams(6, 5, &aom_variance64x32_neon),
  VarianceParams(5, 6, &aom_variance32x64_neon),
  VarianceParams(5, 5, &aom_variance32x32_neon),
  VarianceParams(5, 4, &aom_variance32x16_neon),
  VarianceParams(4, 5, &aom_variance16x32_neon),
  VarianceParams(4, 4, &aom_variance16x16_neon),
  VarianceParams(4, 3, &aom_variance16x8_neon),
  VarianceParams(3, 4, &aom_variance8x16_neon),
  VarianceParams(3, 3, &aom_variance8x8_neon),
  VarianceParams(3, 2, &aom_variance8x4_neon),
  VarianceParams(2, 3, &aom_variance4x8_neon),
  VarianceParams(2, 2, &aom_variance4x4_neon),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(2, 4, &aom_variance4x16_neon),
  VarianceParams(4, 2, &aom_variance16x4_neon),
  VarianceParams(3, 5, &aom_variance8x32_neon),
  VarianceParams(5, 3, &aom_variance32x8_neon),
  VarianceParams(4, 6, &aom_variance16x64_neon),
  VarianceParams(6, 4, &aom_variance64x16_neon),
#endif
};

INSTANTIATE_TEST_SUITE_P(NEON, AvxVarianceTest,
                         ::testing::ValuesIn(kArrayVariance_neon));

const SubpelVarianceParams kArraySubpelVariance_neon[] = {
  SubpelVarianceParams(7, 7, &aom_sub_pixel_variance128x128_neon, 0),
  SubpelVarianceParams(7, 6, &aom_sub_pixel_variance128x64_neon, 0),
  SubpelVarianceParams(6, 7, &aom_sub_pixel_variance64x128_neon, 0),
  SubpelVarianceParams(6, 6, &aom_sub_pixel_variance64x64_neon, 0),
  SubpelVarianceParams(6, 5, &aom_sub_pixel_variance64x32_neon, 0),
  SubpelVarianceParams(5, 6, &aom_sub_pixel_variance32x64_neon, 0),
  SubpelVarianceParams(5, 5, &aom_sub_pixel_variance32x32_neon, 0),
  SubpelVarianceParams(5, 4, &aom_sub_pixel_variance32x16_neon, 0),
  SubpelVarianceParams(4, 5, &aom_sub_pixel_variance16x32_neon, 0),
  SubpelVarianceParams(4, 4, &aom_sub_pixel_variance16x16_neon, 0),
  SubpelVarianceParams(4, 3, &aom_sub_pixel_variance16x8_neon, 0),
  SubpelVarianceParams(3, 4, &aom_sub_pixel_variance8x16_neon, 0),
  SubpelVarianceParams(3, 3, &aom_sub_pixel_variance8x8_neon, 0),
  SubpelVarianceParams(3, 2, &aom_sub_pixel_variance8x4_neon, 0),
  SubpelVarianceParams(2, 3, &aom_sub_pixel_variance4x8_neon, 0),
  SubpelVarianceParams(2, 2, &aom_sub_pixel_variance4x4_neon, 0),
#if !CONFIG_REALTIME_ONLY
  SubpelVarianceParams(6, 4, &aom_sub_pixel_variance64x16_neon, 0),
  SubpelVarianceParams(4, 6, &aom_sub_pixel_variance16x64_neon, 0),
  SubpelVarianceParams(5, 3, &aom_sub_pixel_variance32x8_neon, 0),
  SubpelVarianceParams(3, 5, &aom_sub_pixel_variance8x32_neon, 0),
  SubpelVarianceParams(4, 2, &aom_sub_pixel_variance16x4_neon, 0),
  SubpelVarianceParams(2, 4, &aom_sub_pixel_variance4x16_neon, 0),
#endif
};
INSTANTIATE_TEST_SUITE_P(NEON, AvxSubpelVarianceTest,
                         ::testing::ValuesIn(kArraySubpelVariance_neon));

const SubpelAvgVarianceParams kArraySubpelAvgVariance_neon[] = {
  SubpelAvgVarianceParams(7, 7, &aom_sub_pixel_avg_variance128x128_neon, 0),
  SubpelAvgVarianceParams(7, 6, &aom_sub_pixel_avg_variance128x64_neon, 0),
  SubpelAvgVarianceParams(6, 7, &aom_sub_pixel_avg_variance64x128_neon, 0),
  SubpelAvgVarianceParams(6, 6, &aom_sub_pixel_avg_variance64x64_neon, 0),
  SubpelAvgVarianceParams(6, 5, &aom_sub_pixel_avg_variance64x32_neon, 0),
  SubpelAvgVarianceParams(5, 6, &aom_sub_pixel_avg_variance32x64_neon, 0),
  SubpelAvgVarianceParams(5, 5, &aom_sub_pixel_avg_variance32x32_neon, 0),
  SubpelAvgVarianceParams(5, 4, &aom_sub_pixel_avg_variance32x16_neon, 0),
  SubpelAvgVarianceParams(4, 5, &aom_sub_pixel_avg_variance16x32_neon, 0),
  SubpelAvgVarianceParams(4, 4, &aom_sub_pixel_avg_variance16x16_neon, 0),
  SubpelAvgVarianceParams(4, 3, &aom_sub_pixel_avg_variance16x8_neon, 0),
  SubpelAvgVarianceParams(3, 4, &aom_sub_pixel_avg_variance8x16_neon, 0),
  SubpelAvgVarianceParams(3, 3, &aom_sub_pixel_avg_variance8x8_neon, 0),
  SubpelAvgVarianceParams(3, 2, &aom_sub_pixel_avg_variance8x4_neon, 0),
  SubpelAvgVarianceParams(2, 3, &aom_sub_pixel_avg_variance4x8_neon, 0),
  SubpelAvgVarianceParams(2, 2, &aom_sub_pixel_avg_variance4x4_neon, 0),
#if !CONFIG_REALTIME_ONLY
  SubpelAvgVarianceParams(6, 4, &aom_sub_pixel_avg_variance64x16_neon, 0),
  SubpelAvgVarianceParams(4, 6, &aom_sub_pixel_avg_variance16x64_neon, 0),
  SubpelAvgVarianceParams(5, 3, &aom_sub_pixel_avg_variance32x8_neon, 0),
  SubpelAvgVarianceParams(3, 5, &aom_sub_pixel_avg_variance8x32_neon, 0),
  SubpelAvgVarianceParams(4, 2, &aom_sub_pixel_avg_variance16x4_neon, 0),
  SubpelAvgVarianceParams(2, 4, &aom_sub_pixel_avg_variance4x16_neon, 0),
#endif
};
INSTANTIATE_TEST_SUITE_P(NEON, AvxSubpelAvgVarianceTest,
                         ::testing::ValuesIn(kArraySubpelAvgVariance_neon));

const DistWtdSubpelAvgVarianceParams kArrayDistWtdSubpelAvgVariance_neon[] = {
  DistWtdSubpelAvgVarianceParams(
      6, 6, &aom_dist_wtd_sub_pixel_avg_variance64x64_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      6, 5, &aom_dist_wtd_sub_pixel_avg_variance64x32_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      5, 6, &aom_dist_wtd_sub_pixel_avg_variance32x64_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      5, 5, &aom_dist_wtd_sub_pixel_avg_variance32x32_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      5, 4, &aom_dist_wtd_sub_pixel_avg_variance32x16_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      4, 5, &aom_dist_wtd_sub_pixel_avg_variance16x32_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      4, 4, &aom_dist_wtd_sub_pixel_avg_variance16x16_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      4, 3, &aom_dist_wtd_sub_pixel_avg_variance16x8_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      3, 4, &aom_dist_wtd_sub_pixel_avg_variance8x16_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      3, 3, &aom_dist_wtd_sub_pixel_avg_variance8x8_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      3, 2, &aom_dist_wtd_sub_pixel_avg_variance8x4_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      2, 3, &aom_dist_wtd_sub_pixel_avg_variance4x8_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      2, 2, &aom_dist_wtd_sub_pixel_avg_variance4x4_neon, 0),
#if !CONFIG_REALTIME_ONLY
  DistWtdSubpelAvgVarianceParams(
      6, 4, &aom_dist_wtd_sub_pixel_avg_variance64x16_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      4, 6, &aom_dist_wtd_sub_pixel_avg_variance16x64_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      5, 3, &aom_dist_wtd_sub_pixel_avg_variance32x8_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      3, 5, &aom_dist_wtd_sub_pixel_avg_variance8x32_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      4, 2, &aom_dist_wtd_sub_pixel_avg_variance16x4_neon, 0),
  DistWtdSubpelAvgVarianceParams(
      2, 4, &aom_dist_wtd_sub_pixel_avg_variance4x16_neon, 0),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(
    NEON, AvxDistWtdSubpelAvgVarianceTest,
    ::testing::ValuesIn(kArrayDistWtdSubpelAvgVariance_neon));

#if !CONFIG_REALTIME_ONLY
const ObmcSubpelVarianceParams kArrayObmcSubpelVariance_neon[] = {
  ObmcSubpelVarianceParams(7, 7, &aom_obmc_sub_pixel_variance128x128_neon, 0),
  ObmcSubpelVarianceParams(7, 6, &aom_obmc_sub_pixel_variance128x64_neon, 0),
  ObmcSubpelVarianceParams(6, 7, &aom_obmc_sub_pixel_variance64x128_neon, 0),
  ObmcSubpelVarianceParams(6, 6, &aom_obmc_sub_pixel_variance64x64_neon, 0),
  ObmcSubpelVarianceParams(6, 5, &aom_obmc_sub_pixel_variance64x32_neon, 0),
  ObmcSubpelVarianceParams(5, 6, &aom_obmc_sub_pixel_variance32x64_neon, 0),
  ObmcSubpelVarianceParams(5, 5, &aom_obmc_sub_pixel_variance32x32_neon, 0),
  ObmcSubpelVarianceParams(5, 4, &aom_obmc_sub_pixel_variance32x16_neon, 0),
  ObmcSubpelVarianceParams(4, 5, &aom_obmc_sub_pixel_variance16x32_neon, 0),
  ObmcSubpelVarianceParams(4, 4, &aom_obmc_sub_pixel_variance16x16_neon, 0),
  ObmcSubpelVarianceParams(4, 3, &aom_obmc_sub_pixel_variance16x8_neon, 0),
  ObmcSubpelVarianceParams(3, 4, &aom_obmc_sub_pixel_variance8x16_neon, 0),
  ObmcSubpelVarianceParams(3, 3, &aom_obmc_sub_pixel_variance8x8_neon, 0),
  ObmcSubpelVarianceParams(3, 2, &aom_obmc_sub_pixel_variance8x4_neon, 0),
  ObmcSubpelVarianceParams(2, 3, &aom_obmc_sub_pixel_variance4x8_neon, 0),
  ObmcSubpelVarianceParams(2, 2, &aom_obmc_sub_pixel_variance4x4_neon, 0),
  ObmcSubpelVarianceParams(6, 4, &aom_obmc_sub_pixel_variance64x16_neon, 0),
  ObmcSubpelVarianceParams(4, 6, &aom_obmc_sub_pixel_variance16x64_neon, 0),
  ObmcSubpelVarianceParams(5, 3, &aom_obmc_sub_pixel_variance32x8_neon, 0),
  ObmcSubpelVarianceParams(3, 5, &aom_obmc_sub_pixel_variance8x32_neon, 0),
  ObmcSubpelVarianceParams(4, 2, &aom_obmc_sub_pixel_variance16x4_neon, 0),
  ObmcSubpelVarianceParams(2, 4, &aom_obmc_sub_pixel_variance4x16_neon, 0),
};
INSTANTIATE_TEST_SUITE_P(NEON, AvxObmcSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayObmcSubpelVariance_neon));
#endif

const GetSseSumParams kArrayGetSseSum8x8Quad_neon[] = {
  GetSseSumParams(7, 7, &aom_get_var_sse_sum_8x8_quad_neon, 0),
  GetSseSumParams(6, 6, &aom_get_var_sse_sum_8x8_quad_neon, 0),
  GetSseSumParams(5, 5, &aom_get_var_sse_sum_8x8_quad_neon, 0),
  GetSseSumParams(5, 4, &aom_get_var_sse_sum_8x8_quad_neon, 0)
};
INSTANTIATE_TEST_SUITE_P(NEON, GetSseSum8x8QuadTest,
                         ::testing::ValuesIn(kArrayGetSseSum8x8Quad_neon));

const GetSseSumParamsDual kArrayGetSseSum16x16Dual_neon[] = {
  GetSseSumParamsDual(7, 7, &aom_get_var_sse_sum_16x16_dual_neon, 0),
  GetSseSumParamsDual(6, 6, &aom_get_var_sse_sum_16x16_dual_neon, 0),
  GetSseSumParamsDual(5, 5, &aom_get_var_sse_sum_16x16_dual_neon, 0),
  GetSseSumParamsDual(5, 4, &aom_get_var_sse_sum_16x16_dual_neon, 0)
};
INSTANTIATE_TEST_SUITE_P(NEON, GetSseSum16x16DualTest,
                         ::testing::ValuesIn(kArrayGetSseSum16x16Dual_neon));

#if CONFIG_AV1_HIGHBITDEPTH
const VarianceParams kArrayHBDVariance_neon[] = {
  VarianceParams(7, 7, &aom_highbd_12_variance128x128_neon, 12),
  VarianceParams(7, 6, &aom_highbd_12_variance128x64_neon, 12),
  VarianceParams(6, 7, &aom_highbd_12_variance64x128_neon, 12),
  VarianceParams(6, 6, &aom_highbd_12_variance64x64_neon, 12),
  VarianceParams(6, 5, &aom_highbd_12_variance64x32_neon, 12),
  VarianceParams(5, 6, &aom_highbd_12_variance32x64_neon, 12),
  VarianceParams(5, 5, &aom_highbd_12_variance32x32_neon, 12),
  VarianceParams(5, 4, &aom_highbd_12_variance32x16_neon, 12),
  VarianceParams(4, 5, &aom_highbd_12_variance16x32_neon, 12),
  VarianceParams(4, 4, &aom_highbd_12_variance16x16_neon, 12),
  VarianceParams(4, 3, &aom_highbd_12_variance16x8_neon, 12),
  VarianceParams(3, 4, &aom_highbd_12_variance8x16_neon, 12),
  VarianceParams(3, 3, &aom_highbd_12_variance8x8_neon, 12),
  VarianceParams(3, 2, &aom_highbd_12_variance8x4_neon, 12),
  VarianceParams(2, 3, &aom_highbd_12_variance4x8_neon, 12),
  VarianceParams(2, 2, &aom_highbd_12_variance4x4_neon, 12),
  VarianceParams(7, 7, &aom_highbd_10_variance128x128_neon, 10),
  VarianceParams(7, 6, &aom_highbd_10_variance128x64_neon, 10),
  VarianceParams(6, 7, &aom_highbd_10_variance64x128_neon, 10),
  VarianceParams(6, 6, &aom_highbd_10_variance64x64_neon, 10),
  VarianceParams(6, 5, &aom_highbd_10_variance64x32_neon, 10),
  VarianceParams(5, 6, &aom_highbd_10_variance32x64_neon, 10),
  VarianceParams(5, 5, &aom_highbd_10_variance32x32_neon, 10),
  VarianceParams(5, 4, &aom_highbd_10_variance32x16_neon, 10),
  VarianceParams(4, 5, &aom_highbd_10_variance16x32_neon, 10),
  VarianceParams(4, 4, &aom_highbd_10_variance16x16_neon, 10),
  VarianceParams(4, 3, &aom_highbd_10_variance16x8_neon, 10),
  VarianceParams(3, 4, &aom_highbd_10_variance8x16_neon, 10),
  VarianceParams(3, 3, &aom_highbd_10_variance8x8_neon, 10),
  VarianceParams(3, 2, &aom_highbd_10_variance8x4_neon, 10),
  VarianceParams(2, 3, &aom_highbd_10_variance4x8_neon, 10),
  VarianceParams(2, 2, &aom_highbd_10_variance4x4_neon, 10),
  VarianceParams(7, 7, &aom_highbd_8_variance128x128_neon, 8),
  VarianceParams(7, 6, &aom_highbd_8_variance128x64_neon, 8),
  VarianceParams(6, 7, &aom_highbd_8_variance64x128_neon, 8),
  VarianceParams(6, 6, &aom_highbd_8_variance64x64_neon, 8),
  VarianceParams(6, 5, &aom_highbd_8_variance64x32_neon, 8),
  VarianceParams(5, 6, &aom_highbd_8_variance32x64_neon, 8),
  VarianceParams(5, 5, &aom_highbd_8_variance32x32_neon, 8),
  VarianceParams(5, 4, &aom_highbd_8_variance32x16_neon, 8),
  VarianceParams(4, 5, &aom_highbd_8_variance16x32_neon, 8),
  VarianceParams(4, 4, &aom_highbd_8_variance16x16_neon, 8),
  VarianceParams(4, 3, &aom_highbd_8_variance16x8_neon, 8),
  VarianceParams(3, 4, &aom_highbd_8_variance8x16_neon, 8),
  VarianceParams(3, 3, &aom_highbd_8_variance8x8_neon, 8),
  VarianceParams(3, 2, &aom_highbd_8_variance8x4_neon, 8),
  VarianceParams(2, 3, &aom_highbd_8_variance4x8_neon, 8),
  VarianceParams(2, 2, &aom_highbd_8_variance4x4_neon, 8),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(6, 4, &aom_highbd_12_variance64x16_neon, 12),
  VarianceParams(4, 6, &aom_highbd_12_variance16x64_neon, 12),
  VarianceParams(5, 3, &aom_highbd_12_variance32x8_neon, 12),
  VarianceParams(3, 5, &aom_highbd_12_variance8x32_neon, 12),
  VarianceParams(4, 2, &aom_highbd_12_variance16x4_neon, 12),
  VarianceParams(2, 4, &aom_highbd_12_variance4x16_neon, 12),
  VarianceParams(6, 4, &aom_highbd_10_variance64x16_neon, 10),
  VarianceParams(4, 6, &aom_highbd_10_variance16x64_neon, 10),
  VarianceParams(5, 3, &aom_highbd_10_variance32x8_neon, 10),
  VarianceParams(3, 5, &aom_highbd_10_variance8x32_neon, 10),
  VarianceParams(4, 2, &aom_highbd_10_variance16x4_neon, 10),
  VarianceParams(2, 4, &aom_highbd_10_variance4x16_neon, 10),
  VarianceParams(6, 4, &aom_highbd_8_variance64x16_neon, 8),
  VarianceParams(4, 6, &aom_highbd_8_variance16x64_neon, 8),
  VarianceParams(5, 3, &aom_highbd_8_variance32x8_neon, 8),
  VarianceParams(3, 5, &aom_highbd_8_variance8x32_neon, 8),
  VarianceParams(4, 2, &aom_highbd_8_variance16x4_neon, 8),
  VarianceParams(2, 4, &aom_highbd_8_variance4x16_neon, 8),
#endif
};

INSTANTIATE_TEST_SUITE_P(NEON, AvxHBDVarianceTest,
                         ::testing::ValuesIn(kArrayHBDVariance_neon));

const SubpelVarianceParams kArrayHBDSubpelVariance_neon[] = {
  SubpelVarianceParams(6, 6, &aom_highbd_12_sub_pixel_variance64x64_neon, 12),
  SubpelVarianceParams(6, 5, &aom_highbd_12_sub_pixel_variance64x32_neon, 12),
  SubpelVarianceParams(5, 6, &aom_highbd_12_sub_pixel_variance32x64_neon, 12),
  SubpelVarianceParams(5, 5, &aom_highbd_12_sub_pixel_variance32x32_neon, 12),
  SubpelVarianceParams(5, 4, &aom_highbd_12_sub_pixel_variance32x16_neon, 12),
  SubpelVarianceParams(4, 5, &aom_highbd_12_sub_pixel_variance16x32_neon, 12),
  SubpelVarianceParams(4, 4, &aom_highbd_12_sub_pixel_variance16x16_neon, 12),
  SubpelVarianceParams(4, 3, &aom_highbd_12_sub_pixel_variance16x8_neon, 12),
  SubpelVarianceParams(3, 4, &aom_highbd_12_sub_pixel_variance8x16_neon, 12),
  SubpelVarianceParams(3, 3, &aom_highbd_12_sub_pixel_variance8x8_neon, 12),
  SubpelVarianceParams(3, 2, &aom_highbd_12_sub_pixel_variance8x4_neon, 12),
  SubpelVarianceParams(2, 3, &aom_highbd_12_sub_pixel_variance4x8_neon, 12),
  SubpelVarianceParams(2, 2, &aom_highbd_12_sub_pixel_variance4x4_neon, 12),
  SubpelVarianceParams(6, 6, &aom_highbd_10_sub_pixel_variance64x64_neon, 10),
  SubpelVarianceParams(6, 5, &aom_highbd_10_sub_pixel_variance64x32_neon, 10),
  SubpelVarianceParams(5, 6, &aom_highbd_10_sub_pixel_variance32x64_neon, 10),
  SubpelVarianceParams(5, 5, &aom_highbd_10_sub_pixel_variance32x32_neon, 10),
  SubpelVarianceParams(5, 4, &aom_highbd_10_sub_pixel_variance32x16_neon, 10),
  SubpelVarianceParams(4, 5, &aom_highbd_10_sub_pixel_variance16x32_neon, 10),
  SubpelVarianceParams(4, 4, &aom_highbd_10_sub_pixel_variance16x16_neon, 10),
  SubpelVarianceParams(4, 3, &aom_highbd_10_sub_pixel_variance16x8_neon, 10),
  SubpelVarianceParams(3, 4, &aom_highbd_10_sub_pixel_variance8x16_neon, 10),
  SubpelVarianceParams(3, 3, &aom_highbd_10_sub_pixel_variance8x8_neon, 10),
  SubpelVarianceParams(3, 2, &aom_highbd_10_sub_pixel_variance8x4_neon, 10),
  SubpelVarianceParams(2, 3, &aom_highbd_10_sub_pixel_variance4x8_neon, 10),
  SubpelVarianceParams(2, 2, &aom_highbd_10_sub_pixel_variance4x4_neon, 10),
  SubpelVarianceParams(6, 6, &aom_highbd_8_sub_pixel_variance64x64_neon, 8),
  SubpelVarianceParams(6, 5, &aom_highbd_8_sub_pixel_variance64x32_neon, 8),
  SubpelVarianceParams(5, 6, &aom_highbd_8_sub_pixel_variance32x64_neon, 8),
  SubpelVarianceParams(5, 5, &aom_highbd_8_sub_pixel_variance32x32_neon, 8),
  SubpelVarianceParams(5, 4, &aom_highbd_8_sub_pixel_variance32x16_neon, 8),
  SubpelVarianceParams(4, 5, &aom_highbd_8_sub_pixel_variance16x32_neon, 8),
  SubpelVarianceParams(4, 4, &aom_highbd_8_sub_pixel_variance16x16_neon, 8),
  SubpelVarianceParams(4, 3, &aom_highbd_8_sub_pixel_variance16x8_neon, 8),
  SubpelVarianceParams(3, 4, &aom_highbd_8_sub_pixel_variance8x16_neon, 8),
  SubpelVarianceParams(3, 3, &aom_highbd_8_sub_pixel_variance8x8_neon, 8),
  SubpelVarianceParams(3, 2, &aom_highbd_8_sub_pixel_variance8x4_neon, 8),
  SubpelVarianceParams(2, 3, &aom_highbd_8_sub_pixel_variance4x8_neon, 8),
  SubpelVarianceParams(2, 2, &aom_highbd_8_sub_pixel_variance4x4_neon, 8),
#if !CONFIG_REALTIME_ONLY
  SubpelVarianceParams(6, 4, &aom_highbd_8_sub_pixel_variance64x16_neon, 8),
  SubpelVarianceParams(4, 6, &aom_highbd_8_sub_pixel_variance16x64_neon, 8),
  SubpelVarianceParams(5, 3, &aom_highbd_8_sub_pixel_variance32x8_neon, 8),
  SubpelVarianceParams(3, 5, &aom_highbd_8_sub_pixel_variance8x32_neon, 8),
  SubpelVarianceParams(4, 2, &aom_highbd_8_sub_pixel_variance16x4_neon, 8),
  SubpelVarianceParams(2, 4, &aom_highbd_8_sub_pixel_variance4x16_neon, 8),
  SubpelVarianceParams(6, 4, &aom_highbd_10_sub_pixel_variance64x16_neon, 10),
  SubpelVarianceParams(4, 6, &aom_highbd_10_sub_pixel_variance16x64_neon, 10),
  SubpelVarianceParams(5, 3, &aom_highbd_10_sub_pixel_variance32x8_neon, 10),
  SubpelVarianceParams(3, 5, &aom_highbd_10_sub_pixel_variance8x32_neon, 10),
  SubpelVarianceParams(4, 2, &aom_highbd_10_sub_pixel_variance16x4_neon, 10),
  SubpelVarianceParams(2, 4, &aom_highbd_10_sub_pixel_variance4x16_neon, 10),
  SubpelVarianceParams(6, 4, &aom_highbd_12_sub_pixel_variance64x16_neon, 12),
  SubpelVarianceParams(4, 6, &aom_highbd_12_sub_pixel_variance16x64_neon, 12),
  SubpelVarianceParams(5, 3, &aom_highbd_12_sub_pixel_variance32x8_neon, 12),
  SubpelVarianceParams(3, 5, &aom_highbd_12_sub_pixel_variance8x32_neon, 12),
  SubpelVarianceParams(4, 2, &aom_highbd_12_sub_pixel_variance16x4_neon, 12),
  SubpelVarianceParams(2, 4, &aom_highbd_12_sub_pixel_variance4x16_neon, 12),
#endif  //! CONFIG_REALTIME_ONLY
};

INSTANTIATE_TEST_SUITE_P(NEON, AvxHBDSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelVariance_neon));

const SubpelAvgVarianceParams kArrayHBDSubpelAvgVariance_neon[] = {
  SubpelAvgVarianceParams(7, 7,
                          &aom_highbd_8_sub_pixel_avg_variance128x128_neon, 8),
  SubpelAvgVarianceParams(7, 6, &aom_highbd_8_sub_pixel_avg_variance128x64_neon,
                          8),
  SubpelAvgVarianceParams(6, 7, &aom_highbd_8_sub_pixel_avg_variance64x128_neon,
                          8),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_8_sub_pixel_avg_variance64x64_neon,
                          8),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_8_sub_pixel_avg_variance64x32_neon,
                          8),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_8_sub_pixel_avg_variance32x64_neon,
                          8),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_8_sub_pixel_avg_variance32x32_neon,
                          8),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_8_sub_pixel_avg_variance32x16_neon,
                          8),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_8_sub_pixel_avg_variance16x32_neon,
                          8),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_8_sub_pixel_avg_variance16x16_neon,
                          8),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_8_sub_pixel_avg_variance16x8_neon,
                          8),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_8_sub_pixel_avg_variance8x16_neon,
                          8),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_8_sub_pixel_avg_variance8x8_neon,
                          8),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_8_sub_pixel_avg_variance8x4_neon,
                          8),
  SubpelAvgVarianceParams(2, 3, &aom_highbd_8_sub_pixel_avg_variance4x8_neon,
                          8),
  SubpelAvgVarianceParams(2, 2, &aom_highbd_8_sub_pixel_avg_variance4x4_neon,
                          8),
  SubpelAvgVarianceParams(
      7, 7, &aom_highbd_10_sub_pixel_avg_variance128x128_neon, 10),
  SubpelAvgVarianceParams(7, 6,
                          &aom_highbd_10_sub_pixel_avg_variance128x64_neon, 10),
  SubpelAvgVarianceParams(6, 7,
                          &aom_highbd_10_sub_pixel_avg_variance64x128_neon, 10),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_10_sub_pixel_avg_variance64x64_neon,
                          10),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_10_sub_pixel_avg_variance64x32_neon,
                          10),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_10_sub_pixel_avg_variance32x64_neon,
                          10),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_10_sub_pixel_avg_variance32x32_neon,
                          10),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_10_sub_pixel_avg_variance32x16_neon,
                          10),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_10_sub_pixel_avg_variance16x32_neon,
                          10),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_10_sub_pixel_avg_variance16x16_neon,
                          10),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_10_sub_pixel_avg_variance16x8_neon,
                          10),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_10_sub_pixel_avg_variance8x16_neon,
                          10),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_10_sub_pixel_avg_variance8x8_neon,
                          10),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_10_sub_pixel_avg_variance8x4_neon,
                          10),
  SubpelAvgVarianceParams(2, 3, &aom_highbd_10_sub_pixel_avg_variance4x8_neon,
                          10),
  SubpelAvgVarianceParams(2, 2, &aom_highbd_10_sub_pixel_avg_variance4x4_neon,
                          10),
  SubpelAvgVarianceParams(
      7, 7, &aom_highbd_12_sub_pixel_avg_variance128x128_neon, 12),
  SubpelAvgVarianceParams(7, 6,
                          &aom_highbd_12_sub_pixel_avg_variance128x64_neon, 12),
  SubpelAvgVarianceParams(6, 7,
                          &aom_highbd_12_sub_pixel_avg_variance64x128_neon, 12),
  SubpelAvgVarianceParams(6, 6, &aom_highbd_12_sub_pixel_avg_variance64x64_neon,
                          12),
  SubpelAvgVarianceParams(6, 5, &aom_highbd_12_sub_pixel_avg_variance64x32_neon,
                          12),
  SubpelAvgVarianceParams(5, 6, &aom_highbd_12_sub_pixel_avg_variance32x64_neon,
                          12),
  SubpelAvgVarianceParams(5, 5, &aom_highbd_12_sub_pixel_avg_variance32x32_neon,
                          12),
  SubpelAvgVarianceParams(5, 4, &aom_highbd_12_sub_pixel_avg_variance32x16_neon,
                          12),
  SubpelAvgVarianceParams(4, 5, &aom_highbd_12_sub_pixel_avg_variance16x32_neon,
                          12),
  SubpelAvgVarianceParams(4, 4, &aom_highbd_12_sub_pixel_avg_variance16x16_neon,
                          12),
  SubpelAvgVarianceParams(4, 3, &aom_highbd_12_sub_pixel_avg_variance16x8_neon,
                          12),
  SubpelAvgVarianceParams(3, 4, &aom_highbd_12_sub_pixel_avg_variance8x16_neon,
                          12),
  SubpelAvgVarianceParams(3, 3, &aom_highbd_12_sub_pixel_avg_variance8x8_neon,
                          12),
  SubpelAvgVarianceParams(3, 2, &aom_highbd_12_sub_pixel_avg_variance8x4_neon,
                          12),
  SubpelAvgVarianceParams(2, 3, &aom_highbd_12_sub_pixel_avg_variance4x8_neon,
                          12),
  SubpelAvgVarianceParams(2, 2, &aom_highbd_12_sub_pixel_avg_variance4x4_neon,
                          12),

#if !CONFIG_REALTIME_ONLY
  SubpelAvgVarianceParams(6, 4, &aom_highbd_8_sub_pixel_avg_variance64x16_neon,
                          8),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_8_sub_pixel_avg_variance16x64_neon,
                          8),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_8_sub_pixel_avg_variance32x8_neon,
                          8),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_8_sub_pixel_avg_variance8x32_neon,
                          8),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_8_sub_pixel_avg_variance16x4_neon,
                          8),
  SubpelAvgVarianceParams(2, 4, &aom_highbd_8_sub_pixel_avg_variance4x16_neon,
                          8),
  SubpelAvgVarianceParams(6, 4, &aom_highbd_10_sub_pixel_avg_variance64x16_neon,
                          10),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_10_sub_pixel_avg_variance16x64_neon,
                          10),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_10_sub_pixel_avg_variance32x8_neon,
                          10),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_10_sub_pixel_avg_variance8x32_neon,
                          10),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_10_sub_pixel_avg_variance16x4_neon,
                          10),
  SubpelAvgVarianceParams(2, 4, &aom_highbd_10_sub_pixel_avg_variance4x16_neon,
                          10),
  SubpelAvgVarianceParams(6, 4, &aom_highbd_12_sub_pixel_avg_variance64x16_neon,
                          12),
  SubpelAvgVarianceParams(4, 6, &aom_highbd_12_sub_pixel_avg_variance16x64_neon,
                          12),
  SubpelAvgVarianceParams(5, 3, &aom_highbd_12_sub_pixel_avg_variance32x8_neon,
                          12),
  SubpelAvgVarianceParams(3, 5, &aom_highbd_12_sub_pixel_avg_variance8x32_neon,
                          12),
  SubpelAvgVarianceParams(4, 2, &aom_highbd_12_sub_pixel_avg_variance16x4_neon,
                          12),
  SubpelAvgVarianceParams(2, 4, &aom_highbd_12_sub_pixel_avg_variance4x16_neon,
                          12),
#endif
};

INSTANTIATE_TEST_SUITE_P(NEON, AvxHBDSubpelAvgVarianceTest,
                         ::testing::ValuesIn(kArrayHBDSubpelAvgVariance_neon));

const DistWtdSubpelAvgVarianceParams
    kArrayHBDDistWtdSubpelAvgVariance_neon[] = {
      DistWtdSubpelAvgVarianceParams(
          7, 7, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance128x128_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          7, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance128x64_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          6, 7, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x128_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          6, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x64_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          6, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x32_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          5, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x64_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          5, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x32_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          5, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x16_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          4, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x32_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          4, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x16_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          4, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x8_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          3, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x16_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          3, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x8_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          3, 2, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x4_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          2, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance4x8_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          2, 2, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance4x4_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          7, 7, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance128x128_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          7, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance128x64_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          6, 7, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x128_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          6, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x64_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          6, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x32_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          5, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x64_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          5, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x32_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          5, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x16_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          4, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x32_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          4, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x16_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          4, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x8_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          3, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x16_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          3, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x8_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          3, 2, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x4_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          2, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance4x8_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          2, 2, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance4x4_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          7, 7, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance128x128_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          7, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance128x64_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          6, 7, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x128_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          6, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x64_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          6, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x32_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          5, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x64_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          5, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x32_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          5, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x16_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          4, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x32_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          4, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x16_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          4, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x8_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          3, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x16_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          3, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x8_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          3, 2, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x4_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          2, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance4x8_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          2, 2, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance4x4_neon, 12),

#if !CONFIG_REALTIME_ONLY
      DistWtdSubpelAvgVarianceParams(
          6, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance64x16_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          4, 6, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x64_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          5, 3, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance32x8_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          3, 5, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance8x32_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          4, 2, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance16x4_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          2, 4, &aom_highbd_8_dist_wtd_sub_pixel_avg_variance4x16_neon, 8),
      DistWtdSubpelAvgVarianceParams(
          6, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance64x16_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          4, 6, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x64_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          5, 3, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance32x8_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          3, 5, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance8x32_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          4, 2, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance16x4_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          2, 4, &aom_highbd_10_dist_wtd_sub_pixel_avg_variance4x16_neon, 10),
      DistWtdSubpelAvgVarianceParams(
          6, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance64x16_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          4, 6, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x64_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          5, 3, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance32x8_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          3, 5, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance8x32_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          4, 2, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance16x4_neon, 12),
      DistWtdSubpelAvgVarianceParams(
          2, 4, &aom_highbd_12_dist_wtd_sub_pixel_avg_variance4x16_neon, 12),
#endif  // !CONFIG_REALTIME_ONLY
    };
INSTANTIATE_TEST_SUITE_P(
    NEON, AvxHBDDistWtdSubpelAvgVarianceTest,
    ::testing::ValuesIn(kArrayHBDDistWtdSubpelAvgVariance_neon));

#if !CONFIG_REALTIME_ONLY
const ObmcSubpelVarianceParams kArrayHBDObmcSubpelVariance_neon[] = {
  ObmcSubpelVarianceParams(
      7, 7, &aom_highbd_12_obmc_sub_pixel_variance128x128_neon, 12),
  ObmcSubpelVarianceParams(
      7, 6, &aom_highbd_12_obmc_sub_pixel_variance128x64_neon, 12),
  ObmcSubpelVarianceParams(
      6, 7, &aom_highbd_12_obmc_sub_pixel_variance64x128_neon, 12),
  ObmcSubpelVarianceParams(
      6, 6, &aom_highbd_12_obmc_sub_pixel_variance64x64_neon, 12),
  ObmcSubpelVarianceParams(
      6, 5, &aom_highbd_12_obmc_sub_pixel_variance64x32_neon, 12),
  ObmcSubpelVarianceParams(
      5, 6, &aom_highbd_12_obmc_sub_pixel_variance32x64_neon, 12),
  ObmcSubpelVarianceParams(
      5, 5, &aom_highbd_12_obmc_sub_pixel_variance32x32_neon, 12),
  ObmcSubpelVarianceParams(
      5, 4, &aom_highbd_12_obmc_sub_pixel_variance32x16_neon, 12),
  ObmcSubpelVarianceParams(
      4, 5, &aom_highbd_12_obmc_sub_pixel_variance16x32_neon, 12),
  ObmcSubpelVarianceParams(
      4, 4, &aom_highbd_12_obmc_sub_pixel_variance16x16_neon, 12),
  ObmcSubpelVarianceParams(4, 3,
                           &aom_highbd_12_obmc_sub_pixel_variance16x8_neon, 12),
  ObmcSubpelVarianceParams(3, 4,
                           &aom_highbd_12_obmc_sub_pixel_variance8x16_neon, 12),
  ObmcSubpelVarianceParams(3, 3, &aom_highbd_12_obmc_sub_pixel_variance8x8_neon,
                           12),
  ObmcSubpelVarianceParams(3, 2, &aom_highbd_12_obmc_sub_pixel_variance8x4_neon,
                           12),
  ObmcSubpelVarianceParams(2, 3, &aom_highbd_12_obmc_sub_pixel_variance4x8_neon,
                           12),
  ObmcSubpelVarianceParams(2, 2, &aom_highbd_12_obmc_sub_pixel_variance4x4_neon,
                           12),
  ObmcSubpelVarianceParams(
      6, 4, &aom_highbd_12_obmc_sub_pixel_variance64x16_neon, 12),
  ObmcSubpelVarianceParams(
      4, 6, &aom_highbd_12_obmc_sub_pixel_variance16x64_neon, 12),
  ObmcSubpelVarianceParams(5, 3,
                           &aom_highbd_12_obmc_sub_pixel_variance32x8_neon, 12),
  ObmcSubpelVarianceParams(3, 5,
                           &aom_highbd_12_obmc_sub_pixel_variance8x32_neon, 12),
  ObmcSubpelVarianceParams(4, 2,
                           &aom_highbd_12_obmc_sub_pixel_variance16x4_neon, 12),
  ObmcSubpelVarianceParams(2, 4,
                           &aom_highbd_12_obmc_sub_pixel_variance4x16_neon, 12),
  ObmcSubpelVarianceParams(
      7, 7, &aom_highbd_10_obmc_sub_pixel_variance128x128_neon, 10),
  ObmcSubpelVarianceParams(
      7, 6, &aom_highbd_10_obmc_sub_pixel_variance128x64_neon, 10),
  ObmcSubpelVarianceParams(
      6, 7, &aom_highbd_10_obmc_sub_pixel_variance64x128_neon, 10),
  ObmcSubpelVarianceParams(
      6, 6, &aom_highbd_10_obmc_sub_pixel_variance64x64_neon, 10),
  ObmcSubpelVarianceParams(
      6, 5, &aom_highbd_10_obmc_sub_pixel_variance64x32_neon, 10),
  ObmcSubpelVarianceParams(
      5, 6, &aom_highbd_10_obmc_sub_pixel_variance32x64_neon, 10),
  ObmcSubpelVarianceParams(
      5, 5, &aom_highbd_10_obmc_sub_pixel_variance32x32_neon, 10),
  ObmcSubpelVarianceParams(
      5, 4, &aom_highbd_10_obmc_sub_pixel_variance32x16_neon, 10),
  ObmcSubpelVarianceParams(
      4, 5, &aom_highbd_10_obmc_sub_pixel_variance16x32_neon, 10),
  ObmcSubpelVarianceParams(
      4, 4, &aom_highbd_10_obmc_sub_pixel_variance16x16_neon, 10),
  ObmcSubpelVarianceParams(4, 3,
                           &aom_highbd_10_obmc_sub_pixel_variance16x8_neon, 10),
  ObmcSubpelVarianceParams(3, 4,
                           &aom_highbd_10_obmc_sub_pixel_variance8x16_neon, 10),
  ObmcSubpelVarianceParams(3, 3, &aom_highbd_10_obmc_sub_pixel_variance8x8_neon,
                           10),
  ObmcSubpelVarianceParams(3, 2, &aom_highbd_10_obmc_sub_pixel_variance8x4_neon,
                           10),
  ObmcSubpelVarianceParams(2, 3, &aom_highbd_10_obmc_sub_pixel_variance4x8_neon,
                           10),
  ObmcSubpelVarianceParams(2, 2, &aom_highbd_10_obmc_sub_pixel_variance4x4_neon,
                           10),
  ObmcSubpelVarianceParams(
      6, 4, &aom_highbd_10_obmc_sub_pixel_variance64x16_neon, 10),
  ObmcSubpelVarianceParams(
      4, 6, &aom_highbd_10_obmc_sub_pixel_variance16x64_neon, 10),
  ObmcSubpelVarianceParams(5, 3,
                           &aom_highbd_10_obmc_sub_pixel_variance32x8_neon, 10),
  ObmcSubpelVarianceParams(3, 5,
                           &aom_highbd_10_obmc_sub_pixel_variance8x32_neon, 10),
  ObmcSubpelVarianceParams(4, 2,
                           &aom_highbd_10_obmc_sub_pixel_variance16x4_neon, 10),
  ObmcSubpelVarianceParams(2, 4,
                           &aom_highbd_10_obmc_sub_pixel_variance4x16_neon, 10),
  ObmcSubpelVarianceParams(
      7, 7, &aom_highbd_8_obmc_sub_pixel_variance128x128_neon, 8),
  ObmcSubpelVarianceParams(7, 6,
                           &aom_highbd_8_obmc_sub_pixel_variance128x64_neon, 8),
  ObmcSubpelVarianceParams(6, 7,
                           &aom_highbd_8_obmc_sub_pixel_variance64x128_neon, 8),
  ObmcSubpelVarianceParams(6, 6,
                           &aom_highbd_8_obmc_sub_pixel_variance64x64_neon, 8),
  ObmcSubpelVarianceParams(6, 5,
                           &aom_highbd_8_obmc_sub_pixel_variance64x32_neon, 8),
  ObmcSubpelVarianceParams(5, 6,
                           &aom_highbd_8_obmc_sub_pixel_variance32x64_neon, 8),
  ObmcSubpelVarianceParams(5, 5,
                           &aom_highbd_8_obmc_sub_pixel_variance32x32_neon, 8),
  ObmcSubpelVarianceParams(5, 4,
                           &aom_highbd_8_obmc_sub_pixel_variance32x16_neon, 8),
  ObmcSubpelVarianceParams(4, 5,
                           &aom_highbd_8_obmc_sub_pixel_variance16x32_neon, 8),
  ObmcSubpelVarianceParams(4, 4,
                           &aom_highbd_8_obmc_sub_pixel_variance16x16_neon, 8),
  ObmcSubpelVarianceParams(4, 3, &aom_highbd_8_obmc_sub_pixel_variance16x8_neon,
                           8),
  ObmcSubpelVarianceParams(3, 4, &aom_highbd_8_obmc_sub_pixel_variance8x16_neon,
                           8),
  ObmcSubpelVarianceParams(3, 3, &aom_highbd_8_obmc_sub_pixel_variance8x8_neon,
                           8),
  ObmcSubpelVarianceParams(3, 2, &aom_highbd_8_obmc_sub_pixel_variance8x4_neon,
                           8),
  ObmcSubpelVarianceParams(2, 3, &aom_highbd_8_obmc_sub_pixel_variance4x8_neon,
                           8),
  ObmcSubpelVarianceParams(2, 2, &aom_highbd_8_obmc_sub_pixel_variance4x4_neon,
                           8),
  ObmcSubpelVarianceParams(6, 4,
                           &aom_highbd_8_obmc_sub_pixel_variance64x16_neon, 8),
  ObmcSubpelVarianceParams(4, 6,
                           &aom_highbd_8_obmc_sub_pixel_variance16x64_neon, 8),
  ObmcSubpelVarianceParams(5, 3, &aom_highbd_8_obmc_sub_pixel_variance32x8_neon,
                           8),
  ObmcSubpelVarianceParams(3, 5, &aom_highbd_8_obmc_sub_pixel_variance8x32_neon,
                           8),
  ObmcSubpelVarianceParams(4, 2, &aom_highbd_8_obmc_sub_pixel_variance16x4_neon,
                           8),
  ObmcSubpelVarianceParams(2, 4, &aom_highbd_8_obmc_sub_pixel_variance4x16_neon,
                           8),
};

INSTANTIATE_TEST_SUITE_P(NEON, AvxHBDObmcSubpelVarianceTest,
                         ::testing::ValuesIn(kArrayHBDObmcSubpelVariance_neon));
#endif  // !CONFIG_REALTIME_ONLY

#endif  // CONFIG_AV1_HIGHBITDEPTH

#endif  // HAVE_NEON

#if HAVE_NEON_DOTPROD

const VarianceParams kArrayVariance_neon_dotprod[] = {
  VarianceParams(7, 7, &aom_variance128x128_neon_dotprod),
  VarianceParams(6, 6, &aom_variance64x64_neon_dotprod),
  VarianceParams(7, 6, &aom_variance128x64_neon_dotprod),
  VarianceParams(6, 7, &aom_variance64x128_neon_dotprod),
  VarianceParams(6, 6, &aom_variance64x64_neon_dotprod),
  VarianceParams(6, 5, &aom_variance64x32_neon_dotprod),
  VarianceParams(5, 6, &aom_variance32x64_neon_dotprod),
  VarianceParams(5, 5, &aom_variance32x32_neon_dotprod),
  VarianceParams(5, 4, &aom_variance32x16_neon_dotprod),
  VarianceParams(4, 5, &aom_variance16x32_neon_dotprod),
  VarianceParams(4, 4, &aom_variance16x16_neon_dotprod),
  VarianceParams(4, 3, &aom_variance16x8_neon_dotprod),
  VarianceParams(3, 4, &aom_variance8x16_neon_dotprod),
  VarianceParams(3, 3, &aom_variance8x8_neon_dotprod),
  VarianceParams(3, 2, &aom_variance8x4_neon_dotprod),
  VarianceParams(2, 3, &aom_variance4x8_neon_dotprod),
  VarianceParams(2, 2, &aom_variance4x4_neon_dotprod),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(2, 4, &aom_variance4x16_neon_dotprod),
  VarianceParams(4, 2, &aom_variance16x4_neon_dotprod),
  VarianceParams(3, 5, &aom_variance8x32_neon_dotprod),
  VarianceParams(5, 3, &aom_variance32x8_neon_dotprod),
  VarianceParams(4, 6, &aom_variance16x64_neon_dotprod),
  VarianceParams(6, 4, &aom_variance64x16_neon_dotprod),
#endif
};

INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, AvxVarianceTest,
                         ::testing::ValuesIn(kArrayVariance_neon_dotprod));

const GetSseSumParams kArrayGetSseSum8x8Quad_neon_dotprod[] = {
  GetSseSumParams(7, 7, &aom_get_var_sse_sum_8x8_quad_neon_dotprod, 0),
  GetSseSumParams(6, 6, &aom_get_var_sse_sum_8x8_quad_neon_dotprod, 0),
  GetSseSumParams(5, 5, &aom_get_var_sse_sum_8x8_quad_neon_dotprod, 0),
  GetSseSumParams(5, 4, &aom_get_var_sse_sum_8x8_quad_neon_dotprod, 0)
};
INSTANTIATE_TEST_SUITE_P(
    NEON_DOTPROD, GetSseSum8x8QuadTest,
    ::testing::ValuesIn(kArrayGetSseSum8x8Quad_neon_dotprod));

const GetSseSumParamsDual kArrayGetSseSum16x16Dual_neon_dotprod[] = {
  GetSseSumParamsDual(7, 7, &aom_get_var_sse_sum_16x16_dual_neon_dotprod, 0),
  GetSseSumParamsDual(6, 6, &aom_get_var_sse_sum_16x16_dual_neon_dotprod, 0),
  GetSseSumParamsDual(5, 5, &aom_get_var_sse_sum_16x16_dual_neon_dotprod, 0),
  GetSseSumParamsDual(5, 4, &aom_get_var_sse_sum_16x16_dual_neon_dotprod, 0)
};
INSTANTIATE_TEST_SUITE_P(
    NEON_DOTPROD, GetSseSum16x16DualTest,
    ::testing::ValuesIn(kArrayGetSseSum16x16Dual_neon_dotprod));

INSTANTIATE_TEST_SUITE_P(
    NEON_DOTPROD, AvxMseTest,
    ::testing::Values(MseParams(3, 3, &aom_mse8x8_neon_dotprod),
                      MseParams(3, 4, &aom_mse8x16_neon_dotprod),
                      MseParams(4, 4, &aom_mse16x16_neon_dotprod),
                      MseParams(4, 3, &aom_mse16x8_neon_dotprod)));

#endif  // HAVE_NEON_DOTPROD

#if HAVE_SVE

#if CONFIG_AV1_HIGHBITDEPTH
const VarianceParams kArrayHBDVariance_sve[] = {
  VarianceParams(7, 7, &aom_highbd_12_variance128x128_sve, 12),
  VarianceParams(7, 6, &aom_highbd_12_variance128x64_sve, 12),
  VarianceParams(6, 7, &aom_highbd_12_variance64x128_sve, 12),
  VarianceParams(6, 6, &aom_highbd_12_variance64x64_sve, 12),
  VarianceParams(6, 5, &aom_highbd_12_variance64x32_sve, 12),
  VarianceParams(5, 6, &aom_highbd_12_variance32x64_sve, 12),
  VarianceParams(5, 5, &aom_highbd_12_variance32x32_sve, 12),
  VarianceParams(5, 4, &aom_highbd_12_variance32x16_sve, 12),
  VarianceParams(4, 5, &aom_highbd_12_variance16x32_sve, 12),
  VarianceParams(4, 4, &aom_highbd_12_variance16x16_sve, 12),
  VarianceParams(4, 3, &aom_highbd_12_variance16x8_sve, 12),
  VarianceParams(3, 4, &aom_highbd_12_variance8x16_sve, 12),
  VarianceParams(3, 3, &aom_highbd_12_variance8x8_sve, 12),
  VarianceParams(3, 2, &aom_highbd_12_variance8x4_sve, 12),
  VarianceParams(2, 3, &aom_highbd_12_variance4x8_sve, 12),
  VarianceParams(2, 2, &aom_highbd_12_variance4x4_sve, 12),
  VarianceParams(7, 7, &aom_highbd_10_variance128x128_sve, 10),
  VarianceParams(7, 6, &aom_highbd_10_variance128x64_sve, 10),
  VarianceParams(6, 7, &aom_highbd_10_variance64x128_sve, 10),
  VarianceParams(6, 6, &aom_highbd_10_variance64x64_sve, 10),
  VarianceParams(6, 5, &aom_highbd_10_variance64x32_sve, 10),
  VarianceParams(5, 6, &aom_highbd_10_variance32x64_sve, 10),
  VarianceParams(5, 5, &aom_highbd_10_variance32x32_sve, 10),
  VarianceParams(5, 4, &aom_highbd_10_variance32x16_sve, 10),
  VarianceParams(4, 5, &aom_highbd_10_variance16x32_sve, 10),
  VarianceParams(4, 4, &aom_highbd_10_variance16x16_sve, 10),
  VarianceParams(4, 3, &aom_highbd_10_variance16x8_sve, 10),
  VarianceParams(3, 4, &aom_highbd_10_variance8x16_sve, 10),
  VarianceParams(3, 3, &aom_highbd_10_variance8x8_sve, 10),
  VarianceParams(3, 2, &aom_highbd_10_variance8x4_sve, 10),
  VarianceParams(2, 3, &aom_highbd_10_variance4x8_sve, 10),
  VarianceParams(2, 2, &aom_highbd_10_variance4x4_sve, 10),
  VarianceParams(7, 7, &aom_highbd_8_variance128x128_sve, 8),
  VarianceParams(7, 6, &aom_highbd_8_variance128x64_sve, 8),
  VarianceParams(6, 7, &aom_highbd_8_variance64x128_sve, 8),
  VarianceParams(6, 6, &aom_highbd_8_variance64x64_sve, 8),
  VarianceParams(6, 5, &aom_highbd_8_variance64x32_sve, 8),
  VarianceParams(5, 6, &aom_highbd_8_variance32x64_sve, 8),
  VarianceParams(5, 5, &aom_highbd_8_variance32x32_sve, 8),
  VarianceParams(5, 4, &aom_highbd_8_variance32x16_sve, 8),
  VarianceParams(4, 5, &aom_highbd_8_variance16x32_sve, 8),
  VarianceParams(4, 4, &aom_highbd_8_variance16x16_sve, 8),
  VarianceParams(4, 3, &aom_highbd_8_variance16x8_sve, 8),
  VarianceParams(3, 4, &aom_highbd_8_variance8x16_sve, 8),
  VarianceParams(3, 3, &aom_highbd_8_variance8x8_sve, 8),
  VarianceParams(3, 2, &aom_highbd_8_variance8x4_sve, 8),
  VarianceParams(2, 3, &aom_highbd_8_variance4x8_sve, 8),
  VarianceParams(2, 2, &aom_highbd_8_variance4x4_sve, 8),
#if !CONFIG_REALTIME_ONLY
  VarianceParams(6, 4, &aom_highbd_12_variance64x16_sve, 12),
  VarianceParams(4, 6, &aom_highbd_12_variance16x64_sve, 12),
  VarianceParams(5, 3, &aom_highbd_12_variance32x8_sve, 12),
  VarianceParams(3, 5, &aom_highbd_12_variance8x32_sve, 12),
  VarianceParams(4, 2, &aom_highbd_12_variance16x4_sve, 12),
  VarianceParams(2, 4, &aom_highbd_12_variance4x16_sve, 12),
  VarianceParams(6, 4, &aom_highbd_10_variance64x16_sve, 10),
  VarianceParams(4, 6, &aom_highbd_10_variance16x64_sve, 10),
  VarianceParams(5, 3, &aom_highbd_10_variance32x8_sve, 10),
  VarianceParams(3, 5, &aom_highbd_10_variance8x32_sve, 10),
  VarianceParams(4, 2, &aom_highbd_10_variance16x4_sve, 10),
  VarianceParams(2, 4, &aom_highbd_10_variance4x16_sve, 10),
  VarianceParams(6, 4, &aom_highbd_8_variance64x16_sve, 8),
  VarianceParams(4, 6, &aom_highbd_8_variance16x64_sve, 8),
  VarianceParams(5, 3, &aom_highbd_8_variance32x8_sve, 8),
  VarianceParams(3, 5, &aom_highbd_8_variance8x32_sve, 8),
  VarianceParams(4, 2, &aom_highbd_8_variance16x4_sve, 8),
  VarianceParams(2, 4, &aom_highbd_8_variance4x16_sve, 8),
#endif
};

INSTANTIATE_TEST_SUITE_P(SVE, AvxHBDVarianceTest,
                         ::testing::ValuesIn(kArrayHBDVariance_sve));

#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // HAVE_SVE

}  // namespace