Commit 3246fc04 authored by Yaowu Xu's avatar Yaowu Xu

vp9->vpx in --enable-vp9-highbitdepth

Also changed all related macros and tests

Change-Id: I5269578c0f716fd391111a43932f856778494d29
parent 2334f51d
......@@ -34,7 +34,7 @@ Advanced options:
${toggle_codec_srcs} in/exclude codec library source code
${toggle_debug_libs} in/exclude debug version of libraries
${toggle_static_msvcrt} use static MSVCRT (VS builds only)
${toggle_vp9_highbitdepth} use VP9 high bit depth (10/12) profiles
${toggle_vpx_highbitdepth} use VP9 high bit depth (10/12) profiles
${toggle_better_hw_compatibility}
enable encoder to produce streams with better
hardware decoder compatibility
......@@ -309,7 +309,7 @@ CONFIG_LIST="
temporal_denoising
vp9_temporal_denoising
coefficient_range_checking
vp9_highbitdepth
vpx_highbitdepth
better_hw_compatibility
experimental
size_limit
......@@ -370,7 +370,7 @@ CMDLINE_SELECT="
vp9_temporal_denoising
coefficient_range_checking
better_hw_compatibility
vp9_highbitdepth
vpx_highbitdepth
experimental
"
......
......@@ -83,7 +83,7 @@ static const arg_def_t speed_arg =
static const arg_def_t aqmode_arg =
ARG_DEF("aq", "aqmode", 1, "aq-mode off/on");
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static const struct arg_enum_list bitdepth_enum[] = {
{"8", VPX_BITS_8},
{"10", VPX_BITS_10},
......@@ -94,7 +94,7 @@ static const struct arg_enum_list bitdepth_enum[] = {
static const arg_def_t bitdepth_arg =
ARG_DEF_ENUM("d", "bit-depth", 1, "Bit depth for codec 8, 10 or 12. ",
bitdepth_enum);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static const arg_def_t *svc_args[] = {
......@@ -108,7 +108,7 @@ static const arg_def_t *svc_args[] = {
&output_rc_stats_arg,
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
&bitdepth_arg,
#endif
&speed_arg,
......@@ -265,7 +265,7 @@ static void parse_command_line(int argc, const char **argv_,
enc_cfg->g_lag_in_frames = arg_parse_uint(&arg);
} else if (arg_match(&arg, &rc_end_usage_arg, argi)) {
enc_cfg->rc_end_usage = arg_parse_uint(&arg);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else if (arg_match(&arg, &bitdepth_arg, argi)) {
enc_cfg->g_bit_depth = arg_parse_enum_or_int(&arg);
switch (enc_cfg->g_bit_depth) {
......@@ -285,7 +285,7 @@ static void parse_command_line(int argc, const char **argv_,
die("Error: Invalid bit depth selected (%d)\n", enc_cfg->g_bit_depth);
break;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} else {
++argj;
}
......@@ -634,7 +634,7 @@ int main(int argc, const char **argv) {
parse_command_line(argc, argv, &app_input, &svc_ctx, &enc_cfg);
// Allocate image buffer
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ?
VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
enc_cfg.g_w, enc_cfg.g_h, 32)) {
......@@ -644,7 +644,7 @@ int main(int argc, const char **argv) {
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, enc_cfg.g_w, enc_cfg.g_h, 32)) {
die("Failed to allocate image %dx%d\n", enc_cfg.g_w, enc_cfg.g_h);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (!(infile = fopen(app_input.input_filename, "rb")))
die("Failed to open %s for reading\n", app_input.input_filename);
......
......@@ -492,13 +492,13 @@ int main(int argc, char **argv) {
struct RateControlMetrics rc;
int64_t cx_time = 0;
const int min_args_base = 11;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_bit_depth_t bit_depth = VPX_BITS_8;
int input_bit_depth = 8;
const int min_args = min_args_base + 1;
#else
const int min_args = min_args_base;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
double sum_bitrate = 0.0;
double sum_bitrate2 = 0.0;
double framerate = 30.0;
......@@ -506,7 +506,7 @@ int main(int argc, char **argv) {
exec_name = argv[0];
// Check usage and arguments.
if (argc < min_args) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n", argv[0]);
......@@ -514,7 +514,7 @@ int main(int argc, char **argv) {
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> \n", argv[0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
encoder = get_vpx_encoder_by_name(argv[3]);
......@@ -538,7 +538,7 @@ int main(int argc, char **argv) {
die("Invalid number of arguments");
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (strtol(argv[argc-1], NULL, 0)) {
case 8:
bit_depth = VPX_BITS_8;
......@@ -565,7 +565,7 @@ int main(int argc, char **argv) {
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
die("Failed to allocate image", width, height);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Populate encoder configuration.
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
......@@ -578,13 +578,13 @@ int main(int argc, char **argv) {
cfg.g_w = width;
cfg.g_h = height;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (bit_depth != VPX_BITS_8) {
cfg.g_bit_depth = bit_depth;
cfg.g_input_bit_depth = input_bit_depth;
cfg.g_profile = 2;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Timebase format e.g. 30fps: numerator=1, demoninator = 30.
cfg.g_timebase.num = strtol(argv[6], NULL, 0);
......@@ -672,13 +672,13 @@ int main(int argc, char **argv) {
cfg.ss_number_layers = 1;
// Initialize codec.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (vpx_codec_enc_init(
&codec, encoder->codec_interface(), &cfg,
bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH))
#else
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0))
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
die_codec(&codec, "Failed to initialize encoder");
if (strncmp(encoder->name, "vp8", 3) == 0) {
......
......@@ -50,9 +50,9 @@ const TestVideoParam kTestVectors[] = {
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
{"rush_hour_444.y4m", 352, 288, 30, 1,
8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// Add list of profile 2/3 test videos here ...
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
const TestEncodeParam kEncodeVectors[] = {
......@@ -224,7 +224,7 @@ TEST_P(ArfFreqTest, MinArfFreqTest) {
delete(video);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
# if CONFIG_VP10_ENCODER
// TODO(angiebird): 25-29 fail in high bitdepth mode.
INSTANTIATE_TEST_CASE_P(
......@@ -242,5 +242,5 @@ VP10_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace
......@@ -189,7 +189,7 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
output_width, output_height);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
const unsigned int src_stride,
const int16_t *HFilter,
......@@ -308,7 +308,7 @@ void highbd_filter_average_block2d_8_c(const uint16_t *src_ptr,
highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride,
output_width, output_height, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
public:
......@@ -320,7 +320,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
vpx_memalign(kDataAlignment, kOutputBufferSize));
output_ref_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kOutputBufferSize));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
input16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment,
(kInputBufferSize + 1) * sizeof(uint16_t))) + 1;
......@@ -340,7 +340,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
output_ = NULL;
vpx_free(output_ref_);
output_ref_ = NULL;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_free(input16_ - 1);
input16_ = NULL;
vpx_free(output16_);
......@@ -375,7 +375,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
virtual void SetUp() {
UUT_ = GET_PARAM(2);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ != 0)
mask_ = (1 << UUT_->use_highbd_) - 1;
else
......@@ -393,12 +393,12 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
for (int i = 0; i < kInputBufferSize; ++i) {
if (i & 1) {
input_[i] = 255;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
input16_[i] = mask_;
#endif
} else {
input_[i] = prng.Rand8Extremes();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
input16_[i] = prng.Rand16() & mask_;
#endif
}
......@@ -407,14 +407,14 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
void SetConstantInput(int value) {
memset(input_, value, kInputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_memset16(input16_, value, kInputBufferSize);
#endif
}
void CopyOutputToRef() {
memcpy(output_ref_, output_, kOutputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
memcpy(output16_ref_, output16_, kOutputBufferSize);
#endif
}
......@@ -427,7 +427,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
uint8_t *input() const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return input_ + BorderTop() * kOuterBlockSize + BorderLeft();
} else {
......@@ -440,7 +440,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
uint8_t *output() const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ + BorderTop() * kOuterBlockSize + BorderLeft();
} else {
......@@ -453,7 +453,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
uint8_t *output_ref() const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft();
} else {
......@@ -466,7 +466,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
uint16_t lookup(uint8_t *list, int index) const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return list[index];
} else {
......@@ -478,7 +478,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
}
void assign_val(uint8_t *list, int index, uint16_t val) const {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
list[index] = (uint8_t) val;
} else {
......@@ -497,7 +497,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
unsigned int dst_stride,
unsigned int output_width,
unsigned int output_height) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
filter_average_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
dst_ptr, dst_stride, output_width,
......@@ -524,7 +524,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
unsigned int dst_stride,
unsigned int output_width,
unsigned int output_height) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
dst_ptr, dst_stride, output_width, output_height);
......@@ -544,7 +544,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
static uint8_t* input_;
static uint8_t* output_;
static uint8_t* output_ref_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static uint16_t* input16_;
static uint16_t* output16_;
static uint16_t* output16_ref_;
......@@ -555,7 +555,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
uint8_t* ConvolveTest::input_ = NULL;
uint8_t* ConvolveTest::output_ = NULL;
uint8_t* ConvolveTest::output_ref_ = NULL;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t* ConvolveTest::input16_ = NULL;
uint16_t* ConvolveTest::output16_ = NULL;
uint16_t* ConvolveTest::output16_ref_ = NULL;
......@@ -685,7 +685,7 @@ const int16_t kInvalidFilter[8] = { 0 };
TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
uint8_t* const in = input();
uint8_t* const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t* ref;
......@@ -747,7 +747,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
uint8_t* const in = input();
uint8_t* const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t* ref;
......@@ -765,7 +765,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();
} else {
......@@ -829,7 +829,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
TEST_P(ConvolveTest, FilterExtremes) {
uint8_t *const in = input();
uint8_t *const out = output();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t *ref;
......@@ -847,7 +847,7 @@ TEST_P(ConvolveTest, FilterExtremes) {
for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) {
uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();
} else {
......@@ -866,7 +866,7 @@ TEST_P(ConvolveTest, FilterExtremes) {
while (seed_val < 256) {
for (int y = 0; y < 8; ++y) {
for (int x = 0; x < 8; ++x) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
assign_val(in, y * kOutputStride + x - SUBPEL_TAPS / 2 + 1,
((seed_val >> (axis ? y : x)) & 1) * mask_);
#else
......@@ -959,7 +959,7 @@ TEST_P(ConvolveTest, CheckScalingFiltering) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define WRAP(func, bd) \
void wrap_ ## func ## _ ## bd(const uint8_t *src, ptrdiff_t src_stride, \
uint8_t *dst, ptrdiff_t dst_stride, \
......@@ -1122,7 +1122,7 @@ INSTANTIATE_TEST_CASE_P(C, ConvolveTest, ::testing::Values(
#endif
#if HAVE_SSE2 && ARCH_X86_64
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const ConvolveFunctions convolve8_sse2(
#if CONFIG_USE_X86INC
wrap_convolve_copy_sse2_8, wrap_convolve_avg_sse2_8,
......@@ -1227,7 +1227,7 @@ INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest, ::testing::Values(
make_tuple(64, 32, &convolve8_sse2),
make_tuple(32, 64, &convolve8_sse2),
make_tuple(64, 64, &convolve8_sse2)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif
#if HAVE_SSSE3
......
This diff is collapsed.
......@@ -80,7 +80,7 @@ typedef void (*InvTxfmFunc)(const tran_low_t *in, uint8_t *out, int stride);
typedef std::tr1::tuple<FwdTxfmFunc, InvTxfmFunc, int, vpx_bit_depth_t>
Trans32x32Param;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct32x32_8(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 8);
}
......@@ -92,7 +92,7 @@ void idct32x32_10(const tran_low_t *in, uint8_t *out, int stride) {
void idct32x32_12(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 12);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class Trans32x32Test : public ::testing::TestWithParam<Trans32x32Param> {
public:
......@@ -125,7 +125,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
......@@ -137,7 +137,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
......@@ -149,7 +149,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
ASM_REGISTER_STATE_CHECK(fwd_txfm_(test_input_block, test_temp_block, 32));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block, dst, 32));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(inv_txfm_(test_temp_block,
CONVERT_TO_BYTEPTR(dst16), 32));
......@@ -157,7 +157,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
......@@ -261,7 +261,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, src[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, src16[kNumCoeffs]);
#endif
......@@ -275,7 +275,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
src[j] = rnd.Rand8();
dst[j] = rnd.Rand8();
in[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand16() & mask_;
dst16[j] = rnd.Rand16() & mask_;
......@@ -289,13 +289,13 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
coeff[j] = static_cast<tran_low_t>(round(out_r[j]));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, dst, 32));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(inv_txfm_(coeff, CONVERT_TO_BYTEPTR(dst16), 32));
#endif
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
......@@ -311,7 +311,7 @@ TEST_P(Trans32x32Test, InverseAccuracy) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans32x32Test,
::testing::Values(
......@@ -335,9 +335,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_c, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_c,
&vpx_idct32x32_1024_add_c, 1, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans32x32Test,
::testing::Values(
......@@ -345,9 +345,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_neon, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_c,
&vpx_idct32x32_1024_add_neon, 1, VPX_BITS_8)));
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans32x32Test,
::testing::Values(
......@@ -355,9 +355,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_sse2,
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
#endif // HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans32x32Test,
::testing::Values(
......@@ -371,9 +371,9 @@ INSTANTIATE_TEST_CASE_P(
VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_sse2, &vpx_idct32x32_1024_add_c, 1,
VPX_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
AVX2, Trans32x32Test,
::testing::Values(
......@@ -381,9 +381,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_sse2, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_avx2,
&vpx_idct32x32_1024_add_sse2, 1, VPX_BITS_8)));
#endif // HAVE_AVX2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_AVX2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, Trans32x32Test,
::testing::Values(
......@@ -391,5 +391,5 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct32x32_1024_add_msa, 0, VPX_BITS_8),
make_tuple(&vpx_fdct32x32_rd_msa,
&vpx_idct32x32_1024_add_msa, 1, VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace
......@@ -133,7 +133,7 @@ TEST(DecodeAPI, Vp9InvalidDecode) {
vpx_codec_ctx_t dec;
EXPECT_EQ(VPX_CODEC_OK, vpx_codec_dec_init(&dec, codec, NULL, 0));
const uint32_t frame_size = static_cast<uint32_t>(video.frame_size());
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
EXPECT_EQ(VPX_CODEC_MEM_ERROR,
vpx_codec_decode(&dec, video.cxdata(), frame_size, NULL, 0));
#else
......
......@@ -48,7 +48,7 @@ const TestVideoParam kTestVectors[] = {
{"park_joy_90p_8_422.y4m", 8, VPX_IMG_FMT_I422, VPX_BITS_8, 1},
{"park_joy_90p_8_444.y4m", 8, VPX_IMG_FMT_I444, VPX_BITS_8, 1},
{"park_joy_90p_8_440.yuv", 8, VPX_IMG_FMT_I440, VPX_BITS_8, 1},
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
{"park_joy_90p_10_420.y4m", 10, VPX_IMG_FMT_I42016, VPX_BITS_10, 2},
{"park_joy_90p_10_422.y4m", 10, VPX_IMG_FMT_I42216, VPX_BITS_10, 3},
{"park_joy_90p_10_444.y4m", 10, VPX_IMG_FMT_I44416, VPX_BITS_10, 3},
......@@ -57,7 +57,7 @@ const TestVideoParam kTestVectors[] = {
{"park_joy_90p_12_422.y4m", 12, VPX_IMG_FMT_I42216, VPX_BITS_12, 3},
{"park_joy_90p_12_444.y4m", 12, VPX_IMG_FMT_I44416, VPX_BITS_12, 3},
{"park_joy_90p_12_440.yuv", 12, VPX_IMG_FMT_I44016, VPX_BITS_12, 3},
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
// Encoding modes tested
......@@ -181,7 +181,7 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) {
delete(video);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
# if CONFIG_VP10_ENCODER
// TODO(angiebird): many fail in high bitdepth mode.
INSTANTIATE_TEST_CASE_P(
......@@ -199,5 +199,5 @@ VP10_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(kEncodingModeVectors),
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kCpuUsedVectors));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace
......@@ -27,7 +27,7 @@
using libvpx_test::ACMRandom;
namespace {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int kNumIterations = 1000;
typedef int64_t (*ErrorBlockFunc)(const tran_low_t *coeff,
......@@ -160,52 +160,52 @@ TEST_P(ErrorBlockTest, ExtremeValues) {
using std::tr1::make_tuple;
#if CONFIG_USE_X86INC
int64_t wrap_vp9_highbd_block_error_8bit_c(const tran_low_t *coeff,
int64_t wrap_vp10_highbd_block_error_8bit_c(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
int64_t *ssz, int bps) {
assert(bps == 8);
return vp9_highbd_block_error_8bit_c(coeff, dqcoeff, block_size, ssz);
return vp10_highbd_block_error_8bit_c(coeff, dqcoeff, block_size, ssz);
}
#if HAVE_SSE2
int64_t wrap_vp9_highbd_block_error_8bit_sse2(const tran_low_t *coeff,
int64_t wrap_vp10_highbd_block_error_8bit_sse2(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
int64_t *ssz, int bps) {
assert(bps == 8);
return vp9_highbd_block_error_8bit_sse2(coeff, dqcoeff, block_size, ssz);
return vp10_highbd_block_error_8bit_sse2(coeff, dqcoeff, block_size, ssz);
}
INSTANTIATE_TEST_CASE_P(
SSE2, ErrorBlockTest,
::testing::Values(
make_tuple(&vp9_highbd_block_error_sse2,
&vp9_highbd_block_error_c, VPX_BITS_10),
make_tuple(&vp9_highbd_block_error_sse2,
&vp9_highbd_block_error_c, VPX_BITS_12),
make_tuple(&vp9_highbd_block_error_sse2,
&vp9_highbd_block_error_c, VPX_BITS_8),
make_tuple(&wrap_vp9_highbd_block_error_8bit_sse2,
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
make_tuple(&vp10_highbd_block_error_sse2,
&vp10_highbd_block_error_c, VPX_BITS_10),
make_tuple(&vp10_highbd_block_error_sse2,
&vp10_highbd_block_error_c, VPX_BITS_12),
make_tuple(&vp10_highbd_block_error_sse2,
&vp10_highbd_block_error_c, VPX_BITS_8),
make_tuple(&wrap_vp10_highbd_block_error_8bit_sse2,
&wrap_vp10_highbd_block_error_8bit_c, VPX_BITS_8)));
#endif // HAVE_SSE2
#if HAVE_AVX
int64_t wrap_vp9_highbd_block_error_8bit_avx(const tran_low_t *coeff,
int64_t wrap_vp10_highbd_block_error_8bit_avx(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
int64_t *ssz, int bps) {
assert(bps == 8);
return vp9_highbd_block_error_8bit_avx(coeff, dqcoeff, block_size, ssz);
return vp10_highbd_block_error_8bit_avx(coeff, dqcoeff, block_size, ssz);
}
INSTANTIATE_TEST_CASE_P(
AVX, ErrorBlockTest,
::testing::Values(
make_tuple(&wrap_vp9_highbd_block_error_8bit_avx,
&wrap_vp9_highbd_block_error_8bit_c, VPX_BITS_8)));
make_tuple(&wrap_vp10_highbd_block_error_8bit_avx,