variance_test.cc 95.8 KB
Newer Older
1 2 3 4 5 6 7 8 9 10
/*
 *  Copyright (c) 2012 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

11 12
#include <cstdlib>
#include <new>
13

14
#include "third_party/googletest/src/include/gtest/gtest.h"
15

Yaowu Xu's avatar
Yaowu Xu committed
16
#include "./vpx_config.h"
17 18 19 20
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "test/clear_system_state.h"
#include "test/register_state_check.h"
21 22
#include "vpx/vpx_codec.h"
#include "vpx/vpx_integer.h"
23
#include "vpx_mem/vpx_mem.h"
24
#include "vpx_ports/mem.h"
25 26 27

namespace {

28 29 30
typedef unsigned int (*VarianceMxNFunc)(const uint8_t *a, int a_stride,
                                        const uint8_t *b, int b_stride,
                                        unsigned int *sse);
Johann's avatar
Johann committed
31 32 33 34
typedef unsigned int (*SubpixVarMxNFunc)(const uint8_t *a, int a_stride,
                                         int xoffset, int yoffset,
                                         const uint8_t *b, int b_stride,
                                         unsigned int *sse);
35 36 37 38 39
typedef unsigned int (*SubpixAvgVarMxNFunc)(const uint8_t *a, int a_stride,
                                            int xoffset, int yoffset,
                                            const uint8_t *b, int b_stride,
                                            uint32_t *sse,
                                            const uint8_t *second_pred);
Johann's avatar
Johann committed
40
typedef unsigned int (*Get4x4SseFunc)(const uint8_t *a, int a_stride,
41
                                      const uint8_t *b, int b_stride);
42 43
typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src);

44

45 46 47
using ::std::tr1::get;
using ::std::tr1::make_tuple;
using ::std::tr1::tuple;
48 49
using libvpx_test::ACMRandom;

50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
// 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) {
  switch (bit_depth) {
    case VPX_BITS_12:
      *sse = (*sse + 128) >> 8;
      *se = (*se + 8) >> 4;
      break;
    case VPX_BITS_10:
      *sse = (*sse + 8) >> 4;
      *se = (*se + 2) >> 2;
      break;
    case VPX_BITS_8:
    default:
      break;
  }
}

69 70 71 72 73 74 75 76
static 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;
}

77 78 79 80 81
static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref,
                             int l2w, int l2h, int src_stride_coeff,
                             int ref_stride_coeff, uint32_t *sse_ptr,
                             bool use_high_bit_depth_,
                             vpx_bit_depth_t bit_depth) {
82 83 84 85 86 87 88 89 90 91 92 93
  int64_t se = 0;
  uint64_t sse = 0;
  const int w = 1 << l2w;
  const int h = 1 << l2h;
  for (int y = 0; y < h; y++) {
    for (int x = 0; x < w; x++) {
      int diff;
      if (!use_high_bit_depth_) {
        diff = ref[w * y * ref_stride_coeff + x] -
               src[w * y * src_stride_coeff + x];
        se += diff;
        sse += diff * diff;
94
#if CONFIG_VP9_HIGHBITDEPTH
95 96 97 98 99
      } else {
        diff = CONVERT_TO_SHORTPTR(ref)[w * y * ref_stride_coeff + x] -
               CONVERT_TO_SHORTPTR(src)[w * y * src_stride_coeff + x];
        se += diff;
        sse += diff * diff;
100
#endif  // CONFIG_VP9_HIGHBITDEPTH
101 102 103
      }
    }
  }
104
  RoundHighBitDepth(bit_depth, &se, &sse);
105 106 107 108
  *sse_ptr = static_cast<uint32_t>(sse);
  return static_cast<uint32_t>(sse -
                               ((static_cast<int64_t>(se) * se) >>
                                (l2w + l2h)));
109 110
}

Johann's avatar
Johann committed
111 112 113 114 115 116
/* 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 and maintain
 * compatibility with vp8.
 */
117 118 119 120 121
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_,
                                    vpx_bit_depth_t bit_depth) {
122 123 124 125
  int64_t se = 0;
  uint64_t sse = 0;
  const int w = 1 << l2w;
  const int h = 1 << l2h;
Johann's avatar
Johann committed
126 127 128 129

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

130 131 132 133 134 135 136 137 138 139 140 141 142 143
  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 = ref[(w + 1) * (y + 0) + x + 0];
        const int a2 = ref[(w + 1) * (y + 0) + x + 1];
        const int b1 = ref[(w + 1) * (y + 1) + x + 0];
        const int b2 = ref[(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 = r - src[w * y + x];
        se += diff;
        sse += diff * diff;
144
#if CONFIG_VP9_HIGHBITDEPTH
145 146 147 148 149 150 151 152 153 154 155 156 157
      } else {
        uint16_t *ref16 = CONVERT_TO_SHORTPTR(ref);
        uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
        const int a1 = ref16[(w + 1) * (y + 0) + x + 0];
        const int a2 = ref16[(w + 1) * (y + 0) + x + 1];
        const int b1 = ref16[(w + 1) * (y + 1) + x + 0];
        const int b2 = ref16[(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 = r - src16[w * y + x];
        se += diff;
        sse += diff * diff;
158
#endif  // CONFIG_VP9_HIGHBITDEPTH
159 160 161
      }
    }
  }
162
  RoundHighBitDepth(bit_depth, &se, &sse);
163 164 165 166
  *sse_ptr = static_cast<uint32_t>(sse);
  return static_cast<uint32_t>(sse -
                               ((static_cast<int64_t>(se) * se) >>
                                (l2w + l2h)));
167
}
168

169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210
class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> {
 public:
  SumOfSquaresTest() : func_(GetParam()) {}

  virtual ~SumOfSquaresTest() {
    libvpx_test::ClearSystemState();
  }

 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;
    }
    ASM_REGISTER_STATE_CHECK(res = func_(mem));
    EXPECT_EQ(256u * (v * v), 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;
    ASM_REGISTER_STATE_CHECK(res = func_(mem));
    EXPECT_EQ(expected, res);
  }
}

James Zern's avatar
James Zern committed
211
template<typename VarianceFunctionType>
Yaowu Xu's avatar
Yaowu Xu committed
212
class VarianceTest
213 214
    : public ::testing::TestWithParam<tuple<int, int,
                                            VarianceFunctionType, int> > {
215 216
 public:
  virtual void SetUp() {
217
    const tuple<int, int, VarianceFunctionType, int>& params = this->GetParam();
218 219 220 221
    log2width_  = get<0>(params);
    width_ = 1 << log2width_;
    log2height_ = get<1>(params);
    height_ = 1 << log2height_;
222
    variance_ = get<2>(params);
223 224 225 226 227 228 229 230
    if (get<3>(params)) {
      bit_depth_ = static_cast<vpx_bit_depth_t>(get<3>(params));
      use_high_bit_depth_ = true;
    } else {
      bit_depth_ = VPX_BITS_8;
      use_high_bit_depth_ = false;
    }
    mask_ = (1 << bit_depth_) - 1;
231

232
    rnd_.Reset(ACMRandom::DeterministicSeed());
233
    block_size_ = width_ * height_;
234 235 236
    if (!use_high_bit_depth_) {
      src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_ * 2));
      ref_ = new uint8_t[block_size_ * 2];
237
#if CONFIG_VP9_HIGHBITDEPTH
238 239 240 241
    } else {
      src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
          vpx_memalign(16, block_size_ * 2 * sizeof(uint16_t))));
      ref_ = CONVERT_TO_BYTEPTR(new uint16_t[block_size_ * 2]);
242
#endif  // CONFIG_VP9_HIGHBITDEPTH
243
    }
244 245 246 247 248
    ASSERT_TRUE(src_ != NULL);
    ASSERT_TRUE(ref_ != NULL);
  }

  virtual void TearDown() {
249 250 251
    if (!use_high_bit_depth_) {
      vpx_free(src_);
      delete[] ref_;
252
#if CONFIG_VP9_HIGHBITDEPTH
253 254 255
    } else {
      vpx_free(CONVERT_TO_SHORTPTR(src_));
      delete[] CONVERT_TO_SHORTPTR(ref_);
256
#endif  // CONFIG_VP9_HIGHBITDEPTH
257
    }
258
    libvpx_test::ClearSystemState();
259 260 261
  }

 protected:
James Zern's avatar
James Zern committed
262
  void ZeroTest();
263
  void RefTest();
264
  void RefStrideTest();
James Zern's avatar
James Zern committed
265 266
  void OneQuarterTest();

267
  ACMRandom rnd_;
268 269
  uint8_t *src_;
  uint8_t *ref_;
270 271
  int width_, log2width_;
  int height_, log2height_;
272 273 274
  vpx_bit_depth_t bit_depth_;
  int mask_;
  bool use_high_bit_depth_;
275
  int block_size_;
James Zern's avatar
James Zern committed
276
  VarianceFunctionType variance_;
277 278
};

James Zern's avatar
James Zern committed
279 280
template<typename VarianceFunctionType>
void VarianceTest<VarianceFunctionType>::ZeroTest() {
281
  for (int i = 0; i <= 255; ++i) {
282 283
    if (!use_high_bit_depth_) {
      memset(src_, i, block_size_);
284
#if CONFIG_VP9_HIGHBITDEPTH
285 286 287
    } else {
      vpx_memset16(CONVERT_TO_SHORTPTR(src_), i << (bit_depth_ - 8),
                   block_size_);
288
#endif  // CONFIG_VP9_HIGHBITDEPTH
289
    }
290
    for (int j = 0; j <= 255; ++j) {
291 292
      if (!use_high_bit_depth_) {
        memset(ref_, j, block_size_);
293
#if CONFIG_VP9_HIGHBITDEPTH
294 295 296
      } else {
        vpx_memset16(CONVERT_TO_SHORTPTR(ref_), j  << (bit_depth_ - 8),
                     block_size_);
297
#endif  // CONFIG_VP9_HIGHBITDEPTH
298
      }
299
      unsigned int sse;
300
      unsigned int var;
301 302
      ASM_REGISTER_STATE_CHECK(
          var = variance_(src_, width_, ref_, width_, &sse));
303
      EXPECT_EQ(0u, var) << "src values: " << i << " ref values: " << j;
304 305 306 307
    }
  }
}

308 309 310 311
template<typename VarianceFunctionType>
void VarianceTest<VarianceFunctionType>::RefTest() {
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < block_size_; j++) {
312
    if (!use_high_bit_depth_) {
313 314
      src_[j] = rnd_.Rand8();
      ref_[j] = rnd_.Rand8();
315
#if CONFIG_VP9_HIGHBITDEPTH
316 317 318
    } else {
      CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() && mask_;
      CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() && mask_;
319
#endif  // CONFIG_VP9_HIGHBITDEPTH
320
    }
321 322
    }
    unsigned int sse1, sse2;
323
    unsigned int var1;
324
    const int stride_coeff = 1;
325 326
    ASM_REGISTER_STATE_CHECK(
        var1 = variance_(src_, width_, ref_, width_, &sse1));
327
    const unsigned int var2 = variance_ref(src_, ref_, log2width_,
328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346
                                           log2height_, stride_coeff,
                                           stride_coeff, &sse2,
                                           use_high_bit_depth_, bit_depth_);
    EXPECT_EQ(sse1, sse2);
    EXPECT_EQ(var1, var2);
  }
}

template<typename VarianceFunctionType>
void VarianceTest<VarianceFunctionType>::RefStrideTest() {
  for (int i = 0; i < 10; ++i) {
    int ref_stride_coeff = i % 2;
    int src_stride_coeff = (i >> 1) % 2;
    for (int j = 0; j < block_size_; j++) {
      int ref_ind = (j / width_) * ref_stride_coeff * width_ + j % width_;
      int src_ind = (j / width_) * src_stride_coeff * width_ + j % width_;
      if (!use_high_bit_depth_) {
        src_[src_ind] = rnd_.Rand8();
        ref_[ref_ind] = rnd_.Rand8();
347
#if CONFIG_VP9_HIGHBITDEPTH
348 349 350
      } else {
        CONVERT_TO_SHORTPTR(src_)[src_ind] = rnd_.Rand16() && mask_;
        CONVERT_TO_SHORTPTR(ref_)[ref_ind] = rnd_.Rand16() && mask_;
351
#endif  // CONFIG_VP9_HIGHBITDEPTH
352 353 354 355 356 357 358 359 360 361 362 363
      }
    }
    unsigned int sse1, sse2;
    unsigned int var1;

    ASM_REGISTER_STATE_CHECK(
        var1 = variance_(src_, width_ * src_stride_coeff,
                         ref_, width_ * ref_stride_coeff, &sse1));
    const unsigned int var2 = variance_ref(src_, ref_, log2width_,
                                           log2height_, src_stride_coeff,
                                           ref_stride_coeff, &sse2,
                                           use_high_bit_depth_, bit_depth_);
364 365 366 367 368
    EXPECT_EQ(sse1, sse2);
    EXPECT_EQ(var1, var2);
  }
}

James Zern's avatar
James Zern committed
369 370
template<typename VarianceFunctionType>
void VarianceTest<VarianceFunctionType>::OneQuarterTest() {
371
  const int half = block_size_ / 2;
372 373 374 375
  if (!use_high_bit_depth_) {
    memset(src_, 255, block_size_);
    memset(ref_, 255, half);
    memset(ref_ + half, 0, half);
376
#if CONFIG_VP9_HIGHBITDEPTH
377 378 379 380 381
  } else {
    vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << (bit_depth_ - 8),
                 block_size_);
    vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << (bit_depth_ - 8), half);
    vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, 0, half);
382
#endif  // CONFIG_VP9_HIGHBITDEPTH
383
  }
384
  unsigned int sse;
385
  unsigned int var;
386
  ASM_REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse));
387 388 389 390
  const unsigned int expected = block_size_ * 255 * 255 / 4;
  EXPECT_EQ(expected, var);
}

391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439
template<typename MseFunctionType>
class MseTest
    : public ::testing::TestWithParam<tuple<int, int, MseFunctionType> > {
 public:
  virtual void SetUp() {
    const tuple<int, int, MseFunctionType>& params = this->GetParam();
    log2width_  = get<0>(params);
    width_ = 1 << log2width_;
    log2height_ = get<1>(params);
    height_ = 1 << log2height_;
    mse_ = get<2>(params);

    rnd(ACMRandom::DeterministicSeed());
    block_size_ = width_ * height_;
    src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
    ref_ = new uint8_t[block_size_];
    ASSERT_TRUE(src_ != NULL);
    ASSERT_TRUE(ref_ != NULL);
  }

  virtual void TearDown() {
    vpx_free(src_);
    delete[] ref_;
    libvpx_test::ClearSystemState();
  }

 protected:
  void RefTest_mse();
  void RefTest_sse();
  void MaxTest_mse();
  void MaxTest_sse();

  ACMRandom rnd;
  uint8_t* src_;
  uint8_t* ref_;
  int width_, log2width_;
  int height_, log2height_;
  int block_size_;
  MseFunctionType mse_;
};

template<typename MseFunctionType>
void MseTest<MseFunctionType>::RefTest_mse() {
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < block_size_; j++) {
      src_[j] = rnd.Rand8();
      ref_[j] = rnd.Rand8();
    }
    unsigned int sse1, sse2;
440
    const int stride_coeff = 1;
441
    ASM_REGISTER_STATE_CHECK(mse_(src_, width_, ref_, width_, &sse1));
442 443
    variance_ref(src_, ref_, log2width_, log2height_, stride_coeff,
                 stride_coeff, &sse2, false, VPX_BITS_8);
444 445 446 447 448 449 450 451 452 453 454 455 456
    EXPECT_EQ(sse1, sse2);
  }
}

template<typename MseFunctionType>
void MseTest<MseFunctionType>::RefTest_sse() {
  for (int i = 0; i < 10; ++i) {
    for (int j = 0; j < block_size_; j++) {
      src_[j] = rnd.Rand8();
      ref_[j] = rnd.Rand8();
    }
    unsigned int sse2;
    unsigned int var1;
457 458 459 460
    const int stride_coeff = 1;
    ASM_REGISTER_STATE_CHECK(var1 = mse_(src_, width_, ref_, width_));
    variance_ref(src_, ref_, log2width_, log2height_, stride_coeff,
                 stride_coeff, &sse2, false, VPX_BITS_8);
461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484
    EXPECT_EQ(var1, sse2);
  }
}

template<typename MseFunctionType>
void MseTest<MseFunctionType>::MaxTest_mse() {
  memset(src_, 255, block_size_);
  memset(ref_, 0, block_size_);
  unsigned int sse;
  ASM_REGISTER_STATE_CHECK(mse_(src_, width_, ref_, width_, &sse));
  const unsigned int expected = block_size_ * 255 * 255;
  EXPECT_EQ(expected, sse);
}

template<typename MseFunctionType>
void MseTest<MseFunctionType>::MaxTest_sse() {
  memset(src_, 255, block_size_);
  memset(ref_, 0, block_size_);
  unsigned int var;
  ASM_REGISTER_STATE_CHECK(var = mse_(src_, width_, ref_, width_));
  const unsigned int expected = block_size_ * 255 * 255;
  EXPECT_EQ(expected, var);
}

485 486 487 488 489 490 491 492
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,
                                        vpx_bit_depth_t bit_depth) {
493 494 495 496
  int64_t se = 0;
  uint64_t sse = 0;
  const int w = 1 << l2w;
  const int h = 1 << l2h;
Johann's avatar
Johann committed
497 498 499 500

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

501 502 503 504 505 506 507 508 509 510 511 512 513 514
  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 = ref[(w + 1) * (y + 0) + x + 0];
        const int a2 = ref[(w + 1) * (y + 0) + x + 1];
        const int b1 = ref[(w + 1) * (y + 1) + x + 0];
        const int b2 = ref[(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 = ((r + second_pred[w * y + x] + 1) >> 1) - src[w * y + x];
        se += diff;
        sse += diff * diff;
515
#if CONFIG_VP9_HIGHBITDEPTH
516 517 518 519 520 521 522 523 524 525 526 527 528 529
      } else {
        uint16_t *ref16 = CONVERT_TO_SHORTPTR(ref);
        uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
        uint16_t *sec16   = CONVERT_TO_SHORTPTR(second_pred);
        const int a1 = ref16[(w + 1) * (y + 0) + x + 0];
        const int a2 = ref16[(w + 1) * (y + 0) + x + 1];
        const int b1 = ref16[(w + 1) * (y + 1) + x + 0];
        const int b2 = ref16[(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 = ((r + sec16[w * y + x] + 1) >> 1) - src16[w * y + x];
        se += diff;
        sse += diff * diff;
530
#endif  // CONFIG_VP9_HIGHBITDEPTH
531 532 533
      }
    }
  }
534
  RoundHighBitDepth(bit_depth, &se, &sse);
535 536 537 538
  *sse_ptr = static_cast<uint32_t>(sse);
  return static_cast<uint32_t>(sse -
                               ((static_cast<int64_t>(se) * se) >>
                                (l2w + l2h)));
James Zern's avatar
James Zern committed
539 540
}

541
template<typename SubpelVarianceFunctionType>
Yaowu Xu's avatar
Yaowu Xu committed
542 543
class SubpelVarianceTest
    : public ::testing::TestWithParam<tuple<int, int,
544
                                            SubpelVarianceFunctionType, int> > {
545 546
 public:
  virtual void SetUp() {
547
    const tuple<int, int, SubpelVarianceFunctionType, int>& params =
548 549 550 551 552 553
        this->GetParam();
    log2width_  = get<0>(params);
    width_ = 1 << log2width_;
    log2height_ = get<1>(params);
    height_ = 1 << log2height_;
    subpel_variance_ = get<2>(params);
554 555 556 557 558 559 560 561
    if (get<3>(params)) {
      bit_depth_ = (vpx_bit_depth_t) get<3>(params);
      use_high_bit_depth_ = true;
    } else {
      bit_depth_ = VPX_BITS_8;
      use_high_bit_depth_ = false;
    }
    mask_ = (1 << bit_depth_)-1;
562

563
    rnd_.Reset(ACMRandom::DeterministicSeed());
564
    block_size_ = width_ * height_;
565 566 567 568
    if (!use_high_bit_depth_) {
      src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
      sec_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
      ref_ = new uint8_t[block_size_ + width_ + height_ + 1];
569
#if CONFIG_VP9_HIGHBITDEPTH
570 571 572 573 574 575 576 577 578 579
    } else {
      src_ = CONVERT_TO_BYTEPTR(
          reinterpret_cast<uint16_t *>(
              vpx_memalign(16, block_size_*sizeof(uint16_t))));
      sec_ = CONVERT_TO_BYTEPTR(
          reinterpret_cast<uint16_t *>(
              vpx_memalign(16, block_size_*sizeof(uint16_t))));
      ref_ = CONVERT_TO_BYTEPTR(
          new uint16_t[block_size_ + width_ + height_ + 1]);
#endif  // CONFIG_VP9_HIGHBITDEPTH
580
    }
581
    ASSERT_TRUE(src_ != NULL);
582
    ASSERT_TRUE(sec_ != NULL);
583 584 585 586
    ASSERT_TRUE(ref_ != NULL);
  }

  virtual void TearDown() {
587 588 589 590
    if (!use_high_bit_depth_) {
      vpx_free(src_);
      delete[] ref_;
      vpx_free(sec_);
591
#if CONFIG_VP9_HIGHBITDEPTH
592 593 594 595
    } else {
      vpx_free(CONVERT_TO_SHORTPTR(src_));
      delete[] CONVERT_TO_SHORTPTR(ref_);
      vpx_free(CONVERT_TO_SHORTPTR(sec_));
596
#endif  // CONFIG_VP9_HIGHBITDEPTH
597
    }
598
    libvpx_test::ClearSystemState();
599 600 601 602
  }

 protected:
  void RefTest();
603
  void ExtremeRefTest();
604

605
  ACMRandom rnd_;
606 607 608
  uint8_t *src_;
  uint8_t *ref_;
  uint8_t *sec_;
609 610
  bool use_high_bit_depth_;
  vpx_bit_depth_t bit_depth_;
611 612
  int width_, log2width_;
  int height_, log2height_;
613
  int block_size_,  mask_;
614 615 616 617 618
  SubpelVarianceFunctionType subpel_variance_;
};

template<typename SubpelVarianceFunctionType>
void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {
Johann's avatar
Johann committed
619 620
  for (int x = 0; x < 8; ++x) {
    for (int y = 0; y < 8; ++y) {
621 622 623 624 625 626 627
      if (!use_high_bit_depth_) {
        for (int j = 0; j < block_size_; j++) {
          src_[j] = rnd_.Rand8();
        }
        for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
          ref_[j] = rnd_.Rand8();
        }
628
#if CONFIG_VP9_HIGHBITDEPTH
629 630 631 632 633 634 635 636
      } else {
        for (int j = 0; j < block_size_; j++) {
          CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask_;
        }
        for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
          CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask_;
        }
#endif  // CONFIG_VP9_HIGHBITDEPTH
637
      }
638
      unsigned int sse1, sse2;
639
      unsigned int var1;
640 641
      ASM_REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1, x, y,
                                                       src_, width_, &sse1));
Johann's avatar
Johann committed
642 643 644
      const unsigned int var2 = subpel_variance_ref(ref_, src_,
                                                    log2width_, log2height_,
                                                    x, y, &sse2,
645 646 647 648 649 650 651 652 653 654 655 656 657
                                                    use_high_bit_depth_,
                                                    bit_depth_);
      EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
      EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
    }
  }
}

template<typename SubpelVarianceFunctionType>
void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() {
  // Compare against reference.
  // Src: Set the first half of values to 0, the second half to the maximum.
  // Ref: Set the first half of values to the maximum, the second half to 0.
Johann's avatar
Johann committed
658 659
  for (int x = 0; x < 8; ++x) {
    for (int y = 0; y < 8; ++y) {
660 661 662 663 664 665
      const int half = block_size_ / 2;
      if (!use_high_bit_depth_) {
        memset(src_, 0, half);
        memset(src_ + half, 255, half);
        memset(ref_, 255, half);
        memset(ref_ + half, 0, half + width_ + height_ + 1);
666
#if CONFIG_VP9_HIGHBITDEPTH
667 668 669 670 671 672 673
      } else {
        vpx_memset16(CONVERT_TO_SHORTPTR(src_), mask_, half);
        vpx_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half);
        vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half);
        vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask_,
                     half + width_ + height_ + 1);
#endif  // CONFIG_VP9_HIGHBITDEPTH
674
      }
675 676 677 678 679
      unsigned int sse1, sse2;
      unsigned int var1;
      ASM_REGISTER_STATE_CHECK(
          var1 = subpel_variance_(ref_, width_ + 1, x, y, src_, width_, &sse1));
      const unsigned int var2 =
Johann's avatar
Johann committed
680 681 682 683
          subpel_variance_ref(ref_, src_, log2width_, log2height_,
                              x, y, &sse2, use_high_bit_depth_, bit_depth_);
      EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
      EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
684 685 686 687
    }
  }
}

688
template<>
689
void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() {
Johann's avatar
Johann committed
690 691
  for (int x = 0; x < 8; ++x) {
    for (int y = 0; y < 8; ++y) {
692 693 694 695 696 697 698 699
      if (!use_high_bit_depth_) {
        for (int j = 0; j < block_size_; j++) {
          src_[j] = rnd_.Rand8();
          sec_[j] = rnd_.Rand8();
        }
        for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
          ref_[j] = rnd_.Rand8();
        }
700
#if CONFIG_VP9_HIGHBITDEPTH
701 702 703 704 705 706 707 708
      } else {
        for (int j = 0; j < block_size_; j++) {
          CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask_;
          CONVERT_TO_SHORTPTR(sec_)[j] = rnd_.Rand16() & mask_;
        }
        for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
          CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask_;
        }
709
#endif  // CONFIG_VP9_HIGHBITDEPTH
710
      }
711
      unsigned int sse1, sse2;
712
      unsigned int var1;
713 714 715
      ASM_REGISTER_STATE_CHECK(
          var1 = subpel_variance_(ref_, width_ + 1, x, y,
                                  src_, width_, &sse1, sec_));
716 717
      const unsigned int var2 = subpel_avg_variance_ref(ref_, src_, sec_,
                                                        log2width_, log2height_,
718 719 720
                                                        x, y, &sse2,
                                                        use_high_bit_depth_,
                                                        bit_depth_);
721 722 723 724 725
      EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
      EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
    }
  }
}
James Zern's avatar
James Zern committed
726

Johann's avatar
Johann committed
727
typedef MseTest<Get4x4SseFunc> VpxSseTest;
728 729
typedef MseTest<VarianceMxNFunc> VpxMseTest;
typedef VarianceTest<VarianceMxNFunc> VpxVarianceTest;
730 731
typedef SubpelVarianceTest<SubpixVarMxNFunc> VpxSubpelVarianceTest;
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> VpxSubpelAvgVarianceTest;
732 733 734 735 736 737 738 739 740 741 742

TEST_P(VpxSseTest, Ref_sse) { RefTest_sse(); }
TEST_P(VpxSseTest, Max_sse) { MaxTest_sse(); }
TEST_P(VpxMseTest, Ref_mse) { RefTest_mse(); }
TEST_P(VpxMseTest, Max_mse) { MaxTest_mse(); }
TEST_P(VpxVarianceTest, Zero) { ZeroTest(); }
TEST_P(VpxVarianceTest, Ref) { RefTest(); }
TEST_P(VpxVarianceTest, RefStride) { RefStrideTest(); }
TEST_P(VpxVarianceTest, OneQuarter) { OneQuarterTest(); }
TEST_P(SumOfSquaresTest, Const) { ConstTest(); }
TEST_P(SumOfSquaresTest, Ref) { RefTest(); }
743 744 745
TEST_P(VpxSubpelVarianceTest, Ref) { RefTest(); }
TEST_P(VpxSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
TEST_P(VpxSubpelAvgVarianceTest, Ref) { RefTest(); }
James Zern's avatar
James Zern committed
746

747 748 749
INSTANTIATE_TEST_CASE_P(C, SumOfSquaresTest,
                        ::testing::Values(vpx_get_mb_ss_c));

Johann's avatar
Johann committed
750
const Get4x4SseFunc get4x4sse_cs_c = vpx_get4x4sse_cs_c;
751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776
INSTANTIATE_TEST_CASE_P(C, VpxSseTest,
                        ::testing::Values(make_tuple(2, 2, get4x4sse_cs_c)));

const VarianceMxNFunc mse16x16_c = vpx_mse16x16_c;
const VarianceMxNFunc mse16x8_c = vpx_mse16x8_c;
const VarianceMxNFunc mse8x16_c = vpx_mse8x16_c;
const VarianceMxNFunc mse8x8_c = vpx_mse8x8_c;
INSTANTIATE_TEST_CASE_P(C, VpxMseTest,
                        ::testing::Values(make_tuple(4, 4, mse16x16_c),
                                          make_tuple(4, 3, mse16x8_c),
                                          make_tuple(3, 4, mse8x16_c),
                                          make_tuple(3, 3, mse8x8_c)));

const VarianceMxNFunc variance64x64_c = vpx_variance64x64_c;
const VarianceMxNFunc variance64x32_c = vpx_variance64x32_c;
const VarianceMxNFunc variance32x64_c = vpx_variance32x64_c;
const VarianceMxNFunc variance32x32_c = vpx_variance32x32_c;
const VarianceMxNFunc variance32x16_c = vpx_variance32x16_c;
const VarianceMxNFunc variance16x32_c = vpx_variance16x32_c;
const VarianceMxNFunc variance16x16_c = vpx_variance16x16_c;
const VarianceMxNFunc variance16x8_c = vpx_variance16x8_c;
const VarianceMxNFunc variance8x16_c = vpx_variance8x16_c;
const VarianceMxNFunc variance8x8_c = vpx_variance8x8_c;
const VarianceMxNFunc variance8x4_c = vpx_variance8x4_c;
const VarianceMxNFunc variance4x8_c = vpx_variance4x8_c;
const VarianceMxNFunc variance4x4_c = vpx_variance4x4_c;
777
INSTANTIATE_TEST_CASE_P(
778 779 780 781 782 783 784 785
    C, VpxVarianceTest,
    ::testing::Values(make_tuple(6, 6, variance64x64_c, 0),
                      make_tuple(6, 5, variance64x32_c, 0),
                      make_tuple(5, 6, variance32x64_c, 0),
                      make_tuple(5, 5, variance32x32_c, 0),
                      make_tuple(5, 4, variance32x16_c, 0),
                      make_tuple(4, 5, variance16x32_c, 0),
                      make_tuple(4, 4, variance16x16_c, 0),
786
                      make_tuple(4, 3, variance16x8_c, 0),
787 788 789 790 791
                      make_tuple(3, 4, variance8x16_c, 0),
                      make_tuple(3, 3, variance8x8_c, 0),
                      make_tuple(3, 2, variance8x4_c, 0),
                      make_tuple(2, 3, variance4x8_c, 0),
                      make_tuple(2, 2, variance4x4_c, 0)));
James Zern's avatar
James Zern committed
792

793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859
const SubpixVarMxNFunc subpel_var64x64_c = vpx_sub_pixel_variance64x64_c;
const SubpixVarMxNFunc subpel_var64x32_c = vpx_sub_pixel_variance64x32_c;
const SubpixVarMxNFunc subpel_var32x64_c = vpx_sub_pixel_variance32x64_c;
const SubpixVarMxNFunc subpel_var32x32_c = vpx_sub_pixel_variance32x32_c;
const SubpixVarMxNFunc subpel_var32x16_c = vpx_sub_pixel_variance32x16_c;
const SubpixVarMxNFunc subpel_var16x32_c = vpx_sub_pixel_variance16x32_c;
const SubpixVarMxNFunc subpel_var16x16_c = vpx_sub_pixel_variance16x16_c;
const SubpixVarMxNFunc subpel_var16x8_c = vpx_sub_pixel_variance16x8_c;
const SubpixVarMxNFunc subpel_var8x16_c = vpx_sub_pixel_variance8x16_c;
const SubpixVarMxNFunc subpel_var8x8_c = vpx_sub_pixel_variance8x8_c;
const SubpixVarMxNFunc subpel_var8x4_c = vpx_sub_pixel_variance8x4_c;
const SubpixVarMxNFunc subpel_var4x8_c = vpx_sub_pixel_variance4x8_c;
const SubpixVarMxNFunc subpel_var4x4_c = vpx_sub_pixel_variance4x4_c;
INSTANTIATE_TEST_CASE_P(
    C, VpxSubpelVarianceTest,
    ::testing::Values(make_tuple(6, 6, subpel_var64x64_c, 0),
                      make_tuple(6, 5, subpel_var64x32_c, 0),
                      make_tuple(5, 6, subpel_var32x64_c, 0),
                      make_tuple(5, 5, subpel_var32x32_c, 0),
                      make_tuple(5, 4, subpel_var32x16_c, 0),
                      make_tuple(4, 5, subpel_var16x32_c, 0),
                      make_tuple(4, 4, subpel_var16x16_c, 0),
                      make_tuple(4, 3, subpel_var16x8_c, 0),
                      make_tuple(3, 4, subpel_var8x16_c, 0),
                      make_tuple(3, 3, subpel_var8x8_c, 0),
                      make_tuple(3, 2, subpel_var8x4_c, 0),
                      make_tuple(2, 3, subpel_var4x8_c, 0),
                      make_tuple(2, 2, subpel_var4x4_c, 0)));

const SubpixAvgVarMxNFunc subpel_avg_var64x64_c =
    vpx_sub_pixel_avg_variance64x64_c;
const SubpixAvgVarMxNFunc subpel_avg_var64x32_c =
    vpx_sub_pixel_avg_variance64x32_c;
const SubpixAvgVarMxNFunc subpel_avg_var32x64_c =
    vpx_sub_pixel_avg_variance32x64_c;
const SubpixAvgVarMxNFunc subpel_avg_var32x32_c =
    vpx_sub_pixel_avg_variance32x32_c;
const SubpixAvgVarMxNFunc subpel_avg_var32x16_c =
    vpx_sub_pixel_avg_variance32x16_c;
const SubpixAvgVarMxNFunc subpel_avg_var16x32_c =
    vpx_sub_pixel_avg_variance16x32_c;
const SubpixAvgVarMxNFunc subpel_avg_var16x16_c =
    vpx_sub_pixel_avg_variance16x16_c;
const SubpixAvgVarMxNFunc subpel_avg_var16x8_c =
    vpx_sub_pixel_avg_variance16x8_c;
const SubpixAvgVarMxNFunc subpel_avg_var8x16_c =
    vpx_sub_pixel_avg_variance8x16_c;
const SubpixAvgVarMxNFunc subpel_avg_var8x8_c = vpx_sub_pixel_avg_variance8x8_c;
const SubpixAvgVarMxNFunc subpel_avg_var8x4_c = vpx_sub_pixel_avg_variance8x4_c;
const SubpixAvgVarMxNFunc subpel_avg_var4x8_c = vpx_sub_pixel_avg_variance4x8_c;
const SubpixAvgVarMxNFunc subpel_avg_var4x4_c = vpx_sub_pixel_avg_variance4x4_c;
INSTANTIATE_TEST_CASE_P(
    C, VpxSubpelAvgVarianceTest,
    ::testing::Values(make_tuple(6, 6, subpel_avg_var64x64_c, 0),
                      make_tuple(6, 5, subpel_avg_var64x32_c, 0),
                      make_tuple(5, 6, subpel_avg_var32x64_c, 0),
                      make_tuple(5, 5, subpel_avg_var32x32_c, 0),
                      make_tuple(5, 4, subpel_avg_var32x16_c, 0),
                      make_tuple(4, 5, subpel_avg_var16x32_c, 0),
                      make_tuple(4, 4, subpel_avg_var16x16_c, 0),
                      make_tuple(4, 3, subpel_avg_var16x8_c, 0),
                      make_tuple(3, 4, subpel_avg_var8x16_c, 0),
                      make_tuple(3, 3, subpel_avg_var8x8_c, 0),
                      make_tuple(3, 2, subpel_avg_var8x4_c, 0),
                      make_tuple(2, 3, subpel_avg_var4x8_c, 0),
                      make_tuple(2, 2, subpel_avg_var4x4_c, 0)));

860 861 862
#if CONFIG_VP9_HIGHBITDEPTH
typedef MseTest<VarianceMxNFunc> VpxHBDMseTest;
typedef VarianceTest<VarianceMxNFunc> VpxHBDVarianceTest;
863 864 865
typedef SubpelVarianceTest<SubpixVarMxNFunc> VpxHBDSubpelVarianceTest;
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc>
    VpxHBDSubpelAvgVarianceTest;
866 867 868 869 870 871 872

TEST_P(VpxHBDMseTest, Ref_mse) { RefTest_mse(); }
TEST_P(VpxHBDMseTest, Max_mse) { MaxTest_mse(); }
TEST_P(VpxHBDVarianceTest, Zero) { ZeroTest(); }
TEST_P(VpxHBDVarianceTest, Ref) { RefTest(); }
TEST_P(VpxHBDVarianceTest, RefStride) { RefStrideTest(); }
TEST_P(VpxHBDVarianceTest, OneQuarter) { OneQuarterTest(); }
873 874 875
TEST_P(VpxHBDSubpelVarianceTest, Ref) { RefTest(); }
TEST_P(VpxHBDSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
TEST_P(VpxHBDSubpelAvgVarianceTest, Ref) { RefTest(); }
876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891

/* TODO(debargha): This test does not support the highbd version
const VarianceMxNFunc highbd_12_mse16x16_c = vpx_highbd_12_mse16x16_c;
const VarianceMxNFunc highbd_12_mse16x8_c = vpx_highbd_12_mse16x8_c;
const VarianceMxNFunc highbd_12_mse8x16_c = vpx_highbd_12_mse8x16_c;
const VarianceMxNFunc highbd_12_mse8x8_c = vpx_highbd_12_mse8x8_c;

const VarianceMxNFunc highbd_10_mse16x16_c = vpx_highbd_10_mse16x16_c;
const VarianceMxNFunc highbd_10_mse16x8_c = vpx_highbd_10_mse16x8_c;
const VarianceMxNFunc highbd_10_mse8x16_c = vpx_highbd_10_mse8x16_c;
const VarianceMxNFunc highbd_10_mse8x8_c = vpx_highbd_10_mse8x8_c;

const VarianceMxNFunc highbd_8_mse16x16_c = vpx_highbd_8_mse16x16_c;
const VarianceMxNFunc highbd_8_mse16x8_c = vpx_highbd_8_mse16x8_c;
const VarianceMxNFunc highbd_8_mse8x16_c = vpx_highbd_8_mse8x16_c;
const VarianceMxNFunc highbd_8_mse8x8_c = vpx_highbd_8_mse8x8_c;
892
INSTANTIATE_TEST_CASE_P(
893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945
    C, VpxHBDMseTest, ::testing::Values(make_tuple(4, 4, highbd_12_mse16x16_c),
                                        make_tuple(4, 4, highbd_12_mse16x8_c),
                                        make_tuple(4, 4, highbd_12_mse8x16_c),
                                        make_tuple(4, 4, highbd_12_mse8x8_c),
                                        make_tuple(4, 4, highbd_10_mse16x16_c),
                                        make_tuple(4, 4, highbd_10_mse16x8_c),
                                        make_tuple(4, 4, highbd_10_mse8x16_c),
                                        make_tuple(4, 4, highbd_10_mse8x8_c),
                                        make_tuple(4, 4, highbd_8_mse16x16_c),
                                        make_tuple(4, 4, highbd_8_mse16x8_c),
                                        make_tuple(4, 4, highbd_8_mse8x16_c),
                                        make_tuple(4, 4, highbd_8_mse8x8_c)));
*/

const VarianceMxNFunc highbd_12_variance64x64_c = vpx_highbd_12_variance64x64_c;
const VarianceMxNFunc highbd_12_variance64x32_c = vpx_highbd_12_variance64x32_c;
const VarianceMxNFunc highbd_12_variance32x64_c = vpx_highbd_12_variance32x64_c;
const VarianceMxNFunc highbd_12_variance32x32_c = vpx_highbd_12_variance32x32_c;
const VarianceMxNFunc highbd_12_variance32x16_c = vpx_highbd_12_variance32x16_c;
const VarianceMxNFunc highbd_12_variance16x32_c = vpx_highbd_12_variance16x32_c;
const VarianceMxNFunc highbd_12_variance16x16_c = vpx_highbd_12_variance16x16_c;
const VarianceMxNFunc highbd_12_variance16x8_c = vpx_highbd_12_variance16x8_c;
const VarianceMxNFunc highbd_12_variance8x16_c = vpx_highbd_12_variance8x16_c;
const VarianceMxNFunc highbd_12_variance8x8_c = vpx_highbd_12_variance8x8_c;
const VarianceMxNFunc highbd_12_variance8x4_c = vpx_highbd_12_variance8x4_c;
const VarianceMxNFunc highbd_12_variance4x8_c = vpx_highbd_12_variance4x8_c;
const VarianceMxNFunc highbd_12_variance4x4_c = vpx_highbd_12_variance4x4_c;
const VarianceMxNFunc highbd_10_variance64x64_c = vpx_highbd_10_variance64x64_c;
const VarianceMxNFunc highbd_10_variance64x32_c = vpx_highbd_10_variance64x32_c;
const VarianceMxNFunc highbd_10_variance32x64_c = vpx_highbd_10_variance32x64_c;
const VarianceMxNFunc highbd_10_variance32x32_c = vpx_highbd_10_variance32x32_c;
const VarianceMxNFunc highbd_10_variance32x16_c = vpx_highbd_10_variance32x16_c;
const VarianceMxNFunc highbd_10_variance16x32_c = vpx_highbd_10_variance16x32_c;
const VarianceMxNFunc highbd_10_variance16x16_c = vpx_highbd_10_variance16x16_c;
const VarianceMxNFunc highbd_10_variance16x8_c = vpx_highbd_10_variance16x8_c;
const VarianceMxNFunc highbd_10_variance8x16_c = vpx_highbd_10_variance8x16_c;
const VarianceMxNFunc highbd_10_variance8x8_c = vpx_highbd_10_variance8x8_c;
const VarianceMxNFunc highbd_10_variance8x4_c = vpx_highbd_10_variance8x4_c;
const VarianceMxNFunc highbd_10_variance4x8_c = vpx_highbd_10_variance4x8_c;
const VarianceMxNFunc highbd_10_variance4x4_c = vpx_highbd_10_variance4x4_c;
const VarianceMxNFunc highbd_8_variance64x64_c = vpx_highbd_8_variance64x64_c;
const VarianceMxNFunc highbd_8_variance64x32_c = vpx_highbd_8_variance64x32_c;
const VarianceMxNFunc highbd_8_variance32x64_c = vpx_highbd_8_variance32x64_c;
const VarianceMxNFunc highbd_8_variance32x32_c = vpx_highbd_8_variance32x32_c;
const VarianceMxNFunc highbd_8_variance32x16_c = vpx_highbd_8_variance32x16_c;
const VarianceMxNFunc highbd_8_variance16x32_c = vpx_highbd_8_variance16x32_c;
const VarianceMxNFunc highbd_8_variance16x16_c = vpx_highbd_8_variance16x16_c;
const VarianceMxNFunc highbd_8_variance16x8_c = vpx_highbd_8_variance16x8_c;
const VarianceMxNFunc highbd_8_variance8x16_c = vpx_highbd_8_variance8x16_c;
const VarianceMxNFunc highbd_8_variance8x8_c = vpx_highbd_8_variance8x8_c;
const VarianceMxNFunc highbd_8_variance8x4_c = vpx_highbd_8_variance8x4_c;
const VarianceMxNFunc highbd_8_variance4x8_c = vpx_highbd_8_variance4x8_c;
const VarianceMxNFunc highbd_8_variance4x4_c = vpx_highbd_8_variance4x4_c;
946
INSTANTIATE_TEST_CASE_P(
947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986
    C, VpxHBDVarianceTest,
    ::testing::Values(make_tuple(6, 6, highbd_12_variance64x64_c, 12),
                      make_tuple(6, 5, highbd_12_variance64x32_c, 12),
                      make_tuple(5, 6, highbd_12_variance32x64_c, 12),
                      make_tuple(5, 5, highbd_12_variance32x32_c, 12),
                      make_tuple(5, 4, highbd_12_variance32x16_c, 12),
                      make_tuple(4, 5, highbd_12_variance16x32_c, 12),
                      make_tuple(4, 4, highbd_12_variance16x16_c, 12),
                      make_tuple(4, 3, highbd_12_variance16x8_c, 12),
                      make_tuple(3, 4, highbd_12_variance8x16_c, 12),
                      make_tuple(3, 3, highbd_12_variance8x8_c, 12),
                      make_tuple(3, 2, highbd_12_variance8x4_c, 12),
                      make_tuple(2, 3, highbd_12_variance4x8_c, 12),
                      make_tuple(2, 2, highbd_12_variance4x4_c, 12),
                      make_tuple(6, 6, highbd_10_variance64x64_c, 10),
                      make_tuple(6, 5, highbd_10_variance64x32_c, 10),
                      make_tuple(5, 6, highbd_10_variance32x64_c, 10),
                      make_tuple(5, 5, highbd_10_variance32x32_c, 10),
                      make_tuple(5, 4, highbd_10_variance32x16_c, 10),
                      make_tuple(4, 5, highbd_10_variance16x32_c, 10),
                      make_tuple(4, 4, highbd_10_variance16x16_c, 10),
                      make_tuple(4, 3, highbd_10_variance16x8_c, 10),
                      make_tuple(3, 4, highbd_10_variance8x16_c, 10),
                      make_tuple(3, 3, highbd_10_variance8x8_c, 10),
                      make_tuple(3, 2, highbd_10_variance8x4_c, 10),
                      make_tuple(2, 3, highbd_10_variance4x8_c, 10),
                      make_tuple(2, 2, highbd_10_variance4x4_c, 10),
                      make_tuple(6, 6, highbd_8_variance64x64_c, 8),
                      make_tuple(6, 5, highbd_8_variance64x32_c, 8),
                      make_tuple(5, 6, highbd_8_variance32x64_c, 8),
                      make_tuple(5, 5, highbd_8_variance32x32_c, 8),
                      make_tuple(5, 4, highbd_8_variance32x16_c, 8),
                      make_tuple(4, 5, highbd_8_variance16x32_c, 8),
                      make_tuple(4, 4, highbd_8_variance16x16_c, 8),
                      make_tuple(4, 3, highbd_8_variance16x8_c, 8),
                      make_tuple(3, 4, highbd_8_variance8x16_c, 8),
                      make_tuple(3, 3, highbd_8_variance8x8_c, 8),
                      make_tuple(3, 2, highbd_8_variance8x4_c, 8),
                      make_tuple(2, 3, highbd_8_variance4x8_c, 8),
                      make_tuple(2, 2, highbd_8_variance4x4_c, 8)));
987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 1029 1030 1031 1032 1033 1034 1035 1036 1037 1038 1039 1040 1041 1042 1043 1044 1045 1046 1047 1048 1049 1050 1051 1052 1053 1054 1055 1056 1057 1058 1059 1060 1061 1062 1063 1064 1065 1066 1067 1068 1069 1070 1071 1072 1073 1074 1075 1076 1077 1078 1079 1080 1081 1082 1083 1084 1085 1086 1087 1088 1089 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227

const SubpixVarMxNFunc highbd_8_subpel_var64x64_c =
    vpx_highbd_8_sub_pixel_variance64x64_c;
const SubpixVarMxNFunc highbd_8_subpel_var64x32_c =
    vpx_highbd_8_sub_pixel_variance64x32_c;
const SubpixVarMxNFunc highbd_8_subpel_var32x64_c =
    vpx_highbd_8_sub_pixel_variance32x64_c;
const SubpixVarMxNFunc highbd_8_subpel_var32x32_c =
    vpx_highbd_8_sub_pixel_variance32x32_c;
const SubpixVarMxNFunc highbd_8_subpel_var32x16_c =
    vpx_highbd_8_sub_pixel_variance32x16_c;
const SubpixVarMxNFunc highbd_8_subpel_var16x32_c =
    vpx_highbd_8_sub_pixel_variance16x32_c;
const SubpixVarMxNFunc highbd_8_subpel_var16x16_c =
    vpx_highbd_8_sub_pixel_variance16x16_c;
const SubpixVarMxNFunc highbd_8_subpel_var16x8_c =
    vpx_highbd_8_sub_pixel_variance16x8_c;
const SubpixVarMxNFunc highbd_8_subpel_var8x16_c =
    vpx_highbd_8_sub_pixel_variance8x16_c;
const SubpixVarMxNFunc highbd_8_subpel_var8x8_c =
    vpx_highbd_8_sub_pixel_variance8x8_c;
const SubpixVarMxNFunc highbd_8_subpel_var8x4_c =
    vpx_highbd_8_sub_pixel_variance8x4_c;
const SubpixVarMxNFunc highbd_8_subpel_var4x8_c =
    vpx_highbd_8_sub_pixel_variance4x8_c;
const SubpixVarMxNFunc highbd_8_subpel_var4x4_c =
    vpx_highbd_8_sub_pixel_variance4x4_c;
const SubpixVarMxNFunc highbd_10_subpel_var64x64_c =
    vpx_highbd_10_sub_pixel_variance64x64_c;
const SubpixVarMxNFunc highbd_10_subpel_var64x32_c =
    vpx_highbd_10_sub_pixel_variance64x32_c;
const SubpixVarMxNFunc highbd_10_subpel_var32x64_c =
    vpx_highbd_10_sub_pixel_variance32x64_c;
const SubpixVarMxNFunc highbd_10_subpel_var32x32_c =
    vpx_highbd_10_sub_pixel_variance32x32_c;
const SubpixVarMxNFunc highbd_10_subpel_var32x16_c =
    vpx_highbd_10_sub_pixel_variance32x16_c;
const SubpixVarMxNFunc highbd_10_subpel_var16x32_c =
    vpx_highbd_10_sub_pixel_variance16x32_c;
const SubpixVarMxNFunc highbd_10_subpel_var16x16_c =
    vpx_highbd_10_sub_pixel_variance16x16_c;
const SubpixVarMxNFunc highbd_10_subpel_var16x8_c =
    vpx_highbd_10_sub_pixel_variance16x8_c;
const SubpixVarMxNFunc highbd_10_subpel_var8x16_c =
    vpx_highbd_10_sub_pixel_variance8x16_c;
const SubpixVarMxNFunc highbd_10_subpel_var8x8_c =
    vpx_highbd_10_sub_pixel_variance8x8_c;
const SubpixVarMxNFunc highbd_10_subpel_var8x4_c =
    vpx_highbd_10_sub_pixel_variance8x4_c;
const SubpixVarMxNFunc highbd_10_subpel_var4x8_c =
    vpx_highbd_10_sub_pixel_variance4x8_c;
const SubpixVarMxNFunc highbd_10_subpel_var4x4_c =
    vpx_highbd_10_sub_pixel_variance4x4_c;
const SubpixVarMxNFunc highbd_12_subpel_var64x64_c =
    vpx_highbd_12_sub_pixel_variance64x64_c;
const SubpixVarMxNFunc highbd_12_subpel_var64x32_c =
    vpx_highbd_12_sub_pixel_variance64x32_c;
const SubpixVarMxNFunc highbd_12_subpel_var32x64_c =
    vpx_highbd_12_sub_pixel_variance32x64_c;
const SubpixVarMxNFunc highbd_12_subpel_var32x32_c =
    vpx_highbd_12_sub_pixel_variance32x32_c;
const SubpixVarMxNFunc highbd_12_subpel_var32x16_c =
    vpx_highbd_12_sub_pixel_variance32x16_c;
const SubpixVarMxNFunc highbd_12_subpel_var16x32_c =
    vpx_highbd_12_sub_pixel_variance16x32_c;
const SubpixVarMxNFunc highbd_12_subpel_var16x16_c =
    vpx_highbd_12_sub_pixel_variance16x16_c;
const SubpixVarMxNFunc highbd_12_subpel_var16x8_c =
    vpx_highbd_12_sub_pixel_variance16x8_c;
const SubpixVarMxNFunc highbd_12_subpel_var8x16_c =
    vpx_highbd_12_sub_pixel_variance8x16_c;
const SubpixVarMxNFunc highbd_12_subpel_var8x8_c =
    vpx_highbd_12_sub_pixel_variance8x8_c;
const SubpixVarMxNFunc highbd_12_subpel_var8x4_c =
    vpx_highbd_12_sub_pixel_variance8x4_c;
const SubpixVarMxNFunc highbd_12_subpel_var4x8_c =
    vpx_highbd_12_sub_pixel_variance4x8_c;
const SubpixVarMxNFunc highbd_12_subpel_var4x4_c =
    vpx_highbd_12_sub_pixel_variance4x4_c;
INSTANTIATE_TEST_CASE_P(
    C, VpxHBDSubpelVarianceTest,
    ::testing::Values(make_tuple(6, 6, highbd_8_subpel_var64x64_c, 8),
                      make_tuple(6, 5, highbd_8_subpel_var64x32_c, 8),
                      make_tuple(5, 6, highbd_8_subpel_var32x64_c, 8),
                      make_tuple(5, 5, highbd_8_subpel_var32x32_c, 8),
                      make_tuple(5, 4, highbd_8_subpel_var32x16_c, 8),
                      make_tuple(4, 5, highbd_8_subpel_var16x32_c, 8),
                      make_tuple(4, 4, highbd_8_subpel_var16x16_c, 8),
                      make_tuple(4, 3, highbd_8_subpel_var16x8_c, 8),
                      make_tuple(3, 4, highbd_8_subpel_var8x16_c, 8),
                      make_tuple(3, 3, highbd_8_subpel_var8x8_c, 8),
                      make_tuple(3, 2, highbd_8_subpel_var8x4_c, 8),
                      make_tuple(2, 3, highbd_8_subpel_var4x8_c, 8),
                      make_tuple(2, 2, highbd_8_subpel_var4x4_c, 8),
                      make_tuple(6, 6, highbd_10_subpel_var64x64_c, 10),
                      make_tuple(6, 5, highbd_10_subpel_var64x32_c, 10),
                      make_tuple(5, 6, highbd_10_subpel_var32x64_c, 10),
                      make_tuple(5, 5, highbd_10_subpel_var32x32_c, 10),
                      make_tuple(5, 4, highbd_10_subpel_var32x16_c, 10),
                      make_tuple(4, 5, highbd_10_subpel_var16x32_c, 10),
                      make_tuple(4, 4, highbd_10_subpel_var16x16_c, 10),
                      make_tuple(4, 3, highbd_10_subpel_var16x8_c, 10),
                      make_tuple(3, 4, highbd_10_subpel_var8x16_c, 10),
                      make_tuple(3, 3, highbd_10_subpel_var8x8_c, 10),
                      make_tuple(3, 2, highbd_10_subpel_var8x4_c, 10),
                      make_tuple(2, 3, highbd_10_subpel_var4x8_c, 10),
                      make_tuple(2, 2, highbd_10_subpel_var4x4_c, 10),
                      make_tuple(6, 6, highbd_12_subpel_var64x64_c, 12),
                      make_tuple(6, 5, highbd_12_subpel_var64x32_c, 12),
                      make_tuple(5, 6, highbd_12_subpel_var32x64_c, 12),
                      make_tuple(5, 5, highbd_12_subpel_var32x32_c, 12),
                      make_tuple(5, 4, highbd_12_subpel_var32x16_c, 12),
                      make_tuple(4, 5, highbd_12_subpel_var16x32_c, 12),
                      make_tuple(4, 4, highbd_12_subpel_var16x16_c, 12),
                      make_tuple(4, 3, highbd_12_subpel_var16x8_c, 12),
                      make_tuple(3, 4, highbd_12_subpel_var8x16_c, 12),
                      make_tuple(3, 3, highbd_12_subpel_var8x8_c, 12),
                      make_tuple(3, 2, highbd_12_subpel_var8x4_c, 12),
                      make_tuple(2, 3, highbd_12_subpel_var4x8_c, 12),
                      make_tuple(2, 2, highbd_12_subpel_var4x4_c, 12)));

const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var64x64_c =
    vpx_highbd_8_sub_pixel_avg_variance64x64_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var64x32_c =
    vpx_highbd_8_sub_pixel_avg_variance64x32_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var32x64_c =
    vpx_highbd_8_sub_pixel_avg_variance32x64_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var32x32_c =
    vpx_highbd_8_sub_pixel_avg_variance32x32_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var32x16_c =
    vpx_highbd_8_sub_pixel_avg_variance32x16_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var16x32_c =
    vpx_highbd_8_sub_pixel_avg_variance16x32_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var16x16_c =
    vpx_highbd_8_sub_pixel_avg_variance16x16_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var16x8_c =
    vpx_highbd_8_sub_pixel_avg_variance16x8_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var8x16_c =
    vpx_highbd_8_sub_pixel_avg_variance8x16_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var8x8_c =
    vpx_highbd_8_sub_pixel_avg_variance8x8_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var8x4_c =
    vpx_highbd_8_sub_pixel_avg_variance8x4_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var4x8_c =
    vpx_highbd_8_sub_pixel_avg_variance4x8_c;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_var4x4_c =
    vpx_highbd_8_sub_pixel_avg_variance4x4_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var64x64_c =
    vpx_highbd_10_sub_pixel_avg_variance64x64_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var64x32_c =
    vpx_highbd_10_sub_pixel_avg_variance64x32_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var32x64_c =
    vpx_highbd_10_sub_pixel_avg_variance32x64_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var32x32_c =
    vpx_highbd_10_sub_pixel_avg_variance32x32_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var32x16_c =
    vpx_highbd_10_sub_pixel_avg_variance32x16_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var16x32_c =
    vpx_highbd_10_sub_pixel_avg_variance16x32_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var16x16_c =
    vpx_highbd_10_sub_pixel_avg_variance16x16_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var16x8_c =
    vpx_highbd_10_sub_pixel_avg_variance16x8_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var8x16_c =
    vpx_highbd_10_sub_pixel_avg_variance8x16_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var8x8_c =
    vpx_highbd_10_sub_pixel_avg_variance8x8_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var8x4_c =
    vpx_highbd_10_sub_pixel_avg_variance8x4_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var4x8_c =
    vpx_highbd_10_sub_pixel_avg_variance4x8_c;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_var4x4_c =
    vpx_highbd_10_sub_pixel_avg_variance4x4_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var64x64_c =
    vpx_highbd_12_sub_pixel_avg_variance64x64_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var64x32_c =
    vpx_highbd_12_sub_pixel_avg_variance64x32_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var32x64_c =
    vpx_highbd_12_sub_pixel_avg_variance32x64_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var32x32_c =
    vpx_highbd_12_sub_pixel_avg_variance32x32_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var32x16_c =
    vpx_highbd_12_sub_pixel_avg_variance32x16_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var16x32_c =
    vpx_highbd_12_sub_pixel_avg_variance16x32_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var16x16_c =
    vpx_highbd_12_sub_pixel_avg_variance16x16_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var16x8_c =
    vpx_highbd_12_sub_pixel_avg_variance16x8_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var8x16_c =
    vpx_highbd_12_sub_pixel_avg_variance8x16_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var8x8_c =
    vpx_highbd_12_sub_pixel_avg_variance8x8_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var8x4_c =
    vpx_highbd_12_sub_pixel_avg_variance8x4_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var4x8_c =
    vpx_highbd_12_sub_pixel_avg_variance4x8_c;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_var4x4_c =
    vpx_highbd_12_sub_pixel_avg_variance4x4_c;
INSTANTIATE_TEST_CASE_P(
    C, VpxHBDSubpelAvgVarianceTest,
    ::testing::Values(
        make_tuple(6, 6, highbd_8_subpel_avg_var64x64_c, 8),
        make_tuple(6, 5, highbd_8_subpel_avg_var64x32_c, 8),
        make_tuple(5, 6, highbd_8_subpel_avg_var32x64_c, 8),
        make_tuple(5, 5, highbd_8_subpel_avg_var32x32_c, 8),
        make_tuple(5, 4, highbd_8_subpel_avg_var32x16_c, 8),
        make_tuple(4, 5, highbd_8_subpel_avg_var16x32_c, 8),
        make_tuple(4, 4, highbd_8_subpel_avg_var16x16_c, 8),
        make_tuple(4, 3, highbd_8_subpel_avg_var16x8_c, 8),
        make_tuple(3, 4, highbd_8_subpel_avg_var8x16_c, 8),
        make_tuple(3, 3, highbd_8_subpel_avg_var8x8_c, 8),
        make_tuple(3, 2, highbd_8_subpel_avg_var8x4_c, 8),
        make_tuple(2, 3, highbd_8_subpel_avg_var4x8_c, 8),
        make_tuple(2, 2, highbd_8_subpel_avg_var4x4_c, 8),
        make_tuple(6, 6, highbd_10_subpel_avg_var64x64_c, 10),
        make_tuple(6, 5, highbd_10_subpel_avg_var64x32_c, 10),
        make_tuple(5, 6, highbd_10_subpel_avg_var32x64_c, 10),
        make_tuple(5, 5, highbd_10_subpel_avg_var32x32_c, 10),
        make_tuple(5, 4, highbd_10_subpel_avg_var32x16_c, 10),
        make_tuple(4, 5, highbd_10_subpel_avg_var16x32_c, 10),
        make_tuple(4, 4, highbd_10_subpel_avg_var16x16_c, 10),
        make_tuple(4, 3, highbd_10_subpel_avg_var16x8_c, 10),
        make_tuple(3, 4, highbd_10_subpel_avg_var8x16_c, 10),
        make_tuple(3, 3, highbd_10_subpel_avg_var8x8_c, 10),
        make_tuple(3, 2, highbd_10_subpel_avg_var8x4_c, 10),
        make_tuple(2, 3, highbd_10_subpel_avg_var4x8_c, 10),
        make_tuple(2, 2, highbd_10_subpel_avg_var4x4_c, 10),
        make_tuple(6, 6, highbd_12_subpel_avg_var64x64_c, 12),
        make_tuple(6, 5, highbd_12_subpel_avg_var64x32_c, 12),
        make_tuple(5, 6, highbd_12_subpel_avg_var32x64_c, 12),
        make_tuple(5, 5, highbd_12_subpel_avg_var32x32_c, 12),
        make_tuple(5, 4, highbd_12_subpel_avg_var32x16_c, 12),
        make_tuple(4, 5, highbd_12_subpel_avg_var16x32_c, 12),
        make_tuple(4, 4, highbd_12_subpel_avg_var16x16_c, 12),
        make_tuple(4, 3, highbd_12_subpel_avg_var16x8_c, 12),
        make_tuple(3, 4, highbd_12_subpel_avg_var8x16_c, 12),
        make_tuple(3, 3, highbd_12_subpel_avg_var8x8_c, 12),
        make_tuple(3, 2, highbd_12_subpel_avg_var8x4_c, 12),
        make_tuple(2, 3, highbd_12_subpel_avg_var4x8_c, 12),
        make_tuple(2, 2, highbd_12_subpel_avg_var4x4_c, 12)));
1228
#endif  // CONFIG_VP9_HIGHBITDEPTH
1229

James Zern's avatar
James Zern committed
1230
#if HAVE_MMX
1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242
const VarianceMxNFunc mse16x16_mmx = vpx_mse16x16_mmx;
INSTANTIATE_TEST_CASE_P(MMX, VpxMseTest,
                        ::testing::Values(make_tuple(4, 4, mse16x16_mmx)));

INSTANTIATE_TEST_CASE_P(MMX, SumOfSquaresTest,
                        ::testing::Values(vpx_get_mb_ss_mmx));

const VarianceMxNFunc variance16x16_mmx = vpx_variance16x16_mmx;
const VarianceMxNFunc variance16x8_mmx = vpx_variance16x8_mmx;
const VarianceMxNFunc variance8x16_mmx = vpx_variance8x16_mmx;
const VarianceMxNFunc variance8x8_mmx = vpx_variance8x8_mmx;
const VarianceMxNFunc variance4x4_mmx = vpx_variance4x4_mmx;
James Zern's avatar
James Zern committed
1243
INSTANTIATE_TEST_CASE_P(
1244 1245
    MMX, VpxVarianceTest,
    ::testing::Values(make_tuple(4, 4, variance16x16_mmx, 0),
1246
                      make_tuple(4, 3, variance16x8_mmx, 0),
1247 1248 1249
                      make_tuple(3, 4, variance8x16_mmx, 0),
                      make_tuple(3, 3, variance8x8_mmx, 0),
                      make_tuple(2, 2, variance4x4_mmx, 0)));
1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262

const SubpixVarMxNFunc subpel_var16x16_mmx = vpx_sub_pixel_variance16x16_mmx;
const SubpixVarMxNFunc subpel_var16x8_mmx = vpx_sub_pixel_variance16x8_mmx;
const SubpixVarMxNFunc subpel_var8x16_mmx = vpx_sub_pixel_variance8x16_mmx;
const SubpixVarMxNFunc subpel_var8x8_mmx = vpx_sub_pixel_variance8x8_mmx;
const SubpixVarMxNFunc subpel_var4x4_mmx = vpx_sub_pixel_variance4x4_mmx;
INSTANTIATE_TEST_CASE_P(
    MMX, VpxSubpelVarianceTest,
    ::testing::Values(make_tuple(4, 4, subpel_var16x16_mmx, 0),
                      make_tuple(4, 3, subpel_var16x8_mmx, 0),
                      make_tuple(3, 4, subpel_var8x16_mmx, 0),
                      make_tuple(3, 3, subpel_var8x8_mmx, 0),
                      make_tuple(2, 2, subpel_var4x4_mmx, 0)));
1263
#endif  // HAVE_MMX
James Zern's avatar
James Zern committed
1264 1265

#if HAVE_SSE2
1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291
INSTANTIATE_TEST_CASE_P(SSE2, SumOfSquaresTest,
                        ::testing::Values(vpx_get_mb_ss_sse2));

const VarianceMxNFunc mse16x16_sse2 = vpx_mse16x16_sse2;
const VarianceMxNFunc mse16x8_sse2 = vpx_mse16x8_sse2;
const VarianceMxNFunc mse8x16_sse2 = vpx_mse8x16_sse2;
const VarianceMxNFunc mse8x8_sse2 = vpx_mse8x8_sse2;
INSTANTIATE_TEST_CASE_P(SSE2, VpxMseTest,
                        ::testing::Values(make_tuple(4, 4, mse16x16_sse2),
                                          make_tuple(4, 3, mse16x8_sse2),
                                          make_tuple(3, 4, mse8x16_sse2),
                                          make_tuple(3, 3, mse8x8_sse2)));

const VarianceMxNFunc variance64x64_sse2 = vpx_variance64x64_sse2;
const VarianceMxNFunc variance64x32_sse2 = vpx_variance64x32_sse2;
const VarianceMxNFunc variance32x64_sse2 = vpx_variance32x64_sse2;
const VarianceMxNFunc variance32x32_sse2 = vpx_variance32x32_sse2;
const VarianceMxNFunc variance32x16_sse2 = vpx_variance32x16_sse2;
const VarianceMxNFunc variance16x32_sse2 = vpx_variance16x32_sse2;
const VarianceMxNFunc variance16x16_sse2 = vpx_variance16x16_sse2;
const VarianceMxNFunc variance16x8_sse2 = vpx_variance16x8_sse2;
const VarianceMxNFunc variance8x16_sse2 = vpx_variance8x16_sse2;
const VarianceMxNFunc variance8x8_sse2 = vpx_variance8x8_sse2;
const VarianceMxNFunc variance8x4_sse2 = vpx_variance8x4_sse2;
const VarianceMxNFunc variance4x8_sse2 = vpx_variance4x8_sse2;
const VarianceMxNFunc variance4x4_sse2 = vpx_variance4x4_sse2;
James Zern's avatar
James Zern committed
1292
INSTANTIATE_TEST_CASE_P(
1293 1294 1295 1296 1297 1298 1299 1300 1301 1302 1303 1304 1305 1306
    SSE2, VpxVarianceTest,
    ::testing::Values(make_tuple(6, 6, variance64x64_sse2, 0),
                      make_tuple(6, 5, variance64x32_sse2, 0),
                      make_tuple(5, 6, variance32x64_sse2, 0),
                      make_tuple(5, 5, variance32x32_sse2, 0),
                      make_tuple(5, 4, variance32x16_sse2, 0),
                      make_tuple(4, 5, variance16x32_sse2, 0),
                      make_tuple(4, 4, variance16x16_sse2, 0),
                      make_tuple(4, 3, variance16x8_sse2, 0),
                      make_tuple(3, 4, variance8x16_sse2, 0),
                      make_tuple(3, 3, variance8x8_sse2, 0),
                      make_tuple(3, 2, variance8x4_sse2, 0),
                      make_tuple(2, 3, variance4x8_sse2, 0),
                      make_tuple(2, 2, variance4x4_sse2, 0)));
1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390

#if CONFIG_USE_X86INC
const SubpixVarMxNFunc subpel_variance64x64_sse2 =
    vpx_sub_pixel_variance64x64_sse2;
const SubpixVarMxNFunc subpel_variance64x32_sse2 =
    vpx_sub_pixel_variance64x32_sse2;
const SubpixVarMxNFunc subpel_variance32x64_sse2 =
    vpx_sub_pixel_variance32x64_sse2;
const SubpixVarMxNFunc subpel_variance32x32_sse2 =
    vpx_sub_pixel_variance32x32_sse2;
const SubpixVarMxNFunc subpel_variance32x16_sse2 =
    vpx_sub_pixel_variance32x16_sse2;
const SubpixVarMxNFunc subpel_variance16x32_sse2 =
    vpx_sub_pixel_variance16x32_sse2;
const SubpixVarMxNFunc subpel_variance16x16_sse2 =
    vpx_sub_pixel_variance16x16_sse2;
const SubpixVarMxNFunc subpel_variance16x8_sse2 =
    vpx_sub_pixel_variance16x8_sse2;
const SubpixVarMxNFunc subpel_variance8x16_sse2 =
    vpx_sub_pixel_variance8x16_sse2;
const SubpixVarMxNFunc subpel_variance8x8_sse2 = vpx_sub_pixel_variance8x8_sse2;
const SubpixVarMxNFunc subpel_variance8x4_sse2 = vpx_sub_pixel_variance8x4_sse2;
const SubpixVarMxNFunc subpel_variance4x8_sse = vpx_sub_pixel_variance4x8_sse;
const SubpixVarMxNFunc subpel_variance4x4_sse = vpx_sub_pixel_variance4x4_sse;
INSTANTIATE_TEST_CASE_P(
    SSE2, VpxSubpelVarianceTest,
    ::testing::Values(make_tuple(6, 6, subpel_variance64x64_sse2, 0),
                      make_tuple(6, 5, subpel_variance64x32_sse2, 0),
                      make_tuple(5, 6, subpel_variance32x64_sse2, 0),
                      make_tuple(5, 5, subpel_variance32x32_sse2, 0),
                      make_tuple(5, 4, subpel_variance32x16_sse2, 0),
                      make_tuple(4, 5, subpel_variance16x32_sse2, 0),
                      make_tuple(4, 4, subpel_variance16x16_sse2, 0),
                      make_tuple(4, 3, subpel_variance16x8_sse2, 0),
                      make_tuple(3, 4, subpel_variance8x16_sse2, 0),
                      make_tuple(3, 3, subpel_variance8x8_sse2, 0),
                      make_tuple(3, 2, subpel_variance8x4_sse2, 0),
                      make_tuple(2, 3, subpel_variance4x8_sse, 0),
                      make_tuple(2, 2, subpel_variance4x4_sse, 0)));

const SubpixAvgVarMxNFunc subpel_avg_variance64x64_sse2 =
    vpx_sub_pixel_avg_variance64x64_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance64x32_sse2 =
    vpx_sub_pixel_avg_variance64x32_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance32x64_sse2 =
    vpx_sub_pixel_avg_variance32x64_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance32x32_sse2 =
    vpx_sub_pixel_avg_variance32x32_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance32x16_sse2 =
    vpx_sub_pixel_avg_variance32x16_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance16x32_sse2 =
    vpx_sub_pixel_avg_variance16x32_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance16x16_sse2 =
    vpx_sub_pixel_avg_variance16x16_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance16x8_sse2 =
    vpx_sub_pixel_avg_variance16x8_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance8x16_sse2 =
    vpx_sub_pixel_avg_variance8x16_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance8x8_sse2 =
    vpx_sub_pixel_avg_variance8x8_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance8x4_sse2 =
    vpx_sub_pixel_avg_variance8x4_sse2;
const SubpixAvgVarMxNFunc subpel_avg_variance4x8_sse =
    vpx_sub_pixel_avg_variance4x8_sse;
const SubpixAvgVarMxNFunc subpel_avg_variance4x4_sse =
    vpx_sub_pixel_avg_variance4x4_sse;
INSTANTIATE_TEST_CASE_P(
    SSE2, VpxSubpelAvgVarianceTest,
    ::testing::Values(
                      make_tuple(6, 6, subpel_avg_variance64x64_sse2, 0),
                      make_tuple(6, 5, subpel_avg_variance64x32_sse2, 0),
                      make_tuple(5, 6, subpel_avg_variance32x64_sse2, 0),
                      make_tuple(5, 5, subpel_avg_variance32x32_sse2, 0),
                      make_tuple(5, 4, subpel_avg_variance32x16_sse2, 0),
                      make_tuple(4, 5, subpel_avg_variance16x32_sse2, 0),
                      make_tuple(4, 4, subpel_avg_variance16x16_sse2, 0),
                      make_tuple(4, 3, subpel_avg_variance16x8_sse2, 0),
                      make_tuple(3, 4, subpel_avg_variance8x16_sse2, 0),
                      make_tuple(3, 3, subpel_avg_variance8x8_sse2, 0),
                      make_tuple(3, 2, subpel_avg_variance8x4_sse2, 0),
                      make_tuple(2, 3, subpel_avg_variance4x8_sse, 0),
                      make_tuple(2, 2, subpel_avg_variance4x4_sse, 0)));
#endif  // CONFIG_USE_X86INC

1391 1392 1393 1394 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481
#if CONFIG_VP9_HIGHBITDEPTH
/* TODO(debargha): This test does not support the highbd version
const VarianceMxNFunc highbd_12_mse16x16_sse2 = vpx_highbd_12_mse16x16_sse2;
const VarianceMxNFunc highbd_12_mse16x8_sse2 = vpx_highbd_12_mse16x8_sse2;
const VarianceMxNFunc highbd_12_mse8x16_sse2 = vpx_highbd_12_mse8x16_sse2;
const VarianceMxNFunc highbd_12_mse8x8_sse2 = vpx_highbd_12_mse8x8_sse2;

const VarianceMxNFunc highbd_10_mse16x16_sse2 = vpx_highbd_10_mse16x16_sse2;
const VarianceMxNFunc highbd_10_mse16x8_sse2 = vpx_highbd_10_mse16x8_sse2;
const VarianceMxNFunc highbd_10_mse8x16_sse2 = vpx_highbd_10_mse8x16_sse2;
const VarianceMxNFunc highbd_10_mse8x8_sse2 = vpx_highbd_10_mse8x8_sse2;

const VarianceMxNFunc highbd_8_mse16x16_sse2 = vpx_highbd_8_mse16x16_sse2;
const VarianceMxNFunc highbd_8_mse16x8_sse2 = vpx_highbd_8_mse16x8_sse2;
const VarianceMxNFunc highbd_8_mse8x16_sse2 = vpx_highbd_8_mse8x16_sse2;
const VarianceMxNFunc highbd_8_mse8x8_sse2 = vpx_highbd_8_mse8x8_sse2;
INSTANTIATE_TEST_CASE_P(
    SSE2, VpxHBDMseTest, ::testing::Values(make_tuple(4, 4, highbd_12_mse16x16_sse2),
                                           make_tuple(4, 3, highbd_12_mse16x8_sse2),
                                           make_tuple(3, 4, highbd_12_mse8x16_sse2),
                                           make_tuple(3, 3, highbd_12_mse8x8_sse2),
                                           make_tuple(4, 4, highbd_10_mse16x16_sse2),
                                           make_tuple(4, 3, highbd_10_mse16x8_sse2),
                                           make_tuple(3, 4, highbd_10_mse8x16_sse2),
                                           make_tuple(3, 3, highbd_10_mse8x8_sse2),
                                           make_tuple(4, 4, highbd_8_mse16x16_sse2),
                                           make_tuple(4, 3, highbd_8_mse16x8_sse2),
                                           make_tuple(3, 4, highbd_8_mse8x16_sse2),
                                           make_tuple(3, 3, highbd_8_mse8x8_sse2)));
*/

const VarianceMxNFunc highbd_12_variance64x64_sse2 =
    vpx_highbd_12_variance64x64_sse2;
const VarianceMxNFunc highbd_12_variance64x32_sse2 =
    vpx_highbd_12_variance64x32_sse2;
const VarianceMxNFunc highbd_12_variance32x64_sse2 =
    vpx_highbd_12_variance32x64_sse2;
const VarianceMxNFunc highbd_12_variance32x32_sse2 =
    vpx_highbd_12_variance32x32_sse2;
const VarianceMxNFunc highbd_12_variance32x16_sse2 =
    vpx_highbd_12_variance32x16_sse2;
const VarianceMxNFunc highbd_12_variance16x32_sse2 =
    vpx_highbd_12_variance16x32_sse2;
const VarianceMxNFunc highbd_12_variance16x16_sse2 =
    vpx_highbd_12_variance16x16_sse2;
const VarianceMxNFunc highbd_12_variance16x8_sse2 =
    vpx_highbd_12_variance16x8_sse2;
const VarianceMxNFunc highbd_12_variance8x16_sse2 =
    vpx_highbd_12_variance8x16_sse2;
const VarianceMxNFunc highbd_12_variance8x8_sse2 =
    vpx_highbd_12_variance8x8_sse2;
const VarianceMxNFunc highbd_10_variance64x64_sse2 =
    vpx_highbd_10_variance64x64_sse2;
const VarianceMxNFunc highbd_10_variance64x32_sse2 =
    vpx_highbd_10_variance64x32_sse2;
const VarianceMxNFunc highbd_10_variance32x64_sse2 =
    vpx_highbd_10_variance32x64_sse2;
const VarianceMxNFunc highbd_10_variance32x32_sse2 =
    vpx_highbd_10_variance32x32_sse2;
const VarianceMxNFunc highbd_10_variance32x16_sse2 =
    vpx_highbd_10_variance32x16_sse2;
const VarianceMxNFunc highbd_10_variance16x32_sse2 =
    vpx_highbd_10_variance16x32_sse2;
const VarianceMxNFunc highbd_10_variance16x16_sse2 =
    vpx_highbd_10_variance16x16_sse2;
const VarianceMxNFunc highbd_10_variance16x8_sse2 =
    vpx_highbd_10_variance16x8_sse2;
const VarianceMxNFunc highbd_10_variance8x16_sse2 =
    vpx_highbd_10_variance8x16_sse2;
const VarianceMxNFunc highbd_10_variance8x8_sse2 =
    vpx_highbd_10_variance8x8_sse2;
const VarianceMxNFunc highbd_8_variance64x64_sse2 =
    vpx_highbd_8_variance64x64_sse2;
const VarianceMxNFunc highbd_8_variance64x32_sse2 =
    vpx_highbd_8_variance64x32_sse2;
const VarianceMxNFunc highbd_8_variance32x64_sse2 =
    vpx_highbd_8_variance32x64_sse2;
const VarianceMxNFunc highbd_8_variance32x32_sse2 =
    vpx_highbd_8_variance32x32_sse2;
const VarianceMxNFunc highbd_8_variance32x16_sse2 =
    vpx_highbd_8_variance32x16_sse2;
const VarianceMxNFunc highbd_8_variance16x32_sse2 =
    vpx_highbd_8_variance16x32_sse2;
const VarianceMxNFunc highbd_8_variance16x16_sse2 =
    vpx_highbd_8_variance16x16_sse2;
const VarianceMxNFunc highbd_8_variance16x8_sse2 =
    vpx_highbd_8_variance16x8_sse2;
const VarianceMxNFunc highbd_8_variance8x16_sse2 =
    vpx_highbd_8_variance8x16_sse2;
const VarianceMxNFunc highbd_8_variance8x8_sse2 =
    vpx_highbd_8_variance8x8_sse2;
James Zern's avatar
James Zern committed
1482

1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504 1505 1506 1507 1508 1509 1510 1511 1512 1513 1514
INSTANTIATE_TEST_CASE_P(
    SSE2, VpxHBDVarianceTest,
    ::testing::Values(make_tuple(6, 6, highbd_12_variance64x64_sse2, 12),
                      make_tuple(6, 5, highbd_12_variance64x32_sse2, 12),
                      make_tuple(5, 6, highbd_12_variance32x64_sse2, 12),
                      make_tuple(5, 5, highbd_12_variance32x32_sse2, 12),
                      make_tuple(5, 4, highbd_12_variance32x16_sse2, 12),
                      make_tuple(4, 5, highbd_12_variance16x32_sse2, 12),
                      make_tuple(4, 4, highbd_12_variance16x16_sse2, 12),
                      make_tuple(4, 3, highbd_12_variance16x8_sse2, 12),
                      make_tuple(3, 4, highbd_12_variance8x16_sse2, 12),
                      make_tuple(3, 3, highbd_12_variance8x8_sse2, 12),
                      make_tuple(6, 6, highbd_10_variance64x64_sse2, 10),
                      make_tuple(6, 5, highbd_10_variance64x32_sse2, 10),
                      make_tuple(5, 6, highbd_10_variance32x64_sse2, 10),
                      make_tuple(5, 5, highbd_10_variance32x32_sse2, 10),
                      make_tuple(5, 4, highbd_10_variance32x16_sse2, 10),
                      make_tuple(4, 5, highbd_10_variance16x32_sse2, 10),
                      make_tuple(4, 4, highbd_10_variance16x16_sse2, 10),
                      make_tuple(4, 3, highbd_10_variance16x8_sse2, 10),
                      make_tuple(3, 4, highbd_10_variance8x16_sse2, 10),
                      make_tuple(3, 3, highbd_10_variance8x8_sse2, 10),
                      make_tuple(6, 6, highbd_8_variance64x64_sse2, 8),
                      make_tuple(6, 5, highbd_8_variance64x32_sse2, 8),
                      make_tuple(5, 6, highbd_8_variance32x64_sse2, 8),
                      make_tuple(5, 5, highbd_8_variance32x32_sse2, 8),
                      make_tuple(5, 4, highbd_8_variance32x16_sse2, 8),
                      make_tuple(4, 5, highbd_8_variance16x32_sse2, 8),
                      make_tuple(4, 4, highbd_8_variance16x16_sse2, 8),
                      make_tuple(4, 3, highbd_8_variance16x8_sse2, 8),
                      make_tuple(3, 4, highbd_8_variance8x16_sse2, 8),
                      make_tuple(3, 3, highbd_8_variance8x8_sse2, 8)));
Johann's avatar
Johann committed
1515

Jim Bankoski's avatar
Jim Bankoski committed
1516
#if CONFIG_USE_X86INC
Johann's avatar
Johann committed
1517
const SubpixVarMxNFunc highbd_12_subpel_variance64x64_sse2 =
1518 1519 1520 1521 1522 1523 1524 1525 1526 1527 1528 1529 1530 1531 1532 1533 1534 1535 1536 1537 1538 1539 1540 1541 1542 1543 1544 1545 1546 1547 1548 1549 1550 1551 1552 1553 1554 1555 1556 1557 1558 1559 1560 1561 1562 1563 1564 1565 1566 1567 1568 1569 1570 1571 1572 1573 1574 1575 1576 1577 1578 1579 1580 1581 1582
    vpx_highbd_12_sub_pixel_variance64x64_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance64x32_sse2 =
    vpx_highbd_12_sub_pixel_variance64x32_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance32x64_sse2 =
    vpx_highbd_12_sub_pixel_variance32x64_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance32x32_sse2 =
    vpx_highbd_12_sub_pixel_variance32x32_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance32x16_sse2 =
    vpx_highbd_12_sub_pixel_variance32x16_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance16x32_sse2 =
    vpx_highbd_12_sub_pixel_variance16x32_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance16x16_sse2 =
    vpx_highbd_12_sub_pixel_variance16x16_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance16x8_sse2 =
    vpx_highbd_12_sub_pixel_variance16x8_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance8x16_sse2 =
    vpx_highbd_12_sub_pixel_variance8x16_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance8x8_sse2 =
    vpx_highbd_12_sub_pixel_variance8x8_sse2;
const SubpixVarMxNFunc highbd_12_subpel_variance8x4_sse2 =
    vpx_highbd_12_sub_pixel_variance8x4_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance64x64_sse2 =
    vpx_highbd_10_sub_pixel_variance64x64_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance64x32_sse2 =
    vpx_highbd_10_sub_pixel_variance64x32_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance32x64_sse2 =
    vpx_highbd_10_sub_pixel_variance32x64_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance32x32_sse2 =
    vpx_highbd_10_sub_pixel_variance32x32_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance32x16_sse2 =
    vpx_highbd_10_sub_pixel_variance32x16_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance16x32_sse2 =
    vpx_highbd_10_sub_pixel_variance16x32_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance16x16_sse2 =
    vpx_highbd_10_sub_pixel_variance16x16_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance16x8_sse2 =
    vpx_highbd_10_sub_pixel_variance16x8_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance8x16_sse2 =
    vpx_highbd_10_sub_pixel_variance8x16_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance8x8_sse2 =
    vpx_highbd_10_sub_pixel_variance8x8_sse2;
const SubpixVarMxNFunc highbd_10_subpel_variance8x4_sse2 =
    vpx_highbd_10_sub_pixel_variance8x4_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance64x64_sse2 =
    vpx_highbd_8_sub_pixel_variance64x64_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance64x32_sse2 =
    vpx_highbd_8_sub_pixel_variance64x32_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance32x64_sse2 =
    vpx_highbd_8_sub_pixel_variance32x64_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance32x32_sse2 =
    vpx_highbd_8_sub_pixel_variance32x32_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance32x16_sse2 =
    vpx_highbd_8_sub_pixel_variance32x16_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance16x32_sse2 =
    vpx_highbd_8_sub_pixel_variance16x32_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance16x16_sse2 =
    vpx_highbd_8_sub_pixel_variance16x16_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance16x8_sse2 =
    vpx_highbd_8_sub_pixel_variance16x8_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance8x16_sse2 =
    vpx_highbd_8_sub_pixel_variance8x16_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance8x8_sse2 =
    vpx_highbd_8_sub_pixel_variance8x8_sse2;
const SubpixVarMxNFunc highbd_8_subpel_variance8x4_sse2 =
    vpx_highbd_8_sub_pixel_variance8x4_sse2;
1583
INSTANTIATE_TEST_CASE_P(
1584 1585
    SSE2, VpxHBDSubpelVarianceTest,
    ::testing::Values(make_tuple(6, 6, highbd_12_subpel_variance64x64_sse2, 12),
1586
                      make_tuple(6, 5, highbd_12_subpel_variance64x32_sse2, 12),
1587 1588 1589 1590 1591 1592 1593 1594 1595 1596 1597 1598 1599 1600 1601 1602 1603 1604 1605 1606 1607 1608 1609 1610 1611 1612 1613 1614 1615 1616 1617 1618 1619 1620 1621 1622 1623 1624 1625 1626 1627 1628 1629 1630 1631 1632 1633 1634 1635 1636 1637 1638 1639 1640 1641 1642 1643 1644 1645 1646 1647 1648 1649 1650 1651 1652 1653 1654 1655 1656 1657 1658 1659 1660 1661 1662 1663 1664 1665 1666 1667 1668 1669 1670 1671 1672 1673 1674 1675 1676 1677 1678 1679 1680 1681 1682 1683 1684
                      make_tuple(5, 6, highbd_12_subpel_variance32x64_sse2, 12),
                      make_tuple(5, 5, highbd_12_subpel_variance32x32_sse2, 12),
                      make_tuple(5, 4, highbd_12_subpel_variance32x16_sse2, 12),
                      make_tuple(4, 5, highbd_12_subpel_variance16x32_sse2, 12),
                      make_tuple(4, 4, highbd_12_subpel_variance16x16_sse2, 12),
                      make_tuple(4, 3, highbd_12_subpel_variance16x8_sse2, 12),
                      make_tuple(3, 4, highbd_12_subpel_variance8x16_sse2, 12),
                      make_tuple(3, 3, highbd_12_subpel_variance8x8_sse2, 12),
                      make_tuple(3, 2, highbd_12_subpel_variance8x4_sse2, 12),
                      make_tuple(6, 6, highbd_10_subpel_variance64x64_sse2, 10),
                      make_tuple(6, 5, highbd_10_subpel_variance64x32_sse2, 10),
                      make_tuple(5, 6, highbd_10_subpel_variance32x64_sse2, 10),
                      make_tuple(5, 5, highbd_10_subpel_variance32x32_sse2, 10),
                      make_tuple(5, 4, highbd_10_subpel_variance32x16_sse2, 10),
                      make_tuple(4, 5, highbd_10_subpel_variance16x32_sse2, 10),
                      make_tuple(4, 4, highbd_10_subpel_variance16x16_sse2, 10),
                      make_tuple(4, 3, highbd_10_subpel_variance16x8_sse2, 10),
                      make_tuple(3, 4, highbd_10_subpel_variance8x16_sse2, 10),
                      make_tuple(3, 3, highbd_10_subpel_variance8x8_sse2, 10),
                      make_tuple(3, 2, highbd_10_subpel_variance8x4_sse2, 10),
                      make_tuple(6, 6, highbd_8_subpel_variance64x64_sse2, 8),
                      make_tuple(6, 5, highbd_8_subpel_variance64x32_sse2, 8),
                      make_tuple(5, 6, highbd_8_subpel_variance32x64_sse2, 8),
                      make_tuple(5, 5, highbd_8_subpel_variance32x32_sse2, 8),
                      make_tuple(5, 4, highbd_8_subpel_variance32x16_sse2, 8),
                      make_tuple(4, 5, highbd_8_subpel_variance16x32_sse2, 8),
                      make_tuple(4, 4, highbd_8_subpel_variance16x16_sse2, 8),
                      make_tuple(4, 3, highbd_8_subpel_variance16x8_sse2, 8),
                      make_tuple(3, 4, highbd_8_subpel_variance8x16_sse2, 8),
                      make_tuple(3, 3, highbd_8_subpel_variance8x8_sse2, 8),
                      make_tuple(3, 2, highbd_8_subpel_variance8x4_sse2, 8)));

const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance64x64_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance64x64_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance64x32_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance64x32_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance32x64_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance32x64_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance32x32_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance32x32_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance32x16_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance32x16_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance16x32_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance16x32_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance16x16_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance16x16_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance16x8_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance16x8_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance8x16_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance8x16_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance8x8_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance8x8_sse2;
const SubpixAvgVarMxNFunc highbd_12_subpel_avg_variance8x4_sse2 =
    vpx_highbd_12_sub_pixel_avg_variance8x4_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance64x64_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance64x64_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance64x32_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance64x32_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance32x64_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance32x64_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance32x32_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance32x32_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance32x16_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance32x16_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance16x32_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance16x32_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance16x16_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance16x16_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance16x8_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance16x8_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance8x16_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance8x16_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance8x8_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance8x8_sse2;
const SubpixAvgVarMxNFunc highbd_10_subpel_avg_variance8x4_sse2 =
    vpx_highbd_10_sub_pixel_avg_variance8x4_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance64x64_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance64x64_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance64x32_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance64x32_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance32x64_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance32x64_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance32x32_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance32x32_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance32x16_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance32x16_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance16x32_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance16x32_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance16x16_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance16x16_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance16x8_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance16x8_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance8x16_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance8x16_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance8x8_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance8x8_sse2;
const SubpixAvgVarMxNFunc highbd_8_subpel_avg_variance8x4_sse2 =
    vpx_highbd_8_sub_pixel_avg_variance8x4_sse2;
1685
INSTANTIATE_TEST_CASE_P(
1686
    SSE2, VpxHBDSubpelAvgVarianceTest,
1687
    ::testing::Values(
1688 1689 1690 1691 1692 1693 1694 1695 1696 1697 1698 1699 1700 1701 1702 1703 1704 1705 1706 1707 1708 1709 1710 1711 1712 1713 1714 1715 1716 1717 1718 1719 1720
        make_tuple(6, 6, highbd_12_subpel_avg_variance64x64_sse2, 12),
        make_tuple(6, 5, highbd_12_subpel_avg_variance64x32_sse2, 12),
        make_tuple(5, 6, highbd_12_subpel_avg_variance32x64_sse2, 12),
        make_tuple(5, 5, highbd_12_subpel_avg_variance32x32_sse2, 12),
        make_tuple(5, 4, highbd_12_subpel_avg_variance32x16_sse2, 12),
        make_tuple(4, 5, highbd_12_subpel_avg_variance16x32_sse2, 12),
        make_tuple(4, 4, highbd_12_subpel_avg_variance16x16_sse2, 12),
        make_tuple(4, 3, highbd_12_subpel_avg_variance16x8_sse2, 12),
        make_tuple(3, 4, highbd_12_subpel_avg_variance8x16_sse2, 12),
        make_tuple(3, 3, highbd_12_subpel_avg_variance8x8_sse2, 12),
        make_tuple(3, 2, highbd_12_subpel_avg_variance8x4_sse2, 12),
        make_tuple(6, 6, highbd_10_subpel_avg_variance64x64_sse2, 10),
        make_tuple(6, 5, highbd_10_subpel_avg_variance64x32_sse2, 10),
        make_tuple(5, 6, highbd_10_subpel_avg_variance32x64_sse2, 10),
        make_tuple(5, 5, highbd_10_subpel_avg_variance32x32_sse2, 10),
        make_tuple(5, 4, highbd_10_subpel_avg_variance32x16_sse2, 10),
        make_tuple(4, 5, highbd_10_subpel_avg_variance16x32_sse2, 10),
        make_tuple(4, 4, highbd_10_subpel_avg_variance16x16_sse2, 10),
        make_tuple(4, 3, highbd_10_subpel_avg_variance16x8_sse2, 10),
        make_tuple(3, 4, highbd_10_subpel_avg_variance8x16_sse2, 10),
        make_tuple(3, 3, highbd_10_subpel_avg_variance8x8_sse2, 10),
        make_tuple(3, 2, highbd_10_subpel_avg_variance8x4_sse2, 10),
        make_tuple(6, 6, highbd_8_subpel_avg_variance64x64_sse2, 8),
        make_tuple(6, 5, highbd_8_subpel_avg_variance64x32_sse2, 8),
        make_tuple(5, 6, highbd_8_subpel_avg_variance32x64_sse2, 8),
        make_tuple(5, 5, highbd_8_subpel_avg_variance32x32_sse2, 8),
        make_tuple(5, 4, highbd_8_subpel_avg_variance32x16_sse2, 8),
        make_tuple(4, 5, highbd_8_subpel_avg_variance16x32_sse2, 8),
        make_tuple(4, 4, highbd_8_subpel_avg_variance16x16_sse2, 8),
        make_tuple(4, 3, highbd_8_subpel_avg_variance16x8_sse2, 8),
        make_tuple(3, 4, highbd_8_subpel_avg_variance8x16_sse2, 8),
        make_tuple(3, 3, highbd_8_subpel_avg_variance8x8_sse2, 8),
        make_tuple(3, 2, highbd_8_subpel_avg_variance8x4_sse2, 8)));
1721
#endif  // CONFIG_USE_X86INC
1722
#endif  // CONFIG_VP9_HIGHBITDEPTH
1723
#endif  // HAVE_SSE2
Johann's avatar
Johann committed
1724

1725
#if HAVE_SSSE3
Jim Bankoski's avatar
Jim Bankoski committed
1726
#if CONFIG_USE_X86INC
Johann's avatar
Johann committed
1727
const SubpixVarMxNFunc subpel_variance64x64_ssse3 =
1728 1729 1730 1731 1732 1733 1734 1735 1736 1737 1738 1739 1740 1741 1742 1743 1744 1745 1746 1747 1748 1749 1750 1751 1752
    vpx_sub_pixel_variance64x64_ssse3;
const SubpixVarMxNFunc subpel_variance64x32_ssse3 =
    vpx_sub_pixel_variance64x32_ssse3;
const SubpixVarMxNFunc subpel_variance32x64_ssse3 =
    vpx_sub_pixel_variance32x64_ssse3;
const SubpixVarMxNFunc subpel_variance32x32_ssse3 =
    vpx_sub_pixel_variance32x32_ssse3;
const SubpixVarMxNFunc subpel_variance32x16_ssse3 =
    vpx_sub_pixel_variance32x16_ssse3;
const SubpixVarMxNFunc subpel_variance16x32_ssse3 =
    vpx_sub_pixel_variance16x32_ssse3;
const SubpixVarMxNFunc subpel_variance16x16_ssse3 =
    vpx_sub_pixel_variance16x16_ssse3;
const SubpixVarMxNFunc subpel_variance16x8_ssse3 =
    vpx_sub_pixel_variance16x8_ssse3;
const SubpixVarMxNFunc subpel_variance8x16_ssse3 =
    vpx_sub_pixel_variance8x16_ssse3;
const SubpixVarMxNFunc subpel_variance8x8_ssse3 =
    vpx_sub_pixel_variance8x8_ssse3;
const SubpixVarMxNFunc subpel_variance8x4_ssse3 =
    vpx_sub_pixel_variance8x4_ssse3;
const SubpixVarMxNFunc subpel_variance4x8_ssse3 =
    vpx_sub_pixel_variance4x8_ssse3;
const SubpixVarMxNFunc subpel_variance4x4_ssse3 =
    vpx_sub_pixel_variance4x4_ssse3;
1753
INSTANTIATE_TEST_CASE_P(
1754 1755
    SSSE3, VpxSubpelVarianceTest,
    ::testing::Values(make_tuple(6, 6, subpel_variance64x64_ssse3, 0),
1756
                      make_tuple(6, 5, subpel_variance64x32_ssse3, 0),
1757 1758 1759 1760 1761 1762 1763 1764 1765 1766 1767 1768 1769 1770 1771 1772 1773 1774 1775 1776 1777 1778 1779 1780 1781 1782 1783 1784 1785 1786 1787 1788 1789 1790 1791 1792 1793 1794
                      make_tuple(5, 6, subpel_variance32x64_ssse3, 0),
                      make_tuple(5, 5, subpel_variance32x32_ssse3, 0),
                      make_tuple(5, 4, subpel_variance32x16_ssse3, 0),
                      make_tuple(4, 5, subpel_variance16x32_ssse3, 0),
                      make_tuple(4, 4, subpel_variance16x16_ssse3, 0),
                      make_tuple(4, 3, subpel_variance16x8_ssse3, 0),
                      make_tuple(3, 4, subpel_variance8x16_ssse3, 0),
                      make_tuple(3, 3, subpel_variance8x8_ssse3, 0),
                      make_tuple(3, 2, subpel_variance8x4_ssse3, 0),
                      make_tuple(2, 3, subpel_variance4x8_ssse3, 0),
                      make_tuple(2, 2, subpel_variance4x4_ssse3, 0)));

const SubpixAvgVarMxNFunc subpel_avg_variance64x64_ssse3 =
    vpx_sub_pixel_avg_variance64x64_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance64x32_ssse3 =
    vpx_sub_pixel_avg_variance64x32_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance32x64_ssse3 =
    vpx_sub_pixel_avg_variance32x64_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance32x32_ssse3 =
    vpx_sub_pixel_avg_variance32x32_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance32x16_ssse3 =
    vpx_sub_pixel_avg_variance32x16_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance16x32_ssse3 =
    vpx_sub_pixel_avg_variance16x32_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance16x16_ssse3 =
    vpx_sub_pixel_avg_variance16x16_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance16x8_ssse3 =
    vpx_sub_pixel_avg_variance16x8_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance8x16_ssse3 =
    vpx_sub_pixel_avg_variance8x16_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance8x8_ssse3 =
    vpx_sub_pixel_avg_variance8x8_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance8x4_ssse3 =
    vpx_sub_pixel_avg_variance8x4_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance4x8_ssse3 =
    vpx_sub_pixel_avg_variance4x8_ssse3;
const SubpixAvgVarMxNFunc subpel_avg_variance4x4_ssse3 =
    vpx_sub_pixel_avg_variance4x4_ssse3;
1795
INSTANTIATE_TEST_CASE_P(
1796 1797
    SSSE3, VpxSubpelAvgVarianceTest,
    ::testing::Values(make_tuple(6, 6, subpel_avg_variance64x64_ssse3, 0),
1798
                      make_tuple(6, 5, subpel_avg_variance64x32_ssse3, 0),
1799 1800 1801 1802 1803 1804 1805 1806 1807 1808 1809
                      make_tuple(5, 6, subpel_avg_variance32x64_ssse3, 0),
                      make_tuple(5, 5, subpel_avg_variance32x32_ssse3, 0),
                      make_tuple(5, 4, subpel_avg_variance32x16_ssse3, 0),
                      make_tuple(4, 5, subpel_avg_variance16x32_ssse3, 0),
                      make_tuple(4, 4, subpel_avg_variance16x16_ssse3, 0),
                      make_tuple(4, 3, subpel_avg_variance16x8_ssse3, 0),
                      make_tuple(3, 4, subpel_avg_variance8x16_ssse3, 0),
                      make_tuple(3, 3, subpel_avg_variance8x8_ssse3, 0),
                      make_tuple(3, 2, subpel_avg_variance8x4_ssse3, 0),
                      make_tuple(2, 3, subpel_avg_variance4x8_ssse3, 0),
                      make_tuple(2, 2, subpel_avg_variance4x4_ssse3, 0)));
1810 1811
#endif  // CONFIG_USE_X86INC
#endif  // HAVE_SSSE3
Johann's avatar
Johann committed
1812