2016-05-20 18:33:12 +03:00
|
|
|
/*
|
2016-09-02 22:04:54 +03:00
|
|
|
* Copyright (c) 2016, Alliance for Open Media. All rights reserved
|
2016-05-20 18:33:12 +03:00
|
|
|
*
|
2016-09-02 22:04:54 +03:00
|
|
|
* This source code is subject to the terms of the BSD 2 Clause License and
|
|
|
|
* the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
|
|
|
|
* was not distributed with this source code in the LICENSE file, you can
|
|
|
|
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
|
|
|
|
* Media Patent License 1.0 was not distributed with this source code in the
|
|
|
|
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
2016-05-20 18:33:12 +03:00
|
|
|
*/
|
|
|
|
|
|
|
|
#include <math.h>
|
|
|
|
#include <stdlib.h>
|
|
|
|
#include <string.h>
|
|
|
|
|
2017-02-08 04:14:05 +03:00
|
|
|
#include "third_party/googletest/src/googletest/include/gtest/gtest.h"
|
2016-05-20 18:33:12 +03:00
|
|
|
#include "test/register_state_check.h"
|
|
|
|
#include "test/function_equivalence_test.h"
|
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
#include "./aom_config.h"
|
|
|
|
#include "./aom_dsp_rtcd.h"
|
|
|
|
#include "aom/aom_integer.h"
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
#include "./av1_rtcd.h"
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-23 02:08:15 +03:00
|
|
|
#include "av1/common/enums.h"
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-23 02:08:15 +03:00
|
|
|
#include "aom_dsp/blend.h"
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-08-23 02:08:15 +03:00
|
|
|
using libaom_test::FunctionEquivalenceTest;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
namespace {
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
template <typename F, typename T>
|
2016-07-11 14:43:47 +03:00
|
|
|
class BlendA64Mask1DTest : public FunctionEquivalenceTest<F> {
|
|
|
|
public:
|
2016-07-06 17:54:29 +03:00
|
|
|
static const int kIterations = 10000;
|
|
|
|
static const int kMaxWidth = MAX_SB_SIZE * 5; // * 5 to cover longer strides
|
|
|
|
static const int kMaxHeight = MAX_SB_SIZE;
|
|
|
|
static const int kBufSize = kMaxWidth * kMaxHeight;
|
|
|
|
static const int kMaxMaskWidth = 2 * MAX_SB_SIZE;
|
2016-07-11 14:43:47 +03:00
|
|
|
static const int kMaxMaskSize = kMaxMaskWidth;
|
2016-07-06 17:54:29 +03:00
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
virtual ~BlendA64Mask1DTest() {}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-12 17:26:36 +03:00
|
|
|
virtual void Execute(const T *p_src0, const T *p_src1) = 0;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
void Common() {
|
2016-07-12 17:26:36 +03:00
|
|
|
w_ = 1 << this->rng_(MAX_SB_SIZE_LOG2 + 1);
|
|
|
|
h_ = 1 << this->rng_(MAX_SB_SIZE_LOG2 + 1);
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-12 17:26:36 +03:00
|
|
|
dst_offset_ = this->rng_(33);
|
|
|
|
dst_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-12 17:26:36 +03:00
|
|
|
src0_offset_ = this->rng_(33);
|
|
|
|
src0_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-12 17:26:36 +03:00
|
|
|
src1_offset_ = this->rng_(33);
|
|
|
|
src1_stride_ = this->rng_(kMaxWidth + 1 - w_) + w_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
T *p_src0;
|
|
|
|
T *p_src1;
|
|
|
|
|
2016-07-12 17:26:36 +03:00
|
|
|
switch (this->rng_(3)) {
|
2016-08-12 03:46:05 +03:00
|
|
|
case 0: // Separate sources
|
2016-07-06 17:54:29 +03:00
|
|
|
p_src0 = src0_;
|
|
|
|
p_src1 = src1_;
|
2016-05-20 18:33:12 +03:00
|
|
|
break;
|
2016-08-12 03:46:05 +03:00
|
|
|
case 1: // src0 == dst
|
2016-07-06 17:54:29 +03:00
|
|
|
p_src0 = dst_tst_;
|
|
|
|
src0_stride_ = dst_stride_;
|
|
|
|
src0_offset_ = dst_offset_;
|
|
|
|
p_src1 = src1_;
|
2016-05-20 18:33:12 +03:00
|
|
|
break;
|
2016-08-12 03:46:05 +03:00
|
|
|
case 2: // src1 == dst
|
2016-07-06 17:54:29 +03:00
|
|
|
p_src0 = src0_;
|
|
|
|
p_src1 = dst_tst_;
|
|
|
|
src1_stride_ = dst_stride_;
|
|
|
|
src1_offset_ = dst_offset_;
|
2016-05-20 18:33:12 +03:00
|
|
|
break;
|
2016-08-12 03:46:05 +03:00
|
|
|
default: FAIL();
|
2016-05-20 18:33:12 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
Execute(p_src0, p_src1);
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int r = 0; r < h_; ++r) {
|
|
|
|
for (int c = 0; c < w_; ++c) {
|
2016-07-06 17:54:29 +03:00
|
|
|
ASSERT_EQ(dst_ref_[dst_offset_ + r * dst_stride_ + c],
|
|
|
|
dst_tst_[dst_offset_ + r * dst_stride_ + c]);
|
|
|
|
}
|
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
}
|
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
T dst_ref_[kBufSize];
|
|
|
|
T dst_tst_[kBufSize];
|
2016-08-29 10:09:09 +03:00
|
|
|
uint32_t dst_stride_;
|
|
|
|
uint32_t dst_offset_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
T src0_[kBufSize];
|
2016-08-29 10:09:09 +03:00
|
|
|
uint32_t src0_stride_;
|
|
|
|
uint32_t src0_offset_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
T src1_[kBufSize];
|
2016-08-29 10:09:09 +03:00
|
|
|
uint32_t src1_stride_;
|
|
|
|
uint32_t src1_offset_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
uint8_t mask_[kMaxMaskSize];
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
int w_;
|
|
|
|
int h_;
|
2016-05-20 18:33:12 +03:00
|
|
|
};
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// 8 bit version
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
typedef void (*F8B)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0,
|
|
|
|
uint32_t src0_stride, const uint8_t *src1,
|
|
|
|
uint32_t src1_stride, const uint8_t *mask, int h, int w);
|
2016-08-23 02:08:15 +03:00
|
|
|
typedef libaom_test::FuncParam<F8B> TestFuncs;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
class BlendA64Mask1DTest8B : public BlendA64Mask1DTest<F8B, uint8_t> {
|
2016-05-20 18:33:12 +03:00
|
|
|
protected:
|
2016-07-12 17:26:36 +03:00
|
|
|
void Execute(const uint8_t *p_src0, const uint8_t *p_src1) {
|
2016-08-12 03:46:05 +03:00
|
|
|
params_.ref_func(dst_ref_ + dst_offset_, dst_stride_, p_src0 + src0_offset_,
|
|
|
|
src0_stride_, p_src1 + src1_offset_, src1_stride_, mask_,
|
|
|
|
h_, w_);
|
|
|
|
ASM_REGISTER_STATE_CHECK(params_.tst_func(
|
|
|
|
dst_tst_ + dst_offset_, dst_stride_, p_src0 + src0_offset_,
|
|
|
|
src0_stride_, p_src1 + src1_offset_, src1_stride_, mask_, h_, w_));
|
2016-05-20 18:33:12 +03:00
|
|
|
}
|
|
|
|
};
|
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
TEST_P(BlendA64Mask1DTest8B, RandomValues) {
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
|
|
|
|
for (int i = 0; i < kBufSize; ++i) {
|
2016-07-06 17:54:29 +03:00
|
|
|
dst_ref_[i] = rng_.Rand8();
|
|
|
|
dst_tst_[i] = rng_.Rand8();
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
src0_[i] = rng_.Rand8();
|
|
|
|
src1_[i] = rng_.Rand8();
|
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int i = 0; i < kMaxMaskSize; ++i)
|
2016-08-31 00:01:10 +03:00
|
|
|
mask_[i] = rng_(AOM_BLEND_A64_MAX_ALPHA + 1);
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
Common();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
TEST_P(BlendA64Mask1DTest8B, ExtremeValues) {
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
|
|
|
|
for (int i = 0; i < kBufSize; ++i) {
|
2016-07-06 17:54:29 +03:00
|
|
|
dst_ref_[i] = rng_(2) + 254;
|
|
|
|
dst_tst_[i] = rng_(2) + 254;
|
|
|
|
src0_[i] = rng_(2) + 254;
|
|
|
|
src1_[i] = rng_(2) + 254;
|
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int i = 0; i < kMaxMaskSize; ++i)
|
2016-08-31 00:01:10 +03:00
|
|
|
mask_[i] = rng_(2) + AOM_BLEND_A64_MAX_ALPHA - 1;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
Common();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
static void blend_a64_hmask_ref(uint8_t *dst, uint32_t dst_stride,
|
|
|
|
const uint8_t *src0, uint32_t src0_stride,
|
|
|
|
const uint8_t *src1, uint32_t src1_stride,
|
|
|
|
const uint8_t *mask, int h, int w) {
|
2016-07-11 14:43:47 +03:00
|
|
|
uint8_t mask2d[BlendA64Mask1DTest8B::kMaxMaskSize]
|
|
|
|
[BlendA64Mask1DTest8B::kMaxMaskSize];
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int row = 0; row < h; ++row)
|
|
|
|
for (int col = 0; col < w; ++col) mask2d[row][col] = mask[col];
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_blend_a64_mask_c(dst, dst_stride, src0, src0_stride, src1, src1_stride,
|
2016-08-12 03:46:05 +03:00
|
|
|
&mask2d[0][0], BlendA64Mask1DTest8B::kMaxMaskSize, h, w,
|
|
|
|
0, 0);
|
2016-07-11 14:43:47 +03:00
|
|
|
}
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
static void blend_a64_vmask_ref(uint8_t *dst, uint32_t dst_stride,
|
|
|
|
const uint8_t *src0, uint32_t src0_stride,
|
|
|
|
const uint8_t *src1, uint32_t src1_stride,
|
|
|
|
const uint8_t *mask, int h, int w) {
|
2016-07-11 14:43:47 +03:00
|
|
|
uint8_t mask2d[BlendA64Mask1DTest8B::kMaxMaskSize]
|
|
|
|
[BlendA64Mask1DTest8B::kMaxMaskSize];
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int row = 0; row < h; ++row)
|
|
|
|
for (int col = 0; col < w; ++col) mask2d[row][col] = mask[row];
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_blend_a64_mask_c(dst, dst_stride, src0, src0_stride, src1, src1_stride,
|
2016-08-12 03:46:05 +03:00
|
|
|
&mask2d[0][0], BlendA64Mask1DTest8B::kMaxMaskSize, h, w,
|
|
|
|
0, 0);
|
2016-07-11 14:43:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-08-12 03:46:05 +03:00
|
|
|
C, BlendA64Mask1DTest8B,
|
2016-08-31 00:01:10 +03:00
|
|
|
::testing::Values(TestFuncs(blend_a64_hmask_ref, aom_blend_a64_hmask_c),
|
|
|
|
TestFuncs(blend_a64_vmask_ref, aom_blend_a64_vmask_c)));
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-05-20 18:33:12 +03:00
|
|
|
#if HAVE_SSE4_1
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-08-12 03:46:05 +03:00
|
|
|
SSE4_1, BlendA64Mask1DTest8B,
|
|
|
|
::testing::Values(
|
2016-08-31 00:01:10 +03:00
|
|
|
TestFuncs(blend_a64_hmask_ref, aom_blend_a64_hmask_sse4_1),
|
|
|
|
TestFuncs(blend_a64_vmask_ref, aom_blend_a64_vmask_sse4_1)));
|
2016-05-20 18:33:12 +03:00
|
|
|
#endif // HAVE_SSE4_1
|
|
|
|
|
2017-04-12 17:03:28 +03:00
|
|
|
#if CONFIG_HIGHBITDEPTH
|
2016-05-20 18:33:12 +03:00
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
// High bit-depth version
|
|
|
|
//////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
typedef void (*FHBD)(uint8_t *dst, uint32_t dst_stride, const uint8_t *src0,
|
|
|
|
uint32_t src0_stride, const uint8_t *src1,
|
|
|
|
uint32_t src1_stride, const uint8_t *mask, int h, int w,
|
|
|
|
int bd);
|
2016-08-23 02:08:15 +03:00
|
|
|
typedef libaom_test::FuncParam<FHBD> TestFuncsHBD;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
class BlendA64Mask1DTestHBD : public BlendA64Mask1DTest<FHBD, uint16_t> {
|
2016-05-20 18:33:12 +03:00
|
|
|
protected:
|
2016-07-12 17:26:36 +03:00
|
|
|
void Execute(const uint16_t *p_src0, const uint16_t *p_src1) {
|
|
|
|
params_.ref_func(CONVERT_TO_BYTEPTR(dst_ref_ + dst_offset_), dst_stride_,
|
|
|
|
CONVERT_TO_BYTEPTR(p_src0 + src0_offset_), src0_stride_,
|
|
|
|
CONVERT_TO_BYTEPTR(p_src1 + src1_offset_), src1_stride_,
|
|
|
|
mask_, h_, w_, bit_depth_);
|
|
|
|
ASM_REGISTER_STATE_CHECK(params_.tst_func(
|
|
|
|
CONVERT_TO_BYTEPTR(dst_tst_ + dst_offset_), dst_stride_,
|
|
|
|
CONVERT_TO_BYTEPTR(p_src0 + src0_offset_), src0_stride_,
|
2016-08-12 03:46:05 +03:00
|
|
|
CONVERT_TO_BYTEPTR(p_src1 + src1_offset_), src1_stride_, mask_, h_, w_,
|
|
|
|
bit_depth_));
|
2016-05-20 18:33:12 +03:00
|
|
|
}
|
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
int bit_depth_;
|
2016-05-20 18:33:12 +03:00
|
|
|
};
|
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
TEST_P(BlendA64Mask1DTestHBD, RandomValues) {
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int iter = 0; iter < kIterations && !HasFatalFailure(); ++iter) {
|
2016-07-06 17:54:29 +03:00
|
|
|
switch (rng_(3)) {
|
2016-08-12 03:46:05 +03:00
|
|
|
case 0: bit_depth_ = 8; break;
|
|
|
|
case 1: bit_depth_ = 10; break;
|
|
|
|
default: bit_depth_ = 12; break;
|
2016-07-06 17:54:29 +03:00
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
const int hi = 1 << bit_depth_;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int i = 0; i < kBufSize; ++i) {
|
2016-07-06 17:54:29 +03:00
|
|
|
dst_ref_[i] = rng_(hi);
|
|
|
|
dst_tst_[i] = rng_(hi);
|
|
|
|
src0_[i] = rng_(hi);
|
|
|
|
src1_[i] = rng_(hi);
|
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int i = 0; i < kMaxMaskSize; ++i)
|
2016-08-31 00:01:10 +03:00
|
|
|
mask_[i] = rng_(AOM_BLEND_A64_MAX_ALPHA + 1);
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
Common();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
TEST_P(BlendA64Mask1DTestHBD, ExtremeValues) {
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int iter = 0; iter < 1000 && !HasFatalFailure(); ++iter) {
|
2016-07-06 17:54:29 +03:00
|
|
|
switch (rng_(3)) {
|
2016-08-12 03:46:05 +03:00
|
|
|
case 0: bit_depth_ = 8; break;
|
|
|
|
case 1: bit_depth_ = 10; break;
|
|
|
|
default: bit_depth_ = 12; break;
|
2016-07-06 17:54:29 +03:00
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-07-06 17:54:29 +03:00
|
|
|
const int hi = 1 << bit_depth_;
|
2016-05-20 18:33:12 +03:00
|
|
|
const int lo = hi - 2;
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int i = 0; i < kBufSize; ++i) {
|
2016-07-06 17:54:29 +03:00
|
|
|
dst_ref_[i] = rng_(hi - lo) + lo;
|
|
|
|
dst_tst_[i] = rng_(hi - lo) + lo;
|
|
|
|
src0_[i] = rng_(hi - lo) + lo;
|
|
|
|
src1_[i] = rng_(hi - lo) + lo;
|
|
|
|
}
|
2016-05-20 18:33:12 +03:00
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int i = 0; i < kMaxMaskSize; ++i)
|
2016-08-31 00:01:10 +03:00
|
|
|
mask_[i] = rng_(2) + AOM_BLEND_A64_MAX_ALPHA - 1;
|
2016-05-20 18:33:12 +03:00
|
|
|
|
|
|
|
Common();
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2016-07-11 14:43:47 +03:00
|
|
|
static void highbd_blend_a64_hmask_ref(
|
2016-08-12 03:46:05 +03:00
|
|
|
uint8_t *dst, uint32_t dst_stride, const uint8_t *src0,
|
|
|
|
uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride,
|
2016-07-11 14:43:47 +03:00
|
|
|
const uint8_t *mask, int h, int w, int bd) {
|
|
|
|
uint8_t mask2d[BlendA64Mask1DTestHBD::kMaxMaskSize]
|
|
|
|
[BlendA64Mask1DTestHBD::kMaxMaskSize];
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int row = 0; row < h; ++row)
|
|
|
|
for (int col = 0; col < w; ++col) mask2d[row][col] = mask[col];
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_highbd_blend_a64_mask_c(
|
2016-08-12 03:46:05 +03:00
|
|
|
dst, dst_stride, src0, src0_stride, src1, src1_stride, &mask2d[0][0],
|
|
|
|
BlendA64Mask1DTestHBD::kMaxMaskSize, h, w, 0, 0, bd);
|
2016-07-11 14:43:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
static void highbd_blend_a64_vmask_ref(
|
2016-08-12 03:46:05 +03:00
|
|
|
uint8_t *dst, uint32_t dst_stride, const uint8_t *src0,
|
|
|
|
uint32_t src0_stride, const uint8_t *src1, uint32_t src1_stride,
|
2016-07-11 14:43:47 +03:00
|
|
|
const uint8_t *mask, int h, int w, int bd) {
|
|
|
|
uint8_t mask2d[BlendA64Mask1DTestHBD::kMaxMaskSize]
|
|
|
|
[BlendA64Mask1DTestHBD::kMaxMaskSize];
|
|
|
|
|
2016-08-12 03:46:05 +03:00
|
|
|
for (int row = 0; row < h; ++row)
|
|
|
|
for (int col = 0; col < w; ++col) mask2d[row][col] = mask[row];
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_highbd_blend_a64_mask_c(
|
2016-08-12 03:46:05 +03:00
|
|
|
dst, dst_stride, src0, src0_stride, src1, src1_stride, &mask2d[0][0],
|
|
|
|
BlendA64Mask1DTestHBD::kMaxMaskSize, h, w, 0, 0, bd);
|
2016-07-11 14:43:47 +03:00
|
|
|
}
|
|
|
|
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-08-12 03:46:05 +03:00
|
|
|
C, BlendA64Mask1DTestHBD,
|
|
|
|
::testing::Values(TestFuncsHBD(highbd_blend_a64_hmask_ref,
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_highbd_blend_a64_hmask_c),
|
2016-08-12 03:46:05 +03:00
|
|
|
TestFuncsHBD(highbd_blend_a64_vmask_ref,
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_highbd_blend_a64_vmask_c)));
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2016-05-20 18:33:12 +03:00
|
|
|
#if HAVE_SSE4_1
|
|
|
|
INSTANTIATE_TEST_CASE_P(
|
2016-08-12 03:46:05 +03:00
|
|
|
SSE4_1, BlendA64Mask1DTestHBD,
|
|
|
|
::testing::Values(TestFuncsHBD(highbd_blend_a64_hmask_ref,
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_highbd_blend_a64_hmask_sse4_1),
|
2016-08-12 03:46:05 +03:00
|
|
|
TestFuncsHBD(highbd_blend_a64_vmask_ref,
|
2016-08-31 00:01:10 +03:00
|
|
|
aom_highbd_blend_a64_vmask_sse4_1)));
|
2016-05-20 18:33:12 +03:00
|
|
|
#endif // HAVE_SSE4_1
|
2016-07-11 14:43:47 +03:00
|
|
|
|
2017-04-12 17:03:28 +03:00
|
|
|
#endif // CONFIG_HIGHBITDEPTH
|
2016-05-20 18:33:12 +03:00
|
|
|
} // namespace
|