2012-11-07 01:58:11 +01:00
|
|
|
/*
|
|
|
|
* 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.
|
|
|
|
*/
|
|
|
|
|
2014-10-16 15:00:54 +02:00
|
|
|
#include <cstdlib>
|
|
|
|
#include <new>
|
2012-11-07 01:58:11 +01:00
|
|
|
|
2014-10-16 15:00:54 +02:00
|
|
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
2013-06-18 07:58:40 +02:00
|
|
|
|
2013-09-05 17:45:56 +02:00
|
|
|
#include "./vpx_config.h"
|
2015-07-29 23:51:36 +02:00
|
|
|
#include "./vpx_dsp_rtcd.h"
|
|
|
|
#include "test/acm_random.h"
|
|
|
|
#include "test/clear_system_state.h"
|
|
|
|
#include "test/register_state_check.h"
|
2014-10-16 15:00:54 +02:00
|
|
|
#include "vpx/vpx_codec.h"
|
|
|
|
#include "vpx/vpx_integer.h"
|
2013-06-22 02:03:57 +02:00
|
|
|
#include "vpx_mem/vpx_mem.h"
|
2015-05-12 04:09:22 +02:00
|
|
|
#include "vpx_ports/mem.h"
|
2017-05-01 18:10:06 +02:00
|
|
|
#include "vpx_ports/vpx_timer.h"
|
2012-11-07 01:58:11 +01:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
2015-05-15 20:52:03 +02:00
|
|
|
typedef unsigned int (*VarianceMxNFunc)(const uint8_t *a, int a_stride,
|
|
|
|
const uint8_t *b, int b_stride,
|
|
|
|
unsigned int *sse);
|
2015-05-26 20:30:25 +02:00
|
|
|
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);
|
2015-06-05 18:54:19 +02:00
|
|
|
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);
|
2015-05-27 20:38:43 +02:00
|
|
|
typedef unsigned int (*Get4x4SseFunc)(const uint8_t *a, int a_stride,
|
2015-05-15 20:52:03 +02:00
|
|
|
const uint8_t *b, int b_stride);
|
2015-06-05 18:54:19 +02:00
|
|
|
typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src);
|
|
|
|
|
2013-06-20 18:34:25 +02:00
|
|
|
using libvpx_test::ACMRandom;
|
|
|
|
|
2015-05-27 23:37:31 +02:00
|
|
|
// 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;
|
2016-01-13 20:18:19 +01:00
|
|
|
*se = (*se + 8) >> 4;
|
2015-05-27 23:37:31 +02:00
|
|
|
break;
|
|
|
|
case VPX_BITS_10:
|
|
|
|
*sse = (*sse + 8) >> 4;
|
2016-01-13 20:18:19 +01:00
|
|
|
*se = (*se + 2) >> 2;
|
2015-05-27 23:37:31 +02:00
|
|
|
break;
|
|
|
|
case VPX_BITS_8:
|
2016-07-26 07:50:48 +02:00
|
|
|
default: break;
|
2015-05-27 23:37:31 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2014-09-06 09:10:25 +02:00
|
|
|
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;
|
|
|
|
}
|
|
|
|
|
2016-04-04 18:44:56 +02:00
|
|
|
/* Note:
|
|
|
|
* Our codebase calculates the "diff" value in the variance algorithm by
|
|
|
|
* (src - ref).
|
|
|
|
*/
|
2016-07-26 07:50:48 +02:00
|
|
|
static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w,
|
|
|
|
int l2h, int src_stride, int ref_stride,
|
|
|
|
uint32_t *sse_ptr, bool use_high_bit_depth_,
|
2015-06-01 22:03:30 +02:00
|
|
|
vpx_bit_depth_t bit_depth) {
|
2014-10-16 15:00:54 +02:00
|
|
|
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_) {
|
2016-07-26 07:50:48 +02:00
|
|
|
diff = src[y * src_stride + x] - ref[y * ref_stride + x];
|
2014-10-16 15:00:54 +02:00
|
|
|
se += diff;
|
|
|
|
sse += diff * diff;
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-14 02:33:22 +02:00
|
|
|
diff = CONVERT_TO_SHORTPTR(src)[y * src_stride + x] -
|
|
|
|
CONVERT_TO_SHORTPTR(ref)[y * ref_stride + x];
|
2014-10-16 15:00:54 +02:00
|
|
|
se += diff;
|
|
|
|
sse += diff * diff;
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-05-27 23:37:31 +02:00
|
|
|
RoundHighBitDepth(bit_depth, &se, &sse);
|
2015-06-01 22:03:30 +02:00
|
|
|
*sse_ptr = static_cast<uint32_t>(sse);
|
2016-07-26 07:50:48 +02:00
|
|
|
return static_cast<uint32_t>(
|
|
|
|
sse - ((static_cast<int64_t>(se) * se) >> (l2w + l2h)));
|
2013-06-20 18:34:25 +02:00
|
|
|
}
|
|
|
|
|
2015-05-26 20:30:25 +02:00
|
|
|
/* 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.
|
|
|
|
*/
|
2015-06-01 22:03:30 +02:00
|
|
|
static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
|
|
|
|
int l2w, int l2h, int xoff, int yoff,
|
2016-07-26 07:50:48 +02:00
|
|
|
uint32_t *sse_ptr, bool use_high_bit_depth_,
|
2015-06-01 22:03:30 +02:00
|
|
|
vpx_bit_depth_t bit_depth) {
|
2014-10-16 15:00:54 +02:00
|
|
|
int64_t se = 0;
|
|
|
|
uint64_t sse = 0;
|
|
|
|
const int w = 1 << l2w;
|
|
|
|
const int h = 1 << l2h;
|
2015-05-26 20:30:25 +02:00
|
|
|
|
|
|
|
xoff <<= 1;
|
|
|
|
yoff <<= 1;
|
|
|
|
|
2014-10-16 15:00:54 +02:00
|
|
|
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;
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} 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;
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-05-27 23:37:31 +02:00
|
|
|
RoundHighBitDepth(bit_depth, &se, &sse);
|
2015-06-01 22:03:30 +02:00
|
|
|
*sse_ptr = static_cast<uint32_t>(sse);
|
2016-07-26 07:50:48 +02:00
|
|
|
return static_cast<uint32_t>(
|
|
|
|
sse - ((static_cast<int64_t>(se) * se) >> (l2w + l2h)));
|
2013-06-20 18:34:25 +02:00
|
|
|
}
|
2012-11-07 01:58:11 +01:00
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
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,
|
2016-07-14 02:33:22 +02:00
|
|
|
uint32_t *sse_ptr,
|
|
|
|
bool use_high_bit_depth,
|
|
|
|
vpx_bit_depth_t bit_depth) {
|
|
|
|
int64_t se = 0;
|
|
|
|
uint64_t sse = 0;
|
|
|
|
const int w = 1 << l2w;
|
|
|
|
const int h = 1 << l2h;
|
|
|
|
|
|
|
|
xoff <<= 1;
|
|
|
|
yoff <<= 1;
|
|
|
|
|
|
|
|
for (int y = 0; y < h; y++) {
|
|
|
|
for (int x = 0; x < w; x++) {
|
|
|
|
// bilinear interpolation at a 16th pel step
|
|
|
|
if (!use_high_bit_depth) {
|
|
|
|
const int a1 = 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;
|
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
} else {
|
|
|
|
const uint16_t *ref16 = CONVERT_TO_SHORTPTR(ref);
|
|
|
|
const uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
|
|
|
|
const 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;
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
RoundHighBitDepth(bit_depth, &se, &sse);
|
|
|
|
*sse_ptr = static_cast<uint32_t>(sse);
|
2016-07-26 07:50:48 +02:00
|
|
|
return static_cast<uint32_t>(
|
|
|
|
sse - ((static_cast<int64_t>(se) * se) >> (l2w + l2h)));
|
2016-07-14 02:33:22 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2014-09-06 09:10:25 +02:00
|
|
|
class SumOfSquaresTest : public ::testing::TestWithParam<SumOfSquaresFunction> {
|
|
|
|
public:
|
|
|
|
SumOfSquaresTest() : func_(GetParam()) {}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
virtual ~SumOfSquaresTest() { libvpx_test::ClearSystemState(); }
|
2014-09-06 09:10:25 +02:00
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Encapsulating struct to store the function to test along with
|
|
|
|
// some testing context.
|
|
|
|
// Can be used for MSE, SSE, Variance, etc.
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename Func>
|
2016-07-14 02:33:22 +02:00
|
|
|
struct TestParams {
|
2016-07-26 07:50:48 +02:00
|
|
|
TestParams(int log2w = 0, int log2h = 0, Func function = NULL,
|
|
|
|
int bit_depth_value = 0)
|
2016-07-14 02:33:22 +02:00
|
|
|
: log2width(log2w), log2height(log2h), func(function) {
|
|
|
|
use_high_bit_depth = (bit_depth_value > 0);
|
|
|
|
if (use_high_bit_depth) {
|
|
|
|
bit_depth = static_cast<vpx_bit_depth_t>(bit_depth_value);
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-14 02:33:22 +02:00
|
|
|
bit_depth = VPX_BITS_8;
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2016-07-14 02:33:22 +02:00
|
|
|
width = 1 << log2width;
|
|
|
|
height = 1 << log2height;
|
|
|
|
block_size = width * height;
|
|
|
|
mask = (1u << bit_depth) - 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
int log2width, log2height;
|
|
|
|
int width, height;
|
|
|
|
int block_size;
|
|
|
|
Func func;
|
|
|
|
vpx_bit_depth_t bit_depth;
|
|
|
|
bool use_high_bit_depth;
|
|
|
|
uint32_t mask;
|
|
|
|
};
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename Func>
|
2016-07-14 02:33:22 +02:00
|
|
|
std::ostream &operator<<(std::ostream &os, const TestParams<Func> &p) {
|
|
|
|
return os << "log2width/height:" << p.log2width << "/" << p.log2height
|
2016-07-26 07:50:48 +02:00
|
|
|
<< " function:" << reinterpret_cast<const void *>(p.func)
|
2016-07-14 02:33:22 +02:00
|
|
|
<< " bit-depth:" << p.bit_depth;
|
|
|
|
}
|
|
|
|
|
|
|
|
// Main class for testing a function type
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename FunctionType>
|
|
|
|
class MainTestClass
|
|
|
|
: public ::testing::TestWithParam<TestParams<FunctionType> > {
|
2016-07-14 02:33:22 +02:00
|
|
|
public:
|
|
|
|
virtual void SetUp() {
|
|
|
|
params_ = this->GetParam();
|
2012-11-07 01:58:11 +01:00
|
|
|
|
2014-09-04 21:24:52 +02:00
|
|
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
2016-07-14 02:33:22 +02:00
|
|
|
const size_t unit =
|
|
|
|
use_high_bit_depth() ? sizeof(uint16_t) : sizeof(uint8_t);
|
2016-07-26 07:50:48 +02:00
|
|
|
src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size() * unit));
|
2016-07-14 02:33:22 +02:00
|
|
|
ref_ = new uint8_t[block_size() * unit];
|
2012-11-07 01:58:11 +01:00
|
|
|
ASSERT_TRUE(src_ != NULL);
|
|
|
|
ASSERT_TRUE(ref_ != NULL);
|
2016-07-14 02:33:22 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
if (use_high_bit_depth()) {
|
|
|
|
// TODO(skal): remove!
|
|
|
|
src_ = CONVERT_TO_BYTEPTR(src_);
|
|
|
|
ref_ = CONVERT_TO_BYTEPTR(ref_);
|
|
|
|
}
|
|
|
|
#endif
|
2012-11-07 01:58:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual void TearDown() {
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2016-07-14 02:33:22 +02:00
|
|
|
if (use_high_bit_depth()) {
|
|
|
|
// TODO(skal): remove!
|
2016-07-26 07:50:48 +02:00
|
|
|
src_ = reinterpret_cast<uint8_t *>(CONVERT_TO_SHORTPTR(src_));
|
|
|
|
ref_ = reinterpret_cast<uint8_t *>(CONVERT_TO_SHORTPTR(ref_));
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2016-07-14 02:33:22 +02:00
|
|
|
#endif
|
|
|
|
|
|
|
|
vpx_free(src_);
|
|
|
|
delete[] ref_;
|
|
|
|
src_ = NULL;
|
|
|
|
ref_ = NULL;
|
2013-06-18 07:58:40 +02:00
|
|
|
libvpx_test::ClearSystemState();
|
2012-11-07 01:58:11 +01:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2016-07-14 02:33:22 +02:00
|
|
|
// We could sub-class MainTestClass into dedicated class for Variance
|
|
|
|
// and MSE/SSE, but it involves a lot of 'this->xxx' dereferencing
|
|
|
|
// to access top class fields xxx. That's cumbersome, so for now we'll just
|
|
|
|
// implement the testing methods here:
|
|
|
|
|
|
|
|
// Variance tests
|
2013-02-23 01:23:36 +01:00
|
|
|
void ZeroTest();
|
2013-06-20 18:34:25 +02:00
|
|
|
void RefTest();
|
2014-10-16 15:00:54 +02:00
|
|
|
void RefStrideTest();
|
2013-02-23 01:23:36 +01:00
|
|
|
void OneQuarterTest();
|
2017-05-01 18:10:06 +02:00
|
|
|
void SpeedTest();
|
2013-02-23 01:23:36 +01:00
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
// MSE/SSE tests
|
|
|
|
void RefTestMse();
|
|
|
|
void RefTestSse();
|
|
|
|
void MaxTestMse();
|
|
|
|
void MaxTestSse();
|
|
|
|
|
|
|
|
protected:
|
2014-09-04 21:24:52 +02:00
|
|
|
ACMRandom rnd_;
|
2014-10-16 15:00:54 +02:00
|
|
|
uint8_t *src_;
|
|
|
|
uint8_t *ref_;
|
2016-07-14 02:33:22 +02:00
|
|
|
TestParams<FunctionType> params_;
|
|
|
|
|
|
|
|
// some relay helpers
|
|
|
|
bool use_high_bit_depth() const { return params_.use_high_bit_depth; }
|
|
|
|
int byte_shift() const { return params_.bit_depth - 8; }
|
|
|
|
int block_size() const { return params_.block_size; }
|
|
|
|
int width() const { return params_.width; }
|
2017-05-01 18:10:06 +02:00
|
|
|
int height() const { return params_.height; }
|
2016-07-14 02:33:22 +02:00
|
|
|
uint32_t mask() const { return params_.mask; }
|
2012-11-07 01:58:11 +01:00
|
|
|
};
|
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Tests related to variance.
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename VarianceFunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<VarianceFunctionType>::ZeroTest() {
|
2012-11-07 01:58:11 +01:00
|
|
|
for (int i = 0; i <= 255; ++i) {
|
2016-07-14 02:33:22 +02:00
|
|
|
if (!use_high_bit_depth()) {
|
|
|
|
memset(src_, i, block_size());
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-26 07:50:48 +02:00
|
|
|
uint16_t *const src16 = CONVERT_TO_SHORTPTR(src_);
|
2016-07-14 02:33:22 +02:00
|
|
|
for (int k = 0; k < block_size(); ++k) src16[k] = i << byte_shift();
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2012-11-07 01:58:11 +01:00
|
|
|
for (int j = 0; j <= 255; ++j) {
|
2016-07-14 02:33:22 +02:00
|
|
|
if (!use_high_bit_depth()) {
|
|
|
|
memset(ref_, j, block_size());
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-26 07:50:48 +02:00
|
|
|
uint16_t *const ref16 = CONVERT_TO_SHORTPTR(ref_);
|
2016-07-14 02:33:22 +02:00
|
|
|
for (int k = 0; k < block_size(); ++k) ref16[k] = j << byte_shift();
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2016-07-14 02:33:22 +02:00
|
|
|
unsigned int sse, var;
|
2014-07-10 06:02:02 +02:00
|
|
|
ASM_REGISTER_STATE_CHECK(
|
2016-07-14 02:33:22 +02:00
|
|
|
var = params_.func(src_, width(), ref_, width(), &sse));
|
2014-10-16 15:00:54 +02:00
|
|
|
EXPECT_EQ(0u, var) << "src values: " << i << " ref values: " << j;
|
2012-11-07 01:58:11 +01:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename VarianceFunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<VarianceFunctionType>::RefTest() {
|
2013-06-20 18:34:25 +02:00
|
|
|
for (int i = 0; i < 10; ++i) {
|
2016-07-14 02:33:22 +02:00
|
|
|
for (int j = 0; j < block_size(); j++) {
|
|
|
|
if (!use_high_bit_depth()) {
|
2016-04-04 18:44:56 +02:00
|
|
|
src_[j] = rnd_.Rand8();
|
|
|
|
ref_[j] = rnd_.Rand8();
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2016-04-04 18:44:56 +02:00
|
|
|
} else {
|
2016-07-14 02:33:22 +02:00
|
|
|
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask();
|
|
|
|
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask();
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2016-04-04 18:44:56 +02:00
|
|
|
}
|
2013-06-20 18:34:25 +02:00
|
|
|
}
|
2016-07-14 02:33:22 +02:00
|
|
|
unsigned int sse1, sse2, var1, var2;
|
|
|
|
const int stride = width();
|
2014-07-10 06:02:02 +02:00
|
|
|
ASM_REGISTER_STATE_CHECK(
|
2016-07-14 02:33:22 +02:00
|
|
|
var1 = params_.func(src_, stride, ref_, stride, &sse1));
|
2016-07-26 07:50:48 +02:00
|
|
|
var2 =
|
|
|
|
variance_ref(src_, ref_, params_.log2width, params_.log2height, stride,
|
|
|
|
stride, &sse2, use_high_bit_depth(), params_.bit_depth);
|
2016-07-14 02:33:22 +02:00
|
|
|
EXPECT_EQ(sse1, sse2) << "Error at test index: " << i;
|
|
|
|
EXPECT_EQ(var1, var2) << "Error at test index: " << i;
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename VarianceFunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<VarianceFunctionType>::RefStrideTest() {
|
2014-10-16 15:00:54 +02:00
|
|
|
for (int i = 0; i < 10; ++i) {
|
2016-07-14 02:33:22 +02:00
|
|
|
const int ref_stride = (i & 1) * width();
|
|
|
|
const int src_stride = ((i >> 1) & 1) * width();
|
|
|
|
for (int j = 0; j < block_size(); j++) {
|
|
|
|
const int ref_ind = (j / width()) * ref_stride + j % width();
|
|
|
|
const int src_ind = (j / width()) * src_stride + j % width();
|
|
|
|
if (!use_high_bit_depth()) {
|
2014-10-16 15:00:54 +02:00
|
|
|
src_[src_ind] = rnd_.Rand8();
|
|
|
|
ref_[ref_ind] = rnd_.Rand8();
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-14 02:33:22 +02:00
|
|
|
CONVERT_TO_SHORTPTR(src_)[src_ind] = rnd_.Rand16() & mask();
|
|
|
|
CONVERT_TO_SHORTPTR(ref_)[ref_ind] = rnd_.Rand16() & mask();
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
unsigned int sse1, sse2;
|
2016-07-14 02:33:22 +02:00
|
|
|
unsigned int var1, var2;
|
2014-10-16 15:00:54 +02:00
|
|
|
|
|
|
|
ASM_REGISTER_STATE_CHECK(
|
2016-07-14 02:33:22 +02:00
|
|
|
var1 = params_.func(src_, src_stride, ref_, ref_stride, &sse1));
|
2016-07-26 07:50:48 +02:00
|
|
|
var2 = variance_ref(src_, ref_, params_.log2width, params_.log2height,
|
|
|
|
src_stride, ref_stride, &sse2, use_high_bit_depth(),
|
|
|
|
params_.bit_depth);
|
2016-07-14 02:33:22 +02:00
|
|
|
EXPECT_EQ(sse1, sse2) << "Error at test index: " << i;
|
|
|
|
EXPECT_EQ(var1, var2) << "Error at test index: " << i;
|
2013-06-20 18:34:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename VarianceFunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<VarianceFunctionType>::OneQuarterTest() {
|
|
|
|
const int half = block_size() / 2;
|
|
|
|
if (!use_high_bit_depth()) {
|
|
|
|
memset(src_, 255, block_size());
|
2014-10-16 15:00:54 +02:00
|
|
|
memset(ref_, 255, half);
|
|
|
|
memset(ref_ + half, 0, half);
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-14 02:33:22 +02:00
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << byte_shift(), block_size());
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << byte_shift(), half);
|
2014-10-16 15:00:54 +02:00
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, 0, half);
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2016-07-14 02:33:22 +02:00
|
|
|
unsigned int sse, var, expected;
|
|
|
|
ASM_REGISTER_STATE_CHECK(
|
|
|
|
var = params_.func(src_, width(), ref_, width(), &sse));
|
|
|
|
expected = block_size() * 255 * 255 / 4;
|
2012-11-07 01:58:11 +01:00
|
|
|
EXPECT_EQ(expected, var);
|
|
|
|
}
|
|
|
|
|
2017-05-01 18:10:06 +02:00
|
|
|
template <typename VarianceFunctionType>
|
|
|
|
void MainTestClass<VarianceFunctionType>::SpeedTest() {
|
|
|
|
const int half = block_size() / 2;
|
|
|
|
if (!use_high_bit_depth()) {
|
|
|
|
memset(src_, 255, block_size());
|
|
|
|
memset(ref_, 255, half);
|
|
|
|
memset(ref_ + half, 0, half);
|
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
} else {
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << byte_shift(), block_size());
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << byte_shift(), half);
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, 0, half);
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
}
|
|
|
|
unsigned int sse;
|
|
|
|
|
|
|
|
vpx_usec_timer timer;
|
|
|
|
vpx_usec_timer_start(&timer);
|
|
|
|
for (int i = 0; i < 100000000 / block_size(); ++i) {
|
|
|
|
const uint32_t variance = params_.func(src_, width(), ref_, width(), &sse);
|
|
|
|
// Ignore return value.
|
|
|
|
(void)variance;
|
|
|
|
}
|
|
|
|
vpx_usec_timer_mark(&timer);
|
|
|
|
const int elapsed_time = static_cast<int>(vpx_usec_timer_elapsed(&timer));
|
|
|
|
printf("Variance %dx%d time: %5d ms\n", width(), height(),
|
|
|
|
elapsed_time / 1000);
|
|
|
|
}
|
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
|
|
|
// Tests related to MSE / SSE.
|
2014-08-20 16:56:19 +02:00
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename FunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<FunctionType>::RefTestMse() {
|
2014-08-20 16:56:19 +02:00
|
|
|
for (int i = 0; i < 10; ++i) {
|
2016-07-14 02:33:22 +02:00
|
|
|
for (int j = 0; j < block_size(); ++j) {
|
|
|
|
src_[j] = rnd_.Rand8();
|
|
|
|
ref_[j] = rnd_.Rand8();
|
2014-08-20 16:56:19 +02:00
|
|
|
}
|
|
|
|
unsigned int sse1, sse2;
|
2016-07-14 02:33:22 +02:00
|
|
|
const int stride = width();
|
|
|
|
ASM_REGISTER_STATE_CHECK(params_.func(src_, stride, ref_, stride, &sse1));
|
2016-07-26 07:50:48 +02:00
|
|
|
variance_ref(src_, ref_, params_.log2width, params_.log2height, stride,
|
|
|
|
stride, &sse2, false, VPX_BITS_8);
|
2014-08-20 16:56:19 +02:00
|
|
|
EXPECT_EQ(sse1, sse2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename FunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<FunctionType>::RefTestSse() {
|
2014-08-20 16:56:19 +02:00
|
|
|
for (int i = 0; i < 10; ++i) {
|
2016-07-14 02:33:22 +02:00
|
|
|
for (int j = 0; j < block_size(); ++j) {
|
|
|
|
src_[j] = rnd_.Rand8();
|
|
|
|
ref_[j] = rnd_.Rand8();
|
2014-08-20 16:56:19 +02:00
|
|
|
}
|
|
|
|
unsigned int sse2;
|
|
|
|
unsigned int var1;
|
2016-07-14 02:33:22 +02:00
|
|
|
const int stride = width();
|
|
|
|
ASM_REGISTER_STATE_CHECK(var1 = params_.func(src_, stride, ref_, stride));
|
2016-07-26 07:50:48 +02:00
|
|
|
variance_ref(src_, ref_, params_.log2width, params_.log2height, stride,
|
|
|
|
stride, &sse2, false, VPX_BITS_8);
|
2014-08-20 16:56:19 +02:00
|
|
|
EXPECT_EQ(var1, sse2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename FunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<FunctionType>::MaxTestMse() {
|
|
|
|
memset(src_, 255, block_size());
|
|
|
|
memset(ref_, 0, block_size());
|
2014-08-20 16:56:19 +02:00
|
|
|
unsigned int sse;
|
2016-07-14 02:33:22 +02:00
|
|
|
ASM_REGISTER_STATE_CHECK(params_.func(src_, width(), ref_, width(), &sse));
|
|
|
|
const unsigned int expected = block_size() * 255 * 255;
|
2014-08-20 16:56:19 +02:00
|
|
|
EXPECT_EQ(expected, sse);
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename FunctionType>
|
2016-07-14 02:33:22 +02:00
|
|
|
void MainTestClass<FunctionType>::MaxTestSse() {
|
|
|
|
memset(src_, 255, block_size());
|
|
|
|
memset(ref_, 0, block_size());
|
2014-08-20 16:56:19 +02:00
|
|
|
unsigned int var;
|
2016-07-14 02:33:22 +02:00
|
|
|
ASM_REGISTER_STATE_CHECK(var = params_.func(src_, width(), ref_, width()));
|
|
|
|
const unsigned int expected = block_size() * 255 * 255;
|
2014-08-20 16:56:19 +02:00
|
|
|
EXPECT_EQ(expected, var);
|
|
|
|
}
|
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
////////////////////////////////////////////////////////////////////////////////
|
2015-05-26 20:30:25 +02:00
|
|
|
|
2017-06-23 09:26:00 +02:00
|
|
|
template <typename FunctionType>
|
2013-09-05 17:45:56 +02:00
|
|
|
class SubpelVarianceTest
|
2017-06-23 09:26:00 +02:00
|
|
|
: public ::testing::TestWithParam<TestParams<FunctionType> > {
|
2013-06-20 18:34:25 +02:00
|
|
|
public:
|
|
|
|
virtual void SetUp() {
|
2017-06-23 09:26:00 +02:00
|
|
|
params_ = this->GetParam();
|
2013-06-20 18:34:25 +02:00
|
|
|
|
2014-09-04 21:24:52 +02:00
|
|
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
2017-06-23 09:26:00 +02:00
|
|
|
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];
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2016-07-26 07:50:48 +02:00
|
|
|
src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
|
2017-06-23 09:26:00 +02:00
|
|
|
vpx_memalign(16, block_size() * sizeof(uint16_t))));
|
2016-07-26 07:50:48 +02:00
|
|
|
sec_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
|
2017-06-23 09:26:00 +02:00
|
|
|
vpx_memalign(16, block_size() * sizeof(uint16_t))));
|
|
|
|
ref_ = CONVERT_TO_BYTEPTR(
|
|
|
|
new uint16_t[block_size() + width() + height() + 1]);
|
2014-10-16 15:00:54 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2015-05-15 20:52:03 +02:00
|
|
|
}
|
2013-06-20 18:34:25 +02:00
|
|
|
ASSERT_TRUE(src_ != NULL);
|
2013-06-22 02:03:57 +02:00
|
|
|
ASSERT_TRUE(sec_ != NULL);
|
2013-06-20 18:34:25 +02:00
|
|
|
ASSERT_TRUE(ref_ != NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void TearDown() {
|
2017-06-23 09:26:00 +02:00
|
|
|
if (!use_high_bit_depth()) {
|
2014-10-16 15:00:54 +02:00
|
|
|
vpx_free(src_);
|
|
|
|
delete[] ref_;
|
|
|
|
vpx_free(sec_);
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
|
|
|
vpx_free(CONVERT_TO_SHORTPTR(src_));
|
|
|
|
delete[] CONVERT_TO_SHORTPTR(ref_);
|
|
|
|
vpx_free(CONVERT_TO_SHORTPTR(sec_));
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2013-06-27 03:32:21 +02:00
|
|
|
libvpx_test::ClearSystemState();
|
2013-06-20 18:34:25 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void RefTest();
|
2014-10-16 15:00:54 +02:00
|
|
|
void ExtremeRefTest();
|
2013-06-20 18:34:25 +02:00
|
|
|
|
2014-09-04 21:24:52 +02:00
|
|
|
ACMRandom rnd_;
|
2013-06-21 00:59:48 +02:00
|
|
|
uint8_t *src_;
|
|
|
|
uint8_t *ref_;
|
|
|
|
uint8_t *sec_;
|
2017-06-23 09:26:00 +02:00
|
|
|
TestParams<FunctionType> params_;
|
|
|
|
|
|
|
|
// some relay helpers
|
|
|
|
bool use_high_bit_depth() const { return params_.use_high_bit_depth; }
|
|
|
|
int byte_shift() const { return params_.bit_depth - 8; }
|
|
|
|
int block_size() const { return params_.block_size; }
|
|
|
|
int width() const { return params_.width; }
|
|
|
|
int height() const { return params_.height; }
|
|
|
|
uint32_t mask() const { return params_.mask; }
|
2013-06-20 18:34:25 +02:00
|
|
|
};
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename SubpelVarianceFunctionType>
|
2013-06-20 18:34:25 +02:00
|
|
|
void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {
|
2015-05-26 20:30:25 +02:00
|
|
|
for (int x = 0; x < 8; ++x) {
|
|
|
|
for (int y = 0; y < 8; ++y) {
|
2017-06-23 09:26:00 +02:00
|
|
|
if (!use_high_bit_depth()) {
|
|
|
|
for (int j = 0; j < block_size(); j++) {
|
2014-10-16 15:00:54 +02:00
|
|
|
src_[j] = rnd_.Rand8();
|
|
|
|
}
|
2017-06-23 09:26:00 +02:00
|
|
|
for (int j = 0; j < block_size() + width() + height() + 1; j++) {
|
2014-10-16 15:00:54 +02:00
|
|
|
ref_[j] = rnd_.Rand8();
|
|
|
|
}
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2017-06-23 09:26:00 +02:00
|
|
|
for (int j = 0; j < block_size(); j++) {
|
|
|
|
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask();
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2017-06-23 09:26:00 +02:00
|
|
|
for (int j = 0; j < block_size() + width() + height() + 1; j++) {
|
|
|
|
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask();
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2015-05-15 20:52:03 +02:00
|
|
|
}
|
2013-06-20 18:34:25 +02:00
|
|
|
unsigned int sse1, sse2;
|
2013-06-19 04:15:56 +02:00
|
|
|
unsigned int var1;
|
2016-07-26 07:50:48 +02:00
|
|
|
ASM_REGISTER_STATE_CHECK(
|
2017-06-23 09:26:00 +02:00
|
|
|
var1 = params_.func(ref_, width() + 1, x, y, src_, width(), &sse1));
|
|
|
|
const unsigned int var2 = subpel_variance_ref(
|
|
|
|
ref_, src_, params_.log2width, params_.log2height, x, y, &sse2,
|
|
|
|
use_high_bit_depth(), params_.bit_depth);
|
2014-10-16 15:00:54 +02:00
|
|
|
EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
|
|
|
|
EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <typename SubpelVarianceFunctionType>
|
2014-10-16 15:00:54 +02:00
|
|
|
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.
|
2015-05-26 20:30:25 +02:00
|
|
|
for (int x = 0; x < 8; ++x) {
|
|
|
|
for (int y = 0; y < 8; ++y) {
|
2017-06-23 09:26:00 +02:00
|
|
|
const int half = block_size() / 2;
|
|
|
|
if (!use_high_bit_depth()) {
|
2014-10-16 15:00:54 +02:00
|
|
|
memset(src_, 0, half);
|
|
|
|
memset(src_ + half, 255, half);
|
|
|
|
memset(ref_, 255, half);
|
2017-06-23 09:26:00 +02:00
|
|
|
memset(ref_ + half, 0, half + width() + height() + 1);
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2017-06-23 09:26:00 +02:00
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(src_), mask(), half);
|
2014-10-16 15:00:54 +02:00
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half);
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half);
|
2017-06-23 09:26:00 +02:00
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask(),
|
|
|
|
half + width() + height() + 1);
|
2014-10-16 15:00:54 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2015-05-15 20:52:03 +02:00
|
|
|
}
|
2014-10-16 15:00:54 +02:00
|
|
|
unsigned int sse1, sse2;
|
|
|
|
unsigned int var1;
|
|
|
|
ASM_REGISTER_STATE_CHECK(
|
2017-06-23 09:26:00 +02:00
|
|
|
var1 = params_.func(ref_, width() + 1, x, y, src_, width(), &sse1));
|
|
|
|
const unsigned int var2 = subpel_variance_ref(
|
|
|
|
ref_, src_, params_.log2width, params_.log2height, x, y, &sse2,
|
|
|
|
use_high_bit_depth(), params_.bit_depth);
|
2015-05-26 20:30:25 +02:00
|
|
|
EXPECT_EQ(sse1, sse2) << "for xoffset " << x << " and yoffset " << y;
|
|
|
|
EXPECT_EQ(var1, var2) << "for xoffset " << x << " and yoffset " << y;
|
2013-06-20 18:34:25 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-26 07:50:48 +02:00
|
|
|
template <>
|
2015-06-05 18:54:19 +02:00
|
|
|
void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() {
|
2015-05-26 20:30:25 +02:00
|
|
|
for (int x = 0; x < 8; ++x) {
|
|
|
|
for (int y = 0; y < 8; ++y) {
|
2017-06-23 09:26:00 +02:00
|
|
|
if (!use_high_bit_depth()) {
|
|
|
|
for (int j = 0; j < block_size(); j++) {
|
2014-10-16 15:00:54 +02:00
|
|
|
src_[j] = rnd_.Rand8();
|
|
|
|
sec_[j] = rnd_.Rand8();
|
|
|
|
}
|
2017-06-23 09:26:00 +02:00
|
|
|
for (int j = 0; j < block_size() + width() + height() + 1; j++) {
|
2014-10-16 15:00:54 +02:00
|
|
|
ref_[j] = rnd_.Rand8();
|
|
|
|
}
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
} else {
|
2017-06-23 09:26:00 +02:00
|
|
|
for (int j = 0; j < block_size(); j++) {
|
|
|
|
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask();
|
|
|
|
CONVERT_TO_SHORTPTR(sec_)[j] = rnd_.Rand16() & mask();
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2017-06-23 09:26:00 +02:00
|
|
|
for (int j = 0; j < block_size() + width() + height() + 1; j++) {
|
|
|
|
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask();
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
}
|
2016-07-14 02:33:22 +02:00
|
|
|
uint32_t sse1, sse2;
|
|
|
|
uint32_t var1, var2;
|
2017-06-23 09:26:00 +02:00
|
|
|
ASM_REGISTER_STATE_CHECK(var1 = params_.func(ref_, width() + 1, x, y,
|
|
|
|
src_, width(), &sse1, sec_));
|
|
|
|
var2 = subpel_avg_variance_ref(ref_, src_, sec_, params_.log2width,
|
|
|
|
params_.log2height, x, y, &sse2,
|
|
|
|
use_high_bit_depth(), params_.bit_depth);
|
2013-06-21 00:59:48 +02:00
|
|
|
EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
|
|
|
|
EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-09-18 03:47:25 +02:00
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
typedef MainTestClass<Get4x4SseFunc> VpxSseTest;
|
|
|
|
typedef MainTestClass<VarianceMxNFunc> VpxMseTest;
|
|
|
|
typedef MainTestClass<VarianceMxNFunc> VpxVarianceTest;
|
2015-06-05 18:54:19 +02:00
|
|
|
typedef SubpelVarianceTest<SubpixVarMxNFunc> VpxSubpelVarianceTest;
|
|
|
|
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> VpxSubpelAvgVarianceTest;
|
2015-05-15 20:52:03 +02:00
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
TEST_P(VpxSseTest, RefSse) { RefTestSse(); }
|
|
|
|
TEST_P(VpxSseTest, MaxSse) { MaxTestSse(); }
|
|
|
|
TEST_P(VpxMseTest, RefMse) { RefTestMse(); }
|
|
|
|
TEST_P(VpxMseTest, MaxMse) { MaxTestMse(); }
|
2015-05-15 20:52:03 +02:00
|
|
|
TEST_P(VpxVarianceTest, Zero) { ZeroTest(); }
|
|
|
|
TEST_P(VpxVarianceTest, Ref) { RefTest(); }
|
|
|
|
TEST_P(VpxVarianceTest, RefStride) { RefStrideTest(); }
|
|
|
|
TEST_P(VpxVarianceTest, OneQuarter) { OneQuarterTest(); }
|
2017-05-01 18:10:06 +02:00
|
|
|
TEST_P(VpxVarianceTest, DISABLED_Speed) { SpeedTest(); }
|
2015-05-15 20:52:03 +02:00
|
|
|
TEST_P(SumOfSquaresTest, Const) { ConstTest(); }
|
|
|
|
TEST_P(SumOfSquaresTest, Ref) { RefTest(); }
|
2015-06-05 18:54:19 +02:00
|
|
|
TEST_P(VpxSubpelVarianceTest, Ref) { RefTest(); }
|
|
|
|
TEST_P(VpxSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
|
|
|
|
TEST_P(VpxSubpelAvgVarianceTest, Ref) { RefTest(); }
|
2013-02-23 01:23:36 +01:00
|
|
|
|
2015-05-15 20:52:03 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(C, SumOfSquaresTest,
|
|
|
|
::testing::Values(vpx_get_mb_ss_c));
|
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
typedef TestParams<Get4x4SseFunc> SseParams;
|
2015-05-15 20:52:03 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(C, VpxSseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(SseParams(2, 2,
|
|
|
|
&vpx_get4x4sse_cs_c)));
|
2015-05-15 20:52:03 +02:00
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
typedef TestParams<VarianceMxNFunc> MseParams;
|
2015-05-15 20:52:03 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(C, VpxMseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_mse16x16_c),
|
|
|
|
MseParams(4, 3, &vpx_mse16x8_c),
|
|
|
|
MseParams(3, 4, &vpx_mse8x16_c),
|
|
|
|
MseParams(3, 3, &vpx_mse8x8_c)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
typedef TestParams<VarianceMxNFunc> VarianceParams;
|
2014-08-20 16:56:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 20:52:03 +02:00
|
|
|
C, VpxVarianceTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_variance64x64_c),
|
|
|
|
VarianceParams(6, 5, &vpx_variance64x32_c),
|
|
|
|
VarianceParams(5, 6, &vpx_variance32x64_c),
|
|
|
|
VarianceParams(5, 5, &vpx_variance32x32_c),
|
|
|
|
VarianceParams(5, 4, &vpx_variance32x16_c),
|
|
|
|
VarianceParams(4, 5, &vpx_variance16x32_c),
|
|
|
|
VarianceParams(4, 4, &vpx_variance16x16_c),
|
|
|
|
VarianceParams(4, 3, &vpx_variance16x8_c),
|
|
|
|
VarianceParams(3, 4, &vpx_variance8x16_c),
|
|
|
|
VarianceParams(3, 3, &vpx_variance8x8_c),
|
|
|
|
VarianceParams(3, 2, &vpx_variance8x4_c),
|
|
|
|
VarianceParams(2, 3, &vpx_variance4x8_c),
|
|
|
|
VarianceParams(2, 2, &vpx_variance4x4_c)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2017-06-23 09:26:00 +02:00
|
|
|
typedef TestParams<SubpixVarMxNFunc> SubpelVarianceParams;
|
2015-06-05 18:54:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VpxSubpelVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_c, 0),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_sub_pixel_variance64x32_c, 0),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_sub_pixel_variance32x64_c, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_c, 0),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_sub_pixel_variance32x16_c, 0),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_sub_pixel_variance16x32_c, 0),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_sub_pixel_variance16x16_c, 0),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_sub_pixel_variance16x8_c, 0),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_sub_pixel_variance8x16_c, 0),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_sub_pixel_variance8x8_c, 0),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_sub_pixel_variance8x4_c, 0),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_sub_pixel_variance4x8_c, 0),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_sub_pixel_variance4x4_c, 0)));
|
|
|
|
|
|
|
|
typedef TestParams<SubpixAvgVarMxNFunc> SubpelAvgVarianceParams;
|
2015-06-05 18:54:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VpxSubpelAvgVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_c, 0),
|
|
|
|
SubpelAvgVarianceParams(6, 5, &vpx_sub_pixel_avg_variance64x32_c, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 6, &vpx_sub_pixel_avg_variance32x64_c, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_c, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 4, &vpx_sub_pixel_avg_variance32x16_c, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 5, &vpx_sub_pixel_avg_variance16x32_c, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 4, &vpx_sub_pixel_avg_variance16x16_c, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 3, &vpx_sub_pixel_avg_variance16x8_c, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 4, &vpx_sub_pixel_avg_variance8x16_c, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_sub_pixel_avg_variance8x8_c, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_sub_pixel_avg_variance8x4_c, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_sub_pixel_avg_variance4x8_c, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_c, 0)));
|
2015-06-05 18:54:19 +02:00
|
|
|
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2016-07-14 02:33:22 +02:00
|
|
|
typedef MainTestClass<VarianceMxNFunc> VpxHBDMseTest;
|
|
|
|
typedef MainTestClass<VarianceMxNFunc> VpxHBDVarianceTest;
|
2015-06-05 18:54:19 +02:00
|
|
|
typedef SubpelVarianceTest<SubpixVarMxNFunc> VpxHBDSubpelVarianceTest;
|
2016-07-26 07:50:48 +02:00
|
|
|
typedef SubpelVarianceTest<SubpixAvgVarMxNFunc> VpxHBDSubpelAvgVarianceTest;
|
2015-05-15 20:52:03 +02:00
|
|
|
|
2016-07-14 02:33:22 +02:00
|
|
|
TEST_P(VpxHBDMseTest, RefMse) { RefTestMse(); }
|
|
|
|
TEST_P(VpxHBDMseTest, MaxMse) { MaxTestMse(); }
|
2015-05-15 20:52:03 +02:00
|
|
|
TEST_P(VpxHBDVarianceTest, Zero) { ZeroTest(); }
|
|
|
|
TEST_P(VpxHBDVarianceTest, Ref) { RefTest(); }
|
|
|
|
TEST_P(VpxHBDVarianceTest, RefStride) { RefStrideTest(); }
|
|
|
|
TEST_P(VpxHBDVarianceTest, OneQuarter) { OneQuarterTest(); }
|
2017-05-01 18:10:06 +02:00
|
|
|
TEST_P(VpxHBDVarianceTest, DISABLED_Speed) { SpeedTest(); }
|
2015-06-05 18:54:19 +02:00
|
|
|
TEST_P(VpxHBDSubpelVarianceTest, Ref) { RefTest(); }
|
|
|
|
TEST_P(VpxHBDSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
|
|
|
|
TEST_P(VpxHBDSubpelAvgVarianceTest, Ref) { RefTest(); }
|
2015-05-15 20:52:03 +02:00
|
|
|
|
|
|
|
/* TODO(debargha): This test does not support the highbd version
|
2014-08-20 16:56:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-11-06 04:00:45 +01:00
|
|
|
C, VpxHBDMseTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_highbd_12_mse16x16_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_12_mse16x8_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_12_mse8x16_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_12_mse8x8_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_10_mse16x16_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_10_mse16x8_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_10_mse8x16_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_10_mse8x8_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_8_mse16x16_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_8_mse16x8_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_8_mse8x16_c),
|
|
|
|
MseParams(4, 4, &vpx_highbd_8_mse8x8_c)));
|
2015-05-15 20:52:03 +02:00
|
|
|
*/
|
|
|
|
|
2014-02-26 08:11:49 +01:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 20:52:03 +02:00
|
|
|
C, VpxHBDVarianceTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_highbd_12_variance64x64_c, 12),
|
|
|
|
VarianceParams(6, 5, &vpx_highbd_12_variance64x32_c, 12),
|
|
|
|
VarianceParams(5, 6, &vpx_highbd_12_variance32x64_c, 12),
|
|
|
|
VarianceParams(5, 5, &vpx_highbd_12_variance32x32_c, 12),
|
|
|
|
VarianceParams(5, 4, &vpx_highbd_12_variance32x16_c, 12),
|
|
|
|
VarianceParams(4, 5, &vpx_highbd_12_variance16x32_c, 12),
|
|
|
|
VarianceParams(4, 4, &vpx_highbd_12_variance16x16_c, 12),
|
|
|
|
VarianceParams(4, 3, &vpx_highbd_12_variance16x8_c, 12),
|
|
|
|
VarianceParams(3, 4, &vpx_highbd_12_variance8x16_c, 12),
|
|
|
|
VarianceParams(3, 3, &vpx_highbd_12_variance8x8_c, 12),
|
|
|
|
VarianceParams(3, 2, &vpx_highbd_12_variance8x4_c, 12),
|
|
|
|
VarianceParams(2, 3, &vpx_highbd_12_variance4x8_c, 12),
|
|
|
|
VarianceParams(2, 2, &vpx_highbd_12_variance4x4_c, 12),
|
|
|
|
VarianceParams(6, 6, &vpx_highbd_10_variance64x64_c, 10),
|
|
|
|
VarianceParams(6, 5, &vpx_highbd_10_variance64x32_c, 10),
|
|
|
|
VarianceParams(5, 6, &vpx_highbd_10_variance32x64_c, 10),
|
|
|
|
VarianceParams(5, 5, &vpx_highbd_10_variance32x32_c, 10),
|
|
|
|
VarianceParams(5, 4, &vpx_highbd_10_variance32x16_c, 10),
|
|
|
|
VarianceParams(4, 5, &vpx_highbd_10_variance16x32_c, 10),
|
|
|
|
VarianceParams(4, 4, &vpx_highbd_10_variance16x16_c, 10),
|
|
|
|
VarianceParams(4, 3, &vpx_highbd_10_variance16x8_c, 10),
|
|
|
|
VarianceParams(3, 4, &vpx_highbd_10_variance8x16_c, 10),
|
|
|
|
VarianceParams(3, 3, &vpx_highbd_10_variance8x8_c, 10),
|
|
|
|
VarianceParams(3, 2, &vpx_highbd_10_variance8x4_c, 10),
|
|
|
|
VarianceParams(2, 3, &vpx_highbd_10_variance4x8_c, 10),
|
|
|
|
VarianceParams(2, 2, &vpx_highbd_10_variance4x4_c, 10),
|
|
|
|
VarianceParams(6, 6, &vpx_highbd_8_variance64x64_c, 8),
|
|
|
|
VarianceParams(6, 5, &vpx_highbd_8_variance64x32_c, 8),
|
|
|
|
VarianceParams(5, 6, &vpx_highbd_8_variance32x64_c, 8),
|
|
|
|
VarianceParams(5, 5, &vpx_highbd_8_variance32x32_c, 8),
|
|
|
|
VarianceParams(5, 4, &vpx_highbd_8_variance32x16_c, 8),
|
|
|
|
VarianceParams(4, 5, &vpx_highbd_8_variance16x32_c, 8),
|
|
|
|
VarianceParams(4, 4, &vpx_highbd_8_variance16x16_c, 8),
|
|
|
|
VarianceParams(4, 3, &vpx_highbd_8_variance16x8_c, 8),
|
|
|
|
VarianceParams(3, 4, &vpx_highbd_8_variance8x16_c, 8),
|
|
|
|
VarianceParams(3, 3, &vpx_highbd_8_variance8x8_c, 8),
|
|
|
|
VarianceParams(3, 2, &vpx_highbd_8_variance8x4_c, 8),
|
|
|
|
VarianceParams(2, 3, &vpx_highbd_8_variance4x8_c, 8),
|
|
|
|
VarianceParams(2, 2, &vpx_highbd_8_variance4x4_c, 8)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2015-06-05 18:54:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VpxHBDSubpelVarianceTest,
|
2015-11-06 04:00:45 +01:00
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelVarianceParams(6, 6, &vpx_highbd_8_sub_pixel_variance64x64_c, 8),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_highbd_8_sub_pixel_variance64x32_c, 8),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_highbd_8_sub_pixel_variance32x64_c, 8),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_highbd_8_sub_pixel_variance32x32_c, 8),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_highbd_8_sub_pixel_variance32x16_c, 8),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_highbd_8_sub_pixel_variance16x32_c, 8),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_highbd_8_sub_pixel_variance16x16_c, 8),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_highbd_8_sub_pixel_variance16x8_c, 8),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_highbd_8_sub_pixel_variance8x16_c, 8),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_highbd_8_sub_pixel_variance8x8_c, 8),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_highbd_8_sub_pixel_variance8x4_c, 8),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_highbd_8_sub_pixel_variance4x8_c, 8),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_highbd_8_sub_pixel_variance4x4_c, 8),
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_highbd_10_sub_pixel_variance64x64_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_highbd_10_sub_pixel_variance64x32_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_highbd_10_sub_pixel_variance32x64_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_highbd_10_sub_pixel_variance32x32_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_highbd_10_sub_pixel_variance32x16_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_highbd_10_sub_pixel_variance16x32_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_highbd_10_sub_pixel_variance16x16_c,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_highbd_10_sub_pixel_variance16x8_c, 10),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_highbd_10_sub_pixel_variance8x16_c, 10),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_highbd_10_sub_pixel_variance8x8_c, 10),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_highbd_10_sub_pixel_variance8x4_c, 10),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_highbd_10_sub_pixel_variance4x8_c, 10),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_highbd_10_sub_pixel_variance4x4_c, 10),
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_highbd_12_sub_pixel_variance64x64_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_highbd_12_sub_pixel_variance64x32_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_highbd_12_sub_pixel_variance32x64_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_highbd_12_sub_pixel_variance32x32_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_highbd_12_sub_pixel_variance32x16_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_highbd_12_sub_pixel_variance16x32_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_highbd_12_sub_pixel_variance16x16_c,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_highbd_12_sub_pixel_variance16x8_c, 12),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_highbd_12_sub_pixel_variance8x16_c, 12),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_highbd_12_sub_pixel_variance8x8_c, 12),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_highbd_12_sub_pixel_variance8x4_c, 12),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_highbd_12_sub_pixel_variance4x8_c, 12),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_highbd_12_sub_pixel_variance4x4_c,
|
|
|
|
12)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2015-06-05 18:54:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VpxHBDSubpelAvgVarianceTest,
|
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelAvgVarianceParams(6, 6,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance64x64_c, 8),
|
|
|
|
SubpelAvgVarianceParams(6, 5,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance64x32_c, 8),
|
|
|
|
SubpelAvgVarianceParams(5, 6,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance32x64_c, 8),
|
|
|
|
SubpelAvgVarianceParams(5, 5,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance32x32_c, 8),
|
|
|
|
SubpelAvgVarianceParams(5, 4,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance32x16_c, 8),
|
|
|
|
SubpelAvgVarianceParams(4, 5,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance16x32_c, 8),
|
|
|
|
SubpelAvgVarianceParams(4, 4,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance16x16_c, 8),
|
|
|
|
SubpelAvgVarianceParams(4, 3,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance16x8_c, 8),
|
|
|
|
SubpelAvgVarianceParams(3, 4,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance8x16_c, 8),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_highbd_8_sub_pixel_avg_variance8x8_c,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_highbd_8_sub_pixel_avg_variance8x4_c,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_highbd_8_sub_pixel_avg_variance4x8_c,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_highbd_8_sub_pixel_avg_variance4x4_c,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(6, 6,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance64x64_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(6, 5,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance64x32_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(5, 6,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance32x64_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(5, 5,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance32x32_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(5, 4,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance32x16_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(4, 5,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance16x32_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(4, 4,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance16x16_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(4, 3,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance16x8_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(3, 4,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance8x16_c,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(3, 3,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance8x8_c, 10),
|
|
|
|
SubpelAvgVarianceParams(3, 2,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance8x4_c, 10),
|
|
|
|
SubpelAvgVarianceParams(2, 3,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance4x8_c, 10),
|
|
|
|
SubpelAvgVarianceParams(2, 2,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance4x4_c, 10),
|
|
|
|
SubpelAvgVarianceParams(6, 6,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance64x64_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(6, 5,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance64x32_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(5, 6,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance32x64_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(5, 5,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance32x32_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(5, 4,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance32x16_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(4, 5,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance16x32_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(4, 4,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance16x16_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(4, 3,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance16x8_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(3, 4,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance8x16_c,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(3, 3,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance8x8_c, 12),
|
|
|
|
SubpelAvgVarianceParams(3, 2,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance8x4_c, 12),
|
|
|
|
SubpelAvgVarianceParams(2, 3,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance4x8_c, 12),
|
|
|
|
SubpelAvgVarianceParams(2, 2,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance4x4_c,
|
|
|
|
12)));
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-02-26 08:11:49 +01:00
|
|
|
|
2013-02-23 01:23:36 +01:00
|
|
|
#if HAVE_SSE2
|
2015-05-15 20:52:03 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(SSE2, SumOfSquaresTest,
|
|
|
|
::testing::Values(vpx_get_mb_ss_sse2));
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(SSE2, VpxMseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_mse16x16_sse2),
|
|
|
|
MseParams(4, 3, &vpx_mse16x8_sse2),
|
|
|
|
MseParams(3, 4, &vpx_mse8x16_sse2),
|
|
|
|
MseParams(3, 3, &vpx_mse8x8_sse2)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2013-02-23 01:23:36 +01:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 20:52:03 +02:00
|
|
|
SSE2, VpxVarianceTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_variance64x64_sse2),
|
|
|
|
VarianceParams(6, 5, &vpx_variance64x32_sse2),
|
|
|
|
VarianceParams(5, 6, &vpx_variance32x64_sse2),
|
|
|
|
VarianceParams(5, 5, &vpx_variance32x32_sse2),
|
|
|
|
VarianceParams(5, 4, &vpx_variance32x16_sse2),
|
|
|
|
VarianceParams(4, 5, &vpx_variance16x32_sse2),
|
|
|
|
VarianceParams(4, 4, &vpx_variance16x16_sse2),
|
|
|
|
VarianceParams(4, 3, &vpx_variance16x8_sse2),
|
|
|
|
VarianceParams(3, 4, &vpx_variance8x16_sse2),
|
|
|
|
VarianceParams(3, 3, &vpx_variance8x8_sse2),
|
|
|
|
VarianceParams(3, 2, &vpx_variance8x4_sse2),
|
|
|
|
VarianceParams(2, 3, &vpx_variance4x8_sse2),
|
|
|
|
VarianceParams(2, 2, &vpx_variance4x4_sse2)));
|
2015-06-05 18:54:19 +02:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSE2, VpxSubpelVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_sse2, 0),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_sub_pixel_variance64x32_sse2, 0),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_sub_pixel_variance32x64_sse2, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_sse2, 0),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_sub_pixel_variance32x16_sse2, 0),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_sub_pixel_variance16x32_sse2, 0),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_sub_pixel_variance16x16_sse2, 0),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_sub_pixel_variance16x8_sse2, 0),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_sub_pixel_variance8x16_sse2, 0),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_sub_pixel_variance8x8_sse2, 0),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_sub_pixel_variance8x4_sse2, 0),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_sub_pixel_variance4x8_sse2, 0),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_sub_pixel_variance4x4_sse2, 0)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2015-06-05 18:54:19 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSE2, VpxSubpelAvgVarianceTest,
|
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(6, 5, &vpx_sub_pixel_avg_variance64x32_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 6, &vpx_sub_pixel_avg_variance32x64_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 4, &vpx_sub_pixel_avg_variance32x16_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 5, &vpx_sub_pixel_avg_variance16x32_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 4, &vpx_sub_pixel_avg_variance16x16_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 3, &vpx_sub_pixel_avg_variance16x8_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 4, &vpx_sub_pixel_avg_variance8x16_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_sub_pixel_avg_variance8x8_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_sub_pixel_avg_variance8x4_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_sub_pixel_avg_variance4x8_sse2, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_sse2, 0)));
|
2015-06-05 18:54:19 +02:00
|
|
|
|
2015-05-15 20:52:03 +02:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
/* TODO(debargha): This test does not support the highbd version
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-11-06 04:00:45 +01:00
|
|
|
SSE2, VpxHBDMseTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_highbd_12_mse16x16_sse2),
|
|
|
|
MseParams(4, 3, &vpx_highbd_12_mse16x8_sse2),
|
|
|
|
MseParams(3, 4, &vpx_highbd_12_mse8x16_sse2),
|
|
|
|
MseParams(3, 3, &vpx_highbd_12_mse8x8_sse2),
|
|
|
|
MseParams(4, 4, &vpx_highbd_10_mse16x16_sse2),
|
|
|
|
MseParams(4, 3, &vpx_highbd_10_mse16x8_sse2),
|
|
|
|
MseParams(3, 4, &vpx_highbd_10_mse8x16_sse2),
|
|
|
|
MseParams(3, 3, &vpx_highbd_10_mse8x8_sse2),
|
|
|
|
MseParams(4, 4, &vpx_highbd_8_mse16x16_sse2),
|
|
|
|
MseParams(4, 3, &vpx_highbd_8_mse16x8_sse2),
|
|
|
|
MseParams(3, 4, &vpx_highbd_8_mse8x16_sse2),
|
|
|
|
MseParams(3, 3, &vpx_highbd_8_mse8x8_sse2)));
|
2015-05-15 20:52:03 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-07-26 07:50:48 +02:00
|
|
|
SSE2, VpxHBDVarianceTest,
|
|
|
|
::testing::Values(
|
|
|
|
VarianceParams(6, 6, &vpx_highbd_12_variance64x64_sse2, 12),
|
|
|
|
VarianceParams(6, 5, &vpx_highbd_12_variance64x32_sse2, 12),
|
|
|
|
VarianceParams(5, 6, &vpx_highbd_12_variance32x64_sse2, 12),
|
|
|
|
VarianceParams(5, 5, &vpx_highbd_12_variance32x32_sse2, 12),
|
|
|
|
VarianceParams(5, 4, &vpx_highbd_12_variance32x16_sse2, 12),
|
|
|
|
VarianceParams(4, 5, &vpx_highbd_12_variance16x32_sse2, 12),
|
|
|
|
VarianceParams(4, 4, &vpx_highbd_12_variance16x16_sse2, 12),
|
|
|
|
VarianceParams(4, 3, &vpx_highbd_12_variance16x8_sse2, 12),
|
|
|
|
VarianceParams(3, 4, &vpx_highbd_12_variance8x16_sse2, 12),
|
|
|
|
VarianceParams(3, 3, &vpx_highbd_12_variance8x8_sse2, 12),
|
|
|
|
VarianceParams(6, 6, &vpx_highbd_10_variance64x64_sse2, 10),
|
|
|
|
VarianceParams(6, 5, &vpx_highbd_10_variance64x32_sse2, 10),
|
|
|
|
VarianceParams(5, 6, &vpx_highbd_10_variance32x64_sse2, 10),
|
|
|
|
VarianceParams(5, 5, &vpx_highbd_10_variance32x32_sse2, 10),
|
|
|
|
VarianceParams(5, 4, &vpx_highbd_10_variance32x16_sse2, 10),
|
|
|
|
VarianceParams(4, 5, &vpx_highbd_10_variance16x32_sse2, 10),
|
|
|
|
VarianceParams(4, 4, &vpx_highbd_10_variance16x16_sse2, 10),
|
|
|
|
VarianceParams(4, 3, &vpx_highbd_10_variance16x8_sse2, 10),
|
|
|
|
VarianceParams(3, 4, &vpx_highbd_10_variance8x16_sse2, 10),
|
|
|
|
VarianceParams(3, 3, &vpx_highbd_10_variance8x8_sse2, 10),
|
|
|
|
VarianceParams(6, 6, &vpx_highbd_8_variance64x64_sse2, 8),
|
|
|
|
VarianceParams(6, 5, &vpx_highbd_8_variance64x32_sse2, 8),
|
|
|
|
VarianceParams(5, 6, &vpx_highbd_8_variance32x64_sse2, 8),
|
|
|
|
VarianceParams(5, 5, &vpx_highbd_8_variance32x32_sse2, 8),
|
|
|
|
VarianceParams(5, 4, &vpx_highbd_8_variance32x16_sse2, 8),
|
|
|
|
VarianceParams(4, 5, &vpx_highbd_8_variance16x32_sse2, 8),
|
|
|
|
VarianceParams(4, 4, &vpx_highbd_8_variance16x16_sse2, 8),
|
|
|
|
VarianceParams(4, 3, &vpx_highbd_8_variance16x8_sse2, 8),
|
|
|
|
VarianceParams(3, 4, &vpx_highbd_8_variance8x16_sse2, 8),
|
|
|
|
VarianceParams(3, 3, &vpx_highbd_8_variance8x8_sse2, 8)));
|
2015-05-26 20:30:25 +02:00
|
|
|
|
2014-10-16 15:00:54 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
SSE2, VpxHBDSubpelVarianceTest,
|
2015-11-06 04:00:45 +01:00
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelVarianceParams(6, 6, &vpx_highbd_12_sub_pixel_variance64x64_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_highbd_12_sub_pixel_variance64x32_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_highbd_12_sub_pixel_variance32x64_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_highbd_12_sub_pixel_variance32x32_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_highbd_12_sub_pixel_variance32x16_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_highbd_12_sub_pixel_variance16x32_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_highbd_12_sub_pixel_variance16x16_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_highbd_12_sub_pixel_variance16x8_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_highbd_12_sub_pixel_variance8x16_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_highbd_12_sub_pixel_variance8x8_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_highbd_12_sub_pixel_variance8x4_sse2,
|
|
|
|
12),
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_highbd_10_sub_pixel_variance64x64_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_highbd_10_sub_pixel_variance64x32_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_highbd_10_sub_pixel_variance32x64_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_highbd_10_sub_pixel_variance32x32_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_highbd_10_sub_pixel_variance32x16_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_highbd_10_sub_pixel_variance16x32_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_highbd_10_sub_pixel_variance16x16_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_highbd_10_sub_pixel_variance16x8_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_highbd_10_sub_pixel_variance8x16_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_highbd_10_sub_pixel_variance8x8_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_highbd_10_sub_pixel_variance8x4_sse2,
|
|
|
|
10),
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_highbd_8_sub_pixel_variance64x64_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_highbd_8_sub_pixel_variance64x32_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_highbd_8_sub_pixel_variance32x64_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_highbd_8_sub_pixel_variance32x32_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_highbd_8_sub_pixel_variance32x16_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_highbd_8_sub_pixel_variance16x32_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_highbd_8_sub_pixel_variance16x16_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_highbd_8_sub_pixel_variance16x8_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_highbd_8_sub_pixel_variance8x16_sse2,
|
|
|
|
8),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_highbd_8_sub_pixel_variance8x8_sse2, 8),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_highbd_8_sub_pixel_variance8x4_sse2,
|
|
|
|
8)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2014-10-16 15:00:54 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
SSE2, VpxHBDSubpelAvgVarianceTest,
|
2014-10-16 15:00:54 +02:00
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelAvgVarianceParams(6, 6,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance64x64_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(6, 5,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance64x32_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(5, 6,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance32x64_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(5, 5,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance32x32_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(5, 4,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance32x16_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(4, 5,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance16x32_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(4, 4,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance16x16_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(4, 3,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance16x8_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(3, 4,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance8x16_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(3, 3,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance8x8_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(3, 2,
|
|
|
|
&vpx_highbd_12_sub_pixel_avg_variance8x4_sse2,
|
|
|
|
12),
|
|
|
|
SubpelAvgVarianceParams(6, 6,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance64x64_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(6, 5,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance64x32_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(5, 6,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance32x64_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(5, 5,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance32x32_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(5, 4,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance32x16_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(4, 5,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance16x32_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(4, 4,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance16x16_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(4, 3,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance16x8_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(3, 4,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance8x16_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(3, 3,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance8x8_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(3, 2,
|
|
|
|
&vpx_highbd_10_sub_pixel_avg_variance8x4_sse2,
|
|
|
|
10),
|
|
|
|
SubpelAvgVarianceParams(6, 6,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance64x64_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(6, 5,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance64x32_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(5, 6,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance32x64_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(5, 5,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance32x32_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(5, 4,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance32x16_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(4, 5,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance16x32_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(4, 4,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance16x16_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(4, 3,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance16x8_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(3, 4,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance8x16_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(3, 3,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance8x8_sse2,
|
|
|
|
8),
|
|
|
|
SubpelAvgVarianceParams(3, 2,
|
|
|
|
&vpx_highbd_8_sub_pixel_avg_variance8x4_sse2,
|
|
|
|
8)));
|
2015-06-05 18:54:19 +02:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 15:00:54 +02:00
|
|
|
#endif // HAVE_SSE2
|
2015-05-26 20:30:25 +02:00
|
|
|
|
2013-06-20 18:34:25 +02:00
|
|
|
#if HAVE_SSSE3
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
SSSE3, VpxSubpelVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_ssse3, 0),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_sub_pixel_variance64x32_ssse3, 0),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_sub_pixel_variance32x64_ssse3, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_ssse3, 0),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_sub_pixel_variance32x16_ssse3, 0),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_sub_pixel_variance16x32_ssse3, 0),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_sub_pixel_variance16x16_ssse3, 0),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_sub_pixel_variance16x8_ssse3, 0),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_sub_pixel_variance8x16_ssse3, 0),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_sub_pixel_variance8x8_ssse3, 0),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_sub_pixel_variance8x4_ssse3, 0),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_sub_pixel_variance4x8_ssse3, 0),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_sub_pixel_variance4x4_ssse3, 0)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2013-06-21 00:59:48 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
SSSE3, VpxSubpelAvgVarianceTest,
|
2015-11-06 04:00:45 +01:00
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(6, 5, &vpx_sub_pixel_avg_variance64x32_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(5, 6, &vpx_sub_pixel_avg_variance32x64_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(5, 4, &vpx_sub_pixel_avg_variance32x16_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(4, 5, &vpx_sub_pixel_avg_variance16x32_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(4, 4, &vpx_sub_pixel_avg_variance16x16_ssse3,
|
|
|
|
0),
|
|
|
|
SubpelAvgVarianceParams(4, 3, &vpx_sub_pixel_avg_variance16x8_ssse3, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 4, &vpx_sub_pixel_avg_variance8x16_ssse3, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_sub_pixel_avg_variance8x8_ssse3, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_sub_pixel_avg_variance8x4_ssse3, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_sub_pixel_avg_variance4x8_ssse3, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_ssse3,
|
|
|
|
0)));
|
2014-10-16 15:00:54 +02:00
|
|
|
#endif // HAVE_SSSE3
|
2015-05-26 20:30:25 +02:00
|
|
|
|
2014-06-09 03:25:37 +02:00
|
|
|
#if HAVE_AVX2
|
2015-05-15 20:52:03 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(AVX2, VpxMseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_mse16x16_avx2)));
|
2015-05-15 20:52:03 +02:00
|
|
|
|
2014-06-09 03:25:37 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 20:52:03 +02:00
|
|
|
AVX2, VpxVarianceTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_variance64x64_avx2),
|
|
|
|
VarianceParams(6, 5, &vpx_variance64x32_avx2),
|
|
|
|
VarianceParams(5, 5, &vpx_variance32x32_avx2),
|
|
|
|
VarianceParams(5, 4, &vpx_variance32x16_avx2),
|
|
|
|
VarianceParams(4, 4, &vpx_variance16x16_avx2)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2014-06-09 03:25:37 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
AVX2, VpxSubpelVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_avx2, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_avx2, 0)));
|
2015-06-05 18:54:19 +02:00
|
|
|
|
2014-06-09 03:25:37 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
AVX2, VpxSubpelAvgVarianceTest,
|
2015-11-06 04:00:45 +01:00
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_avx2, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_avx2,
|
|
|
|
0)));
|
2014-06-09 03:25:37 +02:00
|
|
|
#endif // HAVE_AVX2
|
2015-05-15 20:52:03 +02:00
|
|
|
|
2014-07-30 01:47:34 +02:00
|
|
|
#if HAVE_NEON
|
2015-05-15 20:52:03 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(NEON, VpxSseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(SseParams(2, 2,
|
|
|
|
&vpx_get4x4sse_cs_neon)));
|
2015-05-15 20:52:03 +02:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(NEON, VpxMseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_mse16x16_neon)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2014-07-30 01:47:34 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 20:52:03 +02:00
|
|
|
NEON, VpxVarianceTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_variance64x64_neon),
|
|
|
|
VarianceParams(6, 5, &vpx_variance64x32_neon),
|
|
|
|
VarianceParams(5, 6, &vpx_variance32x64_neon),
|
|
|
|
VarianceParams(5, 5, &vpx_variance32x32_neon),
|
2017-05-01 18:10:06 +02:00
|
|
|
VarianceParams(5, 4, &vpx_variance32x16_neon),
|
|
|
|
VarianceParams(4, 5, &vpx_variance16x32_neon),
|
2016-07-14 02:33:22 +02:00
|
|
|
VarianceParams(4, 4, &vpx_variance16x16_neon),
|
|
|
|
VarianceParams(4, 3, &vpx_variance16x8_neon),
|
|
|
|
VarianceParams(3, 4, &vpx_variance8x16_neon),
|
2017-05-01 18:10:06 +02:00
|
|
|
VarianceParams(3, 3, &vpx_variance8x8_neon),
|
2017-05-02 16:31:05 +02:00
|
|
|
VarianceParams(3, 2, &vpx_variance8x4_neon),
|
|
|
|
VarianceParams(2, 3, &vpx_variance4x8_neon),
|
|
|
|
VarianceParams(2, 2, &vpx_variance4x4_neon)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2014-07-30 01:47:34 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
NEON, VpxSubpelVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_neon, 0),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_sub_pixel_variance64x32_neon, 0),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_sub_pixel_variance32x64_neon, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_neon, 0),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_sub_pixel_variance32x16_neon, 0),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_sub_pixel_variance16x32_neon, 0),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_sub_pixel_variance16x16_neon, 0),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_sub_pixel_variance16x8_neon, 0),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_sub_pixel_variance8x16_neon, 0),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_sub_pixel_variance8x8_neon, 0),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_sub_pixel_variance8x4_neon, 0),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_sub_pixel_variance4x8_neon, 0),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_sub_pixel_variance4x4_neon, 0)));
|
2017-05-03 21:28:32 +02:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
NEON, VpxSubpelAvgVarianceTest,
|
|
|
|
::testing::Values(
|
2017-06-23 09:26:00 +02:00
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(6, 5, &vpx_sub_pixel_avg_variance64x32_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 6, &vpx_sub_pixel_avg_variance32x64_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 4, &vpx_sub_pixel_avg_variance32x16_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 5, &vpx_sub_pixel_avg_variance16x32_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 4, &vpx_sub_pixel_avg_variance16x16_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 3, &vpx_sub_pixel_avg_variance16x8_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 4, &vpx_sub_pixel_avg_variance8x16_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_sub_pixel_avg_variance8x8_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_sub_pixel_avg_variance8x4_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_sub_pixel_avg_variance4x8_neon, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_neon, 0)));
|
2015-05-15 20:52:03 +02:00
|
|
|
#endif // HAVE_NEON
|
2013-02-23 01:23:36 +01:00
|
|
|
|
2015-06-26 10:32:16 +02:00
|
|
|
#if HAVE_MSA
|
|
|
|
INSTANTIATE_TEST_CASE_P(MSA, SumOfSquaresTest,
|
|
|
|
::testing::Values(vpx_get_mb_ss_msa));
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(MSA, VpxSseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(SseParams(2, 2,
|
|
|
|
&vpx_get4x4sse_cs_msa)));
|
2015-06-26 10:32:16 +02:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(MSA, VpxMseTest,
|
2016-07-26 07:50:48 +02:00
|
|
|
::testing::Values(MseParams(4, 4, &vpx_mse16x16_msa),
|
|
|
|
MseParams(4, 3, &vpx_mse16x8_msa),
|
|
|
|
MseParams(3, 4, &vpx_mse8x16_msa),
|
|
|
|
MseParams(3, 3, &vpx_mse8x8_msa)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2015-06-26 10:32:16 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
MSA, VpxVarianceTest,
|
2016-07-14 02:33:22 +02:00
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_variance64x64_msa),
|
|
|
|
VarianceParams(6, 5, &vpx_variance64x32_msa),
|
|
|
|
VarianceParams(5, 6, &vpx_variance32x64_msa),
|
|
|
|
VarianceParams(5, 5, &vpx_variance32x32_msa),
|
|
|
|
VarianceParams(5, 4, &vpx_variance32x16_msa),
|
|
|
|
VarianceParams(4, 5, &vpx_variance16x32_msa),
|
|
|
|
VarianceParams(4, 4, &vpx_variance16x16_msa),
|
|
|
|
VarianceParams(4, 3, &vpx_variance16x8_msa),
|
|
|
|
VarianceParams(3, 4, &vpx_variance8x16_msa),
|
|
|
|
VarianceParams(3, 3, &vpx_variance8x8_msa),
|
|
|
|
VarianceParams(3, 2, &vpx_variance8x4_msa),
|
|
|
|
VarianceParams(2, 3, &vpx_variance4x8_msa),
|
|
|
|
VarianceParams(2, 2, &vpx_variance4x4_msa)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2015-07-05 18:14:06 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-06-05 18:54:19 +02:00
|
|
|
MSA, VpxSubpelVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_sub_pixel_variance4x4_msa, 0),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_sub_pixel_variance4x8_msa, 0),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_sub_pixel_variance8x4_msa, 0),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_sub_pixel_variance8x8_msa, 0),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_sub_pixel_variance8x16_msa, 0),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_sub_pixel_variance16x8_msa, 0),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_sub_pixel_variance16x16_msa, 0),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_sub_pixel_variance16x32_msa, 0),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_sub_pixel_variance32x16_msa, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_msa, 0),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_sub_pixel_variance32x64_msa, 0),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_sub_pixel_variance64x32_msa, 0),
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_msa, 0)));
|
2015-11-06 04:00:45 +01:00
|
|
|
|
2015-07-08 08:37:28 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
MSA, VpxSubpelAvgVarianceTest,
|
2017-06-23 09:26:00 +02:00
|
|
|
::testing::Values(
|
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(6, 5, &vpx_sub_pixel_avg_variance64x32_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 6, &vpx_sub_pixel_avg_variance32x64_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 4, &vpx_sub_pixel_avg_variance32x16_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 5, &vpx_sub_pixel_avg_variance16x32_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 4, &vpx_sub_pixel_avg_variance16x16_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 3, &vpx_sub_pixel_avg_variance16x8_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 4, &vpx_sub_pixel_avg_variance8x16_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_sub_pixel_avg_variance8x8_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_sub_pixel_avg_variance8x4_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_sub_pixel_avg_variance4x8_msa, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_msa, 0)));
|
2015-06-26 10:32:16 +02:00
|
|
|
#endif // HAVE_MSA
|
2017-05-11 05:16:45 +02:00
|
|
|
|
|
|
|
#if HAVE_VSX
|
2017-05-11 05:58:34 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(VSX, SumOfSquaresTest,
|
|
|
|
::testing::Values(vpx_get_mb_ss_vsx));
|
|
|
|
|
2017-05-11 05:16:45 +02:00
|
|
|
INSTANTIATE_TEST_CASE_P(VSX, VpxSseTest,
|
|
|
|
::testing::Values(SseParams(2, 2,
|
|
|
|
&vpx_get4x4sse_cs_vsx)));
|
|
|
|
#endif // HAVE_VSX
|
2017-08-22 02:44:36 +02:00
|
|
|
|
|
|
|
#if HAVE_MMI
|
|
|
|
INSTANTIATE_TEST_CASE_P(MMI, VpxMseTest,
|
|
|
|
::testing::Values(MseParams(4, 4, &vpx_mse16x16_mmi),
|
|
|
|
MseParams(4, 3, &vpx_mse16x8_mmi),
|
|
|
|
MseParams(3, 4, &vpx_mse8x16_mmi),
|
|
|
|
MseParams(3, 3, &vpx_mse8x8_mmi)));
|
2017-08-24 17:11:58 +02:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
MMI, VpxVarianceTest,
|
|
|
|
::testing::Values(VarianceParams(6, 6, &vpx_variance64x64_mmi),
|
|
|
|
VarianceParams(6, 5, &vpx_variance64x32_mmi),
|
|
|
|
VarianceParams(5, 6, &vpx_variance32x64_mmi),
|
|
|
|
VarianceParams(5, 5, &vpx_variance32x32_mmi),
|
|
|
|
VarianceParams(5, 4, &vpx_variance32x16_mmi),
|
|
|
|
VarianceParams(4, 5, &vpx_variance16x32_mmi),
|
|
|
|
VarianceParams(4, 4, &vpx_variance16x16_mmi),
|
|
|
|
VarianceParams(4, 3, &vpx_variance16x8_mmi),
|
|
|
|
VarianceParams(3, 4, &vpx_variance8x16_mmi),
|
|
|
|
VarianceParams(3, 3, &vpx_variance8x8_mmi),
|
|
|
|
VarianceParams(3, 2, &vpx_variance8x4_mmi),
|
|
|
|
VarianceParams(2, 3, &vpx_variance4x8_mmi),
|
|
|
|
VarianceParams(2, 2, &vpx_variance4x4_mmi)));
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
MMI, VpxSubpelVarianceTest,
|
|
|
|
::testing::Values(
|
|
|
|
SubpelVarianceParams(6, 6, &vpx_sub_pixel_variance64x64_mmi, 0),
|
|
|
|
SubpelVarianceParams(6, 5, &vpx_sub_pixel_variance64x32_mmi, 0),
|
|
|
|
SubpelVarianceParams(5, 6, &vpx_sub_pixel_variance32x64_mmi, 0),
|
|
|
|
SubpelVarianceParams(5, 5, &vpx_sub_pixel_variance32x32_mmi, 0),
|
|
|
|
SubpelVarianceParams(5, 4, &vpx_sub_pixel_variance32x16_mmi, 0),
|
|
|
|
SubpelVarianceParams(4, 5, &vpx_sub_pixel_variance16x32_mmi, 0),
|
|
|
|
SubpelVarianceParams(4, 4, &vpx_sub_pixel_variance16x16_mmi, 0),
|
|
|
|
SubpelVarianceParams(4, 3, &vpx_sub_pixel_variance16x8_mmi, 0),
|
|
|
|
SubpelVarianceParams(3, 4, &vpx_sub_pixel_variance8x16_mmi, 0),
|
|
|
|
SubpelVarianceParams(3, 3, &vpx_sub_pixel_variance8x8_mmi, 0),
|
|
|
|
SubpelVarianceParams(3, 2, &vpx_sub_pixel_variance8x4_mmi, 0),
|
|
|
|
SubpelVarianceParams(2, 3, &vpx_sub_pixel_variance4x8_mmi, 0),
|
|
|
|
SubpelVarianceParams(2, 2, &vpx_sub_pixel_variance4x4_mmi, 0)));
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
MMI, VpxSubpelAvgVarianceTest,
|
|
|
|
::testing::Values(
|
|
|
|
SubpelAvgVarianceParams(6, 6, &vpx_sub_pixel_avg_variance64x64_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(6, 5, &vpx_sub_pixel_avg_variance64x32_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 6, &vpx_sub_pixel_avg_variance32x64_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 5, &vpx_sub_pixel_avg_variance32x32_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(5, 4, &vpx_sub_pixel_avg_variance32x16_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 5, &vpx_sub_pixel_avg_variance16x32_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 4, &vpx_sub_pixel_avg_variance16x16_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(4, 3, &vpx_sub_pixel_avg_variance16x8_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 4, &vpx_sub_pixel_avg_variance8x16_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 3, &vpx_sub_pixel_avg_variance8x8_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(3, 2, &vpx_sub_pixel_avg_variance8x4_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 3, &vpx_sub_pixel_avg_variance4x8_mmi, 0),
|
|
|
|
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_mmi, 0)));
|
2017-08-22 02:44:36 +02:00
|
|
|
#endif // HAVE_MMI
|
2012-11-07 01:58:11 +01:00
|
|
|
} // namespace
|