chromium/third_party/libaom/source/libaom/test/sad_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 <string.h>
#include <limits.h>
#include <stdio.h>
#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 "test/util.h"
#include "aom/aom_codec.h"
#include "aom_mem/aom_mem.h"
#include "aom_ports/mem.h"

SadMxNFunc;
SadMxNParam;

SadSkipMxNFunc;
SadSkipMxNParam;

SadMxNAvgFunc;
SadMxNAvgParam;

DistWtdSadMxhFunc;
DistWtdSadMxhParam;

DistWtdSadMxNAvgFunc;
DistWtdSadMxNAvgParam;

SadMxNx4Func;
SadMxNx4Param;

SadSkipMxNx4Func;
SadSkipMxNx4Param;

SadMxNx4AvgFunc;
SadMxNx4AvgParam;

ACMRandom;

namespace {
class SADTestBase : public ::testing::Test {};

class SADx4Test : public ::testing::WithParamInterface<SadMxNx4Param>,
                  public SADTestBase {};

class SADx3Test : public ::testing::WithParamInterface<SadMxNx4Param>,
                  public SADTestBase {};

class SADSkipx4Test : public ::testing::WithParamInterface<SadMxNx4Param>,
                      public SADTestBase {};

class SADTest : public ::testing::WithParamInterface<SadMxNParam>,
                public SADTestBase {};

class SADSkipTest : public ::testing::WithParamInterface<SadMxNParam>,
                    public SADTestBase {};

class SADavgTest : public ::testing::WithParamInterface<SadMxNAvgParam>,
                   public SADTestBase {};

class DistWtdSADavgTest
    : public ::testing::WithParamInterface<DistWtdSadMxNAvgParam>,
      public SADTestBase {};

uint8_t *SADTestBase::source_data_ =;
uint8_t *SADTestBase::reference_data_ =;
uint8_t *SADTestBase::second_pred_ =;
uint8_t *SADTestBase::comp_pred_ =;
uint8_t *SADTestBase::comp_pred_test_ =;
uint8_t *SADTestBase::source_data8_ =;
uint8_t *SADTestBase::reference_data8_ =;
uint8_t *SADTestBase::second_pred8_ =;
uint8_t *SADTestBase::comp_pred8_ =;
uint8_t *SADTestBase::comp_pred8_test_ =;
uint16_t *SADTestBase::source_data16_ =;
uint16_t *SADTestBase::reference_data16_ =;
uint16_t *SADTestBase::second_pred16_ =;
uint16_t *SADTestBase::comp_pred16_ =;
uint16_t *SADTestBase::comp_pred16_test_ =;

TEST_P(SADTest, MaxRef) {}

TEST_P(SADTest, MaxSrc) {}

TEST_P(SADTest, ShortRef) {}

TEST_P(SADTest, UnalignedRef) {}

TEST_P(SADTest, ShortSrc) {}

TEST_P(SADTest, DISABLED_Speed) {}

TEST_P(SADSkipTest, MaxRef) {}

TEST_P(SADSkipTest, MaxSrc) {}

TEST_P(SADSkipTest, ShortRef) {}

TEST_P(SADSkipTest, UnalignedRef) {}

TEST_P(SADSkipTest, ShortSrc) {}

TEST_P(SADSkipTest, DISABLED_Speed) {}

TEST_P(SADavgTest, MaxRef) {}
TEST_P(SADavgTest, MaxSrc) {}

TEST_P(SADavgTest, ShortRef) {}

TEST_P(SADavgTest, UnalignedRef) {}

TEST_P(SADavgTest, ShortSrc) {}

TEST_P(DistWtdSADavgTest, MaxRef) {}
TEST_P(DistWtdSADavgTest, MaxSrc) {}

TEST_P(DistWtdSADavgTest, ShortRef) {}

TEST_P(DistWtdSADavgTest, UnalignedRef) {}

TEST_P(DistWtdSADavgTest, ShortSrc) {}

// SADx4
TEST_P(SADx4Test, MaxRef) {}

TEST_P(SADx4Test, MaxSrc) {}

TEST_P(SADx4Test, ShortRef) {}

TEST_P(SADx4Test, UnalignedRef) {}

TEST_P(SADx4Test, ShortSrc) {}

TEST_P(SADx4Test, SrcAlignedByWidth) {}

TEST_P(SADx4Test, DISABLED_Speed) {}

// SADx3
TEST_P(SADx3Test, MaxRef) {}

TEST_P(SADx3Test, MaxSrc) {}

TEST_P(SADx3Test, ShortRef) {}

TEST_P(SADx3Test, UnalignedRef) {}

TEST_P(SADx3Test, ShortSrc) {}

TEST_P(SADx3Test, SrcAlignedByWidth) {}

TEST_P(SADx3Test, DISABLED_Speed) {}

// SADSkipx4
TEST_P(SADSkipx4Test, MaxRef) {}

TEST_P(SADSkipx4Test, MaxSrc) {}

TEST_P(SADSkipx4Test, ShortRef) {}

TEST_P(SADSkipx4Test, UnalignedRef) {}

TEST_P(SADSkipx4Test, ShortSrc) {}

TEST_P(SADSkipx4Test, SrcAlignedByWidth) {}

TEST_P(SADSkipx4Test, DISABLED_Speed) {}

make_tuple;

//------------------------------------------------------------------------------
// C functions
const SadMxNParam c_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadSkipMxNParam skip_c_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNAvgParam avg_c_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const DistWtdSadMxNAvgParam dist_wtd_avg_c_tests[] =;

INSTANTIATE_TEST_SUITE_P();

const SadMxNx4Param x4d_c_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNx4Param x3d_c_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNx4Param skip_x4d_c_tests[] =;
INSTANTIATE_TEST_SUITE_P();

//------------------------------------------------------------------------------
// ARM functions
#if HAVE_NEON
const SadMxNParam neon_tests[] = {
  make_tuple(128, 128, &aom_sad128x128_neon, -1),
  make_tuple(128, 64, &aom_sad128x64_neon, -1),
  make_tuple(64, 128, &aom_sad64x128_neon, -1),
  make_tuple(64, 64, &aom_sad64x64_neon, -1),
  make_tuple(64, 32, &aom_sad64x32_neon, -1),
  make_tuple(32, 64, &aom_sad32x64_neon, -1),
  make_tuple(32, 32, &aom_sad32x32_neon, -1),
  make_tuple(32, 16, &aom_sad32x16_neon, -1),
  make_tuple(16, 32, &aom_sad16x32_neon, -1),
  make_tuple(16, 16, &aom_sad16x16_neon, -1),
  make_tuple(16, 8, &aom_sad16x8_neon, -1),
  make_tuple(8, 16, &aom_sad8x16_neon, -1),
  make_tuple(8, 8, &aom_sad8x8_neon, -1),
  make_tuple(8, 4, &aom_sad8x4_neon, -1),
  make_tuple(4, 8, &aom_sad4x8_neon, -1),
  make_tuple(4, 4, &aom_sad4x4_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(128, 128, &aom_highbd_sad128x128_neon, 8),
  make_tuple(128, 64, &aom_highbd_sad128x64_neon, 8),
  make_tuple(64, 128, &aom_highbd_sad64x128_neon, 8),
  make_tuple(64, 64, &aom_highbd_sad64x64_neon, 8),
  make_tuple(64, 32, &aom_highbd_sad64x32_neon, 8),
  make_tuple(32, 64, &aom_highbd_sad32x64_neon, 8),
  make_tuple(32, 32, &aom_highbd_sad32x32_neon, 8),
  make_tuple(32, 16, &aom_highbd_sad32x16_neon, 8),
  make_tuple(16, 32, &aom_highbd_sad16x32_neon, 8),
  make_tuple(16, 16, &aom_highbd_sad16x16_neon, 8),
  make_tuple(16, 8, &aom_highbd_sad16x8_neon, 8),
  make_tuple(8, 16, &aom_highbd_sad8x16_neon, 8),
  make_tuple(8, 8, &aom_highbd_sad8x8_neon, 8),
  make_tuple(8, 4, &aom_highbd_sad8x4_neon, 8),
  make_tuple(4, 8, &aom_highbd_sad4x8_neon, 8),
  make_tuple(4, 4, &aom_highbd_sad4x4_neon, 8),
  make_tuple(128, 128, &aom_highbd_sad128x128_neon, 10),
  make_tuple(128, 64, &aom_highbd_sad128x64_neon, 10),
  make_tuple(64, 128, &aom_highbd_sad64x128_neon, 10),
  make_tuple(64, 64, &aom_highbd_sad64x64_neon, 10),
  make_tuple(64, 32, &aom_highbd_sad64x32_neon, 10),
  make_tuple(32, 64, &aom_highbd_sad32x64_neon, 10),
  make_tuple(32, 32, &aom_highbd_sad32x32_neon, 10),
  make_tuple(32, 16, &aom_highbd_sad32x16_neon, 10),
  make_tuple(16, 32, &aom_highbd_sad16x32_neon, 10),
  make_tuple(16, 16, &aom_highbd_sad16x16_neon, 10),
  make_tuple(16, 8, &aom_highbd_sad16x8_neon, 10),
  make_tuple(8, 16, &aom_highbd_sad8x16_neon, 10),
  make_tuple(8, 8, &aom_highbd_sad8x8_neon, 10),
  make_tuple(8, 4, &aom_highbd_sad8x4_neon, 10),
  make_tuple(4, 8, &aom_highbd_sad4x8_neon, 10),
  make_tuple(4, 4, &aom_highbd_sad4x4_neon, 10),
  make_tuple(128, 128, &aom_highbd_sad128x128_neon, 12),
  make_tuple(128, 64, &aom_highbd_sad128x64_neon, 12),
  make_tuple(64, 128, &aom_highbd_sad64x128_neon, 12),
  make_tuple(64, 64, &aom_highbd_sad64x64_neon, 12),
  make_tuple(64, 32, &aom_highbd_sad64x32_neon, 12),
  make_tuple(32, 64, &aom_highbd_sad32x64_neon, 12),
  make_tuple(32, 32, &aom_highbd_sad32x32_neon, 12),
  make_tuple(32, 16, &aom_highbd_sad32x16_neon, 12),
  make_tuple(16, 32, &aom_highbd_sad16x32_neon, 12),
  make_tuple(16, 16, &aom_highbd_sad16x16_neon, 12),
  make_tuple(16, 8, &aom_highbd_sad16x8_neon, 12),
  make_tuple(8, 16, &aom_highbd_sad8x16_neon, 12),
  make_tuple(8, 8, &aom_highbd_sad8x8_neon, 12),
  make_tuple(8, 4, &aom_highbd_sad8x4_neon, 12),
  make_tuple(4, 8, &aom_highbd_sad4x8_neon, 12),
  make_tuple(4, 4, &aom_highbd_sad4x4_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16_neon, -1),
  make_tuple(32, 8, &aom_sad32x8_neon, -1),
  make_tuple(16, 64, &aom_sad16x64_neon, -1),
  make_tuple(16, 4, &aom_sad16x4_neon, -1),
  make_tuple(8, 32, &aom_sad8x32_neon, -1),
  make_tuple(4, 16, &aom_sad4x16_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(64, 16, &aom_highbd_sad64x16_neon, 8),
  make_tuple(16, 64, &aom_highbd_sad16x64_neon, 8),
  make_tuple(32, 8, &aom_highbd_sad32x8_neon, 8),
  make_tuple(8, 32, &aom_highbd_sad8x32_neon, 8),
  make_tuple(16, 4, &aom_highbd_sad16x4_neon, 8),
  make_tuple(4, 16, &aom_highbd_sad4x16_neon, 8),
  make_tuple(64, 16, &aom_highbd_sad64x16_neon, 10),
  make_tuple(16, 64, &aom_highbd_sad16x64_neon, 10),
  make_tuple(32, 8, &aom_highbd_sad32x8_neon, 10),
  make_tuple(8, 32, &aom_highbd_sad8x32_neon, 10),
  make_tuple(16, 4, &aom_highbd_sad16x4_neon, 10),
  make_tuple(4, 16, &aom_highbd_sad4x16_neon, 10),
  make_tuple(64, 16, &aom_highbd_sad64x16_neon, 12),
  make_tuple(16, 64, &aom_highbd_sad16x64_neon, 12),
  make_tuple(32, 8, &aom_highbd_sad32x8_neon, 12),
  make_tuple(8, 32, &aom_highbd_sad8x32_neon, 12),
  make_tuple(16, 4, &aom_highbd_sad16x4_neon, 12),
  make_tuple(4, 16, &aom_highbd_sad4x16_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON, SADTest, ::testing::ValuesIn(neon_tests));

const SadMxNx4Param x4d_neon_tests[] = {
  make_tuple(128, 128, &aom_sad128x128x4d_neon, -1),
  make_tuple(128, 64, &aom_sad128x64x4d_neon, -1),
  make_tuple(64, 128, &aom_sad64x128x4d_neon, -1),
  make_tuple(64, 64, &aom_sad64x64x4d_neon, -1),
  make_tuple(64, 32, &aom_sad64x32x4d_neon, -1),
  make_tuple(32, 64, &aom_sad32x64x4d_neon, -1),
  make_tuple(32, 32, &aom_sad32x32x4d_neon, -1),
  make_tuple(32, 16, &aom_sad32x16x4d_neon, -1),
  make_tuple(16, 32, &aom_sad16x32x4d_neon, -1),
  make_tuple(16, 16, &aom_sad16x16x4d_neon, -1),
  make_tuple(16, 8, &aom_sad16x8x4d_neon, -1),
  make_tuple(8, 16, &aom_sad8x16x4d_neon, -1),
  make_tuple(8, 8, &aom_sad8x8x4d_neon, -1),
  make_tuple(8, 4, &aom_sad8x4x4d_neon, -1),
  make_tuple(4, 8, &aom_sad4x8x4d_neon, -1),
  make_tuple(4, 4, &aom_sad4x4x4d_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(128, 128, &aom_highbd_sad128x128x4d_neon, 8),
  make_tuple(128, 64, &aom_highbd_sad128x64x4d_neon, 8),
  make_tuple(64, 128, &aom_highbd_sad64x128x4d_neon, 8),
  make_tuple(64, 64, &aom_highbd_sad64x64x4d_neon, 8),
  make_tuple(64, 32, &aom_highbd_sad64x32x4d_neon, 8),
  make_tuple(32, 64, &aom_highbd_sad32x64x4d_neon, 8),
  make_tuple(32, 32, &aom_highbd_sad32x32x4d_neon, 8),
  make_tuple(32, 16, &aom_highbd_sad32x16x4d_neon, 8),
  make_tuple(16, 32, &aom_highbd_sad16x32x4d_neon, 8),
  make_tuple(16, 16, &aom_highbd_sad16x16x4d_neon, 8),
  make_tuple(16, 8, &aom_highbd_sad16x8x4d_neon, 8),
  make_tuple(8, 16, &aom_highbd_sad8x16x4d_neon, 8),
  make_tuple(8, 8, &aom_highbd_sad8x8x4d_neon, 8),
  make_tuple(8, 4, &aom_highbd_sad8x4x4d_neon, 8),
  make_tuple(4, 8, &aom_highbd_sad4x8x4d_neon, 8),
  make_tuple(4, 4, &aom_highbd_sad4x4x4d_neon, 8),
  make_tuple(128, 128, &aom_highbd_sad128x128x4d_neon, 10),
  make_tuple(128, 64, &aom_highbd_sad128x64x4d_neon, 10),
  make_tuple(64, 128, &aom_highbd_sad64x128x4d_neon, 10),
  make_tuple(64, 64, &aom_highbd_sad64x64x4d_neon, 10),
  make_tuple(64, 32, &aom_highbd_sad64x32x4d_neon, 10),
  make_tuple(32, 64, &aom_highbd_sad32x64x4d_neon, 10),
  make_tuple(32, 32, &aom_highbd_sad32x32x4d_neon, 10),
  make_tuple(32, 16, &aom_highbd_sad32x16x4d_neon, 10),
  make_tuple(16, 32, &aom_highbd_sad16x32x4d_neon, 10),
  make_tuple(16, 16, &aom_highbd_sad16x16x4d_neon, 10),
  make_tuple(16, 8, &aom_highbd_sad16x8x4d_neon, 10),
  make_tuple(8, 16, &aom_highbd_sad8x16x4d_neon, 10),
  make_tuple(8, 8, &aom_highbd_sad8x8x4d_neon, 10),
  make_tuple(8, 4, &aom_highbd_sad8x4x4d_neon, 10),
  make_tuple(4, 8, &aom_highbd_sad4x8x4d_neon, 10),
  make_tuple(4, 4, &aom_highbd_sad4x4x4d_neon, 10),
  make_tuple(128, 128, &aom_highbd_sad128x128x4d_neon, 12),
  make_tuple(128, 64, &aom_highbd_sad128x64x4d_neon, 12),
  make_tuple(64, 128, &aom_highbd_sad64x128x4d_neon, 12),
  make_tuple(64, 64, &aom_highbd_sad64x64x4d_neon, 12),
  make_tuple(64, 32, &aom_highbd_sad64x32x4d_neon, 12),
  make_tuple(32, 64, &aom_highbd_sad32x64x4d_neon, 12),
  make_tuple(32, 32, &aom_highbd_sad32x32x4d_neon, 12),
  make_tuple(32, 16, &aom_highbd_sad32x16x4d_neon, 12),
  make_tuple(16, 32, &aom_highbd_sad16x32x4d_neon, 12),
  make_tuple(16, 16, &aom_highbd_sad16x16x4d_neon, 12),
  make_tuple(16, 8, &aom_highbd_sad16x8x4d_neon, 12),
  make_tuple(8, 16, &aom_highbd_sad8x16x4d_neon, 12),
  make_tuple(8, 8, &aom_highbd_sad8x8x4d_neon, 12),
  make_tuple(8, 4, &aom_highbd_sad8x4x4d_neon, 12),
  make_tuple(4, 8, &aom_highbd_sad4x8x4d_neon, 12),
  make_tuple(4, 4, &aom_highbd_sad4x4x4d_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16x4d_neon, -1),
  make_tuple(32, 8, &aom_sad32x8x4d_neon, -1),
  make_tuple(16, 64, &aom_sad16x64x4d_neon, -1),
  make_tuple(16, 4, &aom_sad16x4x4d_neon, -1),
  make_tuple(8, 32, &aom_sad8x32x4d_neon, -1),
  make_tuple(4, 16, &aom_sad4x16x4d_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(64, 16, &aom_highbd_sad64x16x4d_neon, 8),
  make_tuple(16, 64, &aom_highbd_sad16x64x4d_neon, 8),
  make_tuple(32, 8, &aom_highbd_sad32x8x4d_neon, 8),
  make_tuple(8, 32, &aom_highbd_sad8x32x4d_neon, 8),
  make_tuple(16, 4, &aom_highbd_sad16x4x4d_neon, 8),
  make_tuple(4, 16, &aom_highbd_sad4x16x4d_neon, 8),
  make_tuple(64, 16, &aom_highbd_sad64x16x4d_neon, 10),
  make_tuple(16, 64, &aom_highbd_sad16x64x4d_neon, 10),
  make_tuple(32, 8, &aom_highbd_sad32x8x4d_neon, 10),
  make_tuple(8, 32, &aom_highbd_sad8x32x4d_neon, 10),
  make_tuple(16, 4, &aom_highbd_sad16x4x4d_neon, 10),
  make_tuple(4, 16, &aom_highbd_sad4x16x4d_neon, 10),
  make_tuple(64, 16, &aom_highbd_sad64x16x4d_neon, 12),
  make_tuple(16, 64, &aom_highbd_sad16x64x4d_neon, 12),
  make_tuple(32, 8, &aom_highbd_sad32x8x4d_neon, 12),
  make_tuple(8, 32, &aom_highbd_sad8x32x4d_neon, 12),
  make_tuple(16, 4, &aom_highbd_sad16x4x4d_neon, 12),
  make_tuple(4, 16, &aom_highbd_sad4x16x4d_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON, SADx4Test, ::testing::ValuesIn(x4d_neon_tests));
const SadSkipMxNParam skip_neon_tests[] = {
  make_tuple(128, 128, &aom_sad_skip_128x128_neon, -1),
  make_tuple(128, 64, &aom_sad_skip_128x64_neon, -1),
  make_tuple(64, 128, &aom_sad_skip_64x128_neon, -1),
  make_tuple(64, 64, &aom_sad_skip_64x64_neon, -1),
  make_tuple(64, 32, &aom_sad_skip_64x32_neon, -1),
  make_tuple(32, 64, &aom_sad_skip_32x64_neon, -1),
  make_tuple(32, 32, &aom_sad_skip_32x32_neon, -1),
  make_tuple(32, 16, &aom_sad_skip_32x16_neon, -1),
  make_tuple(16, 32, &aom_sad_skip_16x32_neon, -1),
  make_tuple(16, 16, &aom_sad_skip_16x16_neon, -1),
  make_tuple(16, 8, &aom_sad_skip_16x8_neon, -1),
  make_tuple(8, 16, &aom_sad_skip_8x16_neon, -1),
  make_tuple(8, 8, &aom_sad_skip_8x8_neon, -1),
  make_tuple(8, 4, &aom_sad_skip_8x4_neon, -1),
  make_tuple(4, 8, &aom_sad_skip_4x8_neon, -1),
  make_tuple(4, 4, &aom_sad_skip_4x4_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(128, 128, &aom_highbd_sad_skip_128x128_neon, 8),
  make_tuple(128, 64, &aom_highbd_sad_skip_128x64_neon, 8),
  make_tuple(64, 128, &aom_highbd_sad_skip_64x128_neon, 8),
  make_tuple(64, 64, &aom_highbd_sad_skip_64x64_neon, 8),
  make_tuple(64, 32, &aom_highbd_sad_skip_64x32_neon, 8),
  make_tuple(32, 64, &aom_highbd_sad_skip_32x64_neon, 8),
  make_tuple(32, 32, &aom_highbd_sad_skip_32x32_neon, 8),
  make_tuple(32, 16, &aom_highbd_sad_skip_32x16_neon, 8),
  make_tuple(16, 32, &aom_highbd_sad_skip_16x32_neon, 8),
  make_tuple(16, 16, &aom_highbd_sad_skip_16x16_neon, 8),
  make_tuple(16, 8, &aom_highbd_sad_skip_16x8_neon, 8),
  make_tuple(8, 16, &aom_highbd_sad_skip_8x16_neon, 8),
  make_tuple(8, 8, &aom_highbd_sad_skip_8x8_neon, 8),
  make_tuple(8, 4, &aom_highbd_sad_skip_8x4_neon, 8),
  make_tuple(4, 8, &aom_highbd_sad_skip_4x8_neon, 8),
  make_tuple(4, 4, &aom_highbd_sad_skip_4x4_neon, 8),
  make_tuple(128, 128, &aom_highbd_sad_skip_128x128_neon, 10),
  make_tuple(128, 64, &aom_highbd_sad_skip_128x64_neon, 10),
  make_tuple(64, 128, &aom_highbd_sad_skip_64x128_neon, 10),
  make_tuple(64, 64, &aom_highbd_sad_skip_64x64_neon, 10),
  make_tuple(64, 32, &aom_highbd_sad_skip_64x32_neon, 10),
  make_tuple(32, 64, &aom_highbd_sad_skip_32x64_neon, 10),
  make_tuple(32, 32, &aom_highbd_sad_skip_32x32_neon, 10),
  make_tuple(32, 16, &aom_highbd_sad_skip_32x16_neon, 10),
  make_tuple(16, 32, &aom_highbd_sad_skip_16x32_neon, 10),
  make_tuple(16, 16, &aom_highbd_sad_skip_16x16_neon, 10),
  make_tuple(16, 8, &aom_highbd_sad_skip_16x8_neon, 10),
  make_tuple(8, 16, &aom_highbd_sad_skip_8x16_neon, 10),
  make_tuple(8, 8, &aom_highbd_sad_skip_8x8_neon, 10),
  make_tuple(8, 4, &aom_highbd_sad_skip_8x4_neon, 10),
  make_tuple(4, 8, &aom_highbd_sad_skip_4x8_neon, 10),
  make_tuple(4, 4, &aom_highbd_sad_skip_4x4_neon, 10),
  make_tuple(128, 128, &aom_highbd_sad_skip_128x128_neon, 12),
  make_tuple(128, 64, &aom_highbd_sad_skip_128x64_neon, 12),
  make_tuple(64, 128, &aom_highbd_sad_skip_64x128_neon, 12),
  make_tuple(64, 64, &aom_highbd_sad_skip_64x64_neon, 12),
  make_tuple(64, 32, &aom_highbd_sad_skip_64x32_neon, 12),
  make_tuple(32, 64, &aom_highbd_sad_skip_32x64_neon, 12),
  make_tuple(32, 32, &aom_highbd_sad_skip_32x32_neon, 12),
  make_tuple(32, 16, &aom_highbd_sad_skip_32x16_neon, 12),
  make_tuple(16, 32, &aom_highbd_sad_skip_16x32_neon, 12),
  make_tuple(16, 16, &aom_highbd_sad_skip_16x16_neon, 12),
  make_tuple(16, 8, &aom_highbd_sad_skip_16x8_neon, 12),
  make_tuple(8, 16, &aom_highbd_sad_skip_8x16_neon, 12),
  make_tuple(8, 8, &aom_highbd_sad_skip_8x8_neon, 12),
  make_tuple(8, 4, &aom_highbd_sad_skip_8x4_neon, 12),
  make_tuple(4, 8, &aom_highbd_sad_skip_4x8_neon, 12),
  make_tuple(4, 4, &aom_highbd_sad_skip_4x4_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad_skip_64x16_neon, -1),
  make_tuple(32, 8, &aom_sad_skip_32x8_neon, -1),
  make_tuple(16, 64, &aom_sad_skip_16x64_neon, -1),
  make_tuple(16, 4, &aom_sad_skip_16x4_neon, -1),
  make_tuple(8, 32, &aom_sad_skip_8x32_neon, -1),
  make_tuple(4, 16, &aom_sad_skip_4x16_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(64, 16, &aom_highbd_sad_skip_64x16_neon, 8),
  make_tuple(16, 64, &aom_highbd_sad_skip_16x64_neon, 8),
  make_tuple(32, 8, &aom_highbd_sad_skip_32x8_neon, 8),
  make_tuple(8, 32, &aom_highbd_sad_skip_8x32_neon, 8),
  make_tuple(16, 4, &aom_highbd_sad_skip_16x4_neon, 8),
  make_tuple(4, 16, &aom_highbd_sad_skip_4x16_neon, 8),
  make_tuple(64, 16, &aom_highbd_sad_skip_64x16_neon, 10),
  make_tuple(16, 64, &aom_highbd_sad_skip_16x64_neon, 10),
  make_tuple(32, 8, &aom_highbd_sad_skip_32x8_neon, 10),
  make_tuple(8, 32, &aom_highbd_sad_skip_8x32_neon, 10),
  make_tuple(16, 4, &aom_highbd_sad_skip_16x4_neon, 10),
  make_tuple(4, 16, &aom_highbd_sad_skip_4x16_neon, 10),
  make_tuple(64, 16, &aom_highbd_sad_skip_64x16_neon, 12),
  make_tuple(16, 64, &aom_highbd_sad_skip_16x64_neon, 12),
  make_tuple(32, 8, &aom_highbd_sad_skip_32x8_neon, 12),
  make_tuple(8, 32, &aom_highbd_sad_skip_8x32_neon, 12),
  make_tuple(16, 4, &aom_highbd_sad_skip_16x4_neon, 12),
  make_tuple(4, 16, &aom_highbd_sad_skip_4x16_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON, SADSkipTest,
                         ::testing::ValuesIn(skip_neon_tests));

const SadSkipMxNx4Param skip_x4d_neon_tests[] = {
  make_tuple(128, 128, &aom_sad_skip_128x128x4d_neon, -1),
  make_tuple(128, 64, &aom_sad_skip_128x64x4d_neon, -1),
  make_tuple(64, 128, &aom_sad_skip_64x128x4d_neon, -1),
  make_tuple(64, 64, &aom_sad_skip_64x64x4d_neon, -1),
  make_tuple(64, 32, &aom_sad_skip_64x32x4d_neon, -1),
  make_tuple(32, 64, &aom_sad_skip_32x64x4d_neon, -1),
  make_tuple(32, 32, &aom_sad_skip_32x32x4d_neon, -1),
  make_tuple(32, 16, &aom_sad_skip_32x16x4d_neon, -1),
  make_tuple(16, 32, &aom_sad_skip_16x32x4d_neon, -1),
  make_tuple(16, 16, &aom_sad_skip_16x16x4d_neon, -1),
  make_tuple(16, 8, &aom_sad_skip_16x8x4d_neon, -1),
  make_tuple(8, 16, &aom_sad_skip_8x16x4d_neon, -1),
  make_tuple(8, 8, &aom_sad_skip_8x8x4d_neon, -1),
  make_tuple(8, 4, &aom_sad_skip_8x4x4d_neon, -1),
  make_tuple(4, 8, &aom_sad_skip_4x8x4d_neon, -1),
  make_tuple(4, 4, &aom_sad_skip_4x4x4d_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_neon, 8),
  make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_neon, 8),
  make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_neon, 8),
  make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_neon, 8),
  make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_neon, 8),
  make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_neon, 8),
  make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_neon, 8),
  make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_neon, 8),
  make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_neon, 8),
  make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_neon, 8),
  make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_neon, 8),
  make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_neon, 8),
  make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_neon, 8),
  make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_neon, 8),
  make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_neon, 8),
  make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_neon, 8),
  make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_neon, 10),
  make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_neon, 10),
  make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_neon, 10),
  make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_neon, 10),
  make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_neon, 10),
  make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_neon, 10),
  make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_neon, 10),
  make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_neon, 10),
  make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_neon, 10),
  make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_neon, 10),
  make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_neon, 10),
  make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_neon, 10),
  make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_neon, 10),
  make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_neon, 10),
  make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_neon, 10),
  make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_neon, 10),
  make_tuple(128, 128, &aom_highbd_sad_skip_128x128x4d_neon, 12),
  make_tuple(128, 64, &aom_highbd_sad_skip_128x64x4d_neon, 12),
  make_tuple(64, 128, &aom_highbd_sad_skip_64x128x4d_neon, 12),
  make_tuple(64, 64, &aom_highbd_sad_skip_64x64x4d_neon, 12),
  make_tuple(64, 32, &aom_highbd_sad_skip_64x32x4d_neon, 12),
  make_tuple(32, 64, &aom_highbd_sad_skip_32x64x4d_neon, 12),
  make_tuple(32, 32, &aom_highbd_sad_skip_32x32x4d_neon, 12),
  make_tuple(32, 16, &aom_highbd_sad_skip_32x16x4d_neon, 12),
  make_tuple(16, 32, &aom_highbd_sad_skip_16x32x4d_neon, 12),
  make_tuple(16, 16, &aom_highbd_sad_skip_16x16x4d_neon, 12),
  make_tuple(16, 8, &aom_highbd_sad_skip_16x8x4d_neon, 12),
  make_tuple(8, 16, &aom_highbd_sad_skip_8x16x4d_neon, 12),
  make_tuple(8, 8, &aom_highbd_sad_skip_8x8x4d_neon, 12),
  make_tuple(8, 4, &aom_highbd_sad_skip_8x4x4d_neon, 12),
  make_tuple(4, 8, &aom_highbd_sad_skip_4x8x4d_neon, 12),
  make_tuple(4, 4, &aom_highbd_sad_skip_4x4x4d_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad_skip_64x16x4d_neon, -1),
  make_tuple(32, 8, &aom_sad_skip_32x8x4d_neon, -1),
  make_tuple(16, 64, &aom_sad_skip_16x64x4d_neon, -1),
  make_tuple(16, 4, &aom_sad_skip_16x4x4d_neon, -1),
  make_tuple(8, 32, &aom_sad_skip_8x32x4d_neon, -1),
  make_tuple(4, 16, &aom_sad_skip_4x16x4d_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_neon, 8),
  make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_neon, 8),
  make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_neon, 8),
  make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_neon, 8),
  make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_neon, 8),
  make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_neon, 8),
  make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_neon, 10),
  make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_neon, 10),
  make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_neon, 10),
  make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_neon, 10),
  make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_neon, 10),
  make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_neon, 10),
  make_tuple(64, 16, &aom_highbd_sad_skip_64x16x4d_neon, 12),
  make_tuple(16, 64, &aom_highbd_sad_skip_16x64x4d_neon, 12),
  make_tuple(32, 8, &aom_highbd_sad_skip_32x8x4d_neon, 12),
  make_tuple(8, 32, &aom_highbd_sad_skip_8x32x4d_neon, 12),
  make_tuple(16, 4, &aom_highbd_sad_skip_16x4x4d_neon, 12),
  make_tuple(4, 16, &aom_highbd_sad_skip_4x16x4d_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON, SADSkipx4Test,
                         ::testing::ValuesIn(skip_x4d_neon_tests));

const SadMxNAvgParam avg_neon_tests[] = {
  make_tuple(128, 128, &aom_sad128x128_avg_neon, -1),
  make_tuple(128, 64, &aom_sad128x64_avg_neon, -1),
  make_tuple(64, 128, &aom_sad64x128_avg_neon, -1),
  make_tuple(64, 64, &aom_sad64x64_avg_neon, -1),
  make_tuple(64, 32, &aom_sad64x32_avg_neon, -1),
  make_tuple(32, 64, &aom_sad32x64_avg_neon, -1),
  make_tuple(32, 32, &aom_sad32x32_avg_neon, -1),
  make_tuple(32, 16, &aom_sad32x16_avg_neon, -1),
  make_tuple(16, 32, &aom_sad16x32_avg_neon, -1),
  make_tuple(16, 16, &aom_sad16x16_avg_neon, -1),
  make_tuple(16, 8, &aom_sad16x8_avg_neon, -1),
  make_tuple(8, 16, &aom_sad8x16_avg_neon, -1),
  make_tuple(8, 8, &aom_sad8x8_avg_neon, -1),
  make_tuple(8, 4, &aom_sad8x4_avg_neon, -1),
  make_tuple(4, 8, &aom_sad4x8_avg_neon, -1),
  make_tuple(4, 4, &aom_sad4x4_avg_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(128, 128, &aom_highbd_sad128x128_avg_neon, 8),
  make_tuple(128, 64, &aom_highbd_sad128x64_avg_neon, 8),
  make_tuple(64, 128, &aom_highbd_sad64x128_avg_neon, 8),
  make_tuple(64, 64, &aom_highbd_sad64x64_avg_neon, 8),
  make_tuple(64, 32, &aom_highbd_sad64x32_avg_neon, 8),
  make_tuple(32, 64, &aom_highbd_sad32x64_avg_neon, 8),
  make_tuple(32, 32, &aom_highbd_sad32x32_avg_neon, 8),
  make_tuple(32, 16, &aom_highbd_sad32x16_avg_neon, 8),
  make_tuple(16, 32, &aom_highbd_sad16x32_avg_neon, 8),
  make_tuple(16, 16, &aom_highbd_sad16x16_avg_neon, 8),
  make_tuple(16, 8, &aom_highbd_sad16x8_avg_neon, 8),
  make_tuple(8, 16, &aom_highbd_sad8x16_avg_neon, 8),
  make_tuple(8, 8, &aom_highbd_sad8x8_avg_neon, 8),
  make_tuple(8, 4, &aom_highbd_sad8x4_avg_neon, 8),
  make_tuple(4, 8, &aom_highbd_sad4x8_avg_neon, 8),
  make_tuple(4, 4, &aom_highbd_sad4x4_avg_neon, 8),
  make_tuple(128, 128, &aom_highbd_sad128x128_avg_neon, 10),
  make_tuple(128, 64, &aom_highbd_sad128x64_avg_neon, 10),
  make_tuple(64, 128, &aom_highbd_sad64x128_avg_neon, 10),
  make_tuple(64, 64, &aom_highbd_sad64x64_avg_neon, 10),
  make_tuple(64, 32, &aom_highbd_sad64x32_avg_neon, 10),
  make_tuple(32, 64, &aom_highbd_sad32x64_avg_neon, 10),
  make_tuple(32, 32, &aom_highbd_sad32x32_avg_neon, 10),
  make_tuple(32, 16, &aom_highbd_sad32x16_avg_neon, 10),
  make_tuple(16, 32, &aom_highbd_sad16x32_avg_neon, 10),
  make_tuple(16, 16, &aom_highbd_sad16x16_avg_neon, 10),
  make_tuple(16, 8, &aom_highbd_sad16x8_avg_neon, 10),
  make_tuple(8, 16, &aom_highbd_sad8x16_avg_neon, 10),
  make_tuple(8, 8, &aom_highbd_sad8x8_avg_neon, 10),
  make_tuple(8, 4, &aom_highbd_sad8x4_avg_neon, 10),
  make_tuple(4, 8, &aom_highbd_sad4x8_avg_neon, 10),
  make_tuple(4, 4, &aom_highbd_sad4x4_avg_neon, 10),
  make_tuple(128, 128, &aom_highbd_sad128x128_avg_neon, 12),
  make_tuple(128, 64, &aom_highbd_sad128x64_avg_neon, 12),
  make_tuple(64, 128, &aom_highbd_sad64x128_avg_neon, 12),
  make_tuple(64, 64, &aom_highbd_sad64x64_avg_neon, 12),
  make_tuple(64, 32, &aom_highbd_sad64x32_avg_neon, 12),
  make_tuple(32, 64, &aom_highbd_sad32x64_avg_neon, 12),
  make_tuple(32, 32, &aom_highbd_sad32x32_avg_neon, 12),
  make_tuple(32, 16, &aom_highbd_sad32x16_avg_neon, 12),
  make_tuple(16, 32, &aom_highbd_sad16x32_avg_neon, 12),
  make_tuple(16, 16, &aom_highbd_sad16x16_avg_neon, 12),
  make_tuple(16, 8, &aom_highbd_sad16x8_avg_neon, 12),
  make_tuple(8, 16, &aom_highbd_sad8x16_avg_neon, 12),
  make_tuple(8, 8, &aom_highbd_sad8x8_avg_neon, 12),
  make_tuple(8, 4, &aom_highbd_sad8x4_avg_neon, 12),
  make_tuple(4, 8, &aom_highbd_sad4x8_avg_neon, 12),
  make_tuple(4, 4, &aom_highbd_sad4x4_avg_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16_avg_neon, -1),
  make_tuple(32, 8, &aom_sad32x8_avg_neon, -1),
  make_tuple(16, 64, &aom_sad16x64_avg_neon, -1),
  make_tuple(16, 4, &aom_sad16x4_avg_neon, -1),
  make_tuple(8, 32, &aom_sad8x32_avg_neon, -1),
  make_tuple(4, 16, &aom_sad4x16_avg_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(64, 16, &aom_highbd_sad64x16_avg_neon, 8),
  make_tuple(16, 64, &aom_highbd_sad16x64_avg_neon, 8),
  make_tuple(32, 8, &aom_highbd_sad32x8_avg_neon, 8),
  make_tuple(8, 32, &aom_highbd_sad8x32_avg_neon, 8),
  make_tuple(16, 4, &aom_highbd_sad16x4_avg_neon, 8),
  make_tuple(4, 16, &aom_highbd_sad4x16_avg_neon, 8),
  make_tuple(64, 16, &aom_highbd_sad64x16_avg_neon, 10),
  make_tuple(16, 64, &aom_highbd_sad16x64_avg_neon, 10),
  make_tuple(32, 8, &aom_highbd_sad32x8_avg_neon, 10),
  make_tuple(8, 32, &aom_highbd_sad8x32_avg_neon, 10),
  make_tuple(16, 4, &aom_highbd_sad16x4_avg_neon, 10),
  make_tuple(4, 16, &aom_highbd_sad4x16_avg_neon, 10),
  make_tuple(64, 16, &aom_highbd_sad64x16_avg_neon, 12),
  make_tuple(16, 64, &aom_highbd_sad16x64_avg_neon, 12),
  make_tuple(32, 8, &aom_highbd_sad32x8_avg_neon, 12),
  make_tuple(8, 32, &aom_highbd_sad8x32_avg_neon, 12),
  make_tuple(16, 4, &aom_highbd_sad16x4_avg_neon, 12),
  make_tuple(4, 16, &aom_highbd_sad4x16_avg_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON, SADavgTest, ::testing::ValuesIn(avg_neon_tests));

const DistWtdSadMxNAvgParam dist_wtd_avg_neon_tests[] = {
  make_tuple(128, 128, &aom_dist_wtd_sad128x128_avg_neon, -1),
  make_tuple(128, 64, &aom_dist_wtd_sad128x64_avg_neon, -1),
  make_tuple(64, 128, &aom_dist_wtd_sad64x128_avg_neon, -1),
  make_tuple(64, 64, &aom_dist_wtd_sad64x64_avg_neon, -1),
  make_tuple(64, 32, &aom_dist_wtd_sad64x32_avg_neon, -1),
  make_tuple(32, 64, &aom_dist_wtd_sad32x64_avg_neon, -1),
  make_tuple(32, 32, &aom_dist_wtd_sad32x32_avg_neon, -1),
  make_tuple(32, 16, &aom_dist_wtd_sad32x16_avg_neon, -1),
  make_tuple(16, 32, &aom_dist_wtd_sad16x32_avg_neon, -1),
  make_tuple(16, 16, &aom_dist_wtd_sad16x16_avg_neon, -1),
  make_tuple(16, 8, &aom_dist_wtd_sad16x8_avg_neon, -1),
  make_tuple(8, 16, &aom_dist_wtd_sad8x16_avg_neon, -1),
  make_tuple(8, 8, &aom_dist_wtd_sad8x8_avg_neon, -1),
  make_tuple(8, 4, &aom_dist_wtd_sad8x4_avg_neon, -1),
  make_tuple(4, 8, &aom_dist_wtd_sad4x8_avg_neon, -1),
  make_tuple(4, 4, &aom_dist_wtd_sad4x4_avg_neon, -1),

#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_dist_wtd_sad64x16_avg_neon, -1),
  make_tuple(16, 64, &aom_dist_wtd_sad16x64_avg_neon, -1),
  make_tuple(32, 8, &aom_dist_wtd_sad32x8_avg_neon, -1),
  make_tuple(8, 32, &aom_dist_wtd_sad8x32_avg_neon, -1),
  make_tuple(16, 4, &aom_dist_wtd_sad16x4_avg_neon, -1),
  make_tuple(4, 16, &aom_dist_wtd_sad4x16_avg_neon, -1),
#endif  // !CONFIG_REALTIME_ONLY
};

INSTANTIATE_TEST_SUITE_P(NEON, DistWtdSADavgTest,
                         ::testing::ValuesIn(dist_wtd_avg_neon_tests));

const SadMxNx4Param x3d_neon_tests[] = {
  make_tuple(128, 128, &aom_sad128x128x3d_neon, -1),
  make_tuple(128, 64, &aom_sad128x64x3d_neon, -1),
  make_tuple(64, 128, &aom_sad64x128x3d_neon, -1),
  make_tuple(64, 64, &aom_sad64x64x3d_neon, -1),
  make_tuple(64, 32, &aom_sad64x32x3d_neon, -1),
  make_tuple(32, 64, &aom_sad32x64x3d_neon, -1),
  make_tuple(32, 32, &aom_sad32x32x3d_neon, -1),
  make_tuple(32, 16, &aom_sad32x16x3d_neon, -1),
  make_tuple(16, 32, &aom_sad16x32x3d_neon, -1),
  make_tuple(16, 16, &aom_sad16x16x3d_neon, -1),
  make_tuple(16, 8, &aom_sad16x8x3d_neon, -1),
  make_tuple(8, 16, &aom_sad8x16x3d_neon, -1),
  make_tuple(8, 8, &aom_sad8x8x3d_neon, -1),
  make_tuple(8, 4, &aom_sad8x4x3d_neon, -1),
  make_tuple(4, 8, &aom_sad4x8x3d_neon, -1),
  make_tuple(4, 4, &aom_sad4x4x3d_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(128, 128, &aom_highbd_sad128x128x3d_neon, 8),
  make_tuple(128, 64, &aom_highbd_sad128x64x3d_neon, 8),
  make_tuple(64, 128, &aom_highbd_sad64x128x3d_neon, 8),
  make_tuple(64, 64, &aom_highbd_sad64x64x3d_neon, 8),
  make_tuple(64, 32, &aom_highbd_sad64x32x3d_neon, 8),
  make_tuple(32, 64, &aom_highbd_sad32x64x3d_neon, 8),
  make_tuple(32, 32, &aom_highbd_sad32x32x3d_neon, 8),
  make_tuple(32, 16, &aom_highbd_sad32x16x3d_neon, 8),
  make_tuple(16, 32, &aom_highbd_sad16x32x3d_neon, 8),
  make_tuple(16, 16, &aom_highbd_sad16x16x3d_neon, 8),
  make_tuple(16, 8, &aom_highbd_sad16x8x3d_neon, 8),
  make_tuple(8, 16, &aom_highbd_sad8x16x3d_neon, 8),
  make_tuple(8, 8, &aom_highbd_sad8x8x3d_neon, 8),
  make_tuple(8, 4, &aom_highbd_sad8x4x3d_neon, 8),
  make_tuple(4, 8, &aom_highbd_sad4x8x3d_neon, 8),
  make_tuple(4, 4, &aom_highbd_sad4x4x3d_neon, 8),
  make_tuple(128, 128, &aom_highbd_sad128x128x3d_neon, 10),
  make_tuple(128, 64, &aom_highbd_sad128x64x3d_neon, 10),
  make_tuple(64, 128, &aom_highbd_sad64x128x3d_neon, 10),
  make_tuple(64, 64, &aom_highbd_sad64x64x3d_neon, 10),
  make_tuple(64, 32, &aom_highbd_sad64x32x3d_neon, 10),
  make_tuple(32, 64, &aom_highbd_sad32x64x3d_neon, 10),
  make_tuple(32, 32, &aom_highbd_sad32x32x3d_neon, 10),
  make_tuple(32, 16, &aom_highbd_sad32x16x3d_neon, 10),
  make_tuple(16, 32, &aom_highbd_sad16x32x3d_neon, 10),
  make_tuple(16, 16, &aom_highbd_sad16x16x3d_neon, 10),
  make_tuple(16, 8, &aom_highbd_sad16x8x3d_neon, 10),
  make_tuple(8, 16, &aom_highbd_sad8x16x3d_neon, 10),
  make_tuple(8, 8, &aom_highbd_sad8x8x3d_neon, 10),
  make_tuple(8, 4, &aom_highbd_sad8x4x3d_neon, 10),
  make_tuple(4, 8, &aom_highbd_sad4x8x3d_neon, 10),
  make_tuple(4, 4, &aom_highbd_sad4x4x3d_neon, 10),
  make_tuple(128, 128, &aom_highbd_sad128x128x3d_neon, 12),
  make_tuple(128, 64, &aom_highbd_sad128x64x3d_neon, 12),
  make_tuple(64, 128, &aom_highbd_sad64x128x3d_neon, 12),
  make_tuple(64, 64, &aom_highbd_sad64x64x3d_neon, 12),
  make_tuple(64, 32, &aom_highbd_sad64x32x3d_neon, 12),
  make_tuple(32, 64, &aom_highbd_sad32x64x3d_neon, 12),
  make_tuple(32, 32, &aom_highbd_sad32x32x3d_neon, 12),
  make_tuple(32, 16, &aom_highbd_sad32x16x3d_neon, 12),
  make_tuple(16, 32, &aom_highbd_sad16x32x3d_neon, 12),
  make_tuple(16, 16, &aom_highbd_sad16x16x3d_neon, 12),
  make_tuple(16, 8, &aom_highbd_sad16x8x3d_neon, 12),
  make_tuple(8, 16, &aom_highbd_sad8x16x3d_neon, 12),
  make_tuple(8, 8, &aom_highbd_sad8x8x3d_neon, 12),
  make_tuple(8, 4, &aom_highbd_sad8x4x3d_neon, 12),
  make_tuple(4, 8, &aom_highbd_sad4x8x3d_neon, 12),
  make_tuple(4, 4, &aom_highbd_sad4x4x3d_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16x3d_neon, -1),
  make_tuple(32, 8, &aom_sad32x8x3d_neon, -1),
  make_tuple(16, 64, &aom_sad16x64x3d_neon, -1),
  make_tuple(16, 4, &aom_sad16x4x3d_neon, -1),
  make_tuple(8, 32, &aom_sad8x32x3d_neon, -1),
  make_tuple(4, 16, &aom_sad4x16x3d_neon, -1),
#if CONFIG_AV1_HIGHBITDEPTH
  make_tuple(64, 16, &aom_highbd_sad64x16x3d_neon, 8),
  make_tuple(16, 64, &aom_highbd_sad16x64x3d_neon, 8),
  make_tuple(32, 8, &aom_highbd_sad32x8x3d_neon, 8),
  make_tuple(8, 32, &aom_highbd_sad8x32x3d_neon, 8),
  make_tuple(16, 4, &aom_highbd_sad16x4x3d_neon, 8),
  make_tuple(4, 16, &aom_highbd_sad4x16x3d_neon, 8),
  make_tuple(64, 16, &aom_highbd_sad64x16x3d_neon, 10),
  make_tuple(16, 64, &aom_highbd_sad16x64x3d_neon, 10),
  make_tuple(32, 8, &aom_highbd_sad32x8x3d_neon, 10),
  make_tuple(8, 32, &aom_highbd_sad8x32x3d_neon, 10),
  make_tuple(16, 4, &aom_highbd_sad16x4x3d_neon, 10),
  make_tuple(4, 16, &aom_highbd_sad4x16x3d_neon, 10),
  make_tuple(64, 16, &aom_highbd_sad64x16x3d_neon, 12),
  make_tuple(16, 64, &aom_highbd_sad16x64x3d_neon, 12),
  make_tuple(32, 8, &aom_highbd_sad32x8x3d_neon, 12),
  make_tuple(8, 32, &aom_highbd_sad8x32x3d_neon, 12),
  make_tuple(16, 4, &aom_highbd_sad16x4x3d_neon, 12),
  make_tuple(4, 16, &aom_highbd_sad4x16x3d_neon, 12),
#endif  // CONFIG_AV1_HIGHBITDEPTH
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON, SADx3Test, ::testing::ValuesIn(x3d_neon_tests));

#endif  // HAVE_NEON

#if HAVE_NEON_DOTPROD
const SadMxNParam neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_sad128x128_neon_dotprod, -1),
  make_tuple(128, 64, &aom_sad128x64_neon_dotprod, -1),
  make_tuple(64, 128, &aom_sad64x128_neon_dotprod, -1),
  make_tuple(64, 64, &aom_sad64x64_neon_dotprod, -1),
  make_tuple(64, 32, &aom_sad64x32_neon_dotprod, -1),
  make_tuple(32, 64, &aom_sad32x64_neon_dotprod, -1),
  make_tuple(32, 32, &aom_sad32x32_neon_dotprod, -1),
  make_tuple(32, 16, &aom_sad32x16_neon_dotprod, -1),
  make_tuple(16, 32, &aom_sad16x32_neon_dotprod, -1),
  make_tuple(16, 16, &aom_sad16x16_neon_dotprod, -1),
  make_tuple(16, 8, &aom_sad16x8_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16_neon_dotprod, -1),
  make_tuple(32, 8, &aom_sad32x8_neon_dotprod, -1),
  make_tuple(16, 64, &aom_sad16x64_neon_dotprod, -1),
  make_tuple(16, 4, &aom_sad16x4_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADTest,
                         ::testing::ValuesIn(neon_dotprod_tests));

const SadMxNParam skip_neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_sad_skip_128x128_neon_dotprod, -1),
  make_tuple(128, 64, &aom_sad_skip_128x64_neon_dotprod, -1),
  make_tuple(64, 128, &aom_sad_skip_64x128_neon_dotprod, -1),
  make_tuple(64, 64, &aom_sad_skip_64x64_neon_dotprod, -1),
  make_tuple(64, 32, &aom_sad_skip_64x32_neon_dotprod, -1),
  make_tuple(32, 64, &aom_sad_skip_32x64_neon_dotprod, -1),
  make_tuple(32, 32, &aom_sad_skip_32x32_neon_dotprod, -1),
  make_tuple(32, 16, &aom_sad_skip_32x16_neon_dotprod, -1),
  make_tuple(16, 32, &aom_sad_skip_16x32_neon_dotprod, -1),
  make_tuple(16, 16, &aom_sad_skip_16x16_neon_dotprod, -1),
  make_tuple(16, 8, &aom_sad_skip_16x8_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad_skip_64x16_neon_dotprod, -1),
  make_tuple(32, 8, &aom_sad_skip_32x8_neon_dotprod, -1),
  make_tuple(16, 64, &aom_sad_skip_16x64_neon_dotprod, -1),
  make_tuple(16, 4, &aom_sad_skip_16x4_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADSkipTest,
                         ::testing::ValuesIn(skip_neon_dotprod_tests));

const SadMxNAvgParam avg_neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_sad128x128_avg_neon_dotprod, -1),
  make_tuple(128, 64, &aom_sad128x64_avg_neon_dotprod, -1),
  make_tuple(64, 128, &aom_sad64x128_avg_neon_dotprod, -1),
  make_tuple(64, 64, &aom_sad64x64_avg_neon_dotprod, -1),
  make_tuple(64, 32, &aom_sad64x32_avg_neon_dotprod, -1),
  make_tuple(32, 64, &aom_sad32x64_avg_neon_dotprod, -1),
  make_tuple(32, 32, &aom_sad32x32_avg_neon_dotprod, -1),
  make_tuple(32, 16, &aom_sad32x16_avg_neon_dotprod, -1),
  make_tuple(16, 32, &aom_sad16x32_avg_neon_dotprod, -1),
  make_tuple(16, 16, &aom_sad16x16_avg_neon_dotprod, -1),
  make_tuple(16, 8, &aom_sad16x8_avg_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16_avg_neon_dotprod, -1),
  make_tuple(32, 8, &aom_sad32x8_avg_neon_dotprod, -1),
  make_tuple(16, 64, &aom_sad16x64_avg_neon_dotprod, -1),
  make_tuple(16, 4, &aom_sad16x4_avg_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADavgTest,
                         ::testing::ValuesIn(avg_neon_dotprod_tests));

const DistWtdSadMxNAvgParam dist_wtd_avg_neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_dist_wtd_sad128x128_avg_neon_dotprod, -1),
  make_tuple(128, 64, &aom_dist_wtd_sad128x64_avg_neon_dotprod, -1),
  make_tuple(64, 128, &aom_dist_wtd_sad64x128_avg_neon_dotprod, -1),
  make_tuple(64, 64, &aom_dist_wtd_sad64x64_avg_neon_dotprod, -1),
  make_tuple(64, 32, &aom_dist_wtd_sad64x32_avg_neon_dotprod, -1),
  make_tuple(32, 64, &aom_dist_wtd_sad32x64_avg_neon_dotprod, -1),
  make_tuple(32, 32, &aom_dist_wtd_sad32x32_avg_neon_dotprod, -1),
  make_tuple(32, 16, &aom_dist_wtd_sad32x16_avg_neon_dotprod, -1),
  make_tuple(16, 32, &aom_dist_wtd_sad16x32_avg_neon_dotprod, -1),
  make_tuple(16, 16, &aom_dist_wtd_sad16x16_avg_neon_dotprod, -1),
  make_tuple(16, 8, &aom_dist_wtd_sad16x8_avg_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_dist_wtd_sad64x16_avg_neon_dotprod, -1),
  make_tuple(16, 64, &aom_dist_wtd_sad16x64_avg_neon_dotprod, -1),
  make_tuple(32, 8, &aom_dist_wtd_sad32x8_avg_neon_dotprod, -1),
  make_tuple(16, 4, &aom_dist_wtd_sad16x4_avg_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};

INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, DistWtdSADavgTest,
                         ::testing::ValuesIn(dist_wtd_avg_neon_dotprod_tests));

const SadMxNx4Param x3d_neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_sad128x128x3d_neon_dotprod, -1),
  make_tuple(128, 64, &aom_sad128x64x3d_neon_dotprod, -1),
  make_tuple(64, 128, &aom_sad64x128x3d_neon_dotprod, -1),
  make_tuple(64, 64, &aom_sad64x64x3d_neon_dotprod, -1),
  make_tuple(64, 32, &aom_sad64x32x3d_neon_dotprod, -1),
  make_tuple(32, 64, &aom_sad32x64x3d_neon_dotprod, -1),
  make_tuple(32, 32, &aom_sad32x32x3d_neon_dotprod, -1),
  make_tuple(32, 16, &aom_sad32x16x3d_neon_dotprod, -1),
  make_tuple(16, 32, &aom_sad16x32x3d_neon_dotprod, -1),
  make_tuple(16, 16, &aom_sad16x16x3d_neon_dotprod, -1),
  make_tuple(16, 8, &aom_sad16x8x3d_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16x3d_neon_dotprod, -1),
  make_tuple(32, 8, &aom_sad32x8x3d_neon_dotprod, -1),
  make_tuple(16, 64, &aom_sad16x64x3d_neon_dotprod, -1),
  make_tuple(16, 4, &aom_sad16x4x3d_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADx3Test,
                         ::testing::ValuesIn(x3d_neon_dotprod_tests));

const SadMxNx4Param x4d_neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_sad128x128x4d_neon_dotprod, -1),
  make_tuple(128, 64, &aom_sad128x64x4d_neon_dotprod, -1),
  make_tuple(64, 128, &aom_sad64x128x4d_neon_dotprod, -1),
  make_tuple(64, 64, &aom_sad64x64x4d_neon_dotprod, -1),
  make_tuple(64, 32, &aom_sad64x32x4d_neon_dotprod, -1),
  make_tuple(32, 64, &aom_sad32x64x4d_neon_dotprod, -1),
  make_tuple(32, 32, &aom_sad32x32x4d_neon_dotprod, -1),
  make_tuple(32, 16, &aom_sad32x16x4d_neon_dotprod, -1),
  make_tuple(16, 32, &aom_sad16x32x4d_neon_dotprod, -1),
  make_tuple(16, 16, &aom_sad16x16x4d_neon_dotprod, -1),
  make_tuple(16, 8, &aom_sad16x8x4d_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad64x16x4d_neon_dotprod, -1),
  make_tuple(32, 8, &aom_sad32x8x4d_neon_dotprod, -1),
  make_tuple(16, 64, &aom_sad16x64x4d_neon_dotprod, -1),
  make_tuple(16, 4, &aom_sad16x4x4d_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADx4Test,
                         ::testing::ValuesIn(x4d_neon_dotprod_tests));

const SadSkipMxNx4Param skip_x4d_neon_dotprod_tests[] = {
  make_tuple(128, 128, &aom_sad_skip_128x128x4d_neon_dotprod, -1),
  make_tuple(128, 64, &aom_sad_skip_128x64x4d_neon_dotprod, -1),
  make_tuple(64, 128, &aom_sad_skip_64x128x4d_neon_dotprod, -1),
  make_tuple(64, 64, &aom_sad_skip_64x64x4d_neon_dotprod, -1),
  make_tuple(64, 32, &aom_sad_skip_64x32x4d_neon_dotprod, -1),
  make_tuple(32, 64, &aom_sad_skip_32x64x4d_neon_dotprod, -1),
  make_tuple(32, 32, &aom_sad_skip_32x32x4d_neon_dotprod, -1),
  make_tuple(32, 16, &aom_sad_skip_32x16x4d_neon_dotprod, -1),
  make_tuple(16, 32, &aom_sad_skip_16x32x4d_neon_dotprod, -1),
  make_tuple(16, 16, &aom_sad_skip_16x16x4d_neon_dotprod, -1),
  make_tuple(16, 8, &aom_sad_skip_16x8x4d_neon_dotprod, -1),
#if !CONFIG_REALTIME_ONLY
  make_tuple(64, 16, &aom_sad_skip_64x16x4d_neon_dotprod, -1),
  make_tuple(32, 8, &aom_sad_skip_32x8x4d_neon_dotprod, -1),
  make_tuple(16, 64, &aom_sad_skip_16x64x4d_neon_dotprod, -1),
  make_tuple(16, 4, &aom_sad_skip_16x4x4d_neon_dotprod, -1),
#endif  // !CONFIG_REALTIME_ONLY
};
INSTANTIATE_TEST_SUITE_P(NEON_DOTPROD, SADSkipx4Test,
                         ::testing::ValuesIn(skip_x4d_neon_dotprod_tests));
#endif  // HAVE_NEON_DOTPROD

//------------------------------------------------------------------------------
// x86 functions
#if HAVE_SSE2
const SadMxNParam sse2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadSkipMxNParam skip_sse2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNAvgParam avg_sse2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNx4Param x4d_sse2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadSkipMxNx4Param skip_x4d_sse2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const DistWtdSadMxNAvgParam dist_wtd_avg_sse2_tests[] =;
INSTANTIATE_TEST_SUITE_P();
#endif  // HAVE_SSE2

#if HAVE_SSE3
// Only functions are x3, which do not have tests.
#endif  // HAVE_SSE3

#if HAVE_SSE4_1
// Only functions are x8, which do not have tests.
#endif  // HAVE_SSE4_1

#if HAVE_AVX2
const SadMxNParam avx2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadSkipMxNParam skip_avx2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNAvgParam avg_avx2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadSkipMxNx4Param skip_x4d_avx2_tests[] =;

INSTANTIATE_TEST_SUITE_P();

const SadMxNx4Param x4d_avx2_tests[] =;
INSTANTIATE_TEST_SUITE_P();

const SadMxNx4Param x3d_avx2_tests[] =;
INSTANTIATE_TEST_SUITE_P();
#endif  // HAVE_AVX2

}  // namespace