2012-11-07 04:58:11 +04: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 17:00:54 +04:00
|
|
|
#include <cstdlib>
|
|
|
|
#include <new>
|
2012-11-07 04:58:11 +04:00
|
|
|
|
2014-10-16 17:00:54 +04:00
|
|
|
#include "test/acm_random.h"
|
2013-06-18 09:58:40 +04:00
|
|
|
#include "test/clear_system_state.h"
|
2013-06-19 06:15:56 +04:00
|
|
|
#include "test/register_state_check.h"
|
2014-10-16 17:00:54 +04:00
|
|
|
#include "third_party/googletest/src/include/gtest/gtest.h"
|
2013-06-18 09:58:40 +04:00
|
|
|
|
2013-09-05 19:45:56 +04:00
|
|
|
#include "./vpx_config.h"
|
2014-10-16 17:00:54 +04:00
|
|
|
#include "vpx/vpx_codec.h"
|
|
|
|
#include "vpx/vpx_integer.h"
|
2013-06-22 04:03:57 +04:00
|
|
|
#include "vpx_mem/vpx_mem.h"
|
2015-05-12 05:09:22 +03:00
|
|
|
#include "vpx_ports/mem.h"
|
2013-02-23 04:23:36 +04:00
|
|
|
#if CONFIG_VP9_ENCODER
|
2013-09-05 19:45:56 +04:00
|
|
|
# include "./vp9_rtcd.h"
|
2014-01-19 01:03:31 +04:00
|
|
|
# include "vp9/encoder/vp9_variance.h"
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
|
|
|
#include "./vpx_dsp_rtcd.h"
|
2012-11-07 04:58:11 +04:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
typedef unsigned int (*VarianceMxNFunc)(const uint8_t *a, int a_stride,
|
|
|
|
const uint8_t *b, int b_stride,
|
|
|
|
unsigned int *sse);
|
|
|
|
typedef unsigned int (*Get4x4SSEFunc)(const uint8_t *a, int a_stride,
|
|
|
|
const uint8_t *b, int b_stride);
|
|
|
|
|
|
|
|
|
2012-11-07 04:58:11 +04:00
|
|
|
using ::std::tr1::get;
|
|
|
|
using ::std::tr1::make_tuple;
|
|
|
|
using ::std::tr1::tuple;
|
2013-06-20 20:34:25 +04:00
|
|
|
using libvpx_test::ACMRandom;
|
|
|
|
|
2014-09-06 11:10:25 +04: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;
|
|
|
|
}
|
|
|
|
|
2014-10-16 17:00:54 +04:00
|
|
|
static unsigned int 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) {
|
|
|
|
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;
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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;
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (bit_depth > VPX_BITS_8) {
|
|
|
|
sse = ROUND_POWER_OF_TWO(sse, 2 * (bit_depth - 8));
|
|
|
|
se = ROUND_POWER_OF_TWO(se, bit_depth - 8);
|
|
|
|
}
|
2013-06-20 20:34:25 +04:00
|
|
|
*sse_ptr = sse;
|
|
|
|
return sse - (((int64_t) se * se) >> (l2w + l2h));
|
|
|
|
}
|
|
|
|
|
|
|
|
static unsigned int subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
|
|
|
|
int l2w, int l2h, int xoff, int yoff,
|
2014-10-16 17:00:54 +04:00
|
|
|
unsigned int *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;
|
|
|
|
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 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04: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 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (bit_depth > VPX_BITS_8) {
|
|
|
|
sse = ROUND_POWER_OF_TWO(sse, 2 * (bit_depth - 8));
|
|
|
|
se = ROUND_POWER_OF_TWO(se, bit_depth - 8);
|
|
|
|
}
|
2013-06-20 20:34:25 +04:00
|
|
|
*sse_ptr = sse;
|
|
|
|
return sse - (((int64_t) se * se) >> (l2w + l2h));
|
|
|
|
}
|
2012-11-07 04:58:11 +04:00
|
|
|
|
2014-09-06 11:10:25 +04:00
|
|
|
typedef unsigned int (*SumOfSquaresFunction)(const int16_t *src);
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-23 04:23:36 +04:00
|
|
|
template<typename VarianceFunctionType>
|
2013-09-05 19:45:56 +04:00
|
|
|
class VarianceTest
|
2014-10-16 17:00:54 +04:00
|
|
|
: public ::testing::TestWithParam<tuple<int, int,
|
|
|
|
VarianceFunctionType, int> > {
|
2012-11-07 04:58:11 +04:00
|
|
|
public:
|
|
|
|
virtual void SetUp() {
|
2014-10-16 17:00:54 +04:00
|
|
|
const tuple<int, int, VarianceFunctionType, int>& params = this->GetParam();
|
2013-06-20 20:34:25 +04:00
|
|
|
log2width_ = get<0>(params);
|
|
|
|
width_ = 1 << log2width_;
|
|
|
|
log2height_ = get<1>(params);
|
|
|
|
height_ = 1 << log2height_;
|
2012-11-07 04:58:11 +04:00
|
|
|
variance_ = get<2>(params);
|
2014-10-16 17:00:54 +04:00
|
|
|
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;
|
2012-11-07 04:58:11 +04:00
|
|
|
|
2014-09-04 23:24:52 +04:00
|
|
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
2012-11-07 04:58:11 +04:00
|
|
|
block_size_ = width_ * height_;
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
|
|
|
src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_ * 2));
|
|
|
|
ref_ = new uint8_t[block_size_ * 2];
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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]);
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2012-11-07 04:58:11 +04:00
|
|
|
ASSERT_TRUE(src_ != NULL);
|
|
|
|
ASSERT_TRUE(ref_ != NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void TearDown() {
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
|
|
|
vpx_free(src_);
|
|
|
|
delete[] ref_;
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} else {
|
|
|
|
vpx_free(CONVERT_TO_SHORTPTR(src_));
|
|
|
|
delete[] CONVERT_TO_SHORTPTR(ref_);
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2013-06-18 09:58:40 +04:00
|
|
|
libvpx_test::ClearSystemState();
|
2012-11-07 04:58:11 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
2013-02-23 04:23:36 +04:00
|
|
|
void ZeroTest();
|
2013-06-20 20:34:25 +04:00
|
|
|
void RefTest();
|
2014-10-16 17:00:54 +04:00
|
|
|
void RefStrideTest();
|
2013-02-23 04:23:36 +04:00
|
|
|
void OneQuarterTest();
|
|
|
|
|
2014-09-04 23:24:52 +04:00
|
|
|
ACMRandom rnd_;
|
2014-10-16 17:00:54 +04:00
|
|
|
uint8_t *src_;
|
|
|
|
uint8_t *ref_;
|
2013-06-20 20:34:25 +04:00
|
|
|
int width_, log2width_;
|
|
|
|
int height_, log2height_;
|
2014-10-16 17:00:54 +04:00
|
|
|
vpx_bit_depth_t bit_depth_;
|
|
|
|
int mask_;
|
|
|
|
bool use_high_bit_depth_;
|
2012-11-07 04:58:11 +04:00
|
|
|
int block_size_;
|
2013-02-23 04:23:36 +04:00
|
|
|
VarianceFunctionType variance_;
|
2012-11-07 04:58:11 +04:00
|
|
|
};
|
|
|
|
|
2013-02-23 04:23:36 +04:00
|
|
|
template<typename VarianceFunctionType>
|
|
|
|
void VarianceTest<VarianceFunctionType>::ZeroTest() {
|
2012-11-07 04:58:11 +04:00
|
|
|
for (int i = 0; i <= 255; ++i) {
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
|
|
|
memset(src_, i, block_size_);
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} else {
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(src_), i << (bit_depth_ - 8),
|
|
|
|
block_size_);
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2012-11-07 04:58:11 +04:00
|
|
|
for (int j = 0; j <= 255; ++j) {
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
|
|
|
memset(ref_, j, block_size_);
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} else {
|
|
|
|
vpx_memset16(CONVERT_TO_SHORTPTR(ref_), j << (bit_depth_ - 8),
|
|
|
|
block_size_);
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2012-11-07 04:58:11 +04:00
|
|
|
unsigned int sse;
|
2013-06-19 06:15:56 +04:00
|
|
|
unsigned int var;
|
2014-07-10 08:02:02 +04:00
|
|
|
ASM_REGISTER_STATE_CHECK(
|
|
|
|
var = variance_(src_, width_, ref_, width_, &sse));
|
2014-10-16 17:00:54 +04:00
|
|
|
EXPECT_EQ(0u, var) << "src values: " << i << " ref values: " << j;
|
2012-11-07 04:58:11 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-06-20 20:34:25 +04:00
|
|
|
template<typename VarianceFunctionType>
|
|
|
|
void VarianceTest<VarianceFunctionType>::RefTest() {
|
|
|
|
for (int i = 0; i < 10; ++i) {
|
|
|
|
for (int j = 0; j < block_size_; j++) {
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
2014-09-04 23:24:52 +04:00
|
|
|
src_[j] = rnd_.Rand8();
|
|
|
|
ref_[j] = rnd_.Rand8();
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} else {
|
|
|
|
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() && mask_;
|
|
|
|
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() && mask_;
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2013-06-20 20:34:25 +04:00
|
|
|
}
|
|
|
|
unsigned int sse1, sse2;
|
2013-06-19 06:15:56 +04:00
|
|
|
unsigned int var1;
|
2014-10-16 17:00:54 +04:00
|
|
|
const int stride_coeff = 1;
|
2014-07-10 08:02:02 +04:00
|
|
|
ASM_REGISTER_STATE_CHECK(
|
|
|
|
var1 = variance_(src_, width_, ref_, width_, &sse1));
|
2013-06-20 20:34:25 +04:00
|
|
|
const unsigned int var2 = variance_ref(src_, ref_, log2width_,
|
2014-10-16 17:00:54 +04:00
|
|
|
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();
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} else {
|
|
|
|
CONVERT_TO_SHORTPTR(src_)[src_ind] = rnd_.Rand16() && mask_;
|
|
|
|
CONVERT_TO_SHORTPTR(ref_)[ref_ind] = rnd_.Rand16() && mask_;
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
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_);
|
2013-06-20 20:34:25 +04:00
|
|
|
EXPECT_EQ(sse1, sse2);
|
|
|
|
EXPECT_EQ(var1, var2);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2013-02-23 04:23:36 +04:00
|
|
|
template<typename VarianceFunctionType>
|
|
|
|
void VarianceTest<VarianceFunctionType>::OneQuarterTest() {
|
2012-11-07 04:58:11 +04:00
|
|
|
const int half = block_size_ / 2;
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
|
|
|
memset(src_, 255, block_size_);
|
|
|
|
memset(ref_, 255, half);
|
|
|
|
memset(ref_ + half, 0, half);
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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);
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2012-11-07 04:58:11 +04:00
|
|
|
unsigned int sse;
|
2013-06-19 06:15:56 +04:00
|
|
|
unsigned int var;
|
2014-07-10 08:02:02 +04:00
|
|
|
ASM_REGISTER_STATE_CHECK(var = variance_(src_, width_, ref_, width_, &sse));
|
2012-11-07 04:58:11 +04:00
|
|
|
const unsigned int expected = block_size_ * 255 * 255 / 4;
|
|
|
|
EXPECT_EQ(expected, var);
|
|
|
|
}
|
|
|
|
|
2014-08-20 18:56:19 +04:00
|
|
|
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;
|
2014-10-16 17:00:54 +04:00
|
|
|
const int stride_coeff = 1;
|
2014-08-20 18:56:19 +04:00
|
|
|
ASM_REGISTER_STATE_CHECK(mse_(src_, width_, ref_, width_, &sse1));
|
2014-10-16 17:00:54 +04:00
|
|
|
variance_ref(src_, ref_, log2width_, log2height_, stride_coeff,
|
|
|
|
stride_coeff, &sse2, false, VPX_BITS_8);
|
2014-08-20 18:56:19 +04:00
|
|
|
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;
|
2014-10-16 17:00:54 +04:00
|
|
|
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);
|
2014-08-20 18:56:19 +04:00
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
2013-09-18 05:47:25 +04:00
|
|
|
unsigned int 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,
|
2014-10-16 17:00:54 +04:00
|
|
|
unsigned int *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;
|
|
|
|
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;
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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;
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (bit_depth > 8) {
|
|
|
|
sse = ROUND_POWER_OF_TWO(sse, 2*(bit_depth-8));
|
|
|
|
se = ROUND_POWER_OF_TWO(se, bit_depth-8);
|
|
|
|
}
|
2013-09-18 05:47:25 +04:00
|
|
|
*sse_ptr = sse;
|
|
|
|
return sse - (((int64_t) se * se) >> (l2w + l2h));
|
|
|
|
}
|
|
|
|
|
2013-06-20 20:34:25 +04:00
|
|
|
template<typename SubpelVarianceFunctionType>
|
2013-09-05 19:45:56 +04:00
|
|
|
class SubpelVarianceTest
|
|
|
|
: public ::testing::TestWithParam<tuple<int, int,
|
2014-10-16 17:00:54 +04:00
|
|
|
SubpelVarianceFunctionType, int> > {
|
2013-06-20 20:34:25 +04:00
|
|
|
public:
|
|
|
|
virtual void SetUp() {
|
2014-10-16 17:00:54 +04:00
|
|
|
const tuple<int, int, SubpelVarianceFunctionType, int>& params =
|
2013-06-20 20:34:25 +04:00
|
|
|
this->GetParam();
|
|
|
|
log2width_ = get<0>(params);
|
|
|
|
width_ = 1 << log2width_;
|
|
|
|
log2height_ = get<1>(params);
|
|
|
|
height_ = 1 << log2height_;
|
|
|
|
subpel_variance_ = get<2>(params);
|
2014-10-16 17:00:54 +04:00
|
|
|
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;
|
2013-06-20 20:34:25 +04:00
|
|
|
|
2014-09-04 23:24:52 +04:00
|
|
|
rnd_.Reset(ACMRandom::DeterministicSeed());
|
2013-06-20 20:34:25 +04:00
|
|
|
block_size_ = width_ * height_;
|
2014-10-16 17:00:54 +04: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 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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
|
2015-05-15 21:52:03 +03:00
|
|
|
}
|
2013-06-20 20:34:25 +04:00
|
|
|
ASSERT_TRUE(src_ != NULL);
|
2013-06-22 04:03:57 +04:00
|
|
|
ASSERT_TRUE(sec_ != NULL);
|
2013-06-20 20:34:25 +04:00
|
|
|
ASSERT_TRUE(ref_ != NULL);
|
|
|
|
}
|
|
|
|
|
|
|
|
virtual void TearDown() {
|
2014-10-16 17:00:54 +04:00
|
|
|
if (!use_high_bit_depth_) {
|
|
|
|
vpx_free(src_);
|
|
|
|
delete[] ref_;
|
|
|
|
vpx_free(sec_);
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} else {
|
|
|
|
vpx_free(CONVERT_TO_SHORTPTR(src_));
|
|
|
|
delete[] CONVERT_TO_SHORTPTR(ref_);
|
|
|
|
vpx_free(CONVERT_TO_SHORTPTR(sec_));
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2013-06-27 05:32:21 +04:00
|
|
|
libvpx_test::ClearSystemState();
|
2013-06-20 20:34:25 +04:00
|
|
|
}
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void RefTest();
|
2014-10-16 17:00:54 +04:00
|
|
|
void ExtremeRefTest();
|
2013-06-20 20:34:25 +04:00
|
|
|
|
2014-09-04 23:24:52 +04:00
|
|
|
ACMRandom rnd_;
|
2013-06-21 02:59:48 +04:00
|
|
|
uint8_t *src_;
|
|
|
|
uint8_t *ref_;
|
|
|
|
uint8_t *sec_;
|
2014-10-16 17:00:54 +04:00
|
|
|
bool use_high_bit_depth_;
|
|
|
|
vpx_bit_depth_t bit_depth_;
|
2013-06-20 20:34:25 +04:00
|
|
|
int width_, log2width_;
|
|
|
|
int height_, log2height_;
|
2014-10-16 17:00:54 +04:00
|
|
|
int block_size_, mask_;
|
2013-06-20 20:34:25 +04:00
|
|
|
SubpelVarianceFunctionType subpel_variance_;
|
|
|
|
};
|
|
|
|
|
|
|
|
template<typename SubpelVarianceFunctionType>
|
|
|
|
void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {
|
|
|
|
for (int x = 0; x < 16; ++x) {
|
|
|
|
for (int y = 0; y < 16; ++y) {
|
2014-10-16 17:00:54 +04:00
|
|
|
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();
|
|
|
|
}
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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
|
2015-05-15 21:52:03 +03:00
|
|
|
}
|
2013-06-20 20:34:25 +04:00
|
|
|
unsigned int sse1, sse2;
|
2013-06-19 06:15:56 +04:00
|
|
|
unsigned int var1;
|
2014-07-10 08:02:02 +04:00
|
|
|
ASM_REGISTER_STATE_CHECK(var1 = subpel_variance_(ref_, width_ + 1, x, y,
|
|
|
|
src_, width_, &sse1));
|
2013-06-20 20:34:25 +04:00
|
|
|
const unsigned int var2 = subpel_variance_ref(ref_, src_, log2width_,
|
2014-10-16 17:00:54 +04:00
|
|
|
log2height_, x, y, &sse2,
|
|
|
|
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.
|
|
|
|
for (int x = 0; x < 16; ++x) {
|
|
|
|
for (int y = 0; y < 16; ++y) {
|
|
|
|
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);
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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
|
2015-05-15 21:52:03 +03:00
|
|
|
}
|
2014-10-16 17:00:54 +04:00
|
|
|
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 =
|
|
|
|
subpel_variance_ref(ref_, src_, log2width_, log2height_, x, y, &sse2,
|
|
|
|
use_high_bit_depth_, bit_depth_);
|
2013-06-20 20:34:25 +04:00
|
|
|
EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
|
|
|
|
EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_ENCODER
|
2013-06-21 02:59:48 +04:00
|
|
|
template<>
|
|
|
|
void SubpelVarianceTest<vp9_subp_avg_variance_fn_t>::RefTest() {
|
|
|
|
for (int x = 0; x < 16; ++x) {
|
|
|
|
for (int y = 0; y < 16; ++y) {
|
2014-10-16 17:00:54 +04:00
|
|
|
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();
|
|
|
|
}
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
} 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_;
|
|
|
|
}
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-10-16 17:00:54 +04:00
|
|
|
}
|
2013-06-21 02:59:48 +04:00
|
|
|
unsigned int sse1, sse2;
|
2013-06-19 06:15:56 +04:00
|
|
|
unsigned int var1;
|
2014-07-10 08:02:02 +04:00
|
|
|
ASM_REGISTER_STATE_CHECK(
|
|
|
|
var1 = subpel_variance_(ref_, width_ + 1, x, y,
|
|
|
|
src_, width_, &sse1, sec_));
|
2013-06-21 02:59:48 +04:00
|
|
|
const unsigned int var2 = subpel_avg_variance_ref(ref_, src_, sec_,
|
|
|
|
log2width_, log2height_,
|
2014-10-16 17:00:54 +04:00
|
|
|
x, y, &sse2,
|
|
|
|
use_high_bit_depth_,
|
|
|
|
bit_depth_);
|
2013-06-21 02:59:48 +04:00
|
|
|
EXPECT_EQ(sse1, sse2) << "at position " << x << ", " << y;
|
|
|
|
EXPECT_EQ(var1, var2) << "at position " << x << ", " << y;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2013-09-18 05:47:25 +04:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
typedef MseTest<Get4x4SSEFunc> VpxSseTest;
|
|
|
|
typedef MseTest<VarianceMxNFunc> VpxMseTest;
|
|
|
|
typedef VarianceTest<VarianceMxNFunc> VpxVarianceTest;
|
|
|
|
|
|
|
|
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(); }
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
INSTANTIATE_TEST_CASE_P(C, SumOfSquaresTest,
|
|
|
|
::testing::Values(vpx_get_mb_ss_c));
|
|
|
|
|
|
|
|
const Get4x4SSEFunc get4x4sse_cs_c = vpx_get4x4sse_cs_c;
|
|
|
|
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;
|
2014-08-20 18:56:19 +04:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
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),
|
2014-10-16 17:00:54 +04:00
|
|
|
make_tuple(4, 3, variance16x8_c, 0),
|
2015-05-15 21:52:03 +03:00
|
|
|
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)));
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
typedef MseTest<VarianceMxNFunc> VpxHBDMseTest;
|
|
|
|
typedef VarianceTest<VarianceMxNFunc> VpxHBDVarianceTest;
|
|
|
|
|
|
|
|
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(); }
|
|
|
|
|
|
|
|
/* 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;
|
2014-08-20 18:56:19 +04:00
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
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;
|
2014-02-26 11:11:49 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
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)));
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2014-02-26 11:11:49 +04:00
|
|
|
|
2013-02-23 04:23:36 +04:00
|
|
|
#if HAVE_MMX
|
2015-05-15 21:52:03 +03:00
|
|
|
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;
|
2013-02-23 04:23:36 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
MMX, VpxVarianceTest,
|
|
|
|
::testing::Values(make_tuple(4, 4, variance16x16_mmx, 0),
|
2014-10-16 17:00:54 +04:00
|
|
|
make_tuple(4, 3, variance16x8_mmx, 0),
|
2015-05-15 21:52:03 +03:00
|
|
|
make_tuple(3, 4, variance8x16_mmx, 0),
|
|
|
|
make_tuple(3, 3, variance8x8_mmx, 0),
|
|
|
|
make_tuple(2, 2, variance4x4_mmx, 0)));
|
|
|
|
#endif // HAVE_MMX
|
2013-02-23 04:23:36 +04:00
|
|
|
|
|
|
|
#if HAVE_SSE2
|
2015-05-15 21:52:03 +03:00
|
|
|
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;
|
2013-02-23 04:23:36 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
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)));
|
|
|
|
#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;
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
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;
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
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)));
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
#endif // HAVE_SSE2
|
2013-02-23 04:23:36 +04:00
|
|
|
|
|
|
|
#if CONFIG_VP9_ENCODER
|
2013-06-20 20:34:25 +04:00
|
|
|
typedef SubpelVarianceTest<vp9_subpixvariance_fn_t> VP9SubpelVarianceTest;
|
2013-06-21 02:59:48 +04:00
|
|
|
typedef SubpelVarianceTest<vp9_subp_avg_variance_fn_t> VP9SubpelAvgVarianceTest;
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2013-06-20 20:34:25 +04:00
|
|
|
TEST_P(VP9SubpelVarianceTest, Ref) { RefTest(); }
|
2014-10-16 17:00:54 +04:00
|
|
|
TEST_P(VP9SubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
|
2013-06-21 02:59:48 +04:00
|
|
|
TEST_P(VP9SubpelAvgVarianceTest, Ref) { RefTest(); }
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2014-10-16 17:00:54 +04:00
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
typedef SubpelVarianceTest<vp9_subpixvariance_fn_t> VP9SubpelVarianceHighTest;
|
|
|
|
typedef SubpelVarianceTest<vp9_subp_avg_variance_fn_t>
|
|
|
|
VP9SubpelAvgVarianceHighTest;
|
|
|
|
|
|
|
|
TEST_P(VP9SubpelVarianceHighTest, Ref) { RefTest(); }
|
|
|
|
TEST_P(VP9SubpelVarianceHighTest, ExtremeRef) { ExtremeRefTest(); }
|
|
|
|
TEST_P(VP9SubpelAvgVarianceHighTest, Ref) { RefTest(); }
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
|
Revert "Removing redundant variables from variance_test.cc."
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e.
The constants are necessary to avoid breakage in vs9 builds:
warning C4180: qualifier applied to function type has no meaning; ignored
error C2436: 'f2_' : member function or nested class in constructor initializer list
while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))'
..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-09 01:32:32 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance4x4_c =
|
|
|
|
vp9_sub_pixel_variance4x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance4x8_c =
|
|
|
|
vp9_sub_pixel_variance4x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x4_c =
|
|
|
|
vp9_sub_pixel_variance8x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x8_c =
|
|
|
|
vp9_sub_pixel_variance8x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x16_c =
|
|
|
|
vp9_sub_pixel_variance8x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x8_c =
|
|
|
|
vp9_sub_pixel_variance16x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x16_c =
|
|
|
|
vp9_sub_pixel_variance16x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x32_c =
|
|
|
|
vp9_sub_pixel_variance16x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x16_c =
|
|
|
|
vp9_sub_pixel_variance32x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x32_c =
|
|
|
|
vp9_sub_pixel_variance32x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x64_c =
|
|
|
|
vp9_sub_pixel_variance32x64_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x32_c =
|
|
|
|
vp9_sub_pixel_variance64x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x64_c =
|
|
|
|
vp9_sub_pixel_variance64x64_c;
|
2013-06-20 20:34:25 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VP9SubpelVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(2, 2, subpel_variance4x4_c, 0),
|
|
|
|
make_tuple(2, 3, subpel_variance4x8_c, 0),
|
|
|
|
make_tuple(3, 2, subpel_variance8x4_c, 0),
|
|
|
|
make_tuple(3, 3, subpel_variance8x8_c, 0),
|
|
|
|
make_tuple(3, 4, subpel_variance8x16_c, 0),
|
|
|
|
make_tuple(4, 3, subpel_variance16x8_c, 0),
|
|
|
|
make_tuple(4, 4, subpel_variance16x16_c, 0),
|
|
|
|
make_tuple(4, 5, subpel_variance16x32_c, 0),
|
|
|
|
make_tuple(5, 4, subpel_variance32x16_c, 0),
|
|
|
|
make_tuple(5, 5, subpel_variance32x32_c, 0),
|
|
|
|
make_tuple(5, 6, subpel_variance32x64_c, 0),
|
|
|
|
make_tuple(6, 5, subpel_variance64x32_c, 0),
|
|
|
|
make_tuple(6, 6, subpel_variance64x64_c, 0)));
|
Revert "Removing redundant variables from variance_test.cc."
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e.
The constants are necessary to avoid breakage in vs9 builds:
warning C4180: qualifier applied to function type has no meaning; ignored
error C2436: 'f2_' : member function or nested class in constructor initializer list
while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))'
..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-09 01:32:32 +04:00
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance4x4_c =
|
|
|
|
vp9_sub_pixel_avg_variance4x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance4x8_c =
|
|
|
|
vp9_sub_pixel_avg_variance4x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x4_c =
|
|
|
|
vp9_sub_pixel_avg_variance8x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x8_c =
|
|
|
|
vp9_sub_pixel_avg_variance8x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x16_c =
|
|
|
|
vp9_sub_pixel_avg_variance8x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x8_c =
|
|
|
|
vp9_sub_pixel_avg_variance16x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x16_c =
|
|
|
|
vp9_sub_pixel_avg_variance16x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x32_c =
|
|
|
|
vp9_sub_pixel_avg_variance16x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x16_c =
|
|
|
|
vp9_sub_pixel_avg_variance32x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x32_c =
|
|
|
|
vp9_sub_pixel_avg_variance32x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x64_c =
|
|
|
|
vp9_sub_pixel_avg_variance32x64_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x32_c =
|
|
|
|
vp9_sub_pixel_avg_variance64x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_c =
|
|
|
|
vp9_sub_pixel_avg_variance64x64_c;
|
2013-06-21 02:59:48 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VP9SubpelAvgVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(2, 2, subpel_avg_variance4x4_c, 0),
|
|
|
|
make_tuple(2, 3, subpel_avg_variance4x8_c, 0),
|
|
|
|
make_tuple(3, 2, subpel_avg_variance8x4_c, 0),
|
|
|
|
make_tuple(3, 3, subpel_avg_variance8x8_c, 0),
|
|
|
|
make_tuple(3, 4, subpel_avg_variance8x16_c, 0),
|
|
|
|
make_tuple(4, 3, subpel_avg_variance16x8_c, 0),
|
|
|
|
make_tuple(4, 4, subpel_avg_variance16x16_c, 0),
|
|
|
|
make_tuple(4, 5, subpel_avg_variance16x32_c, 0),
|
|
|
|
make_tuple(5, 4, subpel_avg_variance32x16_c, 0),
|
|
|
|
make_tuple(5, 5, subpel_avg_variance32x32_c, 0),
|
|
|
|
make_tuple(5, 6, subpel_avg_variance32x64_c, 0),
|
|
|
|
make_tuple(6, 5, subpel_avg_variance64x32_c, 0),
|
|
|
|
make_tuple(6, 6, subpel_avg_variance64x64_c, 0)));
|
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance4x4_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance4x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance4x8_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance4x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x4_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance8x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x8_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance8x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x16_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance8x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x8_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance16x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x16_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance16x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x32_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance16x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x16_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance32x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x32_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance32x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x64_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance32x64_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x32_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance64x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x64_c =
|
|
|
|
vp9_highbd_10_sub_pixel_variance64x64_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance4x4_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance4x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance4x8_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance4x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x4_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance8x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x8_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance8x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x16_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance8x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x8_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance16x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x16_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance16x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x32_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance16x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x16_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance32x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x32_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance32x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x64_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance32x64_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x32_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance64x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x64_c =
|
|
|
|
vp9_highbd_12_sub_pixel_variance64x64_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance4x4_c =
|
|
|
|
vp9_highbd_sub_pixel_variance4x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance4x8_c =
|
|
|
|
vp9_highbd_sub_pixel_variance4x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance8x4_c =
|
|
|
|
vp9_highbd_sub_pixel_variance8x4_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance8x8_c =
|
|
|
|
vp9_highbd_sub_pixel_variance8x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance8x16_c =
|
|
|
|
vp9_highbd_sub_pixel_variance8x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance16x8_c =
|
|
|
|
vp9_highbd_sub_pixel_variance16x8_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance16x16_c =
|
|
|
|
vp9_highbd_sub_pixel_variance16x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance16x32_c =
|
|
|
|
vp9_highbd_sub_pixel_variance16x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance32x16_c =
|
|
|
|
vp9_highbd_sub_pixel_variance32x16_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance32x32_c =
|
|
|
|
vp9_highbd_sub_pixel_variance32x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance32x64_c =
|
|
|
|
vp9_highbd_sub_pixel_variance32x64_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance64x32_c =
|
|
|
|
vp9_highbd_sub_pixel_variance64x32_c;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance64x64_c =
|
|
|
|
vp9_highbd_sub_pixel_variance64x64_c;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VP9SubpelVarianceHighTest,
|
|
|
|
::testing::Values(make_tuple(2, 2, highbd_10_subpel_variance4x4_c, 10),
|
|
|
|
make_tuple(2, 3, highbd_10_subpel_variance4x8_c, 10),
|
|
|
|
make_tuple(3, 2, highbd_10_subpel_variance8x4_c, 10),
|
|
|
|
make_tuple(3, 3, highbd_10_subpel_variance8x8_c, 10),
|
|
|
|
make_tuple(3, 4, highbd_10_subpel_variance8x16_c, 10),
|
|
|
|
make_tuple(4, 3, highbd_10_subpel_variance16x8_c, 10),
|
|
|
|
make_tuple(4, 4, highbd_10_subpel_variance16x16_c, 10),
|
|
|
|
make_tuple(4, 5, highbd_10_subpel_variance16x32_c, 10),
|
|
|
|
make_tuple(5, 4, highbd_10_subpel_variance32x16_c, 10),
|
|
|
|
make_tuple(5, 5, highbd_10_subpel_variance32x32_c, 10),
|
|
|
|
make_tuple(5, 6, highbd_10_subpel_variance32x64_c, 10),
|
|
|
|
make_tuple(6, 5, highbd_10_subpel_variance64x32_c, 10),
|
|
|
|
make_tuple(6, 6, highbd_10_subpel_variance64x64_c, 10),
|
|
|
|
make_tuple(2, 2, highbd_12_subpel_variance4x4_c, 12),
|
|
|
|
make_tuple(2, 3, highbd_12_subpel_variance4x8_c, 12),
|
|
|
|
make_tuple(3, 2, highbd_12_subpel_variance8x4_c, 12),
|
|
|
|
make_tuple(3, 3, highbd_12_subpel_variance8x8_c, 12),
|
|
|
|
make_tuple(3, 4, highbd_12_subpel_variance8x16_c, 12),
|
|
|
|
make_tuple(4, 3, highbd_12_subpel_variance16x8_c, 12),
|
|
|
|
make_tuple(4, 4, highbd_12_subpel_variance16x16_c, 12),
|
|
|
|
make_tuple(4, 5, highbd_12_subpel_variance16x32_c, 12),
|
|
|
|
make_tuple(5, 4, highbd_12_subpel_variance32x16_c, 12),
|
|
|
|
make_tuple(5, 5, highbd_12_subpel_variance32x32_c, 12),
|
|
|
|
make_tuple(5, 6, highbd_12_subpel_variance32x64_c, 12),
|
|
|
|
make_tuple(6, 5, highbd_12_subpel_variance64x32_c, 12),
|
|
|
|
make_tuple(6, 6, highbd_12_subpel_variance64x64_c, 12),
|
|
|
|
make_tuple(2, 2, highbd_subpel_variance4x4_c, 8),
|
|
|
|
make_tuple(2, 3, highbd_subpel_variance4x8_c, 8),
|
|
|
|
make_tuple(3, 2, highbd_subpel_variance8x4_c, 8),
|
|
|
|
make_tuple(3, 3, highbd_subpel_variance8x8_c, 8),
|
|
|
|
make_tuple(3, 4, highbd_subpel_variance8x16_c, 8),
|
|
|
|
make_tuple(4, 3, highbd_subpel_variance16x8_c, 8),
|
|
|
|
make_tuple(4, 4, highbd_subpel_variance16x16_c, 8),
|
|
|
|
make_tuple(4, 5, highbd_subpel_variance16x32_c, 8),
|
|
|
|
make_tuple(5, 4, highbd_subpel_variance32x16_c, 8),
|
|
|
|
make_tuple(5, 5, highbd_subpel_variance32x32_c, 8),
|
|
|
|
make_tuple(5, 6, highbd_subpel_variance32x64_c, 8),
|
|
|
|
make_tuple(6, 5, highbd_subpel_variance64x32_c, 8),
|
|
|
|
make_tuple(6, 6, highbd_subpel_variance64x64_c, 8)));
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance4x4_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance4x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance4x8_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance4x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance8x4_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance8x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance8x8_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance8x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance8x16_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance8x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance16x8_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance16x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance16x16_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance16x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance16x32_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance16x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance32x16_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance32x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance32x32_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance32x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance32x64_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance32x64_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance64x32_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance64x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance64x64_c =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance64x64_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance4x4_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance4x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance4x8_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance4x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance8x4_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance8x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance8x8_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance8x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance8x16_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance8x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance16x8_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance16x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance16x16_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance16x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance16x32_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance16x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance32x16_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance32x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance32x32_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance32x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance32x64_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance32x64_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance64x32_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance64x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance64x64_c =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance64x64_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance4x4_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance4x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance4x8_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance4x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance8x4_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance8x4_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance8x8_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance8x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance8x16_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance8x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance16x8_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance16x8_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance16x16_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance16x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance16x32_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance16x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance32x16_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance32x16_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance32x32_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance32x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance32x64_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance32x64_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance64x32_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance64x32_c;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance64x64_c =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance64x64_c;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
C, VP9SubpelAvgVarianceHighTest,
|
|
|
|
::testing::Values(
|
|
|
|
make_tuple(2, 2, highbd_10_subpel_avg_variance4x4_c, 10),
|
|
|
|
make_tuple(2, 3, highbd_10_subpel_avg_variance4x8_c, 10),
|
|
|
|
make_tuple(3, 2, highbd_10_subpel_avg_variance8x4_c, 10),
|
|
|
|
make_tuple(3, 3, highbd_10_subpel_avg_variance8x8_c, 10),
|
|
|
|
make_tuple(3, 4, highbd_10_subpel_avg_variance8x16_c, 10),
|
|
|
|
make_tuple(4, 3, highbd_10_subpel_avg_variance16x8_c, 10),
|
|
|
|
make_tuple(4, 4, highbd_10_subpel_avg_variance16x16_c, 10),
|
|
|
|
make_tuple(4, 5, highbd_10_subpel_avg_variance16x32_c, 10),
|
|
|
|
make_tuple(5, 4, highbd_10_subpel_avg_variance32x16_c, 10),
|
|
|
|
make_tuple(5, 5, highbd_10_subpel_avg_variance32x32_c, 10),
|
|
|
|
make_tuple(5, 6, highbd_10_subpel_avg_variance32x64_c, 10),
|
|
|
|
make_tuple(6, 5, highbd_10_subpel_avg_variance64x32_c, 10),
|
|
|
|
make_tuple(6, 6, highbd_10_subpel_avg_variance64x64_c, 10),
|
|
|
|
make_tuple(2, 2, highbd_12_subpel_avg_variance4x4_c, 12),
|
|
|
|
make_tuple(2, 3, highbd_12_subpel_avg_variance4x8_c, 12),
|
|
|
|
make_tuple(3, 2, highbd_12_subpel_avg_variance8x4_c, 12),
|
|
|
|
make_tuple(3, 3, highbd_12_subpel_avg_variance8x8_c, 12),
|
|
|
|
make_tuple(3, 4, highbd_12_subpel_avg_variance8x16_c, 12),
|
|
|
|
make_tuple(4, 3, highbd_12_subpel_avg_variance16x8_c, 12),
|
|
|
|
make_tuple(4, 4, highbd_12_subpel_avg_variance16x16_c, 12),
|
|
|
|
make_tuple(4, 5, highbd_12_subpel_avg_variance16x32_c, 12),
|
|
|
|
make_tuple(5, 4, highbd_12_subpel_avg_variance32x16_c, 12),
|
|
|
|
make_tuple(5, 5, highbd_12_subpel_avg_variance32x32_c, 12),
|
|
|
|
make_tuple(5, 6, highbd_12_subpel_avg_variance32x64_c, 12),
|
|
|
|
make_tuple(6, 5, highbd_12_subpel_avg_variance64x32_c, 12),
|
|
|
|
make_tuple(6, 6, highbd_12_subpel_avg_variance64x64_c, 12),
|
|
|
|
make_tuple(2, 2, highbd_subpel_avg_variance4x4_c, 8),
|
|
|
|
make_tuple(2, 3, highbd_subpel_avg_variance4x8_c, 8),
|
|
|
|
make_tuple(3, 2, highbd_subpel_avg_variance8x4_c, 8),
|
|
|
|
make_tuple(3, 3, highbd_subpel_avg_variance8x8_c, 8),
|
|
|
|
make_tuple(3, 4, highbd_subpel_avg_variance8x16_c, 8),
|
|
|
|
make_tuple(4, 3, highbd_subpel_avg_variance16x8_c, 8),
|
|
|
|
make_tuple(4, 4, highbd_subpel_avg_variance16x16_c, 8),
|
|
|
|
make_tuple(4, 5, highbd_subpel_avg_variance16x32_c, 8),
|
|
|
|
make_tuple(5, 4, highbd_subpel_avg_variance32x16_c, 8),
|
|
|
|
make_tuple(5, 5, highbd_subpel_avg_variance32x32_c, 8),
|
|
|
|
make_tuple(5, 6, highbd_subpel_avg_variance32x64_c, 8),
|
|
|
|
make_tuple(6, 5, highbd_subpel_avg_variance64x32_c, 8),
|
|
|
|
make_tuple(6, 6, highbd_subpel_avg_variance64x64_c, 8)));
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
2013-06-21 02:59:48 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_ENCODER
|
2012-11-07 04:58:11 +04:00
|
|
|
#if HAVE_SSE2
|
2013-08-06 19:25:10 +04:00
|
|
|
#if CONFIG_USE_X86INC
|
Revert "Removing redundant variables from variance_test.cc."
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e.
The constants are necessary to avoid breakage in vs9 builds:
warning C4180: qualifier applied to function type has no meaning; ignored
error C2436: 'f2_' : member function or nested class in constructor initializer list
while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))'
..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-09 01:32:32 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance4x4_sse =
|
|
|
|
vp9_sub_pixel_variance4x4_sse;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance4x8_sse =
|
|
|
|
vp9_sub_pixel_variance4x8_sse;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x4_sse2 =
|
|
|
|
vp9_sub_pixel_variance8x4_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x8_sse2 =
|
|
|
|
vp9_sub_pixel_variance8x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x16_sse2 =
|
|
|
|
vp9_sub_pixel_variance8x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x8_sse2 =
|
|
|
|
vp9_sub_pixel_variance16x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x16_sse2 =
|
|
|
|
vp9_sub_pixel_variance16x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x32_sse2 =
|
|
|
|
vp9_sub_pixel_variance16x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x16_sse2 =
|
|
|
|
vp9_sub_pixel_variance32x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x32_sse2 =
|
|
|
|
vp9_sub_pixel_variance32x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x64_sse2 =
|
|
|
|
vp9_sub_pixel_variance32x64_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x32_sse2 =
|
|
|
|
vp9_sub_pixel_variance64x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x64_sse2 =
|
|
|
|
vp9_sub_pixel_variance64x64_sse2;
|
2013-06-20 20:34:25 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSE2, VP9SubpelVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(2, 2, subpel_variance4x4_sse, 0),
|
|
|
|
make_tuple(2, 3, subpel_variance4x8_sse, 0),
|
|
|
|
make_tuple(3, 2, subpel_variance8x4_sse2, 0),
|
|
|
|
make_tuple(3, 3, subpel_variance8x8_sse2, 0),
|
|
|
|
make_tuple(3, 4, subpel_variance8x16_sse2, 0),
|
|
|
|
make_tuple(4, 3, subpel_variance16x8_sse2, 0),
|
|
|
|
make_tuple(4, 4, subpel_variance16x16_sse2, 0),
|
|
|
|
make_tuple(4, 5, subpel_variance16x32_sse2, 0),
|
|
|
|
make_tuple(5, 4, subpel_variance32x16_sse2, 0),
|
|
|
|
make_tuple(5, 5, subpel_variance32x32_sse2, 0),
|
|
|
|
make_tuple(5, 6, subpel_variance32x64_sse2, 0),
|
|
|
|
make_tuple(6, 5, subpel_variance64x32_sse2, 0),
|
|
|
|
make_tuple(6, 6, subpel_variance64x64_sse2, 0)));
|
Revert "Removing redundant variables from variance_test.cc."
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e.
The constants are necessary to avoid breakage in vs9 builds:
warning C4180: qualifier applied to function type has no meaning; ignored
error C2436: 'f2_' : member function or nested class in constructor initializer list
while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))'
..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-09 01:32:32 +04:00
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance4x4_sse =
|
|
|
|
vp9_sub_pixel_avg_variance4x4_sse;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance4x8_sse =
|
|
|
|
vp9_sub_pixel_avg_variance4x8_sse;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x4_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance8x4_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x8_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance8x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x16_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance8x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x8_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance16x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x16_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance16x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x32_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance16x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x16_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance32x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x32_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance32x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x64_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance32x64_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x32_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance64x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_sse2 =
|
|
|
|
vp9_sub_pixel_avg_variance64x64_sse2;
|
2013-06-21 02:59:48 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSE2, VP9SubpelAvgVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(2, 2, subpel_avg_variance4x4_sse, 0),
|
|
|
|
make_tuple(2, 3, subpel_avg_variance4x8_sse, 0),
|
|
|
|
make_tuple(3, 2, subpel_avg_variance8x4_sse2, 0),
|
|
|
|
make_tuple(3, 3, subpel_avg_variance8x8_sse2, 0),
|
|
|
|
make_tuple(3, 4, subpel_avg_variance8x16_sse2, 0),
|
|
|
|
make_tuple(4, 3, subpel_avg_variance16x8_sse2, 0),
|
|
|
|
make_tuple(4, 4, subpel_avg_variance16x16_sse2, 0),
|
|
|
|
make_tuple(4, 5, subpel_avg_variance16x32_sse2, 0),
|
|
|
|
make_tuple(5, 4, subpel_avg_variance32x16_sse2, 0),
|
|
|
|
make_tuple(5, 5, subpel_avg_variance32x32_sse2, 0),
|
|
|
|
make_tuple(5, 6, subpel_avg_variance32x64_sse2, 0),
|
|
|
|
make_tuple(6, 5, subpel_avg_variance64x32_sse2, 0),
|
|
|
|
make_tuple(6, 6, subpel_avg_variance64x64_sse2, 0)));
|
|
|
|
#if CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance8x4_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance8x4_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance8x8_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance8x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance8x16_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance8x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance16x8_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance16x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance16x16_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance16x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance16x32_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance16x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance32x16_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance32x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance32x32_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance32x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance32x64_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance32x64_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance64x32_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance64x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_subpel_variance64x64_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_variance64x64_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x4_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance8x4_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x8_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance8x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance8x16_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance8x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x8_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance16x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x16_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance16x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance16x32_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance16x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x16_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance32x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x32_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance32x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance32x64_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance32x64_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x32_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance64x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_10_subpel_variance64x64_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_variance64x64_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x4_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance8x4_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x8_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance8x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance8x16_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance8x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x8_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance16x8_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x16_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance16x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance16x32_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance16x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x16_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance32x16_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x32_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance32x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance32x64_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance32x64_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x32_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance64x32_sse2;
|
|
|
|
const vp9_subpixvariance_fn_t highbd_12_subpel_variance64x64_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_variance64x64_sse2;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSE2, VP9SubpelVarianceHighTest,
|
|
|
|
::testing::Values(make_tuple(3, 2, highbd_10_subpel_variance8x4_sse2, 10),
|
|
|
|
make_tuple(3, 3, highbd_10_subpel_variance8x8_sse2, 10),
|
|
|
|
make_tuple(3, 4, highbd_10_subpel_variance8x16_sse2, 10),
|
|
|
|
make_tuple(4, 3, highbd_10_subpel_variance16x8_sse2, 10),
|
|
|
|
make_tuple(4, 4, highbd_10_subpel_variance16x16_sse2, 10),
|
|
|
|
make_tuple(4, 5, highbd_10_subpel_variance16x32_sse2, 10),
|
|
|
|
make_tuple(5, 4, highbd_10_subpel_variance32x16_sse2, 10),
|
|
|
|
make_tuple(5, 5, highbd_10_subpel_variance32x32_sse2, 10),
|
|
|
|
make_tuple(5, 6, highbd_10_subpel_variance32x64_sse2, 10),
|
|
|
|
make_tuple(6, 5, highbd_10_subpel_variance64x32_sse2, 10),
|
|
|
|
make_tuple(6, 6, highbd_10_subpel_variance64x64_sse2, 10),
|
|
|
|
make_tuple(3, 2, highbd_12_subpel_variance8x4_sse2, 12),
|
|
|
|
make_tuple(3, 3, highbd_12_subpel_variance8x8_sse2, 12),
|
|
|
|
make_tuple(3, 4, highbd_12_subpel_variance8x16_sse2, 12),
|
|
|
|
make_tuple(4, 3, highbd_12_subpel_variance16x8_sse2, 12),
|
|
|
|
make_tuple(4, 4, highbd_12_subpel_variance16x16_sse2, 12),
|
|
|
|
make_tuple(4, 5, highbd_12_subpel_variance16x32_sse2, 12),
|
|
|
|
make_tuple(5, 4, highbd_12_subpel_variance32x16_sse2, 12),
|
|
|
|
make_tuple(5, 5, highbd_12_subpel_variance32x32_sse2, 12),
|
|
|
|
make_tuple(5, 6, highbd_12_subpel_variance32x64_sse2, 12),
|
|
|
|
make_tuple(6, 5, highbd_12_subpel_variance64x32_sse2, 12),
|
|
|
|
make_tuple(6, 6, highbd_12_subpel_variance64x64_sse2, 12),
|
|
|
|
make_tuple(3, 2, highbd_subpel_variance8x4_sse2, 8),
|
|
|
|
make_tuple(3, 3, highbd_subpel_variance8x8_sse2, 8),
|
|
|
|
make_tuple(3, 4, highbd_subpel_variance8x16_sse2, 8),
|
|
|
|
make_tuple(4, 3, highbd_subpel_variance16x8_sse2, 8),
|
|
|
|
make_tuple(4, 4, highbd_subpel_variance16x16_sse2, 8),
|
|
|
|
make_tuple(4, 5, highbd_subpel_variance16x32_sse2, 8),
|
|
|
|
make_tuple(5, 4, highbd_subpel_variance32x16_sse2, 8),
|
|
|
|
make_tuple(5, 5, highbd_subpel_variance32x32_sse2, 8),
|
|
|
|
make_tuple(5, 6, highbd_subpel_variance32x64_sse2, 8),
|
|
|
|
make_tuple(6, 5, highbd_subpel_variance64x32_sse2, 8),
|
|
|
|
make_tuple(6, 6, highbd_subpel_variance64x64_sse2, 8)));
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance8x4_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance8x4_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance8x8_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance8x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance8x16_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance8x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance16x8_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance16x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance16x16_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance16x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance16x32_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance16x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance32x16_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance32x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance32x32_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance32x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance32x64_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance32x64_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance64x32_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance64x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_subpel_avg_variance64x64_sse2 =
|
|
|
|
vp9_highbd_sub_pixel_avg_variance64x64_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance8x4_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance8x4_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance8x8_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance8x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance8x16_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance8x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance16x8_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance16x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance16x16_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance16x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance16x32_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance16x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance32x16_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance32x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance32x32_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance32x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance32x64_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance32x64_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance64x32_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance64x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_10_subpel_avg_variance64x64_sse2 =
|
|
|
|
vp9_highbd_10_sub_pixel_avg_variance64x64_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance8x4_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance8x4_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance8x8_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance8x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance8x16_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance8x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance16x8_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance16x8_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance16x16_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance16x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance16x32_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance16x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance32x16_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance32x16_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance32x32_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance32x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance32x64_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance32x64_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance64x32_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance64x32_sse2;
|
|
|
|
const vp9_subp_avg_variance_fn_t highbd_12_subpel_avg_variance64x64_sse2 =
|
|
|
|
vp9_highbd_12_sub_pixel_avg_variance64x64_sse2;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSE2, VP9SubpelAvgVarianceHighTest,
|
|
|
|
::testing::Values(
|
|
|
|
make_tuple(3, 2, highbd_10_subpel_avg_variance8x4_sse2, 10),
|
|
|
|
make_tuple(3, 3, highbd_10_subpel_avg_variance8x8_sse2, 10),
|
|
|
|
make_tuple(3, 4, highbd_10_subpel_avg_variance8x16_sse2, 10),
|
|
|
|
make_tuple(4, 3, highbd_10_subpel_avg_variance16x8_sse2, 10),
|
|
|
|
make_tuple(4, 4, highbd_10_subpel_avg_variance16x16_sse2, 10),
|
|
|
|
make_tuple(4, 5, highbd_10_subpel_avg_variance16x32_sse2, 10),
|
|
|
|
make_tuple(5, 4, highbd_10_subpel_avg_variance32x16_sse2, 10),
|
|
|
|
make_tuple(5, 5, highbd_10_subpel_avg_variance32x32_sse2, 10),
|
|
|
|
make_tuple(5, 6, highbd_10_subpel_avg_variance32x64_sse2, 10),
|
|
|
|
make_tuple(6, 5, highbd_10_subpel_avg_variance64x32_sse2, 10),
|
|
|
|
make_tuple(6, 6, highbd_10_subpel_avg_variance64x64_sse2, 10),
|
|
|
|
make_tuple(3, 2, highbd_12_subpel_avg_variance8x4_sse2, 12),
|
|
|
|
make_tuple(3, 3, highbd_12_subpel_avg_variance8x8_sse2, 12),
|
|
|
|
make_tuple(3, 4, highbd_12_subpel_avg_variance8x16_sse2, 12),
|
|
|
|
make_tuple(4, 3, highbd_12_subpel_avg_variance16x8_sse2, 12),
|
|
|
|
make_tuple(4, 4, highbd_12_subpel_avg_variance16x16_sse2, 12),
|
|
|
|
make_tuple(4, 5, highbd_12_subpel_avg_variance16x32_sse2, 12),
|
|
|
|
make_tuple(5, 4, highbd_12_subpel_avg_variance32x16_sse2, 12),
|
|
|
|
make_tuple(5, 5, highbd_12_subpel_avg_variance32x32_sse2, 12),
|
|
|
|
make_tuple(5, 6, highbd_12_subpel_avg_variance32x64_sse2, 12),
|
|
|
|
make_tuple(6, 5, highbd_12_subpel_avg_variance64x32_sse2, 12),
|
|
|
|
make_tuple(6, 6, highbd_12_subpel_avg_variance64x64_sse2, 12),
|
|
|
|
make_tuple(3, 2, highbd_subpel_avg_variance8x4_sse2, 8),
|
|
|
|
make_tuple(3, 3, highbd_subpel_avg_variance8x8_sse2, 8),
|
|
|
|
make_tuple(3, 4, highbd_subpel_avg_variance8x16_sse2, 8),
|
|
|
|
make_tuple(4, 3, highbd_subpel_avg_variance16x8_sse2, 8),
|
|
|
|
make_tuple(4, 4, highbd_subpel_avg_variance16x16_sse2, 8),
|
|
|
|
make_tuple(4, 5, highbd_subpel_avg_variance16x32_sse2, 8),
|
|
|
|
make_tuple(5, 4, highbd_subpel_avg_variance32x16_sse2, 8),
|
|
|
|
make_tuple(5, 5, highbd_subpel_avg_variance32x32_sse2, 8),
|
|
|
|
make_tuple(5, 6, highbd_subpel_avg_variance32x64_sse2, 8),
|
|
|
|
make_tuple(6, 5, highbd_subpel_avg_variance64x32_sse2, 8),
|
|
|
|
make_tuple(6, 6, highbd_subpel_avg_variance64x64_sse2, 8)));
|
|
|
|
#endif // CONFIG_VP9_HIGHBITDEPTH
|
|
|
|
#endif // CONFIG_USE_X86INC
|
|
|
|
#endif // HAVE_SSE2
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
|
|
|
|
|
|
|
#if CONFIG_VP9_ENCODER
|
2013-06-20 20:34:25 +04:00
|
|
|
#if HAVE_SSSE3
|
2013-08-06 19:25:10 +04:00
|
|
|
#if CONFIG_USE_X86INC
|
|
|
|
|
Revert "Removing redundant variables from variance_test.cc."
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e.
The constants are necessary to avoid breakage in vs9 builds:
warning C4180: qualifier applied to function type has no meaning; ignored
error C2436: 'f2_' : member function or nested class in constructor initializer list
while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))'
..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-09 01:32:32 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance4x4_ssse3 =
|
|
|
|
vp9_sub_pixel_variance4x4_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance4x8_ssse3 =
|
|
|
|
vp9_sub_pixel_variance4x8_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x4_ssse3 =
|
|
|
|
vp9_sub_pixel_variance8x4_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x8_ssse3 =
|
|
|
|
vp9_sub_pixel_variance8x8_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x16_ssse3 =
|
|
|
|
vp9_sub_pixel_variance8x16_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x8_ssse3 =
|
|
|
|
vp9_sub_pixel_variance16x8_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x16_ssse3 =
|
|
|
|
vp9_sub_pixel_variance16x16_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x32_ssse3 =
|
|
|
|
vp9_sub_pixel_variance16x32_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x16_ssse3 =
|
|
|
|
vp9_sub_pixel_variance32x16_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x32_ssse3 =
|
|
|
|
vp9_sub_pixel_variance32x32_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x64_ssse3 =
|
|
|
|
vp9_sub_pixel_variance32x64_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x32_ssse3 =
|
|
|
|
vp9_sub_pixel_variance64x32_ssse3;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x64_ssse3 =
|
|
|
|
vp9_sub_pixel_variance64x64_ssse3;
|
2013-06-20 20:34:25 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSSE3, VP9SubpelVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(2, 2, subpel_variance4x4_ssse3, 0),
|
|
|
|
make_tuple(2, 3, subpel_variance4x8_ssse3, 0),
|
|
|
|
make_tuple(3, 2, subpel_variance8x4_ssse3, 0),
|
|
|
|
make_tuple(3, 3, subpel_variance8x8_ssse3, 0),
|
|
|
|
make_tuple(3, 4, subpel_variance8x16_ssse3, 0),
|
|
|
|
make_tuple(4, 3, subpel_variance16x8_ssse3, 0),
|
|
|
|
make_tuple(4, 4, subpel_variance16x16_ssse3, 0),
|
|
|
|
make_tuple(4, 5, subpel_variance16x32_ssse3, 0),
|
|
|
|
make_tuple(5, 4, subpel_variance32x16_ssse3, 0),
|
|
|
|
make_tuple(5, 5, subpel_variance32x32_ssse3, 0),
|
|
|
|
make_tuple(5, 6, subpel_variance32x64_ssse3, 0),
|
|
|
|
make_tuple(6, 5, subpel_variance64x32_ssse3, 0),
|
|
|
|
make_tuple(6, 6, subpel_variance64x64_ssse3, 0)));
|
Revert "Removing redundant variables from variance_test.cc."
This reverts commit 4725ab7e51a69bf890856e524c6d78aadd97d64e.
The constants are necessary to avoid breakage in vs9 builds:
warning C4180: qualifier applied to function type has no meaning; ignored
error C2436: 'f2_' : member function or nested class in constructor initializer list
while compiling class template member function 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>::tuple(const int &,const int &,unsigned int (__cdecl &))'
..\test\variance_test.cc : see reference to class template instantiation 'std::tr1::tuple<T0,T1,T2,T3,T4,T5,T6,T7,T8,T9>' being compiled
Change-Id: Ia218b74fc473d40f02fee84cb7009adfbe82e5a7
2014-05-09 01:32:32 +04:00
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance4x4_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance4x4_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance4x8_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance4x8_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x4_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance8x4_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x8_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance8x8_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance8x16_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance8x16_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x8_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance16x8_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x16_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance16x16_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance16x32_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance16x32_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x16_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance32x16_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x32_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance32x32_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x64_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance32x64_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x32_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance64x32_ssse3;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_ssse3 =
|
|
|
|
vp9_sub_pixel_avg_variance64x64_ssse3;
|
2013-06-21 02:59:48 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
SSSE3, VP9SubpelAvgVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(2, 2, subpel_avg_variance4x4_ssse3, 0),
|
|
|
|
make_tuple(2, 3, subpel_avg_variance4x8_ssse3, 0),
|
|
|
|
make_tuple(3, 2, subpel_avg_variance8x4_ssse3, 0),
|
|
|
|
make_tuple(3, 3, subpel_avg_variance8x8_ssse3, 0),
|
|
|
|
make_tuple(3, 4, subpel_avg_variance8x16_ssse3, 0),
|
|
|
|
make_tuple(4, 3, subpel_avg_variance16x8_ssse3, 0),
|
|
|
|
make_tuple(4, 4, subpel_avg_variance16x16_ssse3, 0),
|
|
|
|
make_tuple(4, 5, subpel_avg_variance16x32_ssse3, 0),
|
|
|
|
make_tuple(5, 4, subpel_avg_variance32x16_ssse3, 0),
|
|
|
|
make_tuple(5, 5, subpel_avg_variance32x32_ssse3, 0),
|
|
|
|
make_tuple(5, 6, subpel_avg_variance32x64_ssse3, 0),
|
|
|
|
make_tuple(6, 5, subpel_avg_variance64x32_ssse3, 0),
|
|
|
|
make_tuple(6, 6, subpel_avg_variance64x64_ssse3, 0)));
|
|
|
|
#endif // CONFIG_USE_X86INC
|
|
|
|
#endif // HAVE_SSSE3
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
2014-06-09 05:25:37 +04:00
|
|
|
|
|
|
|
#if HAVE_AVX2
|
2015-05-15 21:52:03 +03:00
|
|
|
const VarianceMxNFunc mse16x16_avx2 = vpx_mse16x16_avx2;
|
|
|
|
INSTANTIATE_TEST_CASE_P(AVX2, VpxMseTest,
|
|
|
|
::testing::Values(make_tuple(4, 4, mse16x16_avx2)));
|
|
|
|
|
|
|
|
const VarianceMxNFunc variance64x64_avx2 = vpx_variance64x64_avx2;
|
|
|
|
const VarianceMxNFunc variance64x32_avx2 = vpx_variance64x32_avx2;
|
|
|
|
const VarianceMxNFunc variance32x32_avx2 = vpx_variance32x32_avx2;
|
|
|
|
const VarianceMxNFunc variance32x16_avx2 = vpx_variance32x16_avx2;
|
|
|
|
const VarianceMxNFunc variance16x16_avx2 = vpx_variance16x16_avx2;
|
2014-06-09 05:25:37 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
AVX2, VpxVarianceTest,
|
|
|
|
::testing::Values(make_tuple(6, 6, variance64x64_avx2, 0),
|
2014-10-16 17:00:54 +04:00
|
|
|
make_tuple(6, 5, variance64x32_avx2, 0),
|
2015-05-15 21:52:03 +03:00
|
|
|
make_tuple(5, 5, variance32x32_avx2, 0),
|
|
|
|
make_tuple(5, 4, variance32x16_avx2, 0),
|
|
|
|
make_tuple(4, 4, variance16x16_avx2, 0)));
|
2014-06-09 05:25:37 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_ENCODER
|
2014-06-09 05:25:37 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x32_avx2 =
|
|
|
|
vp9_sub_pixel_variance32x32_avx2;
|
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x64_avx2 =
|
|
|
|
vp9_sub_pixel_variance64x64_avx2;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2014-07-24 11:20:19 +04:00
|
|
|
AVX2, VP9SubpelVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(5, 5, subpel_variance32x32_avx2, 0),
|
|
|
|
make_tuple(6, 6, subpel_variance64x64_avx2, 0)));
|
2014-06-09 05:25:37 +04:00
|
|
|
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance32x32_avx2 =
|
|
|
|
vp9_sub_pixel_avg_variance32x32_avx2;
|
|
|
|
const vp9_subp_avg_variance_fn_t subpel_avg_variance64x64_avx2 =
|
|
|
|
vp9_sub_pixel_avg_variance64x64_avx2;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2014-07-24 11:20:19 +04:00
|
|
|
AVX2, VP9SubpelAvgVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(5, 5, subpel_avg_variance32x32_avx2, 0),
|
|
|
|
make_tuple(6, 6, subpel_avg_variance64x64_avx2, 0)));
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
2014-06-09 05:25:37 +04:00
|
|
|
#endif // HAVE_AVX2
|
2015-05-15 21:52:03 +03:00
|
|
|
|
2014-07-30 03:47:34 +04:00
|
|
|
#if HAVE_NEON
|
2015-05-15 21:52:03 +03:00
|
|
|
const Get4x4SSEFunc get4x4sse_cs_neon = vpx_get4x4sse_cs_neon;
|
|
|
|
INSTANTIATE_TEST_CASE_P(NEON, VpxSseTest,
|
|
|
|
::testing::Values(make_tuple(2, 2, get4x4sse_cs_neon)));
|
|
|
|
|
|
|
|
const VarianceMxNFunc mse16x16_neon = vpx_mse16x16_neon;
|
|
|
|
INSTANTIATE_TEST_CASE_P(NEON, VpxMseTest,
|
|
|
|
::testing::Values(make_tuple(4, 4, mse16x16_neon)));
|
|
|
|
|
|
|
|
const VarianceMxNFunc variance64x64_neon = vpx_variance64x64_neon;
|
|
|
|
const VarianceMxNFunc variance64x32_neon = vpx_variance64x32_neon;
|
|
|
|
const VarianceMxNFunc variance32x64_neon = vpx_variance32x64_neon;
|
|
|
|
const VarianceMxNFunc variance32x32_neon = vpx_variance32x32_neon;
|
|
|
|
const VarianceMxNFunc variance16x16_neon = vpx_variance16x16_neon;
|
|
|
|
const VarianceMxNFunc variance16x8_neon = vpx_variance16x8_neon;
|
|
|
|
const VarianceMxNFunc variance8x16_neon = vpx_variance8x16_neon;
|
|
|
|
const VarianceMxNFunc variance8x8_neon = vpx_variance8x8_neon;
|
2014-07-30 03:47:34 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2015-05-15 21:52:03 +03:00
|
|
|
NEON, VpxVarianceTest,
|
|
|
|
::testing::Values(make_tuple(6, 6, variance64x64_neon, 0),
|
2015-01-13 22:15:24 +03:00
|
|
|
make_tuple(6, 5, variance64x32_neon, 0),
|
2015-05-15 21:52:03 +03:00
|
|
|
make_tuple(5, 6, variance32x64_neon, 0),
|
|
|
|
make_tuple(5, 5, variance32x32_neon, 0),
|
|
|
|
make_tuple(4, 4, variance16x16_neon, 0),
|
|
|
|
make_tuple(4, 4, variance16x8_neon, 0),
|
|
|
|
make_tuple(4, 4, variance8x16_neon, 0),
|
|
|
|
make_tuple(3, 3, variance8x8_neon, 0)));
|
2014-07-30 03:47:34 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
#if CONFIG_VP9_ENCODER
|
2014-08-01 22:35:55 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance8x8_neon =
|
|
|
|
vp9_sub_pixel_variance8x8_neon;
|
2014-07-30 03:47:34 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance16x16_neon =
|
|
|
|
vp9_sub_pixel_variance16x16_neon;
|
2014-07-31 19:00:36 +04:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance32x32_neon =
|
|
|
|
vp9_sub_pixel_variance32x32_neon;
|
2015-01-14 10:01:06 +03:00
|
|
|
const vp9_subpixvariance_fn_t subpel_variance64x64_neon =
|
|
|
|
vp9_sub_pixel_variance64x64_neon;
|
2014-07-30 03:47:34 +04:00
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
NEON, VP9SubpelVarianceTest,
|
2014-10-16 17:00:54 +04:00
|
|
|
::testing::Values(make_tuple(3, 3, subpel_variance8x8_neon, 0),
|
|
|
|
make_tuple(4, 4, subpel_variance16x16_neon, 0),
|
2015-01-14 10:01:06 +03:00
|
|
|
make_tuple(5, 5, subpel_variance32x32_neon, 0),
|
|
|
|
make_tuple(6, 6, subpel_variance64x64_neon, 0)));
|
2013-02-23 04:23:36 +04:00
|
|
|
#endif // CONFIG_VP9_ENCODER
|
2015-05-15 21:52:03 +03:00
|
|
|
#endif // HAVE_NEON
|
2013-02-23 04:23:36 +04:00
|
|
|
|
2015-05-15 21:52:03 +03:00
|
|
|
#if HAVE_MEDIA
|
|
|
|
const VarianceMxNFunc mse16x16_media = vpx_mse16x16_media;
|
|
|
|
INSTANTIATE_TEST_CASE_P(MEDIA, VpxMseTest,
|
|
|
|
::testing::Values(make_tuple(4, 4, mse16x16_media)));
|
|
|
|
|
|
|
|
const VarianceMxNFunc variance16x16_media = vpx_variance16x16_media;
|
|
|
|
const VarianceMxNFunc variance8x8_media = vpx_variance8x8_media;
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
|
|
|
MEDIA, VpxVarianceTest,
|
|
|
|
::testing::Values(make_tuple(4, 4, variance16x16_media, 0),
|
|
|
|
make_tuple(3, 3, variance8x8_media, 0)));
|
|
|
|
#endif // HAVE_MEDIA
|
2012-11-07 04:58:11 +04:00
|
|
|
} // namespace
|