Commit 697bf5be authored by Geza Lore's avatar Geza Lore

Add 128 pixel variance and SAD functions

Change-Id: I8fde245b32c9e586683a28aa6925da0b83850b39
parent 339ef0ce
......@@ -22,6 +22,8 @@
#include "./vpx_dsp_rtcd.h"
#include "vpx/vpx_integer.h"
#define MAX_CU_SIZE 128
using libvpx_test::ACMRandom;
namespace {
......@@ -50,16 +52,16 @@ class MaskedSADTest : public ::testing::TestWithParam<MaskedSADParam> {
TEST_P(MaskedSADTest, OperationCheck) {
unsigned int ref_ret, ret;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint8_t, src_ptr[4096]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[4096]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[4096]);
DECLARE_ALIGNED(16, uint8_t, src_ptr[MAX_CU_SIZE*MAX_CU_SIZE]);
DECLARE_ALIGNED(16, uint8_t, ref_ptr[MAX_CU_SIZE*MAX_CU_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_CU_SIZE*MAX_CU_SIZE]);
int err_count = 0;
int first_failure = -1;
int src_stride = 64;
int ref_stride = 64;
int msk_stride = 64;
int src_stride = MAX_CU_SIZE;
int ref_stride = MAX_CU_SIZE;
int msk_stride = MAX_CU_SIZE;
for (int i = 0; i < number_of_iterations; ++i) {
for (int j = 0; j < 4096; j++) {
for (int j = 0; j < MAX_CU_SIZE*MAX_CU_SIZE; j++) {
src_ptr[j] = rnd.Rand8();
ref_ptr[j] = rnd.Rand8();
msk_ptr[j] = ((rnd.Rand8()&0x7f) > 64) ? rnd.Rand8()&0x3f : 64;
......@@ -108,18 +110,18 @@ class HighbdMaskedSADTest : public ::testing::
TEST_P(HighbdMaskedSADTest, OperationCheck) {
unsigned int ref_ret, ret;
ACMRandom rnd(ACMRandom::DeterministicSeed());
DECLARE_ALIGNED(16, uint16_t, src_ptr[4096]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[4096]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[4096]);
DECLARE_ALIGNED(16, uint16_t, src_ptr[MAX_CU_SIZE*MAX_CU_SIZE]);
DECLARE_ALIGNED(16, uint16_t, ref_ptr[MAX_CU_SIZE*MAX_CU_SIZE]);
DECLARE_ALIGNED(16, uint8_t, msk_ptr[MAX_CU_SIZE*MAX_CU_SIZE]);
uint8_t* src8_ptr = CONVERT_TO_BYTEPTR(src_ptr);
uint8_t* ref8_ptr = CONVERT_TO_BYTEPTR(ref_ptr);
int err_count = 0;
int first_failure = -1;
int src_stride = 64;
int ref_stride = 64;
int msk_stride = 64;
int src_stride = MAX_CU_SIZE;
int ref_stride = MAX_CU_SIZE;
int msk_stride = MAX_CU_SIZE;
for (int i = 0; i < number_of_iterations; ++i) {
for (int j = 0; j < 4096; j++) {
for (int j = 0; j < MAX_CU_SIZE*MAX_CU_SIZE; j++) {
src_ptr[j] = rnd.Rand16()&0xfff;
ref_ptr[j] = rnd.Rand16()&0xfff;
msk_ptr[j] = ((rnd.Rand8()&0x7f) > 64) ? rnd.Rand8()&0x3f : 64;
......@@ -148,6 +150,14 @@ using std::tr1::make_tuple;
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, MaskedSADTest,
::testing::Values(
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_sad128x128_ssse3,
&vpx_masked_sad128x128_c),
make_tuple(&vpx_masked_sad128x64_ssse3,
&vpx_masked_sad128x64_c),
make_tuple(&vpx_masked_sad64x128_ssse3,
&vpx_masked_sad64x128_c),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_masked_sad64x64_ssse3,
&vpx_masked_sad64x64_c),
make_tuple(&vpx_masked_sad64x32_ssse3,
......@@ -178,32 +188,40 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, HighbdMaskedSADTest,
::testing::Values(
make_tuple(&vp9_highbd_masked_sad64x64_ssse3,
&vp9_highbd_masked_sad64x64_c),
make_tuple(&vp9_highbd_masked_sad64x32_ssse3,
&vp9_highbd_masked_sad64x32_c),
make_tuple(&vp9_highbd_masked_sad32x64_ssse3,
&vp9_highbd_masked_sad32x64_c),
make_tuple(&vp9_highbd_masked_sad32x32_ssse3,
&vp9_highbd_masked_sad32x32_c),
make_tuple(&vp9_highbd_masked_sad32x16_ssse3,
&vp9_highbd_masked_sad32x16_c),
make_tuple(&vp9_highbd_masked_sad16x32_ssse3,
&vp9_highbd_masked_sad16x32_c),
make_tuple(&vp9_highbd_masked_sad16x16_ssse3,
&vp9_highbd_masked_sad16x16_c),
make_tuple(&vp9_highbd_masked_sad16x8_ssse3,
&vp9_highbd_masked_sad16x8_c),
make_tuple(&vp9_highbd_masked_sad8x16_ssse3,
&vp9_highbd_masked_sad8x16_c),
make_tuple(&vp9_highbd_masked_sad8x8_ssse3,
&vp9_highbd_masked_sad8x8_c),
make_tuple(&vp9_highbd_masked_sad8x4_ssse3,
&vp9_highbd_masked_sad8x4_c),
make_tuple(&vp9_highbd_masked_sad4x8_ssse3,
&vp9_highbd_masked_sad4x8_c),
make_tuple(&vp9_highbd_masked_sad4x4_ssse3,
&vp9_highbd_masked_sad4x4_c)));
#if CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_sad128x128_ssse3,
&vpx_highbd_masked_sad128x128_c),
make_tuple(&vpx_highbd_masked_sad128x64_ssse3,
&vpx_highbd_masked_sad128x64_c),
make_tuple(&vpx_highbd_masked_sad64x128_ssse3,
&vpx_highbd_masked_sad64x128_c),
#endif // CONFIG_EXT_PARTITION
make_tuple(&vpx_highbd_masked_sad64x64_ssse3,
&vpx_highbd_masked_sad64x64_c),
make_tuple(&vpx_highbd_masked_sad64x32_ssse3,
&vpx_highbd_masked_sad64x32_c),
make_tuple(&vpx_highbd_masked_sad32x64_ssse3,
&vpx_highbd_masked_sad32x64_c),
make_tuple(&vpx_highbd_masked_sad32x32_ssse3,
&vpx_highbd_masked_sad32x32_c),
make_tuple(&vpx_highbd_masked_sad32x16_ssse3,
&vpx_highbd_masked_sad32x16_c),
make_tuple(&vpx_highbd_masked_sad16x32_ssse3,
&vpx_highbd_masked_sad16x32_c),
make_tuple(&vpx_highbd_masked_sad16x16_ssse3,
&vpx_highbd_masked_sad16x16_c),
make_tuple(&vpx_highbd_masked_sad16x8_ssse3,
&vpx_highbd_masked_sad16x8_c),
make_tuple(&vpx_highbd_masked_sad8x16_ssse3,
&vpx_highbd_masked_sad8x16_c),
make_tuple(&vpx_highbd_masked_sad8x8_ssse3,
&vpx_highbd_masked_sad8x8_c),
make_tuple(&vpx_highbd_masked_sad8x4_ssse3,
&vpx_highbd_masked_sad8x4_c),
make_tuple(&vpx_highbd_masked_sad4x8_ssse3,
&vpx_highbd_masked_sad4x8_c),
make_tuple(&vpx_highbd_masked_sad4x4_ssse3,
&vpx_highbd_masked_sad4x4_c)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSSE3
} // namespace
This diff is collapsed.
......@@ -59,13 +59,13 @@ class SADTestBase : public ::testing::Test {
reference_data8_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
second_pred8_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, 64*64));
vpx_memalign(kDataAlignment, 128*128));
source_data16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, kDataBlockSize*sizeof(uint16_t)));
reference_data16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize*sizeof(uint16_t)));
second_pred16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, 64*64*sizeof(uint16_t)));
vpx_memalign(kDataAlignment, 128*128*sizeof(uint16_t)));
}
static void TearDownTestCase() {
......@@ -88,9 +88,9 @@ class SADTestBase : public ::testing::Test {
}
protected:
// Handle blocks up to 4 blocks 64x64 with stride up to 128
// Handle up to 4 128x128 blocks, with stride up to 256
static const int kDataAlignment = 16;
static const int kDataBlockSize = 64 * 128;
static const int kDataBlockSize = 128 * 256;
static const int kDataBufferSize = 4 * kDataBlockSize;
virtual void SetUp() {
......@@ -485,6 +485,11 @@ using std::tr1::make_tuple;
//------------------------------------------------------------------------------
// C functions
const SadMxNParam c_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128_c, -1),
make_tuple(128, 64, &vpx_sad128x64_c, -1),
make_tuple(64, 128, &vpx_sad64x128_c, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64_c, -1),
make_tuple(64, 32, &vpx_sad64x32_c, -1),
make_tuple(32, 64, &vpx_sad32x64_c, -1),
......@@ -499,6 +504,11 @@ const SadMxNParam c_tests[] = {
make_tuple(4, 8, &vpx_sad4x8_c, -1),
make_tuple(4, 4, &vpx_sad4x4_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_c, 8),
make_tuple(128, 64, &vpx_highbd_sad128x64_c, 8),
make_tuple(64, 128, &vpx_highbd_sad64x128_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_c, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_c, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_c, 8),
......@@ -512,6 +522,11 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_c, 8),
make_tuple(4, 8, &vpx_highbd_sad4x8_c, 8),
make_tuple(4, 4, &vpx_highbd_sad4x4_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_c, 10),
make_tuple(128, 64, &vpx_highbd_sad128x64_c, 10),
make_tuple(64, 128, &vpx_highbd_sad64x128_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_c, 10),
make_tuple(64, 32, &vpx_highbd_sad64x32_c, 10),
make_tuple(32, 64, &vpx_highbd_sad32x64_c, 10),
......@@ -525,6 +540,11 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_c, 10),
make_tuple(4, 8, &vpx_highbd_sad4x8_c, 10),
make_tuple(4, 4, &vpx_highbd_sad4x4_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_c, 12),
make_tuple(128, 64, &vpx_highbd_sad128x64_c, 12),
make_tuple(64, 128, &vpx_highbd_sad64x128_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_c, 12),
make_tuple(64, 32, &vpx_highbd_sad64x32_c, 12),
make_tuple(32, 64, &vpx_highbd_sad32x64_c, 12),
......@@ -543,6 +563,11 @@ const SadMxNParam c_tests[] = {
INSTANTIATE_TEST_CASE_P(C, SADTest, ::testing::ValuesIn(c_tests));
const SadMxNAvgParam avg_c_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128_avg_c, -1),
make_tuple(128, 64, &vpx_sad128x64_avg_c, -1),
make_tuple(64, 128, &vpx_sad64x128_avg_c, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64_avg_c, -1),
make_tuple(64, 32, &vpx_sad64x32_avg_c, -1),
make_tuple(32, 64, &vpx_sad32x64_avg_c, -1),
......@@ -557,6 +582,11 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(4, 8, &vpx_sad4x8_avg_c, -1),
make_tuple(4, 4, &vpx_sad4x4_avg_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_avg_c, 8),
make_tuple(128, 64, &vpx_highbd_sad128x64_avg_c, 8),
make_tuple(64, 128, &vpx_highbd_sad64x128_avg_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 8),
......@@ -570,6 +600,11 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 8),
make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 8),
make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_avg_c, 10),
make_tuple(128, 64, &vpx_highbd_sad128x64_avg_c, 10),
make_tuple(64, 128, &vpx_highbd_sad64x128_avg_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 10),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 10),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 10),
......@@ -583,6 +618,11 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 10),
make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 10),
make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128_avg_c, 12),
make_tuple(128, 64, &vpx_highbd_sad128x64_avg_c, 12),
make_tuple(64, 128, &vpx_highbd_sad64x128_avg_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_c, 12),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_c, 12),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_c, 12),
......@@ -601,6 +641,11 @@ const SadMxNAvgParam avg_c_tests[] = {
INSTANTIATE_TEST_CASE_P(C, SADavgTest, ::testing::ValuesIn(avg_c_tests));
const SadMxNx4Param x4d_c_tests[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_sad128x128x4d_c, -1),
make_tuple(128, 64, &vpx_sad128x64x4d_c, -1),
make_tuple(64, 128, &vpx_sad64x128x4d_c, -1),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_sad64x64x4d_c, -1),
make_tuple(64, 32, &vpx_sad64x32x4d_c, -1),
make_tuple(32, 64, &vpx_sad32x64x4d_c, -1),
......@@ -615,6 +660,11 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(4, 8, &vpx_sad4x8x4d_c, -1),
make_tuple(4, 4, &vpx_sad4x4x4d_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128x4d_c, 8),
make_tuple(128, 64, &vpx_highbd_sad128x64x4d_c, 8),
make_tuple(64, 128, &vpx_highbd_sad64x128x4d_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 8),
......@@ -628,6 +678,11 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 8),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 8),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128x4d_c, 10),
make_tuple(128, 64, &vpx_highbd_sad128x64x4d_c, 10),
make_tuple(64, 128, &vpx_highbd_sad64x128x4d_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 10),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 10),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 10),
......@@ -641,6 +696,11 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 10),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 10),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(128, 128, &vpx_highbd_sad128x128x4d_c, 12),
make_tuple(128, 64, &vpx_highbd_sad128x64x4d_c, 12),
make_tuple(64, 128, &vpx_highbd_sad64x128x4d_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_c, 12),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_c, 12),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_c, 12),
......
......@@ -759,7 +759,13 @@ INSTANTIATE_TEST_CASE_P(C, VpxMseTest,
INSTANTIATE_TEST_CASE_P(
C, VpxVarianceTest,
::testing::Values(make_tuple(6, 6, &vpx_variance64x64_c, 0),
::testing::Values(
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_variance128x128_c, 0),
make_tuple(7, 6, &vpx_variance128x64_c, 0),
make_tuple(6, 7, &vpx_variance64x128_c, 0),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_variance64x64_c, 0),
make_tuple(6, 5, &vpx_variance64x32_c, 0),
make_tuple(5, 6, &vpx_variance32x64_c, 0),
make_tuple(5, 5, &vpx_variance32x32_c, 0),
......@@ -775,7 +781,13 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
C, VpxSubpelVarianceTest,
::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_variance64x64_c, 0),
::testing::Values(
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_sub_pixel_variance128x128_c, 0),
make_tuple(7, 6, &vpx_sub_pixel_variance128x64_c, 0),
make_tuple(6, 7, &vpx_sub_pixel_variance64x128_c, 0),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_sub_pixel_variance64x64_c, 0),
make_tuple(6, 5, &vpx_sub_pixel_variance64x32_c, 0),
make_tuple(5, 6, &vpx_sub_pixel_variance32x64_c, 0),
make_tuple(5, 5, &vpx_sub_pixel_variance32x32_c, 0),
......@@ -791,7 +803,13 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
C, VpxSubpelAvgVarianceTest,
::testing::Values(make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_c, 0),
::testing::Values(
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_sub_pixel_avg_variance128x128_c, 0),
make_tuple(7, 6, &vpx_sub_pixel_avg_variance128x64_c, 0),
make_tuple(6, 7, &vpx_sub_pixel_avg_variance64x128_c, 0),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_sub_pixel_avg_variance64x64_c, 0),
make_tuple(6, 5, &vpx_sub_pixel_avg_variance64x32_c, 0),
make_tuple(5, 6, &vpx_sub_pixel_avg_variance32x64_c, 0),
make_tuple(5, 5, &vpx_sub_pixel_avg_variance32x32_c, 0),
......@@ -841,7 +859,13 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
C, VpxHBDVarianceTest,
::testing::Values(make_tuple(6, 6, &vpx_highbd_12_variance64x64_c, 12),
::testing::Values(
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_12_variance128x128_c, 12),
make_tuple(7, 6, &vpx_highbd_12_variance128x64_c, 12),
make_tuple(6, 7, &vpx_highbd_12_variance64x128_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_12_variance64x64_c, 12),
make_tuple(6, 5, &vpx_highbd_12_variance64x32_c, 12),
make_tuple(5, 6, &vpx_highbd_12_variance32x64_c, 12),
make_tuple(5, 5, &vpx_highbd_12_variance32x32_c, 12),
......@@ -854,6 +878,11 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 2, &vpx_highbd_12_variance8x4_c, 12),
make_tuple(2, 3, &vpx_highbd_12_variance4x8_c, 12),
make_tuple(2, 2, &vpx_highbd_12_variance4x4_c, 12),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_10_variance128x128_c, 10),
make_tuple(7, 6, &vpx_highbd_10_variance128x64_c, 10),
make_tuple(6, 7, &vpx_highbd_10_variance64x128_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_10_variance64x64_c, 10),
make_tuple(6, 5, &vpx_highbd_10_variance64x32_c, 10),
make_tuple(5, 6, &vpx_highbd_10_variance32x64_c, 10),
......@@ -867,6 +896,11 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 2, &vpx_highbd_10_variance8x4_c, 10),
make_tuple(2, 3, &vpx_highbd_10_variance4x8_c, 10),
make_tuple(2, 2, &vpx_highbd_10_variance4x4_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_8_variance128x128_c, 8),
make_tuple(7, 6, &vpx_highbd_8_variance128x64_c, 8),
make_tuple(6, 7, &vpx_highbd_8_variance64x128_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_8_variance64x64_c, 8),
make_tuple(6, 5, &vpx_highbd_8_variance64x32_c, 8),
make_tuple(5, 6, &vpx_highbd_8_variance32x64_c, 8),
......@@ -884,6 +918,11 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
C, VpxHBDSubpelVarianceTest,
::testing::Values(
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_8_sub_pixel_variance128x128_c, 8),
make_tuple(7, 6, &vpx_highbd_8_sub_pixel_variance128x64_c, 8),
make_tuple(6, 7, &vpx_highbd_8_sub_pixel_variance64x128_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_8_sub_pixel_variance64x64_c, 8),
make_tuple(6, 5, &vpx_highbd_8_sub_pixel_variance64x32_c, 8),
make_tuple(5, 6, &vpx_highbd_8_sub_pixel_variance32x64_c, 8),
......@@ -897,6 +936,11 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 2, &vpx_highbd_8_sub_pixel_variance8x4_c, 8),
make_tuple(2, 3, &vpx_highbd_8_sub_pixel_variance4x8_c, 8),
make_tuple(2, 2, &vpx_highbd_8_sub_pixel_variance4x4_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_10_sub_pixel_variance128x128_c, 10),
make_tuple(7, 6, &vpx_highbd_10_sub_pixel_variance128x64_c, 10),
make_tuple(6, 7, &vpx_highbd_10_sub_pixel_variance64x128_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_10_sub_pixel_variance64x64_c, 10),
make_tuple(6, 5, &vpx_highbd_10_sub_pixel_variance64x32_c, 10),
make_tuple(5, 6, &vpx_highbd_10_sub_pixel_variance32x64_c, 10),
......@@ -910,6 +954,11 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 2, &vpx_highbd_10_sub_pixel_variance8x4_c, 10),
make_tuple(2, 3, &vpx_highbd_10_sub_pixel_variance4x8_c, 10),
make_tuple(2, 2, &vpx_highbd_10_sub_pixel_variance4x4_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_12_sub_pixel_variance128x128_c, 12),
make_tuple(7, 6, &vpx_highbd_12_sub_pixel_variance128x64_c, 12),
make_tuple(6, 7, &vpx_highbd_12_sub_pixel_variance64x128_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_12_sub_pixel_variance64x64_c, 12),
make_tuple(6, 5, &vpx_highbd_12_sub_pixel_variance64x32_c, 12),
make_tuple(5, 6, &vpx_highbd_12_sub_pixel_variance32x64_c, 12),
......@@ -927,6 +976,11 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(
C, VpxHBDSubpelAvgVarianceTest,
::testing::Values(
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_8_sub_pixel_avg_variance128x128_c, 8),
make_tuple(7, 6, &vpx_highbd_8_sub_pixel_avg_variance128x64_c, 8),
make_tuple(6, 7, &vpx_highbd_8_sub_pixel_avg_variance64x128_c, 8),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_8_sub_pixel_avg_variance64x64_c, 8),
make_tuple(6, 5, &vpx_highbd_8_sub_pixel_avg_variance64x32_c, 8),
make_tuple(5, 6, &vpx_highbd_8_sub_pixel_avg_variance32x64_c, 8),
......@@ -940,6 +994,11 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 2, &vpx_highbd_8_sub_pixel_avg_variance8x4_c, 8),
make_tuple(2, 3, &vpx_highbd_8_sub_pixel_avg_variance4x8_c, 8),
make_tuple(2, 2, &vpx_highbd_8_sub_pixel_avg_variance4x4_c, 8),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_10_sub_pixel_avg_variance128x128_c, 10),
make_tuple(7, 6, &vpx_highbd_10_sub_pixel_avg_variance128x64_c, 10),
make_tuple(6, 7, &vpx_highbd_10_sub_pixel_avg_variance64x128_c, 10),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_10_sub_pixel_avg_variance64x64_c, 10),
make_tuple(6, 5, &vpx_highbd_10_sub_pixel_avg_variance64x32_c, 10),
make_tuple(5, 6, &vpx_highbd_10_sub_pixel_avg_variance32x64_c, 10),
......@@ -953,6 +1012,11 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 2, &vpx_highbd_10_sub_pixel_avg_variance8x4_c, 10),
make_tuple(2, 3, &vpx_highbd_10_sub_pixel_avg_variance4x8_c, 10),
make_tuple(2, 2, &vpx_highbd_10_sub_pixel_avg_variance4x4_c, 10),
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(7, 7, &vpx_highbd_12_sub_pixel_avg_variance128x128_c, 12),
make_tuple(7, 6, &vpx_highbd_12_sub_pixel_avg_variance128x64_c, 12),
make_tuple(6, 7, &vpx_highbd_12_sub_pixel_avg_variance64x128_c, 12),
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
make_tuple(6, 6, &vpx_highbd_12_sub_pixel_avg_variance64x64_c, 12),
make_tuple(6, 5, &vpx_highbd_12_sub_pixel_avg_variance64x32_c, 12),
make_tuple(5, 6, &vpx_highbd_12_sub_pixel_avg_variance32x64_c, 12),
......
......@@ -108,6 +108,22 @@ void vpx_sad##m##x##n##x4d_c(const uint8_t *src, int src_stride, \
sad_array[i] = vpx_sad##m##x##n##_c(src, src_stride, ref_array[i], ref_stride); \
}
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
// 128x128
sadMxN(128, 128)
sadMxNxK(128, 128, 3)
sadMxNxK(128, 128, 8)
sadMxNx4D(128, 128)
// 128x64
sadMxN(128, 64)
sadMxNx4D(128, 64)
// 64x128
sadMxN(64, 128)
sadMxNx4D(64, 128)
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
// 64x64
sadMxN(64, 64)
sadMxNxK(64, 64, 3)
......@@ -247,6 +263,22 @@ void vpx_highbd_sad##m##x##n##x4d_c(const uint8_t *src, int src_stride, \
} \
}
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
// 128x128
highbd_sadMxN(128, 128)
highbd_sadMxNxK(128, 128, 3)
highbd_sadMxNxK(128, 128, 8)
highbd_sadMxNx4D(128, 128)
// 128x64
highbd_sadMxN(128, 64)
highbd_sadMxNx4D(128, 64)
// 64x128
highbd_sadMxN(64, 128)
highbd_sadMxNx4D(64, 128)
#endif // CONFIG_VP10 && CONFIG_EXT_PARTITION
// 64x64
highbd_sadMxN(64, 64)
highbd_sadMxNxK(64, 64, 3)
......
This diff is collapsed.
This source diff could not be displayed because it is too large. You can view the blob instead.
......@@ -29,7 +29,18 @@ typedef int16_t InterpKernel[SUBPEL_TAPS];
#define BIL_SUBPEL_BITS 3
#define BIL_SUBPEL_SHIFTS (1 << BIL_SUBPEL_BITS)
extern const uint8_t vpx_bilinear_filters[BIL_SUBPEL_SHIFTS][2];
// 2 tap bilinear filters
static const uint8_t bilinear_filters_2t[BIL_SUBPEL_SHIFTS][2] = {
{ 128, 0 },
{ 112, 16 },
{ 96, 32 },
{ 80, 48 },
{ 64, 64 },
{ 48, 80 },
{ 32, 96 },
{ 16, 112 },
};
#ifdef __cplusplus
} // extern "C"
......
......@@ -64,6 +64,11 @@ unsigned int vpx_masked_sad##m##x##n##_ssse3(const uint8_t *src, \
m, n); \
}
#if CONFIG_EXT_PARTITION
MASKSADMXN_SSSE3(128, 128)
MASKSADMXN_SSSE3(128, 64)
MASKSADMXN_SSSE3(64, 128)
#endif // CONFIG_EXT_PARTITION
MASKSADMXN_SSSE3(64, 64)
MASKSADMXN_SSSE3(64, 32)
MASKSADMXN_SSSE3(32, 64)
......@@ -100,7 +105,7 @@ MASKSAD4XN_SSSE3(8)
MASKSAD4XN_SSSE3(4)
// For width a multiple of 16
// Assumes values in m are <=64 and w = 16, 32, or 64
// Assumes values in m are <=64
static INLINE unsigned int masked_sad_ssse3(const uint8_t *a_ptr, int a_stride,
const uint8_t *b_ptr, int b_stride,
const uint8_t *m_ptr, int m_stride,
......@@ -255,6 +260,11 @@ unsigned int vpx_highbd_masked_sad##m##x##n##_ssse3(const uint8_t *src, \
msk_stride, m, n); \
}
#if CONFIG_EXT_PARTITION
HIGHBD_MASKSADMXN_SSSE3(128, 128)
HIGHBD_MASKSADMXN_SSSE3(128, 64)
HIGHBD_MASKSADMXN_SSSE3(64, 128)
#endif // CONFIG_EXT_PARTITION
HIGHBD_MASKSADMXN_SSSE3(64, 64)
HIGHBD_MASKSADMXN_SSSE3(64, 32)
HIGHBD_MASKSADMXN_SSSE3(32, 64)
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment