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: ...@@ -34,7 +34,7 @@ Advanced options:
${toggle_codec_srcs} in/exclude codec library source code ${toggle_codec_srcs} in/exclude codec library source code
${toggle_debug_libs} in/exclude debug version of libraries ${toggle_debug_libs} in/exclude debug version of libraries
${toggle_static_msvcrt} use static MSVCRT (VS builds only) ${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} ${toggle_better_hw_compatibility}
enable encoder to produce streams with better enable encoder to produce streams with better
hardware decoder compatibility hardware decoder compatibility
...@@ -309,7 +309,7 @@ CONFIG_LIST=" ...@@ -309,7 +309,7 @@ CONFIG_LIST="
temporal_denoising temporal_denoising
vp9_temporal_denoising vp9_temporal_denoising
coefficient_range_checking coefficient_range_checking
vp9_highbitdepth vpx_highbitdepth
better_hw_compatibility better_hw_compatibility
experimental experimental
size_limit size_limit
...@@ -370,7 +370,7 @@ CMDLINE_SELECT=" ...@@ -370,7 +370,7 @@ CMDLINE_SELECT="
vp9_temporal_denoising vp9_temporal_denoising
coefficient_range_checking coefficient_range_checking
better_hw_compatibility better_hw_compatibility
vp9_highbitdepth vpx_highbitdepth
experimental experimental
" "
......
...@@ -83,7 +83,7 @@ static const arg_def_t speed_arg = ...@@ -83,7 +83,7 @@ static const arg_def_t speed_arg =
static const arg_def_t aqmode_arg = static const arg_def_t aqmode_arg =
ARG_DEF("aq", "aqmode", 1, "aq-mode off/on"); 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[] = { static const struct arg_enum_list bitdepth_enum[] = {
{"8", VPX_BITS_8}, {"8", VPX_BITS_8},
{"10", VPX_BITS_10}, {"10", VPX_BITS_10},
...@@ -94,7 +94,7 @@ static const struct arg_enum_list bitdepth_enum[] = { ...@@ -94,7 +94,7 @@ static const struct arg_enum_list bitdepth_enum[] = {
static const arg_def_t bitdepth_arg = static const arg_def_t bitdepth_arg =
ARG_DEF_ENUM("d", "bit-depth", 1, "Bit depth for codec 8, 10 or 12. ", ARG_DEF_ENUM("d", "bit-depth", 1, "Bit depth for codec 8, 10 or 12. ",
bitdepth_enum); bitdepth_enum);
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
static const arg_def_t *svc_args[] = { static const arg_def_t *svc_args[] = {
...@@ -108,7 +108,7 @@ static const arg_def_t *svc_args[] = { ...@@ -108,7 +108,7 @@ static const arg_def_t *svc_args[] = {
&output_rc_stats_arg, &output_rc_stats_arg,
#endif #endif
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
&bitdepth_arg, &bitdepth_arg,
#endif #endif
&speed_arg, &speed_arg,
...@@ -265,7 +265,7 @@ static void parse_command_line(int argc, const char **argv_, ...@@ -265,7 +265,7 @@ static void parse_command_line(int argc, const char **argv_,
enc_cfg->g_lag_in_frames = arg_parse_uint(&arg); enc_cfg->g_lag_in_frames = arg_parse_uint(&arg);
} else if (arg_match(&arg, &rc_end_usage_arg, argi)) { } else if (arg_match(&arg, &rc_end_usage_arg, argi)) {
enc_cfg->rc_end_usage = arg_parse_uint(&arg); 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)) { } else if (arg_match(&arg, &bitdepth_arg, argi)) {
enc_cfg->g_bit_depth = arg_parse_enum_or_int(&arg); enc_cfg->g_bit_depth = arg_parse_enum_or_int(&arg);
switch (enc_cfg->g_bit_depth) { switch (enc_cfg->g_bit_depth) {
...@@ -285,7 +285,7 @@ static void parse_command_line(int argc, const char **argv_, ...@@ -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); die("Error: Invalid bit depth selected (%d)\n", enc_cfg->g_bit_depth);
break; break;
} }
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
} else { } else {
++argj; ++argj;
} }
...@@ -634,7 +634,7 @@ int main(int argc, const char **argv) { ...@@ -634,7 +634,7 @@ int main(int argc, const char **argv) {
parse_command_line(argc, argv, &app_input, &svc_ctx, &enc_cfg); parse_command_line(argc, argv, &app_input, &svc_ctx, &enc_cfg);
// Allocate image buffer // Allocate image buffer
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ? if (!vpx_img_alloc(&raw, enc_cfg.g_input_bit_depth == 8 ?
VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016, VPX_IMG_FMT_I420 : VPX_IMG_FMT_I42016,
enc_cfg.g_w, enc_cfg.g_h, 32)) { enc_cfg.g_w, enc_cfg.g_h, 32)) {
...@@ -644,7 +644,7 @@ int main(int argc, const char **argv) { ...@@ -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)) { 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); 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"))) if (!(infile = fopen(app_input.input_filename, "rb")))
die("Failed to open %s for reading\n", app_input.input_filename); die("Failed to open %s for reading\n", app_input.input_filename);
......
...@@ -492,13 +492,13 @@ int main(int argc, char **argv) { ...@@ -492,13 +492,13 @@ int main(int argc, char **argv) {
struct RateControlMetrics rc; struct RateControlMetrics rc;
int64_t cx_time = 0; int64_t cx_time = 0;
const int min_args_base = 11; const int min_args_base = 11;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
vpx_bit_depth_t bit_depth = VPX_BITS_8; vpx_bit_depth_t bit_depth = VPX_BITS_8;
int input_bit_depth = 8; int input_bit_depth = 8;
const int min_args = min_args_base + 1; const int min_args = min_args_base + 1;
#else #else
const int min_args = min_args_base; const int min_args = min_args_base;
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
double sum_bitrate = 0.0; double sum_bitrate = 0.0;
double sum_bitrate2 = 0.0; double sum_bitrate2 = 0.0;
double framerate = 30.0; double framerate = 30.0;
...@@ -506,7 +506,7 @@ int main(int argc, char **argv) { ...@@ -506,7 +506,7 @@ int main(int argc, char **argv) {
exec_name = argv[0]; exec_name = argv[0];
// Check usage and arguments. // Check usage and arguments.
if (argc < min_args) { if (argc < min_args) {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> " die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> " "<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n", argv[0]); "<Rate_0> ... <Rate_nlayers-1> <bit-depth> \n", argv[0]);
...@@ -514,7 +514,7 @@ int main(int argc, char **argv) { ...@@ -514,7 +514,7 @@ int main(int argc, char **argv) {
die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> " die("Usage: %s <infile> <outfile> <codec_type(vp8/vp9)> <width> <height> "
"<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> " "<rate_num> <rate_den> <speed> <frame_drop_threshold> <mode> "
"<Rate_0> ... <Rate_nlayers-1> \n", argv[0]); "<Rate_0> ... <Rate_nlayers-1> \n", argv[0]);
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
} }
encoder = get_vpx_encoder_by_name(argv[3]); encoder = get_vpx_encoder_by_name(argv[3]);
...@@ -538,7 +538,7 @@ int main(int argc, char **argv) { ...@@ -538,7 +538,7 @@ int main(int argc, char **argv) {
die("Invalid number of arguments"); die("Invalid number of arguments");
} }
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
switch (strtol(argv[argc-1], NULL, 0)) { switch (strtol(argv[argc-1], NULL, 0)) {
case 8: case 8:
bit_depth = VPX_BITS_8; bit_depth = VPX_BITS_8;
...@@ -565,7 +565,7 @@ int main(int argc, char **argv) { ...@@ -565,7 +565,7 @@ int main(int argc, char **argv) {
if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) { if (!vpx_img_alloc(&raw, VPX_IMG_FMT_I420, width, height, 32)) {
die("Failed to allocate image", width, height); die("Failed to allocate image", width, height);
} }
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
// Populate encoder configuration. // Populate encoder configuration.
res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0); res = vpx_codec_enc_config_default(encoder->codec_interface(), &cfg, 0);
...@@ -578,13 +578,13 @@ int main(int argc, char **argv) { ...@@ -578,13 +578,13 @@ int main(int argc, char **argv) {
cfg.g_w = width; cfg.g_w = width;
cfg.g_h = height; cfg.g_h = height;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (bit_depth != VPX_BITS_8) { if (bit_depth != VPX_BITS_8) {
cfg.g_bit_depth = bit_depth; cfg.g_bit_depth = bit_depth;
cfg.g_input_bit_depth = input_bit_depth; cfg.g_input_bit_depth = input_bit_depth;
cfg.g_profile = 2; cfg.g_profile = 2;
} }
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
// Timebase format e.g. 30fps: numerator=1, demoninator = 30. // Timebase format e.g. 30fps: numerator=1, demoninator = 30.
cfg.g_timebase.num = strtol(argv[6], NULL, 0); cfg.g_timebase.num = strtol(argv[6], NULL, 0);
...@@ -672,13 +672,13 @@ int main(int argc, char **argv) { ...@@ -672,13 +672,13 @@ int main(int argc, char **argv) {
cfg.ss_number_layers = 1; cfg.ss_number_layers = 1;
// Initialize codec. // Initialize codec.
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (vpx_codec_enc_init( if (vpx_codec_enc_init(
&codec, encoder->codec_interface(), &cfg, &codec, encoder->codec_interface(), &cfg,
bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH)) bit_depth == VPX_BITS_8 ? 0 : VPX_CODEC_USE_HIGHBITDEPTH))
#else #else
if (vpx_codec_enc_init(&codec, encoder->codec_interface(), &cfg, 0)) 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"); die_codec(&codec, "Failed to initialize encoder");
if (strncmp(encoder->name, "vp8", 3) == 0) { if (strncmp(encoder->name, "vp8", 3) == 0) {
......
...@@ -50,9 +50,9 @@ const TestVideoParam kTestVectors[] = { ...@@ -50,9 +50,9 @@ const TestVideoParam kTestVectors[] = {
8, VPX_IMG_FMT_I420, VPX_BITS_8, 0}, 8, VPX_IMG_FMT_I420, VPX_BITS_8, 0},
{"rush_hour_444.y4m", 352, 288, 30, 1, {"rush_hour_444.y4m", 352, 288, 30, 1,
8, VPX_IMG_FMT_I444, VPX_BITS_8, 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 ... // Add list of profile 2/3 test videos here ...
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
}; };
const TestEncodeParam kEncodeVectors[] = { const TestEncodeParam kEncodeVectors[] = {
...@@ -224,7 +224,7 @@ TEST_P(ArfFreqTest, MinArfFreqTest) { ...@@ -224,7 +224,7 @@ TEST_P(ArfFreqTest, MinArfFreqTest) {
delete(video); delete(video);
} }
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
# if CONFIG_VP10_ENCODER # if CONFIG_VP10_ENCODER
// TODO(angiebird): 25-29 fail in high bitdepth mode. // TODO(angiebird): 25-29 fail in high bitdepth mode.
INSTANTIATE_TEST_CASE_P( INSTANTIATE_TEST_CASE_P(
...@@ -242,5 +242,5 @@ VP10_INSTANTIATE_TEST_CASE( ...@@ -242,5 +242,5 @@ VP10_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(kTestVectors), ::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors), ::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors)); ::testing::ValuesIn(kMinArfVectors));
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace } // namespace
...@@ -189,7 +189,7 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr, ...@@ -189,7 +189,7 @@ void filter_average_block2d_8_c(const uint8_t *src_ptr,
output_width, output_height); output_width, output_height);
} }
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
void highbd_filter_block2d_8_c(const uint16_t *src_ptr, void highbd_filter_block2d_8_c(const uint16_t *src_ptr,
const unsigned int src_stride, const unsigned int src_stride,
const int16_t *HFilter, const int16_t *HFilter,
...@@ -308,7 +308,7 @@ void highbd_filter_average_block2d_8_c(const uint16_t *src_ptr, ...@@ -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, highbd_block2d_average_c(tmp, 64, dst_ptr, dst_stride,
output_width, output_height, bd); output_width, output_height, bd);
} }
#endif // CONFIG_VP9_HIGHBITDEPTH #endif // CONFIG_VPX_HIGHBITDEPTH
class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
public: public:
...@@ -320,7 +320,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -320,7 +320,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
vpx_memalign(kDataAlignment, kOutputBufferSize)); vpx_memalign(kDataAlignment, kOutputBufferSize));
output_ref_ = reinterpret_cast<uint8_t*>( output_ref_ = reinterpret_cast<uint8_t*>(
vpx_memalign(kDataAlignment, kOutputBufferSize)); vpx_memalign(kDataAlignment, kOutputBufferSize));
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
input16_ = reinterpret_cast<uint16_t*>( input16_ = reinterpret_cast<uint16_t*>(
vpx_memalign(kDataAlignment, vpx_memalign(kDataAlignment,
(kInputBufferSize + 1) * sizeof(uint16_t))) + 1; (kInputBufferSize + 1) * sizeof(uint16_t))) + 1;
...@@ -340,7 +340,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -340,7 +340,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
output_ = NULL; output_ = NULL;
vpx_free(output_ref_); vpx_free(output_ref_);
output_ref_ = NULL; output_ref_ = NULL;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
vpx_free(input16_ - 1); vpx_free(input16_ - 1);
input16_ = NULL; input16_ = NULL;
vpx_free(output16_); vpx_free(output16_);
...@@ -375,7 +375,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -375,7 +375,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
virtual void SetUp() { virtual void SetUp() {
UUT_ = GET_PARAM(2); UUT_ = GET_PARAM(2);
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ != 0) if (UUT_->use_highbd_ != 0)
mask_ = (1 << UUT_->use_highbd_) - 1; mask_ = (1 << UUT_->use_highbd_) - 1;
else else
...@@ -393,12 +393,12 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -393,12 +393,12 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
for (int i = 0; i < kInputBufferSize; ++i) { for (int i = 0; i < kInputBufferSize; ++i) {
if (i & 1) { if (i & 1) {
input_[i] = 255; input_[i] = 255;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
input16_[i] = mask_; input16_[i] = mask_;
#endif #endif
} else { } else {
input_[i] = prng.Rand8Extremes(); input_[i] = prng.Rand8Extremes();
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
input16_[i] = prng.Rand16() & mask_; input16_[i] = prng.Rand16() & mask_;
#endif #endif
} }
...@@ -407,14 +407,14 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -407,14 +407,14 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
void SetConstantInput(int value) { void SetConstantInput(int value) {
memset(input_, value, kInputBufferSize); memset(input_, value, kInputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
vpx_memset16(input16_, value, kInputBufferSize); vpx_memset16(input16_, value, kInputBufferSize);
#endif #endif
} }
void CopyOutputToRef() { void CopyOutputToRef() {
memcpy(output_ref_, output_, kOutputBufferSize); memcpy(output_ref_, output_, kOutputBufferSize);
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
memcpy(output16_ref_, output16_, kOutputBufferSize); memcpy(output16_ref_, output16_, kOutputBufferSize);
#endif #endif
} }
...@@ -427,7 +427,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -427,7 +427,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
} }
uint8_t *input() const { uint8_t *input() const {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) { if (UUT_->use_highbd_ == 0) {
return input_ + BorderTop() * kOuterBlockSize + BorderLeft(); return input_ + BorderTop() * kOuterBlockSize + BorderLeft();
} else { } else {
...@@ -440,7 +440,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -440,7 +440,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
} }
uint8_t *output() const { uint8_t *output() const {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) { if (UUT_->use_highbd_ == 0) {
return output_ + BorderTop() * kOuterBlockSize + BorderLeft(); return output_ + BorderTop() * kOuterBlockSize + BorderLeft();
} else { } else {
...@@ -453,7 +453,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -453,7 +453,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
} }
uint8_t *output_ref() const { uint8_t *output_ref() const {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) { if (UUT_->use_highbd_ == 0) {
return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft(); return output_ref_ + BorderTop() * kOuterBlockSize + BorderLeft();
} else { } else {
...@@ -466,7 +466,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -466,7 +466,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
} }
uint16_t lookup(uint8_t *list, int index) const { uint16_t lookup(uint8_t *list, int index) const {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) { if (UUT_->use_highbd_ == 0) {
return list[index]; return list[index];
} else { } else {
...@@ -478,7 +478,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -478,7 +478,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
} }
void assign_val(uint8_t *list, int index, uint16_t val) const { 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) { if (UUT_->use_highbd_ == 0) {
list[index] = (uint8_t) val; list[index] = (uint8_t) val;
} else { } else {
...@@ -497,7 +497,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -497,7 +497,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
unsigned int dst_stride, unsigned int dst_stride,
unsigned int output_width, unsigned int output_width,
unsigned int output_height) { unsigned int output_height) {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) { if (UUT_->use_highbd_ == 0) {
filter_average_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, filter_average_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
dst_ptr, dst_stride, output_width, dst_ptr, dst_stride, output_width,
...@@ -524,7 +524,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -524,7 +524,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
unsigned int dst_stride, unsigned int dst_stride,
unsigned int output_width, unsigned int output_width,
unsigned int output_height) { unsigned int output_height) {
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) { if (UUT_->use_highbd_ == 0) {
filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter, filter_block2d_8_c(src_ptr, src_stride, HFilter, VFilter,
dst_ptr, dst_stride, output_width, output_height); dst_ptr, dst_stride, output_width, output_height);
...@@ -544,7 +544,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -544,7 +544,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
static uint8_t* input_; static uint8_t* input_;
static uint8_t* output_; static uint8_t* output_;
static uint8_t* output_ref_; static uint8_t* output_ref_;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
static uint16_t* input16_; static uint16_t* input16_;
static uint16_t* output16_; static uint16_t* output16_;
static uint16_t* output16_ref_; static uint16_t* output16_ref_;
...@@ -555,7 +555,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> { ...@@ -555,7 +555,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
uint8_t* ConvolveTest::input_ = NULL; uint8_t* ConvolveTest::input_ = NULL;
uint8_t* ConvolveTest::output_ = NULL; uint8_t* ConvolveTest::output_ = NULL;
uint8_t* ConvolveTest::output_ref_ = NULL; uint8_t* ConvolveTest::output_ref_ = NULL;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
uint16_t* ConvolveTest::input16_ = NULL; uint16_t* ConvolveTest::input16_ = NULL;
uint16_t* ConvolveTest::output16_ = NULL; uint16_t* ConvolveTest::output16_ = NULL;
uint16_t* ConvolveTest::output16_ref_ = NULL; uint16_t* ConvolveTest::output16_ref_ = NULL;
...@@ -685,7 +685,7 @@ const int16_t kInvalidFilter[8] = { 0 }; ...@@ -685,7 +685,7 @@ const int16_t kInvalidFilter[8] = { 0 };
TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) { TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
uint8_t* const in = input(); uint8_t* const in = input();
uint8_t* const out = output(); uint8_t* const out = output();
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension]; uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension]; uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t* ref; uint8_t* ref;
...@@ -747,7 +747,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) { ...@@ -747,7 +747,7 @@ TEST_P(ConvolveTest, MatchesReferenceSubpixelFilter) {
TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) { TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
uint8_t* const in = input(); uint8_t* const in = input();
uint8_t* const out = output(); uint8_t* const out = output();
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
uint8_t ref8[kOutputStride * kMaxDimension]; uint8_t ref8[kOutputStride * kMaxDimension];
uint16_t ref16[kOutputStride * kMaxDimension]; uint16_t ref16[kOutputStride * kMaxDimension];
uint8_t* ref; uint8_t* ref;
...@@ -765,7 +765,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) { ...@@ -765,7 +765,7 @@ TEST_P(ConvolveTest, MatchesReferenceAveragingSubpixelFilter) {
for (int y = 0; y < Height(); ++y) { for (int y = 0; y < Height(); ++y) {
for (int x = 0; x < Width(); ++x) { for (int x = 0; x < Width(); ++x) {
uint16_t r; uint16_t r;
#if CONFIG_VP9_HIGHBITDEPTH #if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) { if (UUT_->use_highbd_ == 0 || UUT_->use_highbd_ == 8) {
r = prng.Rand8Extremes();