Commit 2d3e879f authored by John Koleszar's avatar John Koleszar Committed by Gerrit Code Review
Browse files

Merge changes If5896507,I06b5ba5c,I2712f99e into experimental

* changes:
  Add unit test for x4 multi-SAD functions
  Add VP9 1 block SAD functions to unit test
  Merge master branch into experimental
parents e189edfe 1cfc86eb
......@@ -74,7 +74,7 @@ HOSTCC?=gcc
TGT_ISA:=$(word 1, $(subst -, ,$(TOOLCHAIN)))
TGT_OS:=$(word 2, $(subst -, ,$(TOOLCHAIN)))
TGT_CC:=$(word 3, $(subst -, ,$(TOOLCHAIN)))
quiet:=$(if $(verbose),,yes)
quiet:=$(if $(or $(verbose), $(V)),, yes)
qexec=$(if $(quiet),@)
# Cancel built-in implicit rules
......@@ -380,6 +380,7 @@ ifneq ($(call enabled,DIST-SRCS),)
# Include obj_int_extract if we use offsets from asm_*_offsets
DIST-SRCS-$(ARCH_ARM)$(ARCH_X86)$(ARCH_X86_64) += build/make/obj_int_extract.c
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas.pl
DIST-SRCS-$(ARCH_ARM) += build/make/ads2gas_apple.pl
DIST-SRCS-yes += $(target:-$(TOOLCHAIN)=).mk
endif
INSTALL-SRCS := $(call cond_enabled,CONFIG_INSTALL_SRCS,INSTALL-SRCS)
......
......@@ -10,12 +10,12 @@
##
# ads2gas.pl
# ads2gas_apple.pl
# Author: Eric Fung (efung (at) acm.org)
#
# Convert ARM Developer Suite 1.0.1 syntax assembly source to GNU as format
#
# Usage: cat inputfile | perl ads2gas.pl > outputfile
# Usage: cat inputfile | perl ads2gas_apple.pl > outputfile
#
print "@ This file was created from a .asm file\n";
print "@ using the ads2gas_apple.pl script.\n\n";
......
......@@ -598,8 +598,13 @@ process_common_toolchain() {
armv6*)
tgt_isa=armv6
;;
armv7*-hardfloat*)
tgt_isa=armv7
float_abi=hard
;;
armv7*)
tgt_isa=armv7
float_abi=softfp
;;
armv5te*)
tgt_isa=armv5te
......@@ -643,6 +648,9 @@ process_common_toolchain() {
tgt_isa=x86_64
tgt_os=darwin12
;;
x86_64*mingw32*)
tgt_os=win64
;;
*mingw32*|*cygwin*)
[ -z "$tgt_isa" ] && tgt_isa=x86
tgt_os=win32
......@@ -785,8 +793,9 @@ process_common_toolchain() {
check_add_asflags --defsym ARCHITECTURE=${arch_int}
tune_cflags="-mtune="
if [ ${tgt_isa} == "armv7" ]; then
check_add_cflags -march=armv7-a -mfloat-abi=softfp
check_add_asflags -march=armv7-a -mfloat-abi=softfp
[ -z "${float_abi}" ] && float_abi=softfp
check_add_cflags -march=armv7-a -mfloat-abi=${float_abi}
check_add_asflags -march=armv7-a -mfloat-abi=${float_abi}
if enabled neon
then
......@@ -1038,7 +1047,7 @@ EOF
add_ldflags -m${bits}
link_with_cc=gcc
tune_cflags="-march="
setup_gnu_toolchain
setup_gnu_toolchain
#for 32 bit x86 builds, -O3 did not turn on this flag
enabled optimizations && check_add_cflags -fomit-frame-pointer
;;
......@@ -1056,6 +1065,8 @@ EOF
soft_enable sse2
soft_enable sse3
soft_enable ssse3
# We can't use 'check_cflags' until the compiler is configured and CC is
# populated.
if enabled gcc && ! disabled sse4_1 && ! check_cflags -msse4; then
RTCD_OPTIONS="${RTCD_OPTIONS}--disable-sse4_1 "
else
......@@ -1082,7 +1093,7 @@ EOF
add_asflags -f x64
enabled debug && add_asflags -g cv8
;;
linux*|solaris*)
linux*|solaris*|android*)
add_asflags -f elf${bits}
enabled debug && [ "${AS}" = yasm ] && add_asflags -g dwarf2
enabled debug && [ "${AS}" = nasm ] && add_asflags -g
......
......@@ -59,13 +59,13 @@ for f in $defs_file; do [ -f "$f" ] || usage; done
# Routines for the RTCD DSL to call
#
prototype() {
local rtyp
rtyp=""
case "$1" in
unsigned) rtyp="$1 "; shift;;
esac
rtyp="${rtyp}$1"
local fn="$2"
local args="$3"
fn="$2"
args="$3"
eval "${2}_rtyp='$rtyp'"
eval "${2}_args='$3'"
......@@ -74,7 +74,7 @@ prototype() {
}
specialize() {
local fn="$1"
fn="$1"
shift
for opt in "$@"; do
eval "${fn}_${opt}=${fn}_${opt}"
......@@ -84,13 +84,13 @@ specialize() {
require() {
for fn in $ALL_FUNCS; do
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
# if we already have a default, then we can disable it, as we know
# we can do better.
local best=$(eval "echo \$${fn}_default")
local best_ofn=$(eval "echo \$${best}")
best=$(eval "echo \$${fn}_default")
best_ofn=$(eval "echo \$${best}")
[ -n "$best" ] && [ "$best_ofn" != "$ofn" ] && eval "${best}_link=false"
eval "${fn}_default=${fn}_${opt}"
eval "${fn}_${opt}_link=true"
......@@ -121,15 +121,15 @@ process_forward_decls() {
determine_indirection() {
[ "$CONFIG_RUNTIME_CPU_DETECT" = "yes" ] || require $ALL_ARCHS
for fn in $ALL_FUNCS; do
local n=""
local rtyp="$(eval "echo \$${fn}_rtyp")"
local args="$(eval "echo \"\$${fn}_args\"")"
local dfn="$(eval "echo \$${fn}_default")"
n=""
rtyp="$(eval "echo \$${fn}_rtyp")"
args="$(eval "echo \"\$${fn}_args\"")"
dfn="$(eval "echo \$${fn}_default")"
dfn=$(eval "echo \$${dfn}")
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
local link=$(eval "echo \$${fn}_${opt}_link")
link=$(eval "echo \$${fn}_${opt}_link")
[ "$link" = "false" ] && continue
n="${n}x"
done
......@@ -143,12 +143,12 @@ determine_indirection() {
declare_function_pointers() {
for fn in $ALL_FUNCS; do
local rtyp="$(eval "echo \$${fn}_rtyp")"
local args="$(eval "echo \"\$${fn}_args\"")"
local dfn="$(eval "echo \$${fn}_default")"
rtyp="$(eval "echo \$${fn}_rtyp")"
args="$(eval "echo \"\$${fn}_args\"")"
dfn="$(eval "echo \$${fn}_default")"
dfn=$(eval "echo \$${dfn}")
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
echo "$rtyp ${ofn}($args);"
done
......@@ -163,20 +163,20 @@ declare_function_pointers() {
set_function_pointers() {
for fn in $ALL_FUNCS; do
local n=""
local rtyp="$(eval "echo \$${fn}_rtyp")"
local args="$(eval "echo \"\$${fn}_args\"")"
local dfn="$(eval "echo \$${fn}_default")"
n=""
rtyp="$(eval "echo \$${fn}_rtyp")"
args="$(eval "echo \"\$${fn}_args\"")"
dfn="$(eval "echo \$${fn}_default")"
dfn=$(eval "echo \$${dfn}")
if $(eval "echo \$${fn}_indirect"); then
echo " $fn = $dfn;"
for opt in "$@"; do
local ofn=$(eval "echo \$${fn}_${opt}")
ofn=$(eval "echo \$${fn}_${opt}")
[ -z "$ofn" ] && continue
[ "$ofn" = "$dfn" ] && continue;
local link=$(eval "echo \$${fn}_${opt}_link")
link=$(eval "echo \$${fn}_${opt}_link")
[ "$link" = "false" ] && continue
local cond="$(eval "echo \$have_${opt}")"
cond="$(eval "echo \$have_${opt}")"
echo " if (${cond}) $fn = $ofn;"
done
fi
......@@ -185,7 +185,7 @@ set_function_pointers() {
}
filter() {
local filtered
filtered=""
for opt in "$@"; do
[ -z $(eval "echo \$disable_${opt}") ] && filtered="$filtered $opt"
done
......@@ -196,8 +196,9 @@ filter() {
# Helper functions for generating the arch specific RTCD files
#
common_top() {
local outfile_basename=$(basename ${symbol:-rtcd.h})
local include_guard=$(echo $outfile_basename | tr '[a-z]' '[A-Z]' | tr -c '[A-Z]' _)
outfile_basename=$(basename ${symbol:-rtcd})
include_guard=$(echo $outfile_basename | tr '[a-z]' '[A-Z]' | \
tr -c '[A-Z0-9]' _)H_
cat <<EOF
#ifndef ${include_guard}
#define ${include_guard}
......@@ -227,7 +228,7 @@ x86() {
# Assign the helper variable for each enabled extension
for opt in $ALL_ARCHS; do
local uc=$(echo $opt | tr '[a-z]' '[A-Z]')
uc=$(echo $opt | tr '[a-z]' '[A-Z]')
eval "have_${opt}=\"flags & HAS_${uc}\""
done
......@@ -254,7 +255,7 @@ arm() {
# Assign the helper variable for each enabled extension
for opt in $ALL_ARCHS; do
local uc=$(echo $opt | tr '[a-z]' '[A-Z]')
uc=$(echo $opt | tr '[a-z]' '[A-Z]')
eval "have_${opt}=\"flags & HAS_${uc}\""
done
......
......@@ -106,6 +106,7 @@ all_platforms="${all_platforms} ppc64-darwin8-gcc"
all_platforms="${all_platforms} ppc64-darwin9-gcc"
all_platforms="${all_platforms} ppc64-linux-gcc"
all_platforms="${all_platforms} sparc-solaris-gcc"
all_platforms="${all_platforms} x86-android-gcc"
all_platforms="${all_platforms} x86-darwin8-gcc"
all_platforms="${all_platforms} x86-darwin8-icc"
all_platforms="${all_platforms} x86-darwin9-gcc"
......@@ -650,7 +651,7 @@ process_toolchain() {
enabled postproc || die "postproc_visualizer requires postproc to be enabled"
fi
# Enable unit tests if we have a working C++ compiler
# Enable unit tests by default if we have a working C++ compiler.
case "$toolchain" in
*-vs*)
soft_enable unit_tests
......@@ -663,7 +664,7 @@ process_toolchain() {
# x86 targets.
;;
*)
check_cxx "$@" <<EOF && soft_enable unit_tests
enabled pthread_h && check_cxx "$@" <<EOF && soft_enable unit_tests
int z;
EOF
;;
......
......@@ -17,7 +17,6 @@ else
ASM:=.asm
endif
#
# Calculate platform- and compiler-specific offsets for hand coded assembly
#
......@@ -167,7 +166,9 @@ CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/emmintrin_compat.h
CODEC_SRCS-$(BUILD_LIBVPX) += vpx_ports/vpx_once.h
CODEC_SRCS-$(BUILD_LIBVPX) += $(BUILD_PFX)vpx_config.c
INSTALL-SRCS-no += $(BUILD_PFX)vpx_config.c
ifeq ($(ARCH_X86)$(ARCH_X86_64),yes)
CODEC_SRCS-$(BUILD_LIBVPX) += third_party/x86inc/x86inc.asm
endif
CODEC_EXPORTS-$(BUILD_LIBVPX) += vpx/exports_com
CODEC_EXPORTS-$(CONFIG_ENCODERS) += vpx/exports_enc
CODEC_EXPORTS-$(CONFIG_DECODERS) += vpx/exports_dec
......@@ -221,7 +222,6 @@ obj_int_extract.vcproj: $(SRC_PATH_BARE)/build/make/obj_int_extract.c
-I"$(SRC_PATH_BARE)" \
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.vcproj
PROJECTS-$(BUILD_LIBVPX) += obj_int_extract.bat
vpx.def: $(call enabled,CODEC_EXPORTS)
@echo " [CREATE] $@"
......@@ -325,7 +325,11 @@ vpx.pc: config.mk libs.mk
$(qexec)echo 'Requires:' >> $@
$(qexec)echo 'Conflicts:' >> $@
$(qexec)echo 'Libs: -L$${libdir} -lvpx -lm' >> $@
ifeq ($(HAVE_PTHREAD_H),yes)
$(qexec)echo 'Libs.private: -lm -lpthread' >> $@
else
$(qexec)echo 'Libs.private: -lm' >> $@
endif
$(qexec)echo 'Cflags: -I$${includedir}' >> $@
INSTALL-LIBS-yes += $(LIBSUBDIR)/pkgconfig/vpx.pc
INSTALL_MAPS += $(LIBSUBDIR)/pkgconfig/%.pc %.pc
......@@ -373,7 +377,7 @@ LIBVPX_TEST_DATA_PATH ?= .
include $(SRC_PATH_BARE)/test/test.mk
LIBVPX_TEST_SRCS=$(addprefix test/,$(call enabled,LIBVPX_TEST_SRCS))
LIBVPX_TEST_BINS=./test_libvpx
LIBVPX_TEST_BINS=./test_libvpx$(EXE_SFX)
LIBVPX_TEST_DATA=$(addprefix $(LIBVPX_TEST_DATA_PATH)/,\
$(call enabled,LIBVPX_TEST_DATA))
libvpx_test_data_url=http://downloads.webmproject.org/test_data/libvpx/$(1)
......
......@@ -15,8 +15,13 @@
extern "C" {
#include "./vpx_config.h"
#if CONFIG_VP8_ENCODER
#include "./vp8_rtcd.h"
#include "vp8/common/blockd.h"
//#include "vp8/common/blockd.h"
#endif
#if CONFIG_VP9_ENCODER
#include "./vp9_rtcd.h"
#endif
#include "vpx_mem/vpx_mem.h"
}
......@@ -32,14 +37,22 @@ typedef unsigned int (*sad_m_by_n_fn_t)(const unsigned char *source_ptr,
int reference_stride,
unsigned int max_sad);
typedef void (*sad_n_by_n_by_4_fn_t)(const uint8_t *src_ptr,
int src_stride,
const unsigned char * const ref_ptr[],
int ref_stride,
unsigned int *sad_array);
using libvpx_test::ACMRandom;
namespace {
class SADTest : public PARAMS(int, int, sad_m_by_n_fn_t) {
class SADTestBase : public ::testing::Test {
public:
SADTestBase(int width, int height) : width_(width), height_(height) {}
static void SetUpTestCase() {
source_data_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
vpx_memalign(kDataAlignment, kDataBlockSize));
reference_data_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kDataBufferSize));
}
......@@ -52,36 +65,31 @@ class SADTest : public PARAMS(int, int, sad_m_by_n_fn_t) {
}
protected:
// Handle blocks up to 4 blocks 64x64 with stride up to 128
static const int kDataAlignment = 16;
static const int kDataBufferSize = 16 * 32;
static const int kDataBlockSize = 64 * 128;
static const int kDataBufferSize = 4 * kDataBlockSize;
virtual void SetUp() {
sad_fn_ = GET_PARAM(2);
height_ = GET_PARAM(1);
width_ = GET_PARAM(0);
source_stride_ = width_ * 2;
source_stride_ = (width_ + 31) & ~31;
reference_stride_ = width_ * 2;
rnd_.Reset(ACMRandom::DeterministicSeed());
}
sad_m_by_n_fn_t sad_fn_;
virtual unsigned int SAD(unsigned int max_sad) {
unsigned int ret;
REGISTER_STATE_CHECK(ret = sad_fn_(source_data_, source_stride_,
reference_data_, reference_stride_,
max_sad));
return ret;
virtual uint8_t* GetReference(int block_idx) {
return reference_data_ + block_idx * kDataBlockSize;
}
// Sum of Absolute Differences. Given two blocks, calculate the absolute
// difference between two pixels in the same relative location; accumulate.
unsigned int ReferenceSAD(unsigned int max_sad) {
unsigned int ReferenceSAD(unsigned int max_sad, int block_idx = 0) {
unsigned int sad = 0;
const uint8_t* const reference = GetReference(block_idx);
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
sad += abs(source_data_[h * source_stride_ + w]
- reference_data_[h * reference_stride_ + w]);
- reference[h * reference_stride_ + w]);
}
if (sad > max_sad) {
break;
......@@ -106,6 +114,32 @@ class SADTest : public PARAMS(int, int, sad_m_by_n_fn_t) {
}
}
int width_, height_;
static uint8_t* source_data_;
int source_stride_;
static uint8_t* reference_data_;
int reference_stride_;
ACMRandom rnd_;
};
class SADTest : public SADTestBase,
public ::testing::WithParamInterface<
std::tr1::tuple<int, int, sad_m_by_n_fn_t> > {
public:
SADTest() : SADTestBase(GET_PARAM(0), GET_PARAM(1)) {}
protected:
unsigned int SAD(unsigned int max_sad, int block_idx = 0) {
unsigned int ret;
const uint8_t* const reference = GetReference(block_idx);
REGISTER_STATE_CHECK(ret = GET_PARAM(2)(source_data_, source_stride_,
reference, reference_stride_,
max_sad));
return ret;
}
void CheckSad(unsigned int max_sad) {
unsigned int reference_sad, exp_sad;
......@@ -119,19 +153,38 @@ class SADTest : public PARAMS(int, int, sad_m_by_n_fn_t) {
ASSERT_GE(exp_sad, reference_sad);
}
}
};
// Handle blocks up to 16x16 with stride up to 32
int height_, width_;
static uint8_t* source_data_;
int source_stride_;
static uint8_t* reference_data_;
int reference_stride_;
class SADx4Test : public SADTestBase,
public ::testing::WithParamInterface<
std::tr1::tuple<int, int, sad_n_by_n_by_4_fn_t> > {
public:
SADx4Test() : SADTestBase(GET_PARAM(0), GET_PARAM(1)) {}
ACMRandom rnd_;
protected:
void SADs(unsigned int *results) {
const uint8_t* refs[] = {GetReference(0), GetReference(1),
GetReference(2), GetReference(3)};
REGISTER_STATE_CHECK(GET_PARAM(2)(source_data_, source_stride_,
refs, reference_stride_,
results));
}
void CheckSADs() {
unsigned int reference_sad, exp_sad[4];
SADs(exp_sad);
for (int block = 0; block < 4; block++) {
reference_sad = ReferenceSAD(UINT_MAX, block);
EXPECT_EQ(exp_sad[block], reference_sad) << "block " << block;
}
}
};
uint8_t* SADTest::source_data_ = NULL;
uint8_t* SADTest::reference_data_ = NULL;
uint8_t* SADTestBase::source_data_ = NULL;
uint8_t* SADTestBase::reference_data_ = NULL;
TEST_P(SADTest, MaxRef) {
FillConstant(source_data_, source_stride_, 0);
......@@ -139,12 +192,30 @@ TEST_P(SADTest, MaxRef) {
CheckSad(UINT_MAX);
}
TEST_P(SADx4Test, MaxRef) {
FillConstant(source_data_, source_stride_, 0);
FillConstant(GetReference(0), reference_stride_, 255);
FillConstant(GetReference(1), reference_stride_, 255);
FillConstant(GetReference(2), reference_stride_, 255);
FillConstant(GetReference(3), reference_stride_, 255);
CheckSADs();
}
TEST_P(SADTest, MaxSrc) {
FillConstant(source_data_, source_stride_, 255);
FillConstant(reference_data_, reference_stride_, 0);
CheckSad(UINT_MAX);
}
TEST_P(SADx4Test, MaxSrc) {
FillConstant(source_data_, source_stride_, 255);
FillConstant(GetReference(0), reference_stride_, 0);
FillConstant(GetReference(1), reference_stride_, 0);
FillConstant(GetReference(2), reference_stride_, 0);
FillConstant(GetReference(3), reference_stride_, 0);
CheckSADs();
}
TEST_P(SADTest, ShortRef) {
int tmp_stride = reference_stride_;
reference_stride_ >>= 1;
......@@ -154,6 +225,18 @@ TEST_P(SADTest, ShortRef) {
reference_stride_ = tmp_stride;
}
TEST_P(SADx4Test, ShortRef) {
int tmp_stride = reference_stride_;
reference_stride_ >>= 1;
FillRandom(source_data_, source_stride_);
FillRandom(GetReference(0), reference_stride_);
FillRandom(GetReference(1), reference_stride_);
FillRandom(GetReference(2), reference_stride_);
FillRandom(GetReference(3), reference_stride_);
CheckSADs();
reference_stride_ = tmp_stride;
}
TEST_P(SADTest, UnalignedRef) {
// The reference frame, but not the source frame, may be unaligned for
// certain types of searches.
......@@ -165,6 +248,20 @@ TEST_P(SADTest, UnalignedRef) {
reference_stride_ = tmp_stride;
}
TEST_P(SADx4Test, UnalignedRef) {
// The reference frame, but not the source frame, may be unaligned for
// certain types of searches.
int tmp_stride = reference_stride_;
reference_stride_ -= 1;
FillRandom(source_data_, source_stride_);
FillRandom(GetReference(0), reference_stride_);
FillRandom(GetReference(1), reference_stride_);
FillRandom(GetReference(2), reference_stride_);
FillRandom(GetReference(3), reference_stride_);
CheckSADs();
reference_stride_ = tmp_stride;
}
TEST_P(SADTest, ShortSrc) {
int tmp_stride = source_stride_;
source_stride_ >>= 1;
......@@ -174,6 +271,18 @@ TEST_P(SADTest, ShortSrc) {
source_stride_ = tmp_stride;
}
TEST_P(SADx4Test, ShortSrc) {
int tmp_stride = source_stride_;
source_stride_ >>= 1;
FillRandom(source_data_, source_stride_);
FillRandom(GetReference(0), reference_stride_);
FillRandom(GetReference(1), reference_stride_);
FillRandom(GetReference(2), reference_stride_);
FillRandom(GetReference(3), reference_stride_);
CheckSADs();
source_stride_ = tmp_stride;
}
TEST_P(SADTest, MaxSAD) {
// Verify that, when max_sad is set, the implementation does not return a
// value lower than the reference.
......@@ -184,17 +293,61 @@ TEST_P(SADTest, MaxSAD) {
using std::tr1::make_tuple;
#if CONFIG_VP8_ENCODER && CONFIG_VP9_ENCODER
#define VP8_VP9_SEPARATOR ,
#else
#define VP8_VP9_SEPARATOR
#endif
#if CONFIG_VP8_ENCODER
const sad_m_by_n_fn_t sad_16x16_c = vp8_sad16x16_c;
const sad_m_by_n_fn_t sad_8x16_c = vp8_sad8x16_c;
const sad_m_by_n_fn_t sad_16x8_c = vp8_sad16x8_c;
const sad_m_by_n_fn_t sad_8x8_c = vp8_sad8x8_c;
const sad_m_by_n_fn_t sad_4x4_c = vp8_sad4x4_c;
#endif
#if CONFIG_VP9_ENCODER
const sad_m_by_n_fn_t sad_64x64_c_vp9 = vp9_sad64x64_c;
const sad_m_by_n_fn_t sad_32x32_c_vp9 = vp9_sad32x32_c;
const sad_m_by_n_fn_t sad_16x16_c_vp9 = vp9_sad16x16_c;
const sad_m_by_n_fn_t sad_8x16_c_vp9 = vp9_sad8x16_c;
const sad_m_by_n_fn_t sad_16x8_c_vp9 = vp9_sad16x8_c;
const sad_m_by_n_fn_t sad_8x8_c_vp9 = vp9_sad8x8_c;
const sad_m_by_n_fn_t sad_4x4_c_vp9 = vp9_sad4x4_c;
#endif
INSTANTIATE_TEST_CASE_P(C, SADTest, ::testing::Values(
#if CONFIG_VP8_ENCODER
make_tuple(16, 16, sad_16x16_c),
make_tuple(8, 16, sad_8x16_c),
make_tuple(16, 8, sad_16x8_c),
make_tuple(8, 8, sad_8x8_c),
make_tuple(4, 4, sad_4x4_c)));
make_tuple(4, 4, sad_4x4_c)
#endif
VP8_VP9_SEPARATOR
#if CONFIG_VP9_ENCODER
make_tuple(64, 64, sad_64x64_c_vp9),
make_tuple(32, 32, sad_32x32_c_vp9),
make_tuple(16, 16, sad_16x16_c_vp9),
make_tuple(8, 16, sad_8x16_c_vp9),
make_tuple(16, 8, sad_16x8_c_vp9),
make_tuple(8, 8, sad_8x8_c_vp9),
make_tuple(4, 4, sad_4x4_c_vp9)
#endif
));
#if CONFIG_VP9_ENCODER
const sad_n_by_n_by_4_fn_t sad_64x64x4d_c = vp9_sad64x64x4d_c;
const sad_n_by_n_by_4_fn_t sad_32x32x4d_c = vp9_sad32x32x4d_c;
const sad_n_by_n_by_4_fn_t sad_16x16x4d_c = vp9_sad16x16x4d_c;
const sad_n_by_n_by_4_fn_t sad_8x8x4d_c = vp9_sad8x8x4d_c;