tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

obmc_variance_test.cc (26181B)


      1 /*
      2 * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
      3 *
      4 * This source code is subject to the terms of the BSD 2 Clause License and
      5 * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
      6 * was not distributed with this source code in the LICENSE file, you can
      7 * obtain it at www.aomedia.org/license/software. If the Alliance for Open
      8 * Media Patent License 1.0 was not distributed with this source code in the
      9 * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
     10 */
     11 
     12 #include "gtest/gtest.h"
     13 #include "test/acm_random.h"
     14 
     15 #include "test/function_equivalence_test.h"
     16 #include "test/register_state_check.h"
     17 
     18 #include "config/aom_config.h"
     19 #include "config/aom_dsp_rtcd.h"
     20 
     21 #include "aom/aom_integer.h"
     22 
     23 #define MAX_SB_SQUARE (MAX_SB_SIZE * MAX_SB_SIZE)
     24 
     25 using libaom_test::ACMRandom;
     26 using libaom_test::FunctionEquivalenceTest;
     27 
     28 namespace {
     29 
     30 static const int kIterations = 1000;
     31 static const int kMaskMax = 64;
     32 
     33 using ObmcVarF = unsigned int (*)(const uint8_t *pre, int pre_stride,
     34                                  const int32_t *wsrc, const int32_t *mask,
     35                                  unsigned int *sse);
     36 using TestFuncs = libaom_test::FuncParam<ObmcVarF>;
     37 
     38 ////////////////////////////////////////////////////////////////////////////////
     39 // 8 bit
     40 ////////////////////////////////////////////////////////////////////////////////
     41 
     42 class ObmcVarianceTest : public FunctionEquivalenceTest<ObmcVarF> {};
     43 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ObmcVarianceTest);
     44 
     45 TEST_P(ObmcVarianceTest, RandomValues) {
     46  DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
     47  DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
     48  DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
     49 
     50  for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
     51    const int pre_stride = this->rng_(MAX_SB_SIZE + 1);
     52 
     53    for (int i = 0; i < MAX_SB_SQUARE; ++i) {
     54      pre[i] = this->rng_.Rand8();
     55      wsrc[i] = this->rng_.Rand8() * this->rng_(kMaskMax * kMaskMax + 1);
     56      mask[i] = this->rng_(kMaskMax * kMaskMax + 1);
     57    }
     58 
     59    unsigned int ref_sse, tst_sse;
     60    const unsigned int ref_res =
     61        params_.ref_func(pre, pre_stride, wsrc, mask, &ref_sse);
     62    unsigned int tst_res;
     63    API_REGISTER_STATE_CHECK(
     64        tst_res = params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse));
     65 
     66    ASSERT_EQ(ref_res, tst_res);
     67    ASSERT_EQ(ref_sse, tst_sse);
     68  }
     69 }
     70 
     71 TEST_P(ObmcVarianceTest, ExtremeValues) {
     72  DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
     73  DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
     74  DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
     75 
     76  for (int iter = 0; iter < MAX_SB_SIZE && !HasFatalFailure(); ++iter) {
     77    const int pre_stride = iter;
     78 
     79    for (int i = 0; i < MAX_SB_SQUARE; ++i) {
     80      pre[i] = UINT8_MAX;
     81      wsrc[i] = UINT8_MAX * kMaskMax * kMaskMax;
     82      mask[i] = kMaskMax * kMaskMax;
     83    }
     84 
     85    unsigned int ref_sse, tst_sse;
     86    const unsigned int ref_res =
     87        params_.ref_func(pre, pre_stride, wsrc, mask, &ref_sse);
     88    unsigned int tst_res;
     89    API_REGISTER_STATE_CHECK(
     90        tst_res = params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse));
     91 
     92    ASSERT_EQ(ref_res, tst_res);
     93    ASSERT_EQ(ref_sse, tst_sse);
     94  }
     95 }
     96 
     97 TEST_P(ObmcVarianceTest, DISABLED_Speed) {
     98  DECLARE_ALIGNED(32, uint8_t, pre[MAX_SB_SQUARE]);
     99  DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
    100  DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
    101 
    102  const int pre_stride = this->rng_(MAX_SB_SIZE + 1);
    103 
    104  for (int i = 0; i < MAX_SB_SQUARE; ++i) {
    105    pre[i] = this->rng_.Rand8();
    106    wsrc[i] = this->rng_.Rand8() * this->rng_(kMaskMax * kMaskMax + 1);
    107    mask[i] = this->rng_(kMaskMax * kMaskMax + 1);
    108  }
    109 
    110  const int num_loops = 1000000;
    111  unsigned int ref_sse, tst_sse;
    112  aom_usec_timer ref_timer, test_timer;
    113 
    114  aom_usec_timer_start(&ref_timer);
    115  for (int i = 0; i < num_loops; ++i) {
    116    params_.ref_func(pre, pre_stride, wsrc, mask, &ref_sse);
    117  }
    118  aom_usec_timer_mark(&ref_timer);
    119  const int elapsed_time_c =
    120      static_cast<int>(aom_usec_timer_elapsed(&ref_timer));
    121 
    122  aom_usec_timer_start(&test_timer);
    123  for (int i = 0; i < num_loops; ++i) {
    124    params_.tst_func(pre, pre_stride, wsrc, mask, &tst_sse);
    125  }
    126  aom_usec_timer_mark(&test_timer);
    127  const int elapsed_time_simd =
    128      static_cast<int>(aom_usec_timer_elapsed(&test_timer));
    129 
    130  printf("c_time=%d \t simd_time=%d \t gain=%f \n", elapsed_time_c,
    131         elapsed_time_simd,
    132         static_cast<double>(elapsed_time_c) / elapsed_time_simd);
    133 }
    134 
    135 #if HAVE_SSE4_1
    136 const ObmcVarianceTest::ParamType sse4_functions[] = {
    137  TestFuncs(aom_obmc_variance128x128_c, aom_obmc_variance128x128_sse4_1),
    138  TestFuncs(aom_obmc_variance128x64_c, aom_obmc_variance128x64_sse4_1),
    139  TestFuncs(aom_obmc_variance64x128_c, aom_obmc_variance64x128_sse4_1),
    140  TestFuncs(aom_obmc_variance64x64_c, aom_obmc_variance64x64_sse4_1),
    141  TestFuncs(aom_obmc_variance64x32_c, aom_obmc_variance64x32_sse4_1),
    142  TestFuncs(aom_obmc_variance32x64_c, aom_obmc_variance32x64_sse4_1),
    143  TestFuncs(aom_obmc_variance32x32_c, aom_obmc_variance32x32_sse4_1),
    144  TestFuncs(aom_obmc_variance32x16_c, aom_obmc_variance32x16_sse4_1),
    145  TestFuncs(aom_obmc_variance16x32_c, aom_obmc_variance16x32_sse4_1),
    146  TestFuncs(aom_obmc_variance16x16_c, aom_obmc_variance16x16_sse4_1),
    147  TestFuncs(aom_obmc_variance16x8_c, aom_obmc_variance16x8_sse4_1),
    148  TestFuncs(aom_obmc_variance8x16_c, aom_obmc_variance8x16_sse4_1),
    149  TestFuncs(aom_obmc_variance8x8_c, aom_obmc_variance8x8_sse4_1),
    150  TestFuncs(aom_obmc_variance8x4_c, aom_obmc_variance8x4_sse4_1),
    151  TestFuncs(aom_obmc_variance4x8_c, aom_obmc_variance4x8_sse4_1),
    152  TestFuncs(aom_obmc_variance4x4_c, aom_obmc_variance4x4_sse4_1),
    153 
    154  TestFuncs(aom_obmc_variance64x16_c, aom_obmc_variance64x16_sse4_1),
    155  TestFuncs(aom_obmc_variance16x64_c, aom_obmc_variance16x64_sse4_1),
    156  TestFuncs(aom_obmc_variance32x8_c, aom_obmc_variance32x8_sse4_1),
    157  TestFuncs(aom_obmc_variance8x32_c, aom_obmc_variance8x32_sse4_1),
    158  TestFuncs(aom_obmc_variance16x4_c, aom_obmc_variance16x4_sse4_1),
    159  TestFuncs(aom_obmc_variance4x16_c, aom_obmc_variance4x16_sse4_1),
    160 };
    161 
    162 INSTANTIATE_TEST_SUITE_P(SSE4_1, ObmcVarianceTest,
    163                         ::testing::ValuesIn(sse4_functions));
    164 #endif  // HAVE_SSE4_1
    165 
    166 #if HAVE_AVX2
    167 const ObmcVarianceTest::ParamType avx2_functions[] = {
    168  TestFuncs(aom_obmc_variance128x128_c, aom_obmc_variance128x128_avx2),
    169  TestFuncs(aom_obmc_variance128x64_c, aom_obmc_variance128x64_avx2),
    170  TestFuncs(aom_obmc_variance64x128_c, aom_obmc_variance64x128_avx2),
    171  TestFuncs(aom_obmc_variance64x64_c, aom_obmc_variance64x64_avx2),
    172  TestFuncs(aom_obmc_variance64x32_c, aom_obmc_variance64x32_avx2),
    173  TestFuncs(aom_obmc_variance32x64_c, aom_obmc_variance32x64_avx2),
    174  TestFuncs(aom_obmc_variance32x32_c, aom_obmc_variance32x32_avx2),
    175  TestFuncs(aom_obmc_variance32x16_c, aom_obmc_variance32x16_avx2),
    176  TestFuncs(aom_obmc_variance16x32_c, aom_obmc_variance16x32_avx2),
    177  TestFuncs(aom_obmc_variance16x16_c, aom_obmc_variance16x16_avx2),
    178  TestFuncs(aom_obmc_variance16x8_c, aom_obmc_variance16x8_avx2),
    179  TestFuncs(aom_obmc_variance8x16_c, aom_obmc_variance8x16_avx2),
    180  TestFuncs(aom_obmc_variance8x8_c, aom_obmc_variance8x8_avx2),
    181  TestFuncs(aom_obmc_variance8x4_c, aom_obmc_variance8x4_avx2),
    182  TestFuncs(aom_obmc_variance4x8_c, aom_obmc_variance4x8_avx2),
    183  TestFuncs(aom_obmc_variance4x4_c, aom_obmc_variance4x4_avx2),
    184 
    185  TestFuncs(aom_obmc_variance64x16_c, aom_obmc_variance64x16_avx2),
    186  TestFuncs(aom_obmc_variance16x64_c, aom_obmc_variance16x64_avx2),
    187  TestFuncs(aom_obmc_variance32x8_c, aom_obmc_variance32x8_avx2),
    188  TestFuncs(aom_obmc_variance8x32_c, aom_obmc_variance8x32_avx2),
    189  TestFuncs(aom_obmc_variance16x4_c, aom_obmc_variance16x4_avx2),
    190  TestFuncs(aom_obmc_variance4x16_c, aom_obmc_variance4x16_avx2),
    191 };
    192 
    193 INSTANTIATE_TEST_SUITE_P(AVX2, ObmcVarianceTest,
    194                         ::testing::ValuesIn(avx2_functions));
    195 #endif  // HAVE_AVX2
    196 
    197 #if HAVE_NEON
    198 const ObmcVarianceTest::ParamType neon_functions[] = {
    199  TestFuncs(aom_obmc_variance128x128_c, aom_obmc_variance128x128_neon),
    200  TestFuncs(aom_obmc_variance128x64_c, aom_obmc_variance128x64_neon),
    201  TestFuncs(aom_obmc_variance64x128_c, aom_obmc_variance64x128_neon),
    202  TestFuncs(aom_obmc_variance64x64_c, aom_obmc_variance64x64_neon),
    203  TestFuncs(aom_obmc_variance64x32_c, aom_obmc_variance64x32_neon),
    204  TestFuncs(aom_obmc_variance32x64_c, aom_obmc_variance32x64_neon),
    205  TestFuncs(aom_obmc_variance32x32_c, aom_obmc_variance32x32_neon),
    206  TestFuncs(aom_obmc_variance32x16_c, aom_obmc_variance32x16_neon),
    207  TestFuncs(aom_obmc_variance16x32_c, aom_obmc_variance16x32_neon),
    208  TestFuncs(aom_obmc_variance16x16_c, aom_obmc_variance16x16_neon),
    209  TestFuncs(aom_obmc_variance16x8_c, aom_obmc_variance16x8_neon),
    210  TestFuncs(aom_obmc_variance8x16_c, aom_obmc_variance8x16_neon),
    211  TestFuncs(aom_obmc_variance8x8_c, aom_obmc_variance8x8_neon),
    212  TestFuncs(aom_obmc_variance8x4_c, aom_obmc_variance8x4_neon),
    213  TestFuncs(aom_obmc_variance4x8_c, aom_obmc_variance4x8_neon),
    214  TestFuncs(aom_obmc_variance4x4_c, aom_obmc_variance4x4_neon),
    215 
    216  TestFuncs(aom_obmc_variance64x16_c, aom_obmc_variance64x16_neon),
    217  TestFuncs(aom_obmc_variance16x64_c, aom_obmc_variance16x64_neon),
    218  TestFuncs(aom_obmc_variance32x8_c, aom_obmc_variance32x8_neon),
    219  TestFuncs(aom_obmc_variance8x32_c, aom_obmc_variance8x32_neon),
    220  TestFuncs(aom_obmc_variance16x4_c, aom_obmc_variance16x4_neon),
    221  TestFuncs(aom_obmc_variance4x16_c, aom_obmc_variance4x16_neon),
    222 };
    223 
    224 INSTANTIATE_TEST_SUITE_P(NEON, ObmcVarianceTest,
    225                         ::testing::ValuesIn(neon_functions));
    226 #endif  // HAVE_NEON
    227 
    228 ////////////////////////////////////////////////////////////////////////////////
    229 // High bit-depth
    230 ////////////////////////////////////////////////////////////////////////////////
    231 #if CONFIG_AV1_HIGHBITDEPTH && !CONFIG_REALTIME_ONLY
    232 class ObmcVarianceHBDTest : public FunctionEquivalenceTest<ObmcVarF> {};
    233 GTEST_ALLOW_UNINSTANTIATED_PARAMETERIZED_TEST(ObmcVarianceHBDTest);
    234 
    235 TEST_P(ObmcVarianceHBDTest, RandomValues) {
    236  DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]);
    237  DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
    238  DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
    239 
    240  for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
    241    const int pre_stride = this->rng_(MAX_SB_SIZE + 1);
    242 
    243    for (int i = 0; i < MAX_SB_SQUARE; ++i) {
    244      pre[i] = this->rng_(1 << params_.bit_depth);
    245      wsrc[i] = this->rng_(1 << params_.bit_depth) *
    246                this->rng_(kMaskMax * kMaskMax + 1);
    247      mask[i] = this->rng_(kMaskMax * kMaskMax + 1);
    248    }
    249 
    250    unsigned int ref_sse, tst_sse;
    251    const unsigned int ref_res = params_.ref_func(
    252        CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask, &ref_sse);
    253    unsigned int tst_res;
    254    API_REGISTER_STATE_CHECK(tst_res = params_.tst_func(CONVERT_TO_BYTEPTR(pre),
    255                                                        pre_stride, wsrc, mask,
    256                                                        &tst_sse));
    257 
    258    ASSERT_EQ(ref_res, tst_res);
    259    ASSERT_EQ(ref_sse, tst_sse);
    260  }
    261 }
    262 
    263 TEST_P(ObmcVarianceHBDTest, ExtremeValues) {
    264  DECLARE_ALIGNED(32, uint16_t, pre[MAX_SB_SQUARE]);
    265  DECLARE_ALIGNED(32, int32_t, wsrc[MAX_SB_SQUARE]);
    266  DECLARE_ALIGNED(32, int32_t, mask[MAX_SB_SQUARE]);
    267 
    268  for (int iter = 0; iter < MAX_SB_SIZE && !HasFatalFailure(); ++iter) {
    269    const int pre_stride = iter;
    270 
    271    for (int i = 0; i < MAX_SB_SQUARE; ++i) {
    272      pre[i] = (1 << params_.bit_depth) - 1;
    273      wsrc[i] = ((1 << params_.bit_depth) - 1) * kMaskMax * kMaskMax;
    274      mask[i] = kMaskMax * kMaskMax;
    275    }
    276 
    277    unsigned int ref_sse, tst_sse;
    278    const unsigned int ref_res = params_.ref_func(
    279        CONVERT_TO_BYTEPTR(pre), pre_stride, wsrc, mask, &ref_sse);
    280    unsigned int tst_res;
    281    API_REGISTER_STATE_CHECK(tst_res = params_.tst_func(CONVERT_TO_BYTEPTR(pre),
    282                                                        pre_stride, wsrc, mask,
    283                                                        &tst_sse));
    284 
    285    ASSERT_EQ(ref_res, tst_res);
    286    ASSERT_EQ(ref_sse, tst_sse);
    287  }
    288 }
    289 
    290 #if HAVE_NEON
    291 ObmcVarianceHBDTest::ParamType neon_functions_hbd[] = {
    292  TestFuncs(aom_highbd_8_obmc_variance128x128_c,
    293            aom_highbd_8_obmc_variance128x128_neon, 8),
    294  TestFuncs(aom_highbd_8_obmc_variance128x64_c,
    295            aom_highbd_8_obmc_variance128x64_neon, 8),
    296  TestFuncs(aom_highbd_8_obmc_variance64x128_c,
    297            aom_highbd_8_obmc_variance64x128_neon, 8),
    298  TestFuncs(aom_highbd_8_obmc_variance64x64_c,
    299            aom_highbd_8_obmc_variance64x64_neon, 8),
    300  TestFuncs(aom_highbd_8_obmc_variance64x32_c,
    301            aom_highbd_8_obmc_variance64x32_neon, 8),
    302  TestFuncs(aom_highbd_8_obmc_variance32x64_c,
    303            aom_highbd_8_obmc_variance32x64_neon, 8),
    304  TestFuncs(aom_highbd_8_obmc_variance32x32_c,
    305            aom_highbd_8_obmc_variance32x32_neon, 8),
    306  TestFuncs(aom_highbd_8_obmc_variance32x16_c,
    307            aom_highbd_8_obmc_variance32x16_neon, 8),
    308  TestFuncs(aom_highbd_8_obmc_variance16x32_c,
    309            aom_highbd_8_obmc_variance16x32_neon, 8),
    310  TestFuncs(aom_highbd_8_obmc_variance16x16_c,
    311            aom_highbd_8_obmc_variance16x16_neon, 8),
    312  TestFuncs(aom_highbd_8_obmc_variance16x8_c,
    313            aom_highbd_8_obmc_variance16x8_neon, 8),
    314  TestFuncs(aom_highbd_8_obmc_variance8x16_c,
    315            aom_highbd_8_obmc_variance8x16_neon, 8),
    316  TestFuncs(aom_highbd_8_obmc_variance8x8_c, aom_highbd_8_obmc_variance8x8_neon,
    317            8),
    318  TestFuncs(aom_highbd_8_obmc_variance8x4_c, aom_highbd_8_obmc_variance8x4_neon,
    319            8),
    320  TestFuncs(aom_highbd_8_obmc_variance4x8_c, aom_highbd_8_obmc_variance4x8_neon,
    321            8),
    322  TestFuncs(aom_highbd_8_obmc_variance4x4_c, aom_highbd_8_obmc_variance4x4_neon,
    323            8),
    324  TestFuncs(aom_highbd_10_obmc_variance128x128_c,
    325            aom_highbd_10_obmc_variance128x128_neon, 10),
    326  TestFuncs(aom_highbd_10_obmc_variance128x64_c,
    327            aom_highbd_10_obmc_variance128x64_neon, 10),
    328  TestFuncs(aom_highbd_10_obmc_variance64x128_c,
    329            aom_highbd_10_obmc_variance64x128_neon, 10),
    330  TestFuncs(aom_highbd_10_obmc_variance64x64_c,
    331            aom_highbd_10_obmc_variance64x64_neon, 10),
    332  TestFuncs(aom_highbd_10_obmc_variance64x32_c,
    333            aom_highbd_10_obmc_variance64x32_neon, 10),
    334  TestFuncs(aom_highbd_10_obmc_variance32x64_c,
    335            aom_highbd_10_obmc_variance32x64_neon, 10),
    336  TestFuncs(aom_highbd_10_obmc_variance32x32_c,
    337            aom_highbd_10_obmc_variance32x32_neon, 10),
    338  TestFuncs(aom_highbd_10_obmc_variance32x16_c,
    339            aom_highbd_10_obmc_variance32x16_neon, 10),
    340  TestFuncs(aom_highbd_10_obmc_variance16x32_c,
    341            aom_highbd_10_obmc_variance16x32_neon, 10),
    342  TestFuncs(aom_highbd_10_obmc_variance16x16_c,
    343            aom_highbd_10_obmc_variance16x16_neon, 10),
    344  TestFuncs(aom_highbd_10_obmc_variance16x8_c,
    345            aom_highbd_10_obmc_variance16x8_neon, 10),
    346  TestFuncs(aom_highbd_10_obmc_variance8x16_c,
    347            aom_highbd_10_obmc_variance8x16_neon, 10),
    348  TestFuncs(aom_highbd_10_obmc_variance8x8_c,
    349            aom_highbd_10_obmc_variance8x8_neon, 10),
    350  TestFuncs(aom_highbd_10_obmc_variance8x4_c,
    351            aom_highbd_10_obmc_variance8x4_neon, 10),
    352  TestFuncs(aom_highbd_10_obmc_variance4x8_c,
    353            aom_highbd_10_obmc_variance4x8_neon, 10),
    354  TestFuncs(aom_highbd_10_obmc_variance4x4_c,
    355            aom_highbd_10_obmc_variance4x4_neon, 10),
    356  TestFuncs(aom_highbd_12_obmc_variance128x128_c,
    357            aom_highbd_12_obmc_variance128x128_neon, 12),
    358  TestFuncs(aom_highbd_12_obmc_variance128x64_c,
    359            aom_highbd_12_obmc_variance128x64_neon, 12),
    360  TestFuncs(aom_highbd_12_obmc_variance64x128_c,
    361            aom_highbd_12_obmc_variance64x128_neon, 12),
    362  TestFuncs(aom_highbd_12_obmc_variance64x64_c,
    363            aom_highbd_12_obmc_variance64x64_neon, 12),
    364  TestFuncs(aom_highbd_12_obmc_variance64x32_c,
    365            aom_highbd_12_obmc_variance64x32_neon, 12),
    366  TestFuncs(aom_highbd_12_obmc_variance32x64_c,
    367            aom_highbd_12_obmc_variance32x64_neon, 12),
    368  TestFuncs(aom_highbd_12_obmc_variance32x32_c,
    369            aom_highbd_12_obmc_variance32x32_neon, 12),
    370  TestFuncs(aom_highbd_12_obmc_variance32x16_c,
    371            aom_highbd_12_obmc_variance32x16_neon, 12),
    372  TestFuncs(aom_highbd_12_obmc_variance16x32_c,
    373            aom_highbd_12_obmc_variance16x32_neon, 12),
    374  TestFuncs(aom_highbd_12_obmc_variance16x16_c,
    375            aom_highbd_12_obmc_variance16x16_neon, 12),
    376  TestFuncs(aom_highbd_12_obmc_variance16x8_c,
    377            aom_highbd_12_obmc_variance16x8_neon, 12),
    378  TestFuncs(aom_highbd_12_obmc_variance8x16_c,
    379            aom_highbd_12_obmc_variance8x16_neon, 12),
    380  TestFuncs(aom_highbd_12_obmc_variance8x8_c,
    381            aom_highbd_12_obmc_variance8x8_neon, 12),
    382  TestFuncs(aom_highbd_12_obmc_variance8x4_c,
    383            aom_highbd_12_obmc_variance8x4_neon, 12),
    384  TestFuncs(aom_highbd_12_obmc_variance4x8_c,
    385            aom_highbd_12_obmc_variance4x8_neon, 12),
    386  TestFuncs(aom_highbd_12_obmc_variance4x4_c,
    387            aom_highbd_12_obmc_variance4x4_neon, 12),
    388  TestFuncs(aom_highbd_8_obmc_variance64x16_c,
    389            aom_highbd_8_obmc_variance64x16_neon, 8),
    390  TestFuncs(aom_highbd_8_obmc_variance16x64_c,
    391            aom_highbd_8_obmc_variance16x64_neon, 8),
    392  TestFuncs(aom_highbd_8_obmc_variance32x8_c,
    393            aom_highbd_8_obmc_variance32x8_neon, 8),
    394  TestFuncs(aom_highbd_8_obmc_variance8x32_c,
    395            aom_highbd_8_obmc_variance8x32_neon, 8),
    396  TestFuncs(aom_highbd_8_obmc_variance16x4_c,
    397            aom_highbd_8_obmc_variance16x4_neon, 8),
    398  TestFuncs(aom_highbd_8_obmc_variance4x16_c,
    399            aom_highbd_8_obmc_variance4x16_neon, 8),
    400  TestFuncs(aom_highbd_10_obmc_variance64x16_c,
    401            aom_highbd_10_obmc_variance64x16_neon, 10),
    402  TestFuncs(aom_highbd_10_obmc_variance16x64_c,
    403            aom_highbd_10_obmc_variance16x64_neon, 10),
    404  TestFuncs(aom_highbd_10_obmc_variance32x8_c,
    405            aom_highbd_10_obmc_variance32x8_neon, 10),
    406  TestFuncs(aom_highbd_10_obmc_variance8x32_c,
    407            aom_highbd_10_obmc_variance8x32_neon, 10),
    408  TestFuncs(aom_highbd_10_obmc_variance16x4_c,
    409            aom_highbd_10_obmc_variance16x4_neon, 10),
    410  TestFuncs(aom_highbd_10_obmc_variance4x16_c,
    411            aom_highbd_10_obmc_variance4x16_neon, 10),
    412  TestFuncs(aom_highbd_12_obmc_variance64x16_c,
    413            aom_highbd_12_obmc_variance64x16_neon, 12),
    414  TestFuncs(aom_highbd_12_obmc_variance16x64_c,
    415            aom_highbd_12_obmc_variance16x64_neon, 12),
    416  TestFuncs(aom_highbd_12_obmc_variance32x8_c,
    417            aom_highbd_12_obmc_variance32x8_neon, 12),
    418  TestFuncs(aom_highbd_12_obmc_variance8x32_c,
    419            aom_highbd_12_obmc_variance8x32_neon, 12),
    420  TestFuncs(aom_highbd_12_obmc_variance16x4_c,
    421            aom_highbd_12_obmc_variance16x4_neon, 12),
    422  TestFuncs(aom_highbd_12_obmc_variance4x16_c,
    423            aom_highbd_12_obmc_variance4x16_neon, 12),
    424 };
    425 
    426 INSTANTIATE_TEST_SUITE_P(NEON, ObmcVarianceHBDTest,
    427                         ::testing::ValuesIn(neon_functions_hbd));
    428 #endif  // HAVE_NEON
    429 
    430 #if HAVE_SSE4_1
    431 ObmcVarianceHBDTest::ParamType sse4_functions_hbd[] = {
    432  TestFuncs(aom_highbd_8_obmc_variance128x128_c,
    433            aom_highbd_8_obmc_variance128x128_sse4_1, 8),
    434  TestFuncs(aom_highbd_8_obmc_variance128x64_c,
    435            aom_highbd_8_obmc_variance128x64_sse4_1, 8),
    436  TestFuncs(aom_highbd_8_obmc_variance64x128_c,
    437            aom_highbd_8_obmc_variance64x128_sse4_1, 8),
    438  TestFuncs(aom_highbd_8_obmc_variance64x64_c,
    439            aom_highbd_8_obmc_variance64x64_sse4_1, 8),
    440  TestFuncs(aom_highbd_8_obmc_variance64x32_c,
    441            aom_highbd_8_obmc_variance64x32_sse4_1, 8),
    442  TestFuncs(aom_highbd_8_obmc_variance32x64_c,
    443            aom_highbd_8_obmc_variance32x64_sse4_1, 8),
    444  TestFuncs(aom_highbd_8_obmc_variance32x32_c,
    445            aom_highbd_8_obmc_variance32x32_sse4_1, 8),
    446  TestFuncs(aom_highbd_8_obmc_variance32x16_c,
    447            aom_highbd_8_obmc_variance32x16_sse4_1, 8),
    448  TestFuncs(aom_highbd_8_obmc_variance16x32_c,
    449            aom_highbd_8_obmc_variance16x32_sse4_1, 8),
    450  TestFuncs(aom_highbd_8_obmc_variance16x16_c,
    451            aom_highbd_8_obmc_variance16x16_sse4_1, 8),
    452  TestFuncs(aom_highbd_8_obmc_variance16x8_c,
    453            aom_highbd_8_obmc_variance16x8_sse4_1, 8),
    454  TestFuncs(aom_highbd_8_obmc_variance8x16_c,
    455            aom_highbd_8_obmc_variance8x16_sse4_1, 8),
    456  TestFuncs(aom_highbd_8_obmc_variance8x8_c,
    457            aom_highbd_8_obmc_variance8x8_sse4_1, 8),
    458  TestFuncs(aom_highbd_8_obmc_variance8x4_c,
    459            aom_highbd_8_obmc_variance8x4_sse4_1, 8),
    460  TestFuncs(aom_highbd_8_obmc_variance4x8_c,
    461            aom_highbd_8_obmc_variance4x8_sse4_1, 8),
    462  TestFuncs(aom_highbd_8_obmc_variance4x4_c,
    463            aom_highbd_8_obmc_variance4x4_sse4_1, 8),
    464  TestFuncs(aom_highbd_10_obmc_variance128x128_c,
    465            aom_highbd_10_obmc_variance128x128_sse4_1, 10),
    466  TestFuncs(aom_highbd_10_obmc_variance128x64_c,
    467            aom_highbd_10_obmc_variance128x64_sse4_1, 10),
    468  TestFuncs(aom_highbd_10_obmc_variance64x128_c,
    469            aom_highbd_10_obmc_variance64x128_sse4_1, 10),
    470  TestFuncs(aom_highbd_10_obmc_variance64x64_c,
    471            aom_highbd_10_obmc_variance64x64_sse4_1, 10),
    472  TestFuncs(aom_highbd_10_obmc_variance64x32_c,
    473            aom_highbd_10_obmc_variance64x32_sse4_1, 10),
    474  TestFuncs(aom_highbd_10_obmc_variance32x64_c,
    475            aom_highbd_10_obmc_variance32x64_sse4_1, 10),
    476  TestFuncs(aom_highbd_10_obmc_variance32x32_c,
    477            aom_highbd_10_obmc_variance32x32_sse4_1, 10),
    478  TestFuncs(aom_highbd_10_obmc_variance32x16_c,
    479            aom_highbd_10_obmc_variance32x16_sse4_1, 10),
    480  TestFuncs(aom_highbd_10_obmc_variance16x32_c,
    481            aom_highbd_10_obmc_variance16x32_sse4_1, 10),
    482  TestFuncs(aom_highbd_10_obmc_variance16x16_c,
    483            aom_highbd_10_obmc_variance16x16_sse4_1, 10),
    484  TestFuncs(aom_highbd_10_obmc_variance16x8_c,
    485            aom_highbd_10_obmc_variance16x8_sse4_1, 10),
    486  TestFuncs(aom_highbd_10_obmc_variance8x16_c,
    487            aom_highbd_10_obmc_variance8x16_sse4_1, 10),
    488  TestFuncs(aom_highbd_10_obmc_variance8x8_c,
    489            aom_highbd_10_obmc_variance8x8_sse4_1, 10),
    490  TestFuncs(aom_highbd_10_obmc_variance8x4_c,
    491            aom_highbd_10_obmc_variance8x4_sse4_1, 10),
    492  TestFuncs(aom_highbd_10_obmc_variance4x8_c,
    493            aom_highbd_10_obmc_variance4x8_sse4_1, 10),
    494  TestFuncs(aom_highbd_10_obmc_variance4x4_c,
    495            aom_highbd_10_obmc_variance4x4_sse4_1, 10),
    496  TestFuncs(aom_highbd_12_obmc_variance128x128_c,
    497            aom_highbd_12_obmc_variance128x128_sse4_1, 12),
    498  TestFuncs(aom_highbd_12_obmc_variance128x64_c,
    499            aom_highbd_12_obmc_variance128x64_sse4_1, 12),
    500  TestFuncs(aom_highbd_12_obmc_variance64x128_c,
    501            aom_highbd_12_obmc_variance64x128_sse4_1, 12),
    502  TestFuncs(aom_highbd_12_obmc_variance64x64_c,
    503            aom_highbd_12_obmc_variance64x64_sse4_1, 12),
    504  TestFuncs(aom_highbd_12_obmc_variance64x32_c,
    505            aom_highbd_12_obmc_variance64x32_sse4_1, 12),
    506  TestFuncs(aom_highbd_12_obmc_variance32x64_c,
    507            aom_highbd_12_obmc_variance32x64_sse4_1, 12),
    508  TestFuncs(aom_highbd_12_obmc_variance32x32_c,
    509            aom_highbd_12_obmc_variance32x32_sse4_1, 12),
    510  TestFuncs(aom_highbd_12_obmc_variance32x16_c,
    511            aom_highbd_12_obmc_variance32x16_sse4_1, 12),
    512  TestFuncs(aom_highbd_12_obmc_variance16x32_c,
    513            aom_highbd_12_obmc_variance16x32_sse4_1, 12),
    514  TestFuncs(aom_highbd_12_obmc_variance16x16_c,
    515            aom_highbd_12_obmc_variance16x16_sse4_1, 12),
    516  TestFuncs(aom_highbd_12_obmc_variance16x8_c,
    517            aom_highbd_12_obmc_variance16x8_sse4_1, 12),
    518  TestFuncs(aom_highbd_12_obmc_variance8x16_c,
    519            aom_highbd_12_obmc_variance8x16_sse4_1, 12),
    520  TestFuncs(aom_highbd_12_obmc_variance8x8_c,
    521            aom_highbd_12_obmc_variance8x8_sse4_1, 12),
    522  TestFuncs(aom_highbd_12_obmc_variance8x4_c,
    523            aom_highbd_12_obmc_variance8x4_sse4_1, 12),
    524  TestFuncs(aom_highbd_12_obmc_variance4x8_c,
    525            aom_highbd_12_obmc_variance4x8_sse4_1, 12),
    526  TestFuncs(aom_highbd_12_obmc_variance4x4_c,
    527            aom_highbd_12_obmc_variance4x4_sse4_1, 12),
    528 
    529  TestFuncs(aom_highbd_8_obmc_variance64x16_c,
    530            aom_highbd_8_obmc_variance64x16_sse4_1, 8),
    531  TestFuncs(aom_highbd_8_obmc_variance16x64_c,
    532            aom_highbd_8_obmc_variance16x64_sse4_1, 8),
    533  TestFuncs(aom_highbd_8_obmc_variance32x8_c,
    534            aom_highbd_8_obmc_variance32x8_sse4_1, 8),
    535  TestFuncs(aom_highbd_8_obmc_variance8x32_c,
    536            aom_highbd_8_obmc_variance8x32_sse4_1, 8),
    537  TestFuncs(aom_highbd_8_obmc_variance16x4_c,
    538            aom_highbd_8_obmc_variance16x4_sse4_1, 8),
    539  TestFuncs(aom_highbd_8_obmc_variance4x16_c,
    540            aom_highbd_8_obmc_variance4x16_sse4_1, 8),
    541  TestFuncs(aom_highbd_10_obmc_variance64x16_c,
    542            aom_highbd_10_obmc_variance64x16_sse4_1, 10),
    543  TestFuncs(aom_highbd_10_obmc_variance16x64_c,
    544            aom_highbd_10_obmc_variance16x64_sse4_1, 10),
    545  TestFuncs(aom_highbd_10_obmc_variance32x8_c,
    546            aom_highbd_10_obmc_variance32x8_sse4_1, 10),
    547  TestFuncs(aom_highbd_10_obmc_variance8x32_c,
    548            aom_highbd_10_obmc_variance8x32_sse4_1, 10),
    549  TestFuncs(aom_highbd_10_obmc_variance16x4_c,
    550            aom_highbd_10_obmc_variance16x4_sse4_1, 10),
    551  TestFuncs(aom_highbd_10_obmc_variance4x16_c,
    552            aom_highbd_10_obmc_variance4x16_sse4_1, 10),
    553  TestFuncs(aom_highbd_12_obmc_variance64x16_c,
    554            aom_highbd_12_obmc_variance64x16_sse4_1, 12),
    555  TestFuncs(aom_highbd_12_obmc_variance16x64_c,
    556            aom_highbd_12_obmc_variance16x64_sse4_1, 12),
    557  TestFuncs(aom_highbd_12_obmc_variance32x8_c,
    558            aom_highbd_12_obmc_variance32x8_sse4_1, 12),
    559  TestFuncs(aom_highbd_12_obmc_variance8x32_c,
    560            aom_highbd_12_obmc_variance8x32_sse4_1, 12),
    561  TestFuncs(aom_highbd_12_obmc_variance16x4_c,
    562            aom_highbd_12_obmc_variance16x4_sse4_1, 12),
    563  TestFuncs(aom_highbd_12_obmc_variance4x16_c,
    564            aom_highbd_12_obmc_variance4x16_sse4_1, 12),
    565 };
    566 
    567 INSTANTIATE_TEST_SUITE_P(SSE4_1, ObmcVarianceHBDTest,
    568                         ::testing::ValuesIn(sse4_functions_hbd));
    569 #endif  // HAVE_SSE4_1
    570 #endif  // CONFIG_AV1_HIGHBITDEPTH && !CONFIG_REALTIME_ONLY
    571 }  // namespace