vp9-highbitdepth -> vpx-highbitdepth

Change-Id: I1e90cf7ab4bb02c0ef119b0bd1596771edefedff
This commit is contained in:
Yaowu Xu 2016-07-29 13:17:22 -07:00
parent cbed16b8b3
commit 7e89c102c4
154 changed files with 1148 additions and 1149 deletions

6
configure vendored
View File

@ -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 high bit depth (10/12) profiles
${toggle_vpx_highbitdepth} use VPX high bit depth (10/12) profiles
${toggle_better_hw_compatibility}
enable encoder to produce streams with better
hardware decoder compatibility
@ -324,7 +324,7 @@ CONFIG_LIST="
temporal_denoising
vp9_temporal_denoising
coefficient_range_checking
vp9_highbitdepth
vpx_highbitdepth
better_hw_compatibility
experimental
size_limit
@ -384,7 +384,7 @@ CMDLINE_SELECT="
vp9_temporal_denoising
coefficient_range_checking
better_hw_compatibility
vp9_highbitdepth
vpx_highbitdepth
experimental
"

View File

@ -517,13 +517,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;
@ -531,7 +531,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]);
@ -539,7 +539,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]);
@ -563,7 +563,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;
@ -590,7 +590,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);
@ -603,13 +603,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);
@ -697,13 +697,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) {

View File

@ -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[] = {
@ -223,7 +223,7 @@ TEST_P(ArfFreqTestLarge, MinArfFreqTest) {
}
}
#if CONFIG_VP9_HIGHBITDEPTH || CONFIG_EXT_REFS
#if CONFIG_VPX_HIGHBITDEPTH || CONFIG_EXT_REFS
#if CONFIG_VP10_ENCODER
// TODO(angiebird): 25-29 fail in high bitdepth mode.
// TODO(zoeliu): This ArfFreqTest does not work with BWDREF_FRAME, as
@ -245,5 +245,5 @@ VP10_INSTANTIATE_TEST_CASE(
::testing::ValuesIn(kTestVectors),
::testing::ValuesIn(kEncodeVectors),
::testing::ValuesIn(kMinArfVectors));
#endif // CONFIG_VP9_HIGHBITDEPTH || CONFIG_EXT_REFS
#endif // CONFIG_VPX_HIGHBITDEPTH || CONFIG_EXT_REFS
} // namespace

View File

@ -218,7 +218,7 @@ INSTANTIATE_TEST_CASE_P(
TestFuncs(blend_a64_vmask_ref, vpx_blend_a64_vmask_sse4_1)));
#endif // HAVE_SSE4_1
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
//////////////////////////////////////////////////////////////////////////////
// High bit-depth version
//////////////////////////////////////////////////////////////////////////////
@ -363,5 +363,5 @@ INSTANTIATE_TEST_CASE_P(
vpx_highbd_blend_a64_vmask_sse4_1)));
#endif // HAVE_SSE4_1
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -187,7 +187,7 @@ INSTANTIATE_TEST_CASE_P(
TestFuncs(vpx_blend_a64_mask_c, vpx_blend_a64_mask_sse4_1)));
#endif // HAVE_SSE4_1
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
//////////////////////////////////////////////////////////////////////////////
// High bit-depth version
//////////////////////////////////////////////////////////////////////////////
@ -284,5 +284,5 @@ INSTANTIATE_TEST_CASE_P(
TestFuncsHBD(vpx_highbd_blend_a64_mask_c,
vpx_highbd_blend_a64_mask_sse4_1)));
#endif // HAVE_SSE4_1
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -222,7 +222,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,
@ -342,7 +342,7 @@ void highbd_filter_average_block2d_8_c(const uint16_t *src_ptr,
highbd_block2d_average_c(tmp, kMaxDimension, dst_ptr, dst_stride,
output_width, output_height);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
public:
@ -354,7 +354,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;
@ -374,7 +374,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_);
@ -409,7 +409,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
@ -427,12 +427,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
}
@ -441,14 +441,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 * sizeof(output16_ref_[0]));
#endif
@ -463,7 +463,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
uint8_t *input() const {
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return input_ + offset;
} else {
@ -476,7 +476,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
uint8_t *output() const {
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ + offset;
} else {
@ -489,7 +489,7 @@ class ConvolveTest : public ::testing::TestWithParam<ConvolveParam> {
uint8_t *output_ref() const {
const int offset = BorderTop() * kOuterBlockSize + BorderLeft();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (UUT_->use_highbd_ == 0) {
return output_ref_ + offset;
} else {
@ -501,7 +501,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 {
@ -513,7 +513,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 {
@ -532,7 +532,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,
@ -559,7 +559,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);
@ -579,7 +579,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_;
@ -590,7 +590,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;
@ -720,7 +720,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;
@ -782,7 +782,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;
@ -800,7 +800,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 {
@ -864,7 +864,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;
@ -882,7 +882,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 {
@ -901,7 +901,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
@ -994,7 +994,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, \
@ -1105,7 +1105,7 @@ INSTANTIATE_TEST_CASE_P(C, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_c));
#if HAVE_SSE2 && ARCH_X86_64
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const ConvolveFunctions convolve8_sse2(
wrap_convolve_copy_sse2_8, wrap_convolve_avg_sse2_8,
wrap_convolve8_horiz_sse2_8, wrap_convolve8_avg_horiz_sse2_8,
@ -1146,7 +1146,7 @@ const ConvolveFunctions convolve8_sse2(
vpx_scaled_2d_c, vpx_scaled_avg_2d_c, 0);
const ConvolveParam kArrayConvolve_sse2[] = { ALL_SIZES(convolve8_sse2) };
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(SSE2, ConvolveTest,
::testing::ValuesIn(kArrayConvolve_sse2));
#endif

View File

@ -258,7 +258,7 @@ void iht16x16_ref(const tran_low_t *in, uint8_t *dest, int stride,
vp10_iht16x16_256_add_c(in, dest, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct16x16_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct16x16_256_add_c(in, out, stride, 10);
}
@ -310,7 +310,7 @@ void idct16x16_10_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct16x16_10_add_sse2(in, out, stride, 12);
}
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class Trans16x16TestBase {
public:
@ -331,7 +331,7 @@ class Trans16x16TestBase {
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
@ -342,7 +342,7 @@ class Trans16x16TestBase {
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_;
@ -356,7 +356,7 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -364,7 +364,7 @@ class Trans16x16TestBase {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -446,7 +446,7 @@ class Trans16x16TestBase {
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
#endif
@ -468,7 +468,7 @@ class Trans16x16TestBase {
// clear reconstructed pixel buffers
memset(dst, 0, kNumCoeffs * sizeof(uint8_t));
memset(ref, 0, kNumCoeffs * sizeof(uint8_t));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
memset(dst16, 0, kNumCoeffs * sizeof(uint16_t));
memset(ref16, 0, kNumCoeffs * sizeof(uint16_t));
#endif
@ -480,7 +480,7 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
inv_txfm_ref(output_ref_block, ref, pitch_, tx_type_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(output_ref_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
inv_txfm_ref(output_ref_block, CONVERT_TO_BYTEPTR(ref16), pitch_,
tx_type_);
@ -491,7 +491,7 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
for (int j = 0; j < kNumCoeffs; ++j)
EXPECT_EQ(ref[j], dst[j]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
for (int j = 0; j < kNumCoeffs; ++j)
EXPECT_EQ(ref16[j], dst16[j]);
@ -507,10 +507,10 @@ class Trans16x16TestBase {
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 // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int i = 0; i < count_test_block; ++i) {
double out_r[kNumCoeffs];
@ -521,12 +521,12 @@ class Trans16x16TestBase {
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_;
in[j] = src16[j] - dst16[j];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -536,20 +536,20 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, 16));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
16));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
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
const uint32_t diff = dst[j] - src[j];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const uint32_t error = diff * diff;
EXPECT_GE(1u, error)
<< "Error: 16x16 IDCT has error " << error
@ -566,10 +566,10 @@ class Trans16x16TestBase {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int i = 0; i < count_test_block; ++i) {
for (int j = 0; j < kNumCoeffs; ++j) {
@ -582,31 +582,31 @@ class Trans16x16TestBase {
if (bit_depth_ == VPX_BITS_8) {
dst[j] = 0;
ref[j] = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
dst16[j] = 0;
ref16[j] = 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
if (bit_depth_ == VPX_BITS_8) {
ref_txfm(coeff, ref, pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
} else {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
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] - ref[j] : dst16[j] - ref16[j];
#else
const uint32_t diff = dst[j] - ref[j];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const uint32_t error = diff * diff;
EXPECT_EQ(0u, error)
<< "Error: 16x16 IDCT Comparison has error " << error
@ -638,7 +638,7 @@ class Trans16x16DCT
fwd_txfm_ref = fdct16x16_ref;
inv_txfm_ref = idct16x16_ref;
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth_) {
case VPX_BITS_10:
inv_txfm_ref = idct16x16_10_ref;
@ -705,7 +705,7 @@ class Trans16x16HT
fwd_txfm_ref = fht16x16_ref;
inv_txfm_ref = iht16x16_ref;
mask_ = (1 << bit_depth_) - 1;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth_) {
case VPX_BITS_10:
inv_txfm_ref = iht16x16_10;
@ -802,7 +802,7 @@ class PartialTrans16x16Test
};
TEST_P(PartialTrans16x16Test, Extremes) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -824,7 +824,7 @@ TEST_P(PartialTrans16x16Test, Extremes) {
}
TEST_P(PartialTrans16x16Test, Random) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -847,7 +847,7 @@ TEST_P(PartialTrans16x16Test, Random) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans16x16DCT,
::testing::Values(
@ -859,9 +859,9 @@ INSTANTIATE_TEST_CASE_P(
C, Trans16x16DCT,
::testing::Values(
make_tuple(&vpx_fdct16x16_c, &vpx_idct16x16_256_add_c, 0, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans16x16HT,
::testing::Values(
@ -893,9 +893,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(C, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_c,
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, Trans16x16DCT,
::testing::Values(
@ -903,7 +903,7 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct16x16_256_add_neon, 0, VPX_BITS_8)));
#endif
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans16x16DCT,
::testing::Values(
@ -923,9 +923,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_sse2,
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, Trans16x16DCT,
::testing::Values(
@ -966,9 +966,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_sse2,
VPX_BITS_8)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && 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, Trans16x16DCT,
::testing::Values(
@ -988,5 +988,5 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(MSA, PartialTrans16x16Test,
::testing::Values(make_tuple(&vpx_fdct16x16_1_msa,
VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -73,7 +73,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_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct32x32_1024_add_c(in, out, stride, 10);
}
@ -81,7 +81,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:
@ -114,7 +114,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
@ -126,7 +126,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_;
@ -138,7 +138,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));
@ -146,7 +146,7 @@ TEST_P(Trans32x32Test, AccuracyCheck) {
}
for (int j = 0; j < kNumCoeffs; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t diff =
bit_depth_ == VPX_BITS_8 ? dst[j] - src[j] : dst16[j] - src16[j];
#else
@ -250,7 +250,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
@ -264,7 +264,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_;
@ -278,13 +278,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
@ -316,7 +316,7 @@ class PartialTrans32x32Test
};
TEST_P(PartialTrans32x32Test, Extremes) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -338,7 +338,7 @@ TEST_P(PartialTrans32x32Test, Extremes) {
}
TEST_P(PartialTrans32x32Test, Random) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int16_t maxval =
static_cast<int16_t>(clip_pixel_highbd(1 << 30, bit_depth_));
#else
@ -361,7 +361,7 @@ TEST_P(PartialTrans32x32Test, Random) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans32x32Test,
::testing::Values(
@ -393,9 +393,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(C, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_c,
VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans32x32Test,
::testing::Values(
@ -403,9 +403,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 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON && !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(
@ -416,9 +416,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2,
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(
@ -435,9 +435,9 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(SSE2, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_sse2,
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(
@ -445,9 +445,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(
@ -458,5 +458,5 @@ INSTANTIATE_TEST_CASE_P(
INSTANTIATE_TEST_CASE_P(MSA, PartialTrans32x32Test,
::testing::Values(make_tuple(&vpx_fdct32x32_1_msa,
VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -29,7 +29,7 @@ const double kPsnrThreshold[][5] = {
// VP10 HBD average PSNR is slightly lower than VP9.
// We make two cases here to enable the testing and
// guard picture quality.
#if CONFIG_VP10_ENCODER && CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VP10_ENCODER && CONFIG_VPX_HIGHBITDEPTH
{ 36.0, 37.0, 37.0, 37.0, 37.0 },
{ 31.0, 36.0, 36.0, 36.0, 36.0 },
{ 31.0, 35.0, 35.0, 35.0, 35.0 },
@ -47,7 +47,7 @@ const double kPsnrThreshold[][5] = {
{ 31.0, 32.0, 32.0, 32.0, 32.0 },
{ 30.0, 31.0, 31.0, 31.0, 31.0 },
{ 29.0, 30.0, 30.0, 30.0, 30.0 },
#endif // CONFIG_VP9_HIGHBITDEPTH && CONFIG_VP10_ENCODER
#endif // CONFIG_VPX_HIGHBITDEPTH && CONFIG_VP10_ENCODER
};
typedef struct {
@ -63,7 +63,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},
@ -72,7 +72,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

View File

@ -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,
@ -171,5 +171,5 @@ INSTANTIATE_TEST_CASE_P(
&vp10_highbd_block_error_c, VPX_BITS_8)));
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -54,7 +54,7 @@ void fwht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
vp10_fwht4x4_c(in, out, stride);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct4x4_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct4x4_16_add_c(in, out, stride, 10);
}
@ -88,7 +88,7 @@ void idct4x4_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct4x4_16_add_sse2(in, out, stride, 12);
}
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class Trans4x4DCT
@ -231,7 +231,7 @@ TEST_P(Trans4x4WHT, InvAccuracyCheck) {
}
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4DCT,
::testing::Values(
@ -243,9 +243,9 @@ INSTANTIATE_TEST_CASE_P(
C, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_fdct4x4_c, &vpx_idct4x4_16_add_c, 0, VPX_BITS_8, 16)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4HT,
::testing::Values(
@ -269,9 +269,9 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 1, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_c, 3, VPX_BITS_8, 16)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, Trans4x4WHT,
::testing::Values(
@ -283,17 +283,17 @@ INSTANTIATE_TEST_CASE_P(
C, Trans4x4WHT,
::testing::Values(
make_tuple(&vp10_fwht4x4_c, &vpx_iwht4x4_16_add_c, 0, VPX_BITS_8, 16)));
#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, Trans4x4DCT,
::testing::Values(
make_tuple(&vpx_fdct4x4_c,
&vpx_idct4x4_16_add_neon, 0, VPX_BITS_8, 16)));
#endif // HAVE_NEON_ASM && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON_ASM && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, Trans4x4HT,
::testing::Values(
@ -305,7 +305,7 @@ INSTANTIATE_TEST_CASE_P(
2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_c, &vp10_iht4x4_16_add_neon,
3, VPX_BITS_8, 16)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
@ -317,7 +317,7 @@ INSTANTIATE_TEST_CASE_P(
0, VPX_BITS_8, 16)));
#endif
#if HAVE_SSE2 && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSE2 && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSE2, Trans4x4DCT,
::testing::Values(
@ -334,9 +334,9 @@ INSTANTIATE_TEST_CASE_P(
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_sse2, 3,
VPX_BITS_8, 16)));
#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, Trans4x4DCT,
::testing::Values(
@ -362,9 +362,9 @@ INSTANTIATE_TEST_CASE_P(
2, VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_sse2, &vp10_iht4x4_16_add_c,
3, VPX_BITS_8, 16)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && 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, Trans4x4DCT,
::testing::Values(
@ -381,5 +381,5 @@ INSTANTIATE_TEST_CASE_P(
VPX_BITS_8, 16),
make_tuple(&vp10_fht4x4_msa, &vp10_iht4x4_16_add_msa, 3,
VPX_BITS_8, 16)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -91,7 +91,7 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
vp10_fht8x8_c(in, out, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void idct8x8_10(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct8x8_64_add_c(in, out, stride, 10);
}
@ -134,7 +134,7 @@ void idct8x8_64_add_12_sse2(const tran_low_t *in, uint8_t *out, int stride) {
vpx_highbd_idct8x8_64_add_sse2(in, out, stride, 12);
}
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class FwdTrans8x8TestBase {
public:
@ -221,7 +221,7 @@ class FwdTrans8x8TestBase {
DECLARE_ALIGNED(16, tran_low_t, test_temp_block[64]);
DECLARE_ALIGNED(16, uint8_t, dst[64]);
DECLARE_ALIGNED(16, uint8_t, src[64]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[64]);
DECLARE_ALIGNED(16, uint16_t, src16[64]);
#endif
@ -233,7 +233,7 @@ class FwdTrans8x8TestBase {
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_;
@ -258,7 +258,7 @@ class FwdTrans8x8TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -266,7 +266,7 @@ class FwdTrans8x8TestBase {
}
for (int j = 0; j < 64; ++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
@ -299,7 +299,7 @@ class FwdTrans8x8TestBase {
DECLARE_ALIGNED(16, tran_low_t, ref_temp_block[64]);
DECLARE_ALIGNED(16, uint8_t, dst[64]);
DECLARE_ALIGNED(16, uint8_t, src[64]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[64]);
DECLARE_ALIGNED(16, uint16_t, src16[64]);
#endif
@ -319,7 +319,7 @@ class FwdTrans8x8TestBase {
dst[j] = rnd.Rand8() % 2 ? 255 : 0;
}
test_input_block[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
if (i == 0) {
src16[j] = mask_;
@ -343,7 +343,7 @@ class FwdTrans8x8TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(
RunInvTxfm(test_temp_block, CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -351,7 +351,7 @@ class FwdTrans8x8TestBase {
}
for (int j = 0; j < 64; ++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
@ -387,7 +387,7 @@ class FwdTrans8x8TestBase {
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, src16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
#endif
@ -401,7 +401,7 @@ class FwdTrans8x8TestBase {
src[j] = rnd.Rand8() % 2 ? 255 : 0;
dst[j] = src[j] > 0 ? 0 : 255;
in[j] = src[j] - dst[j];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src16[j] = rnd.Rand8() % 2 ? mask_ : 0;
dst16[j] = src16[j] > 0 ? 0 : mask_;
@ -416,7 +416,7 @@ class FwdTrans8x8TestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
@ -424,7 +424,7 @@ class FwdTrans8x8TestBase {
}
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
@ -474,7 +474,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
DECLARE_ALIGNED(16, tran_low_t, coeff[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, dst[kNumCoeffs]);
DECLARE_ALIGNED(16, uint8_t, ref[kNumCoeffs]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, dst16[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref16[kNumCoeffs]);
#endif
@ -491,7 +491,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
if (bit_depth_ == VPX_BITS_8) {
dst[j] = 0;
ref[j] = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
dst16[j] = 0;
ref16[j] = 0;
@ -501,7 +501,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
if (bit_depth_ == VPX_BITS_8) {
ref_txfm(coeff, ref, pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ref_txfm(coeff, CONVERT_TO_BYTEPTR(ref16), pitch_);
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
@ -510,7 +510,7 @@ void CompareInvReference(IdctFunc ref_txfm, int thresh) {
}
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] - ref[j] : dst16[j] - ref16[j];
#else
@ -656,7 +656,7 @@ TEST_P(InvTrans8x8DCT, CompareReference) {
using std::tr1::make_tuple;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8DCT,
::testing::Values(
@ -668,9 +668,9 @@ INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8DCT,
::testing::Values(
make_tuple(&vpx_fdct8x8_c, &vpx_idct8x8_64_add_c, 0, VPX_BITS_8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
C, FwdTrans8x8HT,
::testing::Values(
@ -694,17 +694,17 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_c, 3, 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, FwdTrans8x8DCT,
::testing::Values(
make_tuple(&vpx_fdct8x8_neon, &vpx_idct8x8_64_add_neon, 0,
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_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, FwdTrans8x8HT,
::testing::Values(
@ -712,9 +712,9 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_c, &vp10_iht8x8_64_add_neon, 3, VPX_BITS_8)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON && !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, FwdTrans8x8DCT,
::testing::Values(
@ -731,9 +731,9 @@ INSTANTIATE_TEST_CASE_P(
2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_sse2, &vp10_iht8x8_64_add_sse2,
3, 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, FwdTrans8x8DCT,
::testing::Values(
@ -768,10 +768,10 @@ INSTANTIATE_TEST_CASE_P(
&idct8x8_10_add_12_sse2, 6225, VPX_BITS_12),
make_tuple(&idct8x8_12,
&idct8x8_64_add_12_sse2, 6225, VPX_BITS_12)));
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_SSE2 && CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_SSSE3 && ARCH_X86_64 && \
!CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
!CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSSE3, FwdTrans8x8DCT,
::testing::Values(
@ -779,7 +779,7 @@ INSTANTIATE_TEST_CASE_P(
VPX_BITS_8)));
#endif
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, FwdTrans8x8DCT,
::testing::Values(
@ -791,5 +791,5 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 1, VPX_BITS_8),
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 2, VPX_BITS_8),
make_tuple(&vp10_fht8x8_msa, &vp10_iht8x8_64_add_msa, 3, VPX_BITS_8)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -125,7 +125,7 @@ TEST_P(VP9IntraPredTest, IntraPredTests) {
}
#if HAVE_SSE2
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(SSE2_TO_C_8, VP9IntraPredTest,
::testing::Values(
IntraPredFunc(&vpx_highbd_dc_predictor_32x32_sse2,
@ -207,6 +207,6 @@ INSTANTIATE_TEST_CASE_P(SSE2_TO_C_12, VP9IntraPredTest,
IntraPredFunc(&vpx_highbd_tm_predictor_8x8_sse2,
&vpx_highbd_tm_predictor_8x8_c, 8, 12)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSE2
} // namespace

View File

@ -34,7 +34,7 @@ const int kNumCoeffs = 1024;
const int number_of_iterations = 10000;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*loop_op_t)(uint16_t *s, int p, const uint8_t *blimit,
const uint8_t *limit, const uint8_t *thresh,
int bd);
@ -49,7 +49,7 @@ typedef void (*dual_loop_op_t)(uint8_t *s, int p, const uint8_t *blimit0,
const uint8_t *limit0, const uint8_t *thresh0,
const uint8_t *blimit1, const uint8_t *limit1,
const uint8_t *thresh1);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
typedef std::tr1::tuple<loop_op_t, loop_op_t, int> loop8_param_t;
typedef std::tr1::tuple<dual_loop_op_t, dual_loop_op_t, int> dualloop8_param_t;
@ -95,14 +95,14 @@ class Loop8Test9Param : public ::testing::TestWithParam<dualloop8_param_t> {
TEST_P(Loop8Test6Param, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int32_t bd = bit_depth_;
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
for (int i = 0; i < count_test_block; ++i) {
@ -153,7 +153,7 @@ TEST_P(Loop8Test6Param, OperationCheck) {
}
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, bd);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, bd));
@ -161,7 +161,7 @@ TEST_P(Loop8Test6Param, OperationCheck) {
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
@ -180,14 +180,14 @@ TEST_P(Loop8Test6Param, OperationCheck) {
TEST_P(Loop8Test6Param, ValueCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t bd = bit_depth_;
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
@ -225,7 +225,7 @@ TEST_P(Loop8Test6Param, ValueCheck) {
s[j] = rnd.Rand16() & mask_;
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit, limit, thresh, bd);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh, bd));
@ -233,7 +233,7 @@ TEST_P(Loop8Test6Param, ValueCheck) {
ref_loopfilter_op_(ref_s+8+p*8, p, blimit, limit, thresh);
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit, limit, thresh));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
@ -251,14 +251,14 @@ TEST_P(Loop8Test6Param, ValueCheck) {
TEST_P(Loop8Test9Param, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t bd = bit_depth_;
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
for (int i = 0; i < count_test_block; ++i) {
@ -324,7 +324,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
}
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1, bd);
ASM_REGISTER_STATE_CHECK(
@ -336,7 +336,7 @@ TEST_P(Loop8Test9Param, OperationCheck) {
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
@ -354,13 +354,13 @@ TEST_P(Loop8Test9Param, OperationCheck) {
TEST_P(Loop8Test9Param, ValueCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, s[kNumCoeffs]);
DECLARE_ALIGNED(16, uint16_t, ref_s[kNumCoeffs]);
#else
DECLARE_ALIGNED(8, uint8_t, s[kNumCoeffs]);
DECLARE_ALIGNED(8, uint8_t, ref_s[kNumCoeffs]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
int err_count_total = 0;
int first_failure = -1;
for (int i = 0; i < count_test_block; ++i) {
@ -400,7 +400,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
s[j] = rnd.Rand16() & mask_;
ref_s[j] = s[j];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int32_t bd = bit_depth_;
ref_loopfilter_op_(ref_s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1, bd);
@ -413,7 +413,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
ASM_REGISTER_STATE_CHECK(
loopfilter_op_(s + 8 + p * 8, p, blimit0, limit0, thresh0,
blimit1, limit1, thresh1));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int j = 0; j < kNumCoeffs; ++j) {
err_count += ref_s[j] != s[j];
}
@ -431,7 +431,7 @@ TEST_P(Loop8Test9Param, ValueCheck) {
using std::tr1::make_tuple;
#if HAVE_SSE2
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSE2, Loop8Test6Param,
::testing::Values(
@ -503,10 +503,10 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_16_c, 8),
make_tuple(&vpx_lpf_vertical_16_dual_sse2,
&vpx_lpf_vertical_16_dual_c, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif
#if HAVE_AVX2 && (!CONFIG_VP9_HIGHBITDEPTH)
#if HAVE_AVX2 && (!CONFIG_VPX_HIGHBITDEPTH)
INSTANTIATE_TEST_CASE_P(
AVX2, Loop8Test6Param,
::testing::Values(
@ -517,7 +517,7 @@ INSTANTIATE_TEST_CASE_P(
#endif
#if HAVE_SSE2
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSE2, Loop8Test9Param,
::testing::Values(
@ -557,11 +557,11 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_8_dual_sse2,
&vpx_lpf_vertical_8_dual_c, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif
#if HAVE_NEON
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// No neon high bitdepth functions.
#else
INSTANTIATE_TEST_CASE_P(
@ -600,10 +600,10 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_horizontal_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_4_dual_neon,
&vpx_lpf_vertical_4_dual_c, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_NEON
#if HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
#if HAVE_DSPR2 && !CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
DSPR2, Loop8Test6Param,
::testing::Values(
@ -635,9 +635,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_8_dual_dspr2,
&vpx_lpf_vertical_8_dual_c, 8)));
#endif // HAVE_DSPR2 && !CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_DSPR2 && !CONFIG_VPX_HIGHBITDEPTH
#if HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
#if HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH)
INSTANTIATE_TEST_CASE_P(
MSA, Loop8Test6Param,
::testing::Values(
@ -667,6 +667,6 @@ INSTANTIATE_TEST_CASE_P(
&vpx_lpf_vertical_4_dual_c, 8),
make_tuple(&vpx_lpf_vertical_8_dual_msa,
&vpx_lpf_vertical_8_dual_c, 8)));
#endif // HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH)
#endif // HAVE_MSA && (!CONFIG_VPX_HIGHBITDEPTH)
} // namespace

View File

@ -82,7 +82,7 @@ TEST_P(MaskedSADTest, OperationCheck) {
<< "First failed at test case " << first_failure;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef unsigned int (*HighbdMaskedSADFunc)(const uint8_t *a, int a_stride,
const uint8_t *b, int b_stride,
const uint8_t *m, int m_stride);
@ -140,7 +140,7 @@ TEST_P(HighbdMaskedSADTest, OperationCheck) {
<< "Error: High BD Masked SAD Test, C output doesn't match SSSE3 output. "
<< "First failed at test case " << first_failure;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
@ -182,7 +182,7 @@ INSTANTIATE_TEST_CASE_P(
&vpx_masked_sad4x8_c),
make_tuple(&vpx_masked_sad4x4_ssse3,
&vpx_masked_sad4x4_c)));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, HighbdMaskedSADTest,
::testing::Values(
@ -220,6 +220,6 @@ INSTANTIATE_TEST_CASE_P(
&vpx_highbd_masked_sad4x8_c),
make_tuple(&vpx_highbd_masked_sad4x4_ssse3,
&vpx_highbd_masked_sad4x4_c)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSSE3
} // namespace

View File

@ -270,7 +270,7 @@ TEST_P(MaskedSubPixelVarianceTest, ExtremeValues) {
<< " y_offset = " << first_failure_y;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef std::tr1::tuple<MaskedVarianceFunc,
MaskedVarianceFunc,
vpx_bit_depth_t> HighbdMaskedVarianceParam;
@ -517,7 +517,7 @@ TEST_P(HighbdMaskedSubPixelVarianceTest, ExtremeValues) {
<< " x_offset = " << first_failure_x
<< " y_offset = " << first_failure_y;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
@ -598,7 +598,7 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(&vpx_masked_sub_pixel_variance4x4_ssse3,
&vpx_masked_sub_pixel_variance4x4_c)));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSSE3_C_COMPARE, HighbdMaskedVarianceTest,
::testing::Values(
@ -810,7 +810,7 @@ INSTANTIATE_TEST_CASE_P(
&vpx_highbd_12_masked_sub_pixel_variance4x8_c, VPX_BITS_12),
make_tuple(&vpx_highbd_12_masked_sub_pixel_variance4x4_ssse3,
&vpx_highbd_12_masked_sub_pixel_variance4x4_c, VPX_BITS_12)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSSE3
} // namespace

View File

@ -112,7 +112,7 @@ INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcSadTest,
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
class ObmcSadHBDTest : public FunctionEquivalenceTest<ObmcSadF> {};
TEST_P(ObmcSadHBDTest, RandomValues) {
@ -188,5 +188,5 @@ ObmcSadHBDTest::ParamType sse4_functions_hbd[] = {
INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcSadHBDTest,
::testing::ValuesIn(sse4_functions_hbd));
#endif // HAVE_SSE4_1
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -121,7 +121,7 @@ INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcVarianceTest,
// High bit-depth
////////////////////////////////////////////////////////////////////////////////
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
class ObmcVarianceHBDTest : public FunctionEquivalenceTest<ObmcVarF> {};
TEST_P(ObmcVarianceHBDTest, RandomValues) {
@ -290,5 +290,5 @@ ObmcVarianceHBDTest::ParamType sse4_functions_hbd[] = {
INSTANTIATE_TEST_CASE_P(SSE4_1_C_COMPARE, ObmcVarianceHBDTest,
::testing::ValuesIn(sse4_functions_hbd));
#endif // HAVE_SSE4_1
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -231,7 +231,7 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct4x4_1_add_c,
TX_4X4, 1)));
#if HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_NEON && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
NEON, PartialIDctTest,
::testing::Values(
@ -259,9 +259,9 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct4x4_16_add_c,
&vpx_idct4x4_1_add_neon,
TX_4X4, 1)));
#endif // HAVE_NEON && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_NEON && !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, PartialIDctTest,
::testing::Values(
@ -296,7 +296,7 @@ INSTANTIATE_TEST_CASE_P(
#endif
#if HAVE_SSSE3 && ARCH_X86_64 && \
!CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
!CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
SSSE3_64, PartialIDctTest,
::testing::Values(
@ -306,7 +306,7 @@ INSTANTIATE_TEST_CASE_P(
TX_8X8, 12)));
#endif
#if HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#if HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
INSTANTIATE_TEST_CASE_P(
MSA, PartialIDctTest,
::testing::Values(
@ -338,6 +338,6 @@ INSTANTIATE_TEST_CASE_P(
&vpx_idct4x4_16_add_c,
&vpx_idct4x4_1_add_msa,
TX_4X4, 1)));
#endif // HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
#endif // HAVE_MSA && !CONFIG_VPX_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
} // namespace

View File

@ -100,14 +100,14 @@ class SADTestBase : public ::testing::Test {
source_data_ = source_data8_;
reference_data_ = reference_data8_;
second_pred_ = second_pred8_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
use_high_bit_depth_ = true;
bit_depth_ = static_cast<vpx_bit_depth_t>(bd_);
source_data_ = CONVERT_TO_BYTEPTR(source_data16_);
reference_data_ = CONVERT_TO_BYTEPTR(reference_data16_);
second_pred_ = CONVERT_TO_BYTEPTR(second_pred16_);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
mask_ = (1 << bit_depth_) - 1;
source_stride_ = (width_ + 31) & ~31;
@ -116,11 +116,11 @@ class SADTestBase : public ::testing::Test {
}
virtual uint8_t *GetReference(int block_idx) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (use_high_bit_depth_)
return CONVERT_TO_BYTEPTR(CONVERT_TO_SHORTPTR(reference_data_) +
block_idx * kDataBlockSize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
return reference_data_ + block_idx * kDataBlockSize;
}
@ -130,21 +130,21 @@ class SADTestBase : public ::testing::Test {
unsigned int sad = 0;
const uint8_t *const reference8 = GetReference(block_idx);
const uint8_t *const source8 = source_data_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint16_t *const reference16 =
CONVERT_TO_SHORTPTR(GetReference(block_idx));
const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
sad += abs(source8[h * source_stride_ + w] -
reference8[h * reference_stride_ + w]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
sad += abs(source16[h * source_stride_ + w] -
reference16[h * reference_stride_ + w]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -159,12 +159,12 @@ class SADTestBase : public ::testing::Test {
const uint8_t *const reference8 = GetReference(block_idx);
const uint8_t *const source8 = source_data_;
const uint8_t *const second_pred8 = second_pred_;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint16_t *const reference16 =
CONVERT_TO_SHORTPTR(GetReference(block_idx));
const uint16_t *const source16 = CONVERT_TO_SHORTPTR(source_data_);
const uint16_t *const second_pred16 = CONVERT_TO_SHORTPTR(second_pred_);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
@ -172,13 +172,13 @@ class SADTestBase : public ::testing::Test {
reference8[h * reference_stride_ + w];
const uint8_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
sad += abs(source8[h * source_stride_ + w] - comp_pred);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
const int tmp = second_pred16[h * width_ + w] +
reference16[h * reference_stride_ + w];
const uint16_t comp_pred = ROUND_POWER_OF_TWO(tmp, 1);
sad += abs(source16[h * source_stride_ + w] - comp_pred);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -187,17 +187,17 @@ class SADTestBase : public ::testing::Test {
void FillConstant(uint8_t *data, int stride, uint16_t fill_constant) {
uint8_t *data8 = data;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *data16 = CONVERT_TO_SHORTPTR(data);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
data8[h * stride + w] = static_cast<uint8_t>(fill_constant);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
data16[h * stride + w] = fill_constant;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -205,17 +205,17 @@ class SADTestBase : public ::testing::Test {
void FillRandom(uint8_t *data, int stride) {
uint8_t *data8 = data;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *data16 = CONVERT_TO_SHORTPTR(data);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (int h = 0; h < height_; ++h) {
for (int w = 0; w < width_; ++w) {
if (!use_high_bit_depth_) {
data8[h * stride + w] = rnd_.Rand8();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
data16[h * stride + w] = rnd_.Rand16() & mask_;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -503,7 +503,7 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_c, -1),
make_tuple(4, 8, &vpx_sad4x8_c, -1),
make_tuple(4, 4, &vpx_sad4x4_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_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),
@ -558,7 +558,7 @@ const SadMxNParam c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_c, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8_c, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4_c, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(C, SADTest, ::testing::ValuesIn(c_tests));
@ -581,7 +581,7 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_avg_c, -1),
make_tuple(4, 8, &vpx_sad4x8_avg_c, -1),
make_tuple(4, 4, &vpx_sad4x4_avg_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_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),
@ -636,7 +636,7 @@ const SadMxNAvgParam avg_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_c, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8_avg_c, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4_avg_c, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(C, SADavgTest, ::testing::ValuesIn(avg_c_tests));
@ -659,7 +659,7 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_sad8x4x4d_c, -1),
make_tuple(4, 8, &vpx_sad4x8x4d_c, -1),
make_tuple(4, 4, &vpx_sad4x4x4d_c, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_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),
@ -714,7 +714,7 @@ const SadMxNx4Param x4d_c_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_c, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_c, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_c, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(C, SADx4Test, ::testing::ValuesIn(x4d_c_tests));
@ -769,7 +769,7 @@ const SadMxNParam sse2_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_sse2, -1),
make_tuple(4, 8, &vpx_sad4x8_sse2, -1),
make_tuple(4, 4, &vpx_sad4x4_sse2, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
make_tuple(64, 64, &vpx_highbd_sad64x64_sse2, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_sse2, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_sse2, 8),
@ -803,7 +803,7 @@ const SadMxNParam sse2_tests[] = {
make_tuple(8, 16, &vpx_highbd_sad8x16_sse2, 12),
make_tuple(8, 8, &vpx_highbd_sad8x8_sse2, 12),
make_tuple(8, 4, &vpx_highbd_sad8x4_sse2, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(SSE2, SADTest, ::testing::ValuesIn(sse2_tests));
@ -826,7 +826,7 @@ const SadMxNAvgParam avg_sse2_tests[] = {
make_tuple(8, 4, &vpx_sad8x4_avg_sse2, -1),
make_tuple(4, 8, &vpx_sad4x8_avg_sse2, -1),
make_tuple(4, 4, &vpx_sad4x4_avg_sse2, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
make_tuple(64, 64, &vpx_highbd_sad64x64_avg_sse2, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32_avg_sse2, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64_avg_sse2, 8),
@ -860,7 +860,7 @@ const SadMxNAvgParam avg_sse2_tests[] = {
make_tuple(8, 16, &vpx_highbd_sad8x16_avg_sse2, 12),
make_tuple(8, 8, &vpx_highbd_sad8x8_avg_sse2, 12),
make_tuple(8, 4, &vpx_highbd_sad8x4_avg_sse2, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(SSE2, SADavgTest, ::testing::ValuesIn(avg_sse2_tests));
@ -883,7 +883,7 @@ const SadMxNx4Param x4d_sse2_tests[] = {
make_tuple(8, 4, &vpx_sad8x4x4d_sse2, -1),
make_tuple(4, 8, &vpx_sad4x8x4d_sse2, -1),
make_tuple(4, 4, &vpx_sad4x4x4d_sse2, -1),
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
make_tuple(64, 64, &vpx_highbd_sad64x64x4d_sse2, 8),
make_tuple(64, 32, &vpx_highbd_sad64x32x4d_sse2, 8),
make_tuple(32, 64, &vpx_highbd_sad32x64x4d_sse2, 8),
@ -923,7 +923,7 @@ const SadMxNx4Param x4d_sse2_tests[] = {
make_tuple(8, 4, &vpx_highbd_sad8x4x4d_sse2, 12),
make_tuple(4, 8, &vpx_highbd_sad4x8x4d_sse2, 12),
make_tuple(4, 4, &vpx_highbd_sad4x4x4d_sse2, 12),
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
};
INSTANTIATE_TEST_CASE_P(SSE2, SADx4Test, ::testing::ValuesIn(x4d_sse2_tests));
#endif // HAVE_SSE2

View File

@ -124,7 +124,7 @@ using ::std::tr1::tuple;
// <width, height, bit_dpeth, subtract>
typedef tuple<int, int, int, HBDSubtractFunc> Params;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
class VP10HBDSubtractBlockTest : public ::testing::TestWithParam<Params> {
public:
virtual void SetUp() {
@ -256,5 +256,5 @@ INSTANTIATE_TEST_CASE_P(SSE2, VP10HBDSubtractBlockTest, ::testing::Values(
make_tuple(128, 128, 12, vpx_highbd_subtract_block_sse2),
make_tuple(128, 128, 12, vpx_highbd_subtract_block_c)));
#endif // HAVE_SSE2
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -154,10 +154,10 @@ LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += obmc_sad_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10_ENCODER) += obmc_variance_test.cc
endif
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
LIBVPX_TEST_SRCS-$(HAVE_SSE4_1) += vp10_quantize_test.cc
LIBVPX_TEST_SRCS-$(HAVE_SSE4_1) += vp10_highbd_iht_test.cc
endif # CONFIG_VP9_HIGHBITDEPTH
endif # CONFIG_VPX_HIGHBITDEPTH
endif # VP10
## Multi-codec / unconditional whitebox tests.
@ -166,7 +166,7 @@ ifeq ($(CONFIG_VP10_ENCODER),yes)
LIBVPX_TEST_SRCS-yes += avg_test.cc
endif
ifeq ($(CONFIG_INTERNAL_STATS),yes)
LIBVPX_TEST_SRCS-$(CONFIG_VP9_HIGHBITDEPTH) += hbd_metrics_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VPX_HIGHBITDEPTH) += hbd_metrics_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP10) += vp10_txfm_test.h

View File

@ -52,7 +52,7 @@ class TransformTestBase {
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
uint8_t *src = reinterpret_cast<uint8_t *>
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *dst16 = reinterpret_cast<uint16_t *>
(vpx_memalign(16, sizeof(uint16_t) * num_coeffs_));
uint16_t *src16 = reinterpret_cast<uint16_t *>
@ -66,7 +66,7 @@ class TransformTestBase {
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_;
@ -79,7 +79,7 @@ class TransformTestBase {
test_temp_block, pitch_));
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(test_temp_block,
CONVERT_TO_BYTEPTR(dst16), pitch_));
@ -87,7 +87,7 @@ class TransformTestBase {
}
for (int j = 0; j < num_coeffs_; ++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
@ -113,7 +113,7 @@ class TransformTestBase {
vpx_free(test_temp_block);
vpx_free(dst);
vpx_free(src);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_free(dst16);
vpx_free(src16);
#endif
@ -205,7 +205,7 @@ class TransformTestBase {
uint8_t *src = reinterpret_cast<uint8_t *>
(vpx_memalign(16, sizeof(uint8_t) * num_coeffs_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *dst16 = reinterpret_cast<uint16_t *>
(vpx_memalign(16, sizeof(uint16_t) * num_coeffs_));
uint16_t *src16 = reinterpret_cast<uint16_t *>
@ -219,7 +219,7 @@ class TransformTestBase {
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_;
@ -232,7 +232,7 @@ class TransformTestBase {
if (bit_depth_ == VPX_BITS_8) {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, dst, pitch_));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
ASM_REGISTER_STATE_CHECK(RunInvTxfm(coeff, CONVERT_TO_BYTEPTR(dst16),
pitch_));
@ -240,7 +240,7 @@ class TransformTestBase {
}
for (int j = 0; j < num_coeffs_; ++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
@ -256,7 +256,7 @@ class TransformTestBase {
vpx_free(coeff);
vpx_free(dst);
vpx_free(src);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_free(src16);
vpx_free(dst16);
#endif

View File

@ -88,13 +88,13 @@ static uint32_t variance_ref(const uint8_t *src, const uint8_t *ref, int l2w,
diff = src[y * src_stride + x] - ref[y * ref_stride + x];
se += diff;
sse += diff * diff;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
diff = CONVERT_TO_SHORTPTR(src)[y * src_stride + x] -
CONVERT_TO_SHORTPTR(ref)[y * ref_stride + x];
se += diff;
sse += diff * diff;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -136,7 +136,7 @@ static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
const int diff = r - src[w * y + x];
se += diff;
sse += diff * diff;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
uint16_t *ref16 = CONVERT_TO_SHORTPTR(ref);
uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
@ -150,7 +150,7 @@ static uint32_t subpel_variance_ref(const uint8_t *ref, const uint8_t *src,
const int diff = r - src16[w * y + x];
se += diff;
sse += diff * diff;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -189,7 +189,7 @@ static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src,
((r + second_pred[w * y + x] + 1) >> 1) - src[w * y + x];
se += diff;
sse += diff * diff;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
const uint16_t *ref16 = CONVERT_TO_SHORTPTR(ref);
const uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
@ -204,7 +204,7 @@ static uint32_t subpel_avg_variance_ref(const uint8_t *ref, const uint8_t *src,
const int diff = ((r + sec16[w * y + x] + 1) >> 1) - src16[w * y + x];
se += diff;
sse += diff * diff;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -309,7 +309,7 @@ class MainTestClass
ref_ = new uint8_t[block_size() * unit];
ASSERT_TRUE(src_ != NULL);
ASSERT_TRUE(ref_ != NULL);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (use_high_bit_depth()) {
// TODO(skal): remove!
src_ = CONVERT_TO_BYTEPTR(src_);
@ -319,7 +319,7 @@ class MainTestClass
}
virtual void TearDown() {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (use_high_bit_depth()) {
// TODO(skal): remove!
src_ = reinterpret_cast<uint8_t *>(CONVERT_TO_SHORTPTR(src_));
@ -400,11 +400,11 @@ void MainTestClass<VarianceFunctionType>::RefTest() {
if (!use_high_bit_depth()) {
src_[j] = rnd_.Rand8();
ref_[j] = rnd_.Rand8();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask();
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask();
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
unsigned int sse1, sse2, var1, var2;
@ -430,11 +430,11 @@ void MainTestClass<VarianceFunctionType>::RefStrideTest() {
if (!use_high_bit_depth()) {
src_[src_ind] = rnd_.Rand8();
ref_[ref_ind] = rnd_.Rand8();
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
CONVERT_TO_SHORTPTR(src_)[src_ind] = rnd_.Rand16() & mask();
CONVERT_TO_SHORTPTR(ref_)[ref_ind] = rnd_.Rand16() & mask();
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
unsigned int sse1, sse2;
@ -457,12 +457,12 @@ void MainTestClass<VarianceFunctionType>::OneQuarterTest() {
memset(src_, 255, block_size());
memset(ref_, 255, half);
memset(ref_ + half, 0, half);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
vpx_memset16(CONVERT_TO_SHORTPTR(src_), 255 << byte_shift(), block_size());
vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 255 << byte_shift(), half);
vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, 0, half);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
unsigned int sse, var, expected;
ASM_REGISTER_STATE_CHECK(
@ -561,7 +561,7 @@ class SubpelVarianceTest
src_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
sec_ = reinterpret_cast<uint8_t *>(vpx_memalign(16, block_size_));
ref_ = new uint8_t[block_size_ + width_ + height_ + 1];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
src_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
vpx_memalign(16, block_size_ * sizeof(uint16_t))));
@ -569,7 +569,7 @@ class SubpelVarianceTest
vpx_memalign(16, block_size_ * sizeof(uint16_t))));
ref_ =
CONVERT_TO_BYTEPTR(new uint16_t[block_size_ + width_ + height_ + 1]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
ASSERT_TRUE(src_ != NULL);
ASSERT_TRUE(sec_ != NULL);
@ -581,12 +581,12 @@ class SubpelVarianceTest
vpx_free(src_);
delete[] ref_;
vpx_free(sec_);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
vpx_free(CONVERT_TO_SHORTPTR(src_));
delete[] CONVERT_TO_SHORTPTR(ref_);
vpx_free(CONVERT_TO_SHORTPTR(sec_));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
libvpx_test::ClearSystemState();
}
@ -618,7 +618,7 @@ void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {
for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
ref_[j] = rnd_.Rand8();
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
for (int j = 0; j < block_size_; j++) {
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask_;
@ -626,7 +626,7 @@ void SubpelVarianceTest<SubpelVarianceFunctionType>::RefTest() {
for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask_;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
unsigned int sse1, sse2;
unsigned int var1;
@ -654,14 +654,14 @@ void SubpelVarianceTest<SubpelVarianceFunctionType>::ExtremeRefTest() {
memset(src_ + half, 255, half);
memset(ref_, 255, half);
memset(ref_ + half, 0, half + width_ + height_ + 1);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
vpx_memset16(CONVERT_TO_SHORTPTR(src_), mask_, half);
vpx_memset16(CONVERT_TO_SHORTPTR(src_) + half, 0, half);
vpx_memset16(CONVERT_TO_SHORTPTR(ref_), 0, half);
vpx_memset16(CONVERT_TO_SHORTPTR(ref_) + half, mask_,
half + width_ + height_ + 1);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
unsigned int sse1, sse2;
unsigned int var1;
@ -688,7 +688,7 @@ void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() {
for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
ref_[j] = rnd_.Rand8();
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
for (int j = 0; j < block_size_; j++) {
CONVERT_TO_SHORTPTR(src_)[j] = rnd_.Rand16() & mask_;
@ -697,7 +697,7 @@ void SubpelVarianceTest<SubpixAvgVarMxNFunc>::RefTest() {
for (int j = 0; j < block_size_ + width_ + height_ + 1; j++) {
CONVERT_TO_SHORTPTR(ref_)[j] = rnd_.Rand16() & mask_;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
uint32_t sse1, sse2;
uint32_t var1, var2;
@ -797,7 +797,7 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(2, 3, &vpx_sub_pixel_avg_variance4x8_c, 0),
make_tuple(2, 2, &vpx_sub_pixel_avg_variance4x4_c, 0)));
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef MainTestClass<VarianceMxNFunc> VpxHBDMseTest;
typedef MainTestClass<VarianceMxNFunc> VpxHBDVarianceTest;
typedef SubpelVarianceTest<SubpixVarMxNFunc> VpxHBDSubpelVarianceTest;
@ -890,14 +890,14 @@ INSTANTIATE_TEST_CASE_P(
C, VpxHBDVarianceTest,
::testing::ValuesIn(kArrayHBDVariance_c));
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#if HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSE4_1, VpxHBDVarianceTest,
::testing::Values(
VarianceParams(2, 2, &vpx_highbd_8_variance4x4_sse4_1, 8),
VarianceParams(2, 2, &vpx_highbd_10_variance4x4_sse4_1, 10),
VarianceParams(2, 2, &vpx_highbd_12_variance4x4_sse4_1, 12)));
#endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
const VpxHBDSubpelVarianceTest::ParamType kArrayHBDSubpelVariance_c[] = {
#if CONFIG_VP10 && CONFIG_EXT_PARTITION
@ -1016,7 +1016,7 @@ const VpxHBDSubpelAvgVarianceTest::ParamType kArrayHBDSubpelAvgVariance_c[] = {
};
INSTANTIATE_TEST_CASE_P(C, VpxHBDSubpelAvgVarianceTest,
::testing::ValuesIn(kArrayHBDSubpelAvgVariance_c));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if HAVE_SSE2
INSTANTIATE_TEST_CASE_P(SSE2, SumOfSquaresTest,
@ -1077,7 +1077,7 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(2, 3, &vpx_sub_pixel_avg_variance4x8_sse2, 0),
make_tuple(2, 2, &vpx_sub_pixel_avg_variance4x4_sse2, 0)));
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#if HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
INSTANTIATE_TEST_CASE_P(
SSE4_1, VpxSubpelVarianceTest,
::testing::Values(
@ -1091,9 +1091,9 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(2, 2, &vpx_highbd_8_sub_pixel_avg_variance4x4_sse4_1, 8),
make_tuple(2, 2, &vpx_highbd_10_sub_pixel_avg_variance4x4_sse4_1, 10),
make_tuple(2, 2, &vpx_highbd_12_sub_pixel_avg_variance4x4_sse4_1, 12)));
#endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
/* TODO(debargha): This test does not support the highbd version
INSTANTIATE_TEST_CASE_P(
SSE2, VpxHBDMseTest,
@ -1218,7 +1218,7 @@ INSTANTIATE_TEST_CASE_P(
make_tuple(3, 4, &vpx_highbd_8_sub_pixel_avg_variance8x16_sse2, 8),
make_tuple(3, 3, &vpx_highbd_8_sub_pixel_avg_variance8x8_sse2, 8),
make_tuple(3, 2, &vpx_highbd_8_sub_pixel_avg_variance8x4_sse2, 8)));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // HAVE_SSE2
#if HAVE_SSSE3

View File

@ -24,7 +24,7 @@ using libvpx_test::ACMRandom;
typedef void (*conv_filter_t)(const uint8_t*, int, uint8_t*, int,
int, int, const InterpFilterParams,
const int, int, int);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*hbd_conv_filter_t)(const uint16_t*, int, uint16_t*, int,
int, int, const InterpFilterParams,
const int, int, int, int);
@ -36,7 +36,7 @@ typedef void (*hbd_conv_filter_t)(const uint16_t*, int, uint16_t*, int,
typedef tuple<int, int> BlockDimension;
typedef tuple<conv_filter_t, conv_filter_t, BlockDimension, INTERP_FILTER,
int, int> ConvParams;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// Test parameter list:
// <convolve_horiz_func, convolve_vert_func,
// <width, height>, filter_params, subpel_x_q4, avg, bit_dpeth>
@ -242,7 +242,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(kAvg)));
#endif // HAVE_SSSE3 && CONFIG_EXT_INTERP
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef ::testing::TestWithParam<HbdConvParams> TestWithHbdConvParams;
class VP10HbdConvolveOptimzTest : public TestWithHbdConvParams {
public:
@ -403,5 +403,5 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(kAvg),
::testing::ValuesIn(kBitdepth)));
#endif // HAVE_SSE4_1 && CONFIG_EXT_INTERP
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -196,7 +196,7 @@ TEST(VP10ConvolveTest, vp10_convolve_avg) {
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
TEST(VP10ConvolveTest, vp10_highbd_convolve) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
#if CONFIG_DUAL_FILTER
@ -329,7 +329,7 @@ TEST(VP10ConvolveTest, vp10_highbd_convolve_avg) {
}
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#define CONVOLVE_SPEED_TEST 0
#if CONVOLVE_SPEED_TEST

View File

@ -34,7 +34,7 @@ void fht16x16_ref(const int16_t *in, tran_low_t *out, int stride,
vp10_fht16x16_c(in, out, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*IHbdHtFunc)(const tran_low_t *in, uint8_t *out, int stride,
int tx_type, int bd);
typedef void (*HbdHtFunc)(const int16_t *input, int32_t *output, int stride,
@ -47,7 +47,7 @@ void highbd_fht16x16_ref(const int16_t *in, int32_t *out, int stride,
int tx_type, int bd) {
vp10_fwd_txfm2d_16x16_c(in, out, stride, tx_type, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class VP10Trans16x16HT
: public libvpx_test::TransformTestBase,
@ -84,7 +84,7 @@ TEST_P(VP10Trans16x16HT, CoeffCheck) {
RunCoeffCheck();
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
class VP10HighbdTrans16x16HT
: public ::testing::TestWithParam<HighbdHt16x16Param> {
public:
@ -154,7 +154,7 @@ void VP10HighbdTrans16x16HT::RunBitexactCheck() {
TEST_P(VP10HighbdTrans16x16HT, HighbdCoeffCheck) {
RunBitexactCheck();
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
@ -198,7 +198,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(kArrayHt16x16Param_sse2));
#endif // HAVE_SSE2
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#if HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
const HighbdHt16x16Param kArrayHBDHt16x16Param_sse4_1[] = {
make_tuple(&vp10_fwd_txfm2d_16x16_sse4_1, 0, 10),
make_tuple(&vp10_fwd_txfm2d_16x16_sse4_1, 0, 12),
@ -224,6 +224,6 @@ const HighbdHt16x16Param kArrayHBDHt16x16Param_sse4_1[] = {
INSTANTIATE_TEST_CASE_P(
SSE4_1, VP10HighbdTrans16x16HT,
::testing::ValuesIn(kArrayHBDHt16x16Param_sse4_1));
#endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -34,7 +34,7 @@ void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride,
vp10_fht4x4_c(in, out, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*IhighbdHtFunc)(const tran_low_t *in, uint8_t *out, int stride,
int tx_type, int bd);
typedef void (*HBDFhtFunc)(const int16_t *input, int32_t *output, int stride,
@ -48,7 +48,7 @@ void highbe_fht4x4_ref(const int16_t *in, int32_t *out, int stride,
int tx_type, int bd) {
vp10_fwd_txfm2d_4x4_c(in, out, stride, tx_type, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class VP10Trans4x4HT
: public libvpx_test::TransformTestBase,
@ -85,7 +85,7 @@ TEST_P(VP10Trans4x4HT, CoeffCheck) {
RunCoeffCheck();
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
class VP10HighbdTrans4x4HT : public ::testing::TestWithParam<HighbdHt4x4Param> {
public:
virtual ~VP10HighbdTrans4x4HT() {}
@ -154,7 +154,7 @@ void VP10HighbdTrans4x4HT::RunBitexactCheck() {
TEST_P(VP10HighbdTrans4x4HT, HighbdCoeffCheck) {
RunBitexactCheck();
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
@ -198,7 +198,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(kArrayHt4x4Param_sse2));
#endif // HAVE_SSE2
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#if HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
const HighbdHt4x4Param kArrayHighbdHt4x4Param[] = {
make_tuple(&vp10_fwd_txfm2d_4x4_sse4_1, 0, 10),
make_tuple(&vp10_fwd_txfm2d_4x4_sse4_1, 0, 12),
@ -226,6 +226,6 @@ INSTANTIATE_TEST_CASE_P(
SSE4_1, VP10HighbdTrans4x4HT,
::testing::ValuesIn(kArrayHighbdHt4x4Param));
#endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -35,7 +35,7 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride,
vp10_fht8x8_c(in, out, stride, tx_type);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*IHbdHtFunc)(const tran_low_t *in, uint8_t *out, int stride,
int tx_type, int bd);
typedef void (*HbdHtFunc)(const int16_t *input, int32_t *output, int stride,
@ -47,7 +47,7 @@ void highbd_fht8x8_ref(const int16_t *in, int32_t *out, int stride,
int tx_type, int bd) {
vp10_fwd_txfm2d_8x8_c(in, out, stride, tx_type, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
class VP10Trans8x8HT
: public libvpx_test::TransformTestBase,
@ -84,7 +84,7 @@ TEST_P(VP10Trans8x8HT, CoeffCheck) {
RunCoeffCheck();
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
class VP10HighbdTrans8x8HT : public ::testing::TestWithParam<HighbdHt8x8Param> {
public:
virtual ~VP10HighbdTrans8x8HT() {}
@ -154,7 +154,7 @@ void VP10HighbdTrans8x8HT::RunBitexactCheck() {
TEST_P(VP10HighbdTrans8x8HT, HighbdCoeffCheck) {
RunBitexactCheck();
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
using std::tr1::make_tuple;
@ -198,7 +198,7 @@ INSTANTIATE_TEST_CASE_P(
::testing::ValuesIn(kArrayHt8x8Param_sse2));
#endif // HAVE_SSE2
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#if HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
const HighbdHt8x8Param kArrayHBDHt8x8Param_sse4_1[] = {
make_tuple(&vp10_fwd_txfm2d_8x8_sse4_1, 0, 10),
make_tuple(&vp10_fwd_txfm2d_8x8_sse4_1, 0, 12),
@ -224,6 +224,6 @@ const HighbdHt8x8Param kArrayHBDHt8x8Param_sse4_1[] = {
INSTANTIATE_TEST_CASE_P(
SSE4_1, VP10HighbdTrans8x8HT,
::testing::ValuesIn(kArrayHBDHt8x8Param_sse4_1));
#endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -26,7 +26,7 @@ using libvpx_test::Fwd_Txfm2d_Func;
using libvpx_test::TYPE_TXFM;
namespace {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// tx_type_, tx_size_, max_error_, max_avg_error_
typedef std::tr1::tuple<TX_TYPE, TX_SIZE, double, double> VP10FwdTxfm2dParam;
@ -177,5 +177,5 @@ INSTANTIATE_TEST_CASE_P(
C, VP10FwdTxfm2d,
::testing::ValuesIn(vp10_fwd_txfm2d_param_c));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -135,7 +135,7 @@ TEST_P(VP10HighbdInvHTNxN, InvTransResultCheck) {
using std::tr1::make_tuple;
#if HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#if HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
#define PARAM_LIST_4X4 &vp10_fwd_txfm2d_4x4_c, \
&vp10_inv_txfm2d_add_4x4_sse4_1, \
&vp10_inv_txfm2d_add_4x4_c, 16
@ -217,6 +217,6 @@ const IHbdHtParam kArrayIhtParam[] = {
INSTANTIATE_TEST_CASE_P(
SSE4_1, VP10HighbdInvHTNxN,
::testing::ValuesIn(kArrayIhtParam));
#endif // HAVE_SSE4_1 && CONFIG_VP9_HIGHBITDEPTH
#endif // HAVE_SSE4_1 && CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -27,7 +27,7 @@ using libvpx_test::Inv_Txfm2d_Func;
namespace {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// VP10InvTxfm2dParam argument list:
// tx_type_, tx_size_, max_error_, max_avg_error_
typedef std::tr1::tuple<TX_TYPE, TX_SIZE, int, double> VP10InvTxfm2dParam;
@ -153,6 +153,6 @@ INSTANTIATE_TEST_CASE_P(
C, VP10InvTxfm2d,
::testing::ValuesIn(vp10_inv_txfm2d_param));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace

View File

@ -76,7 +76,7 @@ typedef void (*Inv_Txfm2d_Func)(const int32_t*, uint16_t*, int, int, int);
static const int bd = 10;
static const int input_base = (1 << bd);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static const Fwd_Txfm2d_Func fwd_txfm_func_ls[TX_SIZES] = {
vp10_fwd_txfm2d_4x4_c, vp10_fwd_txfm2d_8x8_c, vp10_fwd_txfm2d_16x16_c,
vp10_fwd_txfm2d_32x32_c};
@ -84,7 +84,7 @@ static const Fwd_Txfm2d_Func fwd_txfm_func_ls[TX_SIZES] = {
static const Inv_Txfm2d_Func inv_txfm_func_ls[TX_SIZES] = {
vp10_inv_txfm2d_add_4x4_c, vp10_inv_txfm2d_add_8x8_c,
vp10_inv_txfm2d_add_16x16_c, vp10_inv_txfm2d_add_32x32_c};
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} // namespace libvpx_test
#endif // VP10_TXFM_TEST_H_

View File

@ -271,7 +271,7 @@ double sse_to_psnr(double samples, double peak, double sse) {
}
// TODO(debargha): Consolidate the functions below into a separate file.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_img_upshift(vpx_image_t *dst, vpx_image_t *src,
int input_shift) {
// Note the offset is 1 less than half.
@ -484,4 +484,4 @@ void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src,
lowbd_img_downshift(dst, src, down_shift);
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -151,7 +151,7 @@ int vpx_img_read(vpx_image_t *img, FILE *file);
double sse_to_psnr(double samples, double peak, double mse);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vpx_img_upshift(vpx_image_t *dst, vpx_image_t *src, int input_shift);
void vpx_img_downshift(vpx_image_t *dst, vpx_image_t *src, int down_shift);
void vpx_img_truncate_16_to_8(vpx_image_t *dst, vpx_image_t *src);

View File

@ -160,11 +160,11 @@ typedef struct {
// Number of base colors for Y (0) and UV (1)
uint8_t palette_size[2];
// Value of base colors for Y, U, and V
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t palette_colors[3 * PALETTE_MAX_SIZE];
#else
uint8_t palette_colors[3 * PALETTE_MAX_SIZE];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Only used by encoder to store the color index of the top left pixel.
// TODO(huisu): move this to encoder
uint8_t palette_first_color_idx[2];
@ -379,7 +379,7 @@ typedef struct macroblockd {
uint8_t is_sec_rect;
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
/* Bit depth: 8, 10, 12 */
int bd;
#endif

View File

@ -35,7 +35,7 @@ const vpx_prob vp10_cat5_prob[] = { 180, 157, 141, 134, 130 };
const vpx_prob vp10_cat6_prob[] = {
254, 254, 254, 252, 249, 243, 230, 196, 177, 153, 140, 133, 130, 129
};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const vpx_prob vp10_cat1_prob_high10[] = { 159 };
const vpx_prob vp10_cat2_prob_high10[] = { 165, 145 };
const vpx_prob vp10_cat3_prob_high10[] = { 173, 148, 140 };

View File

@ -68,7 +68,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat4_prob[4]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat5_prob[5]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat6_prob[14]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat1_prob_high10[1]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat2_prob_high10[2]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat3_prob_high10[3]);
@ -81,7 +81,7 @@ DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat3_prob_high12[3]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat4_prob_high12[4]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat5_prob_high12[5]);
DECLARE_ALIGNED(16, extern const uint8_t, vp10_cat6_prob_high12[18]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#define EOB_MODEL_TOKEN 3
@ -95,16 +95,16 @@ typedef struct {
// indexed by token value
extern const vp10_extra_bit vp10_extra_bits[ENTROPY_TOKENS];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
extern const vp10_extra_bit vp10_extra_bits_high10[ENTROPY_TOKENS];
extern const vp10_extra_bit vp10_extra_bits_high12[ENTROPY_TOKENS];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#define DCT_MAX_VALUE 16384
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define DCT_MAX_VALUE_HIGH10 65536
#define DCT_MAX_VALUE_HIGH12 262144
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
/* Coefficients are predicted via a 3-dimensional probability table. */

View File

@ -343,7 +343,7 @@ SubpelFilterCoeffs vp10_get_subpel_filter_ver_signal_dir(
return NULL;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
HbdSubpelFilterCoeffs vp10_hbd_get_subpel_filter_ver_signal_dir(
const InterpFilterParams p, int index) {
#if CONFIG_EXT_INTERP && HAVE_SSE4_1

View File

@ -95,7 +95,7 @@ static INLINE int vp10_is_interpolating_filter(
#if USE_TEMPORALFILTER_12TAP
extern const int8_t sub_pel_filters_temporalfilter_12_signal_dir[15][2][16];
extern const int8_t sub_pel_filters_temporalfilter_12_ver_signal_dir[15][6][16];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
extern const
int16_t sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8];
#endif
@ -106,14 +106,14 @@ extern const int8_t sub_pel_filters_12sharp_signal_dir[15][2][16];
extern const int8_t sub_pel_filters_10sharp_signal_dir[15][2][16];
extern const int8_t sub_pel_filters_12sharp_ver_signal_dir[15][6][16];
extern const int8_t sub_pel_filters_10sharp_ver_signal_dir[15][6][16];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
extern const int16_t sub_pel_filters_12sharp_highbd_ver_signal_dir[15][6][8];
extern const int16_t sub_pel_filters_10sharp_highbd_ver_signal_dir[15][6][8];
#endif
#endif
typedef const int8_t (*SubpelFilterCoeffs)[16];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef const int16_t (*HbdSubpelFilterCoeffs)[8];
#endif
@ -122,7 +122,7 @@ SubpelFilterCoeffs vp10_get_subpel_filter_signal_dir(
SubpelFilterCoeffs vp10_get_subpel_filter_ver_signal_dir(
const InterpFilterParams p, int index);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
HbdSubpelFilterCoeffs vp10_hbd_get_subpel_filter_ver_signal_dir(
const InterpFilterParams p, int index);
#endif

View File

@ -22,7 +22,7 @@
int get_tx_scale(const MACROBLOCKD *const xd, const TX_TYPE tx_type,
const TX_SIZE tx_size) {
(void) tx_type;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
return tx_size == TX_32X32;
}
@ -72,7 +72,7 @@ static void ihalfright32_c(const tran_low_t *input, tran_low_t *output) {
// Note overall scaling factor is 4 times orthogonal
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_iidtx4_c(const tran_low_t *input, tran_low_t *output,
int bd) {
int i;
@ -120,7 +120,7 @@ static void highbd_ihalfright32_c(const tran_low_t *input, tran_low_t *output,
vpx_highbd_idct16_c(inputhalf, output + 16, bd);
// Note overall scaling factor is 4 times orthogonal
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Inverse identity transform and add.
static void inv_idtx_add_c(const tran_low_t *input, uint8_t *dest, int stride,
@ -183,7 +183,7 @@ static void maybe_flip_strides(uint8_t **dst, int *dstride,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void highbd_idst4_c(const tran_low_t *input, tran_low_t *output, int bd) {
tran_low_t step[4];
tran_high_t temp1, temp2;
@ -483,7 +483,7 @@ static void maybe_flip_strides16(uint16_t **dst, int *dstride,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_EXT_TX
void vp10_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest, int stride,
@ -1073,7 +1073,7 @@ void vp10_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_iht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int tx_type, int bd) {
static const highbd_transform_2d HIGH_IHT_4[] = {
@ -1689,7 +1689,7 @@ void vp10_highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param) {
@ -1729,7 +1729,7 @@ void inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param) {
const TX_TYPE tx_type = inv_txfm_param->tx_type;
@ -1768,4 +1768,4 @@ void highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -30,7 +30,7 @@ typedef struct INV_TXFM_PARAM {
TX_SIZE tx_size;
int eob;
int lossless;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int bd;
#endif
} INV_TXFM_PARAM;
@ -41,13 +41,13 @@ typedef struct {
transform_1d cols, rows; // vertical and horizontal
} transform_2d;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*highbd_transform_1d)(const tran_low_t*, tran_low_t*, int bd);
typedef struct {
highbd_transform_1d cols, rows; // vertical and horizontal
} highbd_transform_2d;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#define MAX_TX_SCALE 1
int get_tx_scale(const MACROBLOCKD *const xd, const TX_TYPE tx_type,
@ -80,7 +80,7 @@ void vp10_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
int stride, int eob, TX_TYPE tx_type);
void inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_iwht4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
int eob, int bd);
void vp10_highbd_idct4x4_add(const tran_low_t *input, uint8_t *dest, int stride,
@ -110,7 +110,7 @@ void vp10_highbd_inv_txfm_add_32x32(const tran_low_t *input, uint8_t *dest,
TX_TYPE tx_type);
void highbd_inv_txfm_add(const tran_low_t *input, uint8_t *dest, int stride,
INV_TXFM_PARAM *inv_txfm_param);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"
#endif

View File

@ -407,7 +407,7 @@ static void filter_selectively_vert_row2(int subsampling_factor,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_filter_selectively_vert_row2(int subsampling_factor,
uint16_t *s, int pitch,
unsigned int mask_16x16_l,
@ -505,7 +505,7 @@ static void highbd_filter_selectively_vert_row2(int subsampling_factor,
mask_4x4_int_1 >>= 1;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static void filter_selectively_horiz(uint8_t *s, int pitch,
unsigned int mask_16x16,
@ -603,7 +603,7 @@ static void filter_selectively_horiz(uint8_t *s, int pitch,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_filter_selectively_horiz(uint16_t *s, int pitch,
unsigned int mask_16x16,
unsigned int mask_8x8,
@ -707,7 +707,7 @@ static void highbd_filter_selectively_horiz(uint16_t *s, int pitch,
mask_4x4_int >>= count;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// This function ors into the current lfm structure, where to do loop
// filters for the specific mi we are looking at. It uses information
@ -1178,7 +1178,7 @@ static void filter_selectively_vert(uint8_t *s, int pitch,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_filter_selectively_vert(uint16_t *s, int pitch,
unsigned int mask_16x16,
unsigned int mask_8x8,
@ -1215,7 +1215,7 @@ static void highbd_filter_selectively_vert(uint16_t *s, int pitch,
mask_4x4_int >>= 1;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_filter_block_plane_non420(VP10_COMMON *cm,
struct macroblockd_plane *plane,
@ -1363,7 +1363,7 @@ void vp10_filter_block_plane_non420(VP10_COMMON *cm,
// Disable filtering on the leftmost column
border_mask = ~(mi_col == 0);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_vert(
CONVERT_TO_SHORTPTR(dst->buf),
@ -1389,7 +1389,7 @@ void vp10_filter_block_plane_non420(VP10_COMMON *cm,
mask_4x4_c & border_mask,
mask_4x4_int[r],
&cm->lf_info, &lfl[r][0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mib += row_step * cm->mi_stride;
}
@ -1413,7 +1413,7 @@ void vp10_filter_block_plane_non420(VP10_COMMON *cm,
mask_8x8_r = mask_8x8[r];
mask_4x4_r = mask_4x4[r];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_horiz(
CONVERT_TO_SHORTPTR(dst->buf),
@ -1439,7 +1439,7 @@ void vp10_filter_block_plane_non420(VP10_COMMON *cm,
mask_4x4_r,
mask_4x4_int_r,
&cm->lf_info, &lfl[r][0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
}
}
@ -1466,7 +1466,7 @@ void vp10_filter_block_plane_ss00(VP10_COMMON *const cm,
unsigned int mask_4x4_int_l = mask_4x4_int & 0xffff;
// Disable filtering on the leftmost column.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_vert_row2(
plane->subsampling_x, CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
@ -1483,7 +1483,7 @@ void vp10_filter_block_plane_ss00(VP10_COMMON *const cm,
plane->subsampling_x, dst->buf, dst->stride, mask_16x16_l, mask_8x8_l,
mask_4x4_l, mask_4x4_int_l, &cm->lf_info,
&lfm->lfl_y[r][0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst->buf += 2 * MI_SIZE * dst->stride;
mask_16x16 >>= 2 * MI_SIZE;
mask_8x8 >>= 2 * MI_SIZE;
@ -1513,7 +1513,7 @@ void vp10_filter_block_plane_ss00(VP10_COMMON *const cm,
mask_4x4_r = mask_4x4 & 0xff;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_horiz(
CONVERT_TO_SHORTPTR(dst->buf), dst->stride, mask_16x16_r, mask_8x8_r,
@ -1529,7 +1529,7 @@ void vp10_filter_block_plane_ss00(VP10_COMMON *const cm,
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int & 0xff, &cm->lf_info,
&lfm->lfl_y[r][0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE;
@ -1569,7 +1569,7 @@ void vp10_filter_block_plane_ss11(VP10_COMMON *const cm,
unsigned int mask_4x4_int_l = mask_4x4_int & 0xff;
// Disable filtering on the leftmost column.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_vert_row2(
plane->subsampling_x, CONVERT_TO_SHORTPTR(dst->buf), dst->stride,
@ -1586,7 +1586,7 @@ void vp10_filter_block_plane_ss11(VP10_COMMON *const cm,
plane->subsampling_x, dst->buf, dst->stride,
mask_16x16_l, mask_8x8_l, mask_4x4_l, mask_4x4_int_l, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst->buf += 2 * MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE;
@ -1621,7 +1621,7 @@ void vp10_filter_block_plane_ss11(VP10_COMMON *const cm,
mask_4x4_r = mask_4x4 & 0xf;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
highbd_filter_selectively_horiz(CONVERT_TO_SHORTPTR(dst->buf),
dst->stride, mask_16x16_r, mask_8x8_r,
@ -1637,7 +1637,7 @@ void vp10_filter_block_plane_ss11(VP10_COMMON *const cm,
filter_selectively_horiz(dst->buf, dst->stride, mask_16x16_r, mask_8x8_r,
mask_4x4_r, mask_4x4_int_r, &cm->lf_info,
&lfm->lfl_uv[r >> 1][0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst->buf += MI_SIZE * dst->stride;
mask_16x16 >>= MI_SIZE / 2;

View File

@ -140,7 +140,7 @@ typedef struct VP10Common {
int subsampling_x;
int subsampling_y;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
// Marks if we need to use 16bit frame buffers (1: yes, 0: no).
int use_highbitdepth;
#endif

View File

@ -199,7 +199,7 @@ static const int16_t dc_qlookup[QINDEX_RANGE] = {
1022, 1058, 1098, 1139, 1184, 1232, 1282, 1336,
};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static const int16_t dc_qlookup_10[QINDEX_RANGE] = {
4, 9, 10, 13, 15, 17, 20, 22,
25, 28, 31, 34, 37, 40, 43, 47,
@ -306,7 +306,7 @@ static const int16_t ac_qlookup[QINDEX_RANGE] = {
1597, 1628, 1660, 1692, 1725, 1759, 1793, 1828,
};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static const int16_t ac_qlookup_10[QINDEX_RANGE] = {
4, 9, 11, 13, 16, 18, 21, 24,
27, 30, 33, 37, 40, 44, 48, 51,
@ -379,7 +379,7 @@ static const int16_t ac_qlookup_12[QINDEX_RANGE] = {
#endif
int16_t vp10_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth) {
case VPX_BITS_8:
return dc_qlookup[clamp(qindex + delta, 0, MAXQ)];
@ -398,7 +398,7 @@ int16_t vp10_dc_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
}
int16_t vp10_ac_quant(int qindex, int delta, vpx_bit_depth_t bit_depth) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth) {
case VPX_BITS_8:
return ac_qlookup[clamp(qindex + delta, 0, MAXQ)];

View File

@ -467,7 +467,7 @@ static void build_masked_compound_wedge_extend(
h, w, subh, subw);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void build_masked_compound_wedge_extend_highbd(
uint8_t *dst_8, int dst_stride,
const uint8_t *src0_8, int src0_stride,
@ -486,7 +486,7 @@ static void build_masked_compound_wedge_extend_highbd(
mask, MASK_MASTER_STRIDE,
h, w, subh, subw, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_SUPERTX
static void build_masked_compound_wedge(
@ -509,7 +509,7 @@ static void build_masked_compound_wedge(
h, w, subh, subw);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void build_masked_compound_wedge_highbd(
uint8_t *dst_8, int dst_stride,
const uint8_t *src0_8, int src0_stride,
@ -529,7 +529,7 @@ static void build_masked_compound_wedge_highbd(
mask, 4 * num_4x4_blocks_wide_lookup[sb_type],
h, w, subh, subw, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_make_masked_inter_predictor(
const uint8_t *pre,
@ -560,7 +560,7 @@ void vp10_make_masked_inter_predictor(
#else
INTERP_FILTER tmp_ipf = interp_filter;
#endif // CONFIG_DUAL_FILTER
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_dst_[2 * MAX_SB_SQUARE]);
uint8_t *tmp_dst =
(xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ?
@ -605,7 +605,7 @@ void vp10_make_masked_inter_predictor(
mi->mbmi.interinter_wedge_sign,
mi->mbmi.sb_type, h, w);
#endif // CONFIG_SUPERTX
#else // CONFIG_VP9_HIGHBITDEPTH
#else // CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_dst[MAX_SB_SQUARE]);
vp10_make_inter_predictor(pre, pre_stride, tmp_dst, MAX_SB_SIZE,
subpel_x, subpel_y, sf, w, h, 0,
@ -628,11 +628,11 @@ void vp10_make_masked_inter_predictor(
mi->mbmi.interinter_wedge_sign,
mi->mbmi.sb_type, h, w);
#endif // CONFIG_SUPERTX
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_EXT_INTER
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
const MV *src_mv,
@ -658,7 +658,7 @@ void vp10_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
sf, w, h, ref, interp_filter, sf->x_step_q4,
sf->y_step_q4, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_build_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
@ -861,7 +861,7 @@ void vp10_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane,
for (ref = 0; ref < 1 + is_compound; ++ref) {
const uint8_t *pre =
&pd->pre[ref].buf[(ir * pd->pre[ref].stride + ic) << 2];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vp10_highbd_build_inter_predictor(pre, pd->pre[ref].stride,
dst, pd->dst.stride,
@ -888,7 +888,7 @@ void vp10_build_inter_predictor_sub8x8(MACROBLOCKD *xd, int plane,
mi->mbmi.interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE + 4 * ic,
mi_row * MI_SIZE + 4 * ir);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -1110,9 +1110,9 @@ void vp10_build_masked_inter_predictor_complex(
int w_remain, h_remain;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int is_hdb = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
assert(bsize <= BLOCK_32X32);
assert(IMPLIES(plane == 0, ssx == 0));
@ -1127,14 +1127,14 @@ void vp10_build_masked_inter_predictor_complex(
dst += h_offset * dst_stride;
pre += h_offset * pre_stride;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (is_hdb)
vpx_highbd_blend_a64_vmask(dst, dst_stride,
dst, dst_stride,
pre, pre_stride,
mask, h, top_w, xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_blend_a64_vmask(dst, dst_stride,
dst, dst_stride,
pre, pre_stride,
@ -1152,14 +1152,14 @@ void vp10_build_masked_inter_predictor_complex(
dst += w_offset;
pre += w_offset;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (is_hdb)
vpx_highbd_blend_a64_hmask(dst, dst_stride,
dst, dst_stride,
pre, pre_stride,
mask, top_h, w, xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_blend_a64_hmask(dst, dst_stride,
dst, dst_stride,
pre, pre_stride,
@ -1179,7 +1179,7 @@ void vp10_build_masked_inter_predictor_complex(
return;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (is_hdb) {
dst = (uint8_t*)CONVERT_TO_SHORTPTR(dst);
pre = (const uint8_t*)CONVERT_TO_SHORTPTR(pre);
@ -1187,7 +1187,7 @@ void vp10_build_masked_inter_predictor_complex(
pre_stride *= 2;
w_remain *= 2;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
do {
memcpy(dst, pre, w_remain * sizeof(uint8_t));
@ -1380,9 +1380,9 @@ void vp10_build_obmc_inter_prediction(VP10_COMMON *cm,
int left_stride[MAX_MB_PLANE]) {
const BLOCK_SIZE bsize = xd->mi[0]->mbmi.sb_type;
int plane, i;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int is_hbd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// handle above row
if (xd->up_available) {
@ -1413,12 +1413,12 @@ void vp10_build_obmc_inter_prediction(VP10_COMMON *cm,
&above[plane][(i * MI_SIZE) >> pd->subsampling_x];
const uint8_t *const mask = vp10_get_obmc_mask(bh);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (is_hbd)
vpx_highbd_blend_a64_vmask(dst, dst_stride, dst, dst_stride,
tmp, tmp_stride, mask, bh, bw, xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_blend_a64_vmask(dst, dst_stride, dst, dst_stride,
tmp, tmp_stride, mask, bh, bw);
}
@ -1456,12 +1456,12 @@ void vp10_build_obmc_inter_prediction(VP10_COMMON *cm,
&left[plane][(i * MI_SIZE * tmp_stride) >> pd->subsampling_y];
const uint8_t *const mask = vp10_get_obmc_mask(bw);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (is_hbd)
vpx_highbd_blend_a64_hmask(dst, dst_stride, dst, dst_stride,
tmp, tmp_stride, mask, bh, bw, xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_blend_a64_hmask(dst, dst_stride, dst, dst_stride,
tmp, tmp_stride, mask, bh, bw);
}
@ -1859,7 +1859,7 @@ static void combine_interintra(INTERINTRA_MODE mode,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void combine_interintra_highbd(INTERINTRA_MODE mode,
int use_wedge_interintra,
int wedge_index,
@ -1988,7 +1988,7 @@ static void combine_interintra_highbd(INTERINTRA_MODE mode,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Break down rectangular intra prediction for joint spatio-temporal prediction
// into two square intra predictions.
@ -2017,14 +2017,14 @@ static void build_intra_predictors_for_interintra(
vp10_predict_intra_block(xd, bwl, bhl, max_tx_size, mode,
ref, ref_stride, dst, dst_stride,
0, 0, plane);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src_216 = CONVERT_TO_SHORTPTR(src_2);
uint16_t *dst_216 = CONVERT_TO_SHORTPTR(dst_2);
memcpy(src_216 - ref_stride, dst_216 - dst_stride,
sizeof(*src_216) * pxbw);
} else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
memcpy(src_2 - ref_stride, dst_2 - dst_stride, sizeof(*src_2) * pxbw);
}
@ -2038,14 +2038,14 @@ static void build_intra_predictors_for_interintra(
vp10_predict_intra_block(xd, bwl, bhl, max_tx_size, mode,
ref, ref_stride, dst, dst_stride,
0, 0, plane);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src_216 = CONVERT_TO_SHORTPTR(src_2);
uint16_t *dst_216 = CONVERT_TO_SHORTPTR(dst_2);
for (i = 0; i < pxbh; ++i)
src_216[i * ref_stride - 1] = dst_216[i * dst_stride - 1];
} else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
for (i = 0; i < pxbh; ++i)
src_2[i * ref_stride - 1] = dst_2[i * dst_stride - 1];
@ -2086,7 +2086,7 @@ void vp10_combine_interintra(MACROBLOCKD *xd,
const uint8_t *inter_pred, int inter_stride,
const uint8_t *intra_pred, int intra_stride) {
const BLOCK_SIZE plane_bsize = get_plane_block_size(bsize, &xd->plane[plane]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
combine_interintra_highbd(xd->mi[0]->mbmi.interintra_mode,
xd->mi[0]->mbmi.use_wedge_interintra,
@ -2101,7 +2101,7 @@ void vp10_combine_interintra(MACROBLOCKD *xd,
xd->bd);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
combine_interintra(xd->mi[0]->mbmi.interintra_mode,
xd->mi[0]->mbmi.use_wedge_interintra,
xd->mi[0]->mbmi.interintra_wedge_index,
@ -2117,7 +2117,7 @@ void vp10_build_interintra_predictors_sby(MACROBLOCKD *xd,
uint8_t *ypred,
int ystride,
BLOCK_SIZE bsize) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t,
intrapredictor[MAX_SB_SQUARE]);
@ -2127,7 +2127,7 @@ void vp10_build_interintra_predictors_sby(MACROBLOCKD *xd,
CONVERT_TO_BYTEPTR(intrapredictor), MAX_SB_SIZE);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
DECLARE_ALIGNED(16, uint8_t, intrapredictor[MAX_SB_SQUARE]);
vp10_build_intra_predictors_for_interintra(
@ -2142,7 +2142,7 @@ void vp10_build_interintra_predictors_sbc(MACROBLOCKD *xd,
int ustride,
int plane,
BLOCK_SIZE bsize) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t,
uintrapredictor[MAX_SB_SQUARE]);
@ -2152,7 +2152,7 @@ void vp10_build_interintra_predictors_sbc(MACROBLOCKD *xd,
CONVERT_TO_BYTEPTR(uintrapredictor), MAX_SB_SIZE);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
DECLARE_ALIGNED(16, uint8_t, uintrapredictor[MAX_SB_SQUARE]);
vp10_build_intra_predictors_for_interintra(
@ -2197,7 +2197,7 @@ static void build_inter_predictors_single_buf(MACROBLOCKD *xd, int plane,
const struct scale_factors *const sf = &xd->block_refs[ref]->sf;
struct buf_2d *const pre_buf = &pd->pre[ref];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint8_t *const dst =
(xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH ?
CONVERT_TO_BYTEPTR(ext_dst) : ext_dst) + ext_dst_stride * y + x;
@ -2297,7 +2297,7 @@ static void build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, int plane,
if (is_compound
&& is_interinter_wedge_used(mbmi->sb_type)
&& mbmi->use_wedge_interinter) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
build_masked_compound_wedge_highbd(
dst, dst_buf->stride,
@ -2308,7 +2308,7 @@ static void build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, int plane,
mbmi->sb_type, h, w,
xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
build_masked_compound_wedge(
dst, dst_buf->stride,
ext_dst0, ext_dst_stride0,
@ -2317,13 +2317,13 @@ static void build_wedge_inter_predictor_from_buf(MACROBLOCKD *xd, int plane,
mbmi->interinter_wedge_sign,
mbmi->sb_type, h, w);
} else {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
vpx_highbd_convolve_copy(CONVERT_TO_BYTEPTR(ext_dst0), ext_dst_stride0,
dst, dst_buf->stride, NULL, 0, NULL, 0, w, h,
xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_convolve_copy(ext_dst0, ext_dst_stride0,
dst, dst_buf->stride, NULL, 0, NULL, 0, w, h);
}

View File

@ -82,7 +82,7 @@ static INLINE void inter_predictor(const uint8_t *src, int src_stride,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
const int subpel_x,
@ -146,7 +146,7 @@ static INLINE void highbd_inter_predictor(const uint8_t *src, int src_stride,
bd);
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_EXT_INTER
// Set to one to use larger codebooks
@ -249,13 +249,13 @@ static INLINE void vp10_make_inter_predictor(
int xs, int ys,
const MACROBLOCKD *xd) {
(void) xd;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
highbd_inter_predictor(src, src_stride, dst, dst_stride,
subpel_x, subpel_y, sf, w, h, ref,
interp_filter, xs, ys, xd->bd);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
inter_predictor(src, src_stride, dst, dst_stride,
subpel_x, subpel_y, sf, w, h, ref,
interp_filter, xs, ys);
@ -416,7 +416,7 @@ void vp10_build_inter_predictor(const uint8_t *src, int src_stride,
enum mv_precision precision,
int x, int y);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_build_inter_predictor(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
const MV *mv_q3,

View File

@ -14,9 +14,9 @@
#include "./vpx_dsp_rtcd.h"
#include "vpx_ports/system_state.h"
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#include "vpx_dsp/vpx_dsp_common.h"
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#include "vpx_mem/vpx_mem.h"
#include "vpx_ports/mem.h"
#include "vpx_ports/vpx_once.h"
@ -336,13 +336,13 @@ typedef void (*intra_pred_fn)(uint8_t *dst, ptrdiff_t stride,
static intra_pred_fn pred[INTRA_MODES][TX_SIZES];
static intra_pred_fn dc_pred[2][2][TX_SIZES];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*intra_high_pred_fn)(uint16_t *dst, ptrdiff_t stride,
const uint16_t *above, const uint16_t *left,
int bd);
static intra_high_pred_fn pred_high[INTRA_MODES][4];
static intra_high_pred_fn dc_pred_high[2][2][4];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static void vp10_init_intra_predictors_internal(void) {
#define INIT_NO_4X4(p, type) \
@ -369,7 +369,7 @@ static void vp10_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(dc_pred[1][0], dc_left);
INIT_ALL_SIZES(dc_pred[1][1], dc);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
INIT_ALL_SIZES(pred_high[V_PRED], highbd_v);
INIT_ALL_SIZES(pred_high[H_PRED], highbd_h);
INIT_ALL_SIZES(pred_high[D207_PRED], highbd_d207e);
@ -384,7 +384,7 @@ static void vp10_init_intra_predictors_internal(void) {
INIT_ALL_SIZES(dc_pred_high[0][1], highbd_dc_top);
INIT_ALL_SIZES(dc_pred_high[1][0], highbd_dc_left);
INIT_ALL_SIZES(dc_pred_high[1][1], highbd_dc);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#undef intra_pred_allsizes
}
@ -873,7 +873,7 @@ static void (*filter_intra_predictors[EXT_INTRA_MODES])(uint8_t *dst,
tm_filter_predictor,
};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static int highbd_intra_subpel_interp(int base, int shift, const uint16_t *ref,
int ref_start_idx, int ref_end_idx,
INTRA_FILTER filter_type) {
@ -1168,10 +1168,10 @@ static void (*highbd_filter_intra_predictors[EXT_INTRA_MODES])(uint16_t *dst,
highbd_d153_filter_predictor, highbd_d207_filter_predictor,
highbd_d63_filter_predictor, highbd_tm_filter_predictor,
};
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_EXT_INTRA
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void build_intra_predictors_high(const MACROBLOCKD *xd,
const uint8_t *ref8,
int ref_stride,
@ -1347,7 +1347,7 @@ static void build_intra_predictors_high(const MACROBLOCKD *xd,
xd->bd);
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static void build_intra_predictors(const MACROBLOCKD *xd, const uint8_t *ref,
int ref_stride, uint8_t *dst, int dst_stride,
@ -1568,17 +1568,17 @@ void vp10_predict_intra_block(const MACROBLOCKD *xd, int bwl_in, int bhl_in,
const int stride = 4 * (1 << bwl_in);
int r, c;
uint8_t *map = NULL;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *palette = xd->mi[0]->mbmi.palette_mode_info.palette_colors +
plane * PALETTE_MAX_SIZE;
#else
uint8_t *palette = xd->mi[0]->mbmi.palette_mode_info.palette_colors +
plane * PALETTE_MAX_SIZE;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
map = xd->plane[plane != 0].color_index_map;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
for (r = 0; r < bs; ++r)
@ -1595,11 +1595,11 @@ void vp10_predict_intra_block(const MACROBLOCKD *xd, int bwl_in, int bhl_in,
for (r = 0; r < bs; ++r)
for (c = 0; c < bs; ++c)
dst[r * dst_stride + c] = palette[map[(r + y) * stride + c + x]];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
return;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
build_intra_predictors_high(xd, ref, ref_stride, dst, dst_stride, mode,
tx_size,

View File

@ -76,13 +76,13 @@ typedef void (*restore_func_type)(
int stride, RestorationInternal *rst,
uint8_t *tmpdata8, int tmpstride);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef void (*restore_func_highbd_type)(
uint8_t *data8, int width, int height,
int stride, RestorationInternal *rst,
uint8_t *tmpdata8, int tmpstride,
int bit_depth);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static INLINE RestorationParamsType vp10_restoration_level_to_params(
int index, int kf) {
@ -270,7 +270,7 @@ static void loop_wiener_filter(uint8_t *data, int width, int height,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void loop_bilateral_filter_highbd(
uint8_t *data8, int width, int height,
int stride, RestorationInternal *rst,
@ -374,7 +374,7 @@ static void loop_wiener_filter_highbd(uint8_t *data8, int width, int height,
tmpdata_p += tmpstride;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
VP10_COMMON *cm,
@ -391,11 +391,11 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
restore_func_type restore_func =
cm->rst_internal.restoration_type == RESTORE_BILATERAL ?
loop_bilateral_filter : loop_wiener_filter;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
restore_func_highbd_type restore_func_highbd =
cm->rst_internal.restoration_type == RESTORE_BILATERAL ?
loop_bilateral_filter_highbd : loop_wiener_filter_highbd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
YV12_BUFFER_CONFIG *tmp_buf;
yend = VPXMIN(yend, cm->height);
@ -403,7 +403,7 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
if (vpx_realloc_frame_buffer(&cm->tmp_loop_buf, cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_DEC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -413,7 +413,7 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
tmp_buf = &cm->tmp_loop_buf;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth)
restore_func_highbd(
frame->y_buffer + ystart * ystride,
@ -421,14 +421,14 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
tmp_buf->y_buffer + ystart * tmp_buf->y_stride,
tmp_buf->y_stride, cm->bit_depth);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
restore_func(
frame->y_buffer + ystart * ystride,
ywidth, yend - ystart, ystride, &cm->rst_internal,
tmp_buf->y_buffer + ystart * tmp_buf->y_stride,
tmp_buf->y_stride);
if (!y_only) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
restore_func_highbd(
frame->u_buffer + uvstart * uvstride,
@ -441,7 +441,7 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
tmp_buf->v_buffer + uvstart * tmp_buf->uv_stride,
tmp_buf->uv_stride, cm->bit_depth);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
restore_func(
frame->u_buffer + uvstart * uvstride,
uvwidth, uvend - uvstart, uvstride, &cm->rst_internal,
@ -452,9 +452,9 @@ void vp10_loop_restoration_rows(YV12_BUFFER_CONFIG *frame,
uvwidth, uvend - uvstart, uvstride, &cm->rst_internal,
tmp_buf->v_buffer + uvstart * tmp_buf->uv_stride,
tmp_buf->uv_stride);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}

View File

@ -44,7 +44,7 @@ MV32 vp10_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf) {
return res;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_setup_scale_factors_for_frame(struct scale_factors *sf,
int other_w, int other_h,
int this_w, int this_h,
@ -130,7 +130,7 @@ void vp10_setup_scale_factors_for_frame(struct scale_factors *sf,
sf->predict[1][1][0] = vpx_convolve8;
sf->predict[1][1][1] = vpx_convolve8_avg;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (use_highbd) {
#if CONFIG_EXT_INTERP && SUPPORT_NONINTERPOLATING_FILTERS
sf->highbd_predict_ni[0][0][0] = vpx_highbd_convolve8_c;
@ -183,5 +183,5 @@ void vp10_setup_scale_factors_for_frame(struct scale_factors *sf,
sf->highbd_predict[1][1][0] = vpx_highbd_convolve8;
sf->highbd_predict[1][1][1] = vpx_highbd_convolve8_avg;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}

View File

@ -32,22 +32,22 @@ struct scale_factors {
int (*scale_value_y)(int val, const struct scale_factors *sf);
convolve_fn_t predict[2][2][2]; // horiz, vert, avg
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd_convolve_fn_t highbd_predict[2][2][2]; // horiz, vert, avg
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Functions for non-interpolating filters (those that filter zero offsets)
#if CONFIG_EXT_INTERP && SUPPORT_NONINTERPOLATING_FILTERS
convolve_fn_t predict_ni[2][2][2]; // horiz, vert, avg
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd_convolve_fn_t highbd_predict_ni[2][2][2]; // horiz, vert, avg
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_EXT_INTERP && SUPPORT_NONINTERPOLATING_FILTERS
};
MV32 vp10_scale_mv(const MV *mv, int x, int y, const struct scale_factors *sf);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_setup_scale_factors_for_frame(struct scale_factors *sf,
int other_w, int other_h,
int this_w, int this_h,
@ -56,7 +56,7 @@ void vp10_setup_scale_factors_for_frame(struct scale_factors *sf,
void vp10_setup_scale_factors_for_frame(struct scale_factors *sf,
int other_w, int other_h,
int this_w, int this_h);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static INLINE int vp10_is_valid_scale(const struct scale_factors *sf) {
return sf->x_scale_fp != REF_INVALID_SCALE &&

View File

@ -182,7 +182,7 @@ void vp10_convolve(const uint8_t *src, int src_stride, uint8_t *dst,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_convolve_horiz_c(const uint16_t *src, int src_stride,
uint16_t *dst, int dst_stride, int w, int h,
const InterpFilterParams filter_params,
@ -355,4 +355,4 @@ void vp10_highbd_convolve(const uint8_t *src8, int src_stride, uint8_t *dst8,
subpel_y_q4, y_step_q4, ref_idx, bd);
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -17,7 +17,7 @@ void vp10_convolve(const uint8_t *src, int src_stride,
const int subpel_x, int xstep,
const int subpel_y, int ystep, int avg);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_convolve(const uint8_t *src, int src_stride,
uint8_t *dst, int dst_stride,
int w, int h,
@ -29,7 +29,7 @@ void vp10_highbd_convolve(const uint8_t *src, int src_stride,
const int subpel_x, int xstep,
const int subpel_y, int ystep,
int avg, int bd);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

View File

@ -782,7 +782,7 @@ void vp10_fdct32x32_1_c(const int16_t *input, tran_low_t *output, int stride) {
output[1] = 0;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_fdct4x4_c(const int16_t *input, tran_low_t *output,
int stride) {
vp10_fdct4x4_c(input, output, stride);
@ -822,4 +822,4 @@ void vp10_highbd_fdct32x32_1_c(const int16_t *input,
tran_low_t *out, int stride) {
vp10_fdct32x32_1_c(input, out, stride);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -1246,7 +1246,7 @@ void vp10_idct32x32_1_add_c(const tran_low_t *input,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_iwht4x4_16_add_c(const tran_low_t *input, uint8_t *dest8,
int stride, int bd) {
/* 4-point reversible, orthonormal inverse Walsh-Hadamard in 3.5 adds,
@ -2500,4 +2500,4 @@ void vp10_highbd_idct32x32_1_add_c(const tran_low_t *input, uint8_t *dest8,
dest += stride;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -41,7 +41,7 @@ static INLINE tran_high_t dct_const_round_shift(tran_high_t input) {
return rv;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE tran_high_t highbd_check_range(tran_high_t input,
int bd) {
#if CONFIG_COEFFICIENT_RANGE_CHECKING
@ -64,7 +64,7 @@ static INLINE tran_high_t highbd_dct_const_round_shift(tran_high_t input) {
tran_high_t rv = ROUND_POWER_OF_TWO(input, DCT_CONST_BITS);
return rv;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_EMULATE_HARDWARE
// When CONFIG_EMULATE_HARDWARE is 1 the transform performs a
@ -85,18 +85,18 @@ static INLINE tran_high_t highbd_dct_const_round_shift(tran_high_t input) {
// bd of x uses trans_low with 8+x bits, need to remove 24-x bits
#define WRAPLOW(x) ((((int32_t)check_range(x)) << 16) >> 16)
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define HIGHBD_WRAPLOW(x, bd) \
((((int32_t)highbd_check_range((x), bd)) << (24 - bd)) >> (24 - bd))
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#else // CONFIG_EMULATE_HARDWARE
#define WRAPLOW(x) ((int32_t)check_range(x))
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define HIGHBD_WRAPLOW(x, bd) \
((int32_t)highbd_check_range((x), bd))
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_EMULATE_HARDWARE
@ -108,7 +108,7 @@ void vp10_iadst4_c(const tran_low_t *input, tran_low_t *output);
void vp10_iadst8_c(const tran_low_t *input, tran_low_t *output);
void vp10_iadst16_c(const tran_low_t *input, tran_low_t *output);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_idct4_c(const tran_low_t *input, tran_low_t *output, int bd);
void vp10_highbd_idct8_c(const tran_low_t *input, tran_low_t *output, int bd);
void vp10_highbd_idct16_c(const tran_low_t *input, tran_low_t *output, int bd);

View File

@ -43,7 +43,7 @@ specialize qw/vp10_convolve_horiz ssse3/;
add_proto qw/void vp10_convolve_vert/, "const uint8_t *src, int src_stride, uint8_t *dst, int dst_stride, int w, int h, const InterpFilterParams fp, const int subpel_x_q4, int x_step_q4, int avg";
specialize qw/vp10_convolve_vert ssse3/;
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
add_proto qw/void vp10_highbd_convolve_horiz/, "const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams fp, const int subpel_x_q4, int x_step_q4, int avg, int bd";
specialize qw/vp10_highbd_convolve_horiz sse4_1/;
add_proto qw/void vp10_highbd_convolve_vert/, "const uint16_t *src, int src_stride, uint16_t *dst, int dst_stride, int w, int h, const InterpFilterParams fp, const int subpel_x_q4, int x_step_q4, int avg, int bd";
@ -53,7 +53,7 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
#
# dct
#
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
# Note as optimized versions of these functions are added we need to add a check to ensure
# that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
if (vpx_config("CONFIG_EMULATE_HARDWARE") eq "yes") {
@ -299,7 +299,7 @@ if (vpx_config("CONFIG_NEW_QUANT") eq "yes") {
}
# High bitdepth functions
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
#
# Sub Pixel Filters
#
@ -355,7 +355,7 @@ if (vpx_config("CONFIG_VP10_ENCODER") eq "yes") {
# ENCODEMB INVOKE
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
# the transform coefficients are held in 32-bit
# values, so the assembler code for vp10_block_error can no longer be used.
add_proto qw/int64_t vp10_block_error/, "const tran_low_t *coeff, const tran_low_t *dqcoeff, intptr_t block_size, int64_t *ssz";
@ -388,7 +388,7 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
# fdct functions
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
add_proto qw/void vp10_fht4x4/, "const int16_t *input, tran_low_t *output, int stride, int tx_type";
specialize qw/vp10_fht4x4 sse2/;
@ -442,7 +442,7 @@ add_proto qw/void vp10_fwd_idtx/, "const int16_t *src_diff, tran_low_t *coeff, i
specialize qw/vp10_fwd_idtx/;
# Inverse transform
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
# Note as optimized versions of these functions are added we need to add a check to ensure
# that when CONFIG_EMULATE_HARDWARE is on, it defaults to the C versions only.
add_proto qw/void vp10_idct4x4_1_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
@ -621,9 +621,9 @@ if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
add_proto qw/void vp10_iwht4x4_16_add/, "const tran_low_t *input, uint8_t *dest, int dest_stride";
specialize qw/vp10_iwht4x4_16_add/;
} # CONFIG_EMULATE_HARDWARE
} # CONFIG_VP9_HIGHBITDEPTH
} # CONFIG_VPX_HIGHBITDEPTH
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
#fwd txfm
add_proto qw/void vp10_fwd_txfm2d_4x4/, "const int16_t *input, int32_t *output, int stride, int tx_type, int bd";
specialize qw/vp10_fwd_txfm2d_4x4 sse4_1/;
@ -666,7 +666,7 @@ specialize qw/vp10_full_range_search/;
add_proto qw/void vp10_temporal_filter_apply/, "uint8_t *frame1, unsigned int stride, uint8_t *frame2, unsigned int block_width, unsigned int block_height, int strength, int filter_weight, unsigned int *accumulator, uint16_t *count";
specialize qw/vp10_temporal_filter_apply sse2 msa/;
if (vpx_config("CONFIG_VP9_HIGHBITDEPTH") eq "yes") {
if (vpx_config("CONFIG_VPX_HIGHBITDEPTH") eq "yes") {
# ENCODEMB INVOKE
if (vpx_config("CONFIG_NEW_QUANT") eq "yes") {

View File

@ -518,7 +518,7 @@ void vp10_warp_plane(WarpedMotionParams *wm,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE void highbd_get_subcolumn(int taps, uint16_t *ref, int32_t *col,
int stride, int x, int y_start) {
int i;
@ -665,7 +665,7 @@ void vp10_highbd_warp_plane(WarpedMotionParams *wm,
}
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_integerize_model(double *H, TransformationType wmtype,
WarpedMotionParams *wm) {

View File

@ -67,7 +67,7 @@ void vp10_warp_plane(WarpedMotionParams *wm,
int p_width, int p_height, int p_stride,
int subsampling_col, int subsampling_row,
int x_scale, int y_scale);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_warp_plane(WarpedMotionParams *wm,
uint8_t *ref,
int width, int height, int stride,
@ -77,5 +77,5 @@ void vp10_highbd_warp_plane(WarpedMotionParams *wm,
int subsampling_col, int subsampling_row,
int x_scale, int y_scale,
int bd);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // VP10_COMMON_WARPED_MOTION_H

View File

@ -247,7 +247,7 @@ void vp10_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output,
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define DCT_HIGH_BIT_DEPTH 1
#define FDCT4x4_2D vp10_highbd_fdct4x4_sse2
#define FDCT8x8_2D vp10_highbd_fdct8x8_sse2
@ -269,4 +269,4 @@ void vp10_fdct32x32_1_sse2(const int16_t *input, tran_low_t *output,
#undef FDCT32x32_2D
#undef FDCT32x32_HIGH_PRECISION
#undef DCT_HIGH_BIT_DEPTH
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -10,7 +10,7 @@
#include "./vpx_config.h"
#include "vp10/common/filter.h"
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_EXT_INTERP
DECLARE_ALIGNED(16, const int16_t,
sub_pel_filters_10sharp_highbd_ver_signal_dir[15][6][8]) = {
@ -137,7 +137,7 @@ DECLARE_ALIGNED(16, const int16_t,
};
#endif
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_EXT_INTERP
DECLARE_ALIGNED(16, const int16_t,
sub_pel_filters_12sharp_highbd_ver_signal_dir[15][6][8]) = {
@ -264,7 +264,7 @@ DECLARE_ALIGNED(16, const int16_t,
};
#endif
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#if USE_TEMPORALFILTER_12TAP
DECLARE_ALIGNED(16, const int16_t,
sub_pel_filters_temporalfilter_12_highbd_ver_signal_dir[15][6][8]) = {

View File

@ -3488,7 +3488,7 @@ void vp10_idct32x32_1_add_sse2(const int16_t *input,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE __m128i clamp_high_sse2(__m128i value, int bd) {
__m128i ubounded, retval;
const __m128i zero = _mm_set1_epi16(0);
@ -4055,4 +4055,4 @@ void vp10_highbd_idct16x16_10_add_sse2(const tran_low_t *input, uint8_t *dest8,
}
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -234,16 +234,16 @@ static void inverse_transform_block(MACROBLOCKD* xd, int plane,
inv_txfm_param.eob = eob;
inv_txfm_param.lossless = xd->lossless[xd->mi[0]->mbmi.segment_id];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
inv_txfm_param.bd = xd->bd;
highbd_inv_txfm_add(dqcoeff, dst, stride, &inv_txfm_param);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
inv_txfm_add(dqcoeff, dst, stride, &inv_txfm_param);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (eob == 1) {
dqcoeff[0] = 0;
@ -755,7 +755,7 @@ static void dec_predict_sb_complex(VP10Decoder *const pbi,
int dst_stride2[3] = {MAX_TX_SIZE, MAX_TX_SIZE, MAX_TX_SIZE};
int dst_stride3[3] = {MAX_TX_SIZE, MAX_TX_SIZE, MAX_TX_SIZE};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -778,7 +778,7 @@ static void dec_predict_sb_complex(VP10Decoder *const pbi,
dst_buf3[0] = tmp_buf3;
dst_buf3[1] = tmp_buf3 + MAX_TX_SQUARE;
dst_buf3[2] = tmp_buf3 + 2 * MAX_TX_SQUARE;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif
@ -1348,7 +1348,7 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
VPXMAX(bsize, BLOCK_8X8));
#if CONFIG_OBMC
if (mbmi->motion_variation == OBMC_CAUSAL) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t,
tmp_buf1[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t,
@ -1358,7 +1358,7 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
tmp_buf1[MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t,
tmp_buf2[MAX_MB_PLANE * MAX_SB_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
uint8_t *dst_buf1[MAX_MB_PLANE], *dst_buf2[MAX_MB_PLANE];
int dst_width1[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
int dst_width2[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
@ -1368,7 +1368,7 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
int dst_stride2[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
assert(mbmi->sb_type >= BLOCK_8X8);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -1378,16 +1378,16 @@ static void decode_block(VP10Decoder *const pbi, MACROBLOCKD *const xd,
dst_buf2[1] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * len);
dst_buf2[2] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * 2 * len);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_SB_SQUARE;
dst_buf1[2] = tmp_buf1 + MAX_SB_SQUARE * 2;
dst_buf2[0] = tmp_buf2;
dst_buf2[1] = tmp_buf2 + MAX_SB_SQUARE;
dst_buf2[2] = tmp_buf2 + MAX_SB_SQUARE * 2;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vp10_build_prediction_by_above_preds(cm, xd, mi_row, mi_col,
dst_buf1, dst_width1,
dst_height1, dst_stride1);
@ -2211,7 +2211,7 @@ static void setup_frame_size(VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) {
if (vpx_realloc_frame_buffer(
get_frame_new_buffer(cm), cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_DEC_BORDER_IN_PIXELS,
@ -2298,7 +2298,7 @@ static void setup_frame_size_with_refs(VP10_COMMON *cm,
if (vpx_realloc_frame_buffer(
get_frame_new_buffer(cm), cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_DEC_BORDER_IN_PIXELS,
@ -3084,12 +3084,12 @@ static void read_bitdepth_colorspace_sampling(
VP10_COMMON *cm, struct vpx_read_bit_buffer *rb) {
if (cm->profile >= PROFILE_2) {
cm->bit_depth = vpx_rb_read_bit(rb) ? VPX_BITS_12 : VPX_BITS_10;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth = 1;
#endif
} else {
cm->bit_depth = VPX_BITS_8;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth = 0;
#endif
}
@ -3149,7 +3149,7 @@ static size_t read_uncompressed_header(VP10Decoder *pbi,
"Invalid frame marker");
cm->profile = vp10_read_profile(rb);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->profile >= MAX_PROFILES)
vpx_internal_error(&cm->error, VPX_CODEC_UNSUP_BITSTREAM,
"Unsupported bitstream profile");
@ -3272,7 +3272,7 @@ static size_t read_uncompressed_header(VP10Decoder *pbi,
for (i = 0; i < INTER_REFS_PER_FRAME; ++i) {
RefBuffer *const ref_buf = &cm->frame_refs[i];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vp10_setup_scale_factors_for_frame(&ref_buf->sf,
ref_buf->buf->y_crop_width,
ref_buf->buf->y_crop_height,
@ -3287,7 +3287,7 @@ static size_t read_uncompressed_header(VP10Decoder *pbi,
}
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
get_frame_new_buffer(cm)->bit_depth = cm->bit_depth;
#endif
get_frame_new_buffer(cm)->color_space = cm->color_space;
@ -3352,7 +3352,7 @@ static size_t read_uncompressed_header(VP10Decoder *pbi,
setup_restoration(cm, rb);
#endif // CONFIG_LOOP_RESTORATION
setup_quantization(cm, rb);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
xd->bd = (int)cm->bit_depth;
#endif

View File

@ -85,7 +85,7 @@ static int decode_coefs(const MACROBLOCKD *xd,
eob_branch_count = counts->eob_branch[tx_size_ctx][type][ref];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->bd > VPX_BITS_8) {
if (xd->bd == VPX_BITS_10) {
cat1_prob = vp10_cat1_prob_high10;
@ -183,7 +183,7 @@ static int decode_coefs(const MACROBLOCKD *xd,
case CATEGORY6_TOKEN: {
const int skip_bits = TX_SIZES - 1 - tx_size;
const uint8_t *cat6p = cat6_prob + skip_bits;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (xd->bd) {
case VPX_BITS_8:
val = CAT6_MIN_VAL + read_coeff(cat6p, 14 - skip_bits, r);
@ -213,12 +213,12 @@ static int decode_coefs(const MACROBLOCKD *xd,
#endif // CONFIG_NEW_QUANT
#if CONFIG_COEFFICIENT_RANGE_CHECKING
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
dqcoeff[scan[c]] = highbd_check_range((vp10_read_bit(r) ? -v : v),
xd->bd);
#else
dqcoeff[scan[c]] = check_range(vp10_read_bit(r) ? -v : v);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#else
dqcoeff[scan[c]] = vp10_read_bit(r) ? -v : v;
#endif // CONFIG_COEFFICIENT_RANGE_CHECKING
@ -286,7 +286,7 @@ static int decode_coefs_ans(const MACROBLOCKD *const xd,
eob_branch_count = counts->eob_branch[tx_size_ctx][type][ref];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->bd > VPX_BITS_8) {
if (xd->bd == VPX_BITS_10) {
cat1_prob = vp10_cat1_prob_high10;
@ -370,7 +370,7 @@ static int decode_coefs_ans(const MACROBLOCKD *const xd,
case CATEGORY6_TOKEN: {
const int skip_bits = TX_SIZES - 1 - tx_size;
const uint8_t *cat6p = cat6_prob + skip_bits;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (xd->bd) {
case VPX_BITS_8:
val = CAT6_MIN_VAL + read_coeff(cat6p, 14 - skip_bits, ans);
@ -398,12 +398,12 @@ static int decode_coefs_ans(const MACROBLOCKD *const xd,
#endif // CONFIG_NEW_QUANT
#if CONFIG_COEFFICIENT_RANGE_CHECKING
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
dqcoeff[scan[c]] =
highbd_check_range((uabs_read_bit(ans) ? -v : v), xd->bd);
#else
dqcoeff[scan[c]] = check_range(uabs_read_bit(ans) ? -v : v);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#else
dqcoeff[scan[c]] = uabs_read_bit(ans) ? -v : v;
#endif // CONFIG_COEFFICIENT_RANGE_CHECKING

View File

@ -156,7 +156,7 @@ void vp10_frameworker_copy_context(VPxWorker *const dst_worker,
vp10_frameworker_unlock_stats(src_worker);
dst_cm->bit_depth = src_cm->bit_depth;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
dst_cm->use_highbitdepth = src_cm->use_highbitdepth;
#endif
#if CONFIG_EXT_REFS

View File

@ -34,7 +34,7 @@ static const int segment_id[ENERGY_SPAN] = {0, 1, 1, 2, 3, 4};
DECLARE_ALIGNED(16, static const uint8_t,
vp10_all_zeros[MAX_SB_SIZE]) = {0};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, static const uint16_t,
vp10_highbd_all_zeros[MAX_SB_SIZE]) = {0};
#endif
@ -108,7 +108,7 @@ static void aq_variance(const uint8_t *a, int a_stride,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void aq_highbd_variance64(const uint8_t *a8, int a_stride,
const uint8_t *b8, int b_stride,
int w, int h, uint64_t *sse, uint64_t *sum) {
@ -139,7 +139,7 @@ static void aq_highbd_8_variance(const uint8_t *a8, int a_stride,
*sse = (unsigned int)sse_long;
*sum = (int)sum_long;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static unsigned int block_variance(VP10_COMP *cpi, MACROBLOCK *x,
BLOCK_SIZE bs) {
@ -154,7 +154,7 @@ static unsigned int block_variance(VP10_COMP *cpi, MACROBLOCK *x,
const int bw = 8 * num_8x8_blocks_wide_lookup[bs] - right_overflow;
const int bh = 8 * num_8x8_blocks_high_lookup[bs] - bottom_overflow;
int avg;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
aq_highbd_8_variance(x->plane[0].src.buf, x->plane[0].src.stride,
CONVERT_TO_BYTEPTR(vp10_highbd_all_zeros), 0, bw, bh,
@ -168,11 +168,11 @@ static unsigned int block_variance(VP10_COMP *cpi, MACROBLOCK *x,
#else
aq_variance(x->plane[0].src.buf, x->plane[0].src.stride,
vp10_all_zeros, 0, bw, bh, &sse, &avg);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
var = sse - (((int64_t)avg * avg) / (bw * bh));
return (256 * var) / (bw * bh);
} else {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
var = cpi->fn_ptr[bs].vf(x->plane[0].src.buf,
x->plane[0].src.stride,
@ -187,7 +187,7 @@ static unsigned int block_variance(VP10_COMP *cpi, MACROBLOCK *x,
var = cpi->fn_ptr[bs].vf(x->plane[0].src.buf,
x->plane[0].src.stride,
vp10_all_zeros, 0, &sse);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
return (256 * var) >> num_pels_log2_lookup[bs];
}
}

View File

@ -614,7 +614,7 @@ static void pack_mb_tokens(vp10_writer *w,
const struct vp10_token *const a = &vp10_coef_encodings[t];
int v = a->value;
int n = a->len;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const vp10_extra_bit *b;
if (bit_depth == VPX_BITS_12)
b = &vp10_extra_bits_high12[t];
@ -625,7 +625,7 @@ static void pack_mb_tokens(vp10_writer *w,
#else
const vp10_extra_bit *const b = &vp10_extra_bits[t];
(void) bit_depth;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
/* skip one or two nodes */
if (p->skip_eob_node)
@ -700,7 +700,7 @@ static void pack_mb_tokens(struct BufAnsCoder *ans,
while (p < stop && p->token != EOSB_TOKEN) {
const int t = p->token;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const vp10_extra_bit *b;
if (bit_depth == VPX_BITS_12)
b = &vp10_extra_bits_high12[t];
@ -711,7 +711,7 @@ static void pack_mb_tokens(struct BufAnsCoder *ans,
#else
const vp10_extra_bit *const b = &vp10_extra_bits[t];
(void)bit_depth;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
/* skip one or two nodes */
if (!p->skip_eob_node)

View File

@ -1602,7 +1602,7 @@ void vp10_fht16x16_c(const int16_t *input, tran_low_t *output,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_fht4x4_c(const int16_t *input, tran_low_t *output,
int stride, int tx_type) {
vp10_fht4x4_c(input, output, stride, tx_type);
@ -1634,7 +1634,7 @@ void vp10_highbd_fht16x16_c(const int16_t *input, tran_low_t *output,
int stride, int tx_type) {
vp10_fht16x16_c(input, output, stride, tx_type);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#if CONFIG_EXT_TX
void vp10_fht32x32_c(const int16_t *input, tran_low_t *output,
@ -1686,10 +1686,10 @@ void vp10_fwd_idtx_c(const int16_t *src_diff,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_fht32x32_c(const int16_t *input, tran_low_t *output,
int stride, int tx_type) {
vp10_fht32x32_c(input, output, stride, tx_type);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_EXT_TX

View File

@ -49,11 +49,11 @@
#include "vp10/encoder/segmentation.h"
#include "vp10/encoder/tokenize.h"
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
# define IF_HBD(...) __VA_ARGS__
#else
# define IF_HBD(...)
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static void encode_superblock(VP10_COMP *cpi, ThreadData * td,
TOKENEXTRA **t, int output_enabled,
@ -120,7 +120,7 @@ static const uint8_t VP10_VAR_OFFS[MAX_SB_SIZE] = {
#endif // CONFIG_EXT_PARTITION
};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static const uint16_t VP10_HIGH_VAR_OFFS_8[MAX_SB_SIZE] = {
128, 128, 128, 128, 128, 128, 128, 128,
128, 128, 128, 128, 128, 128, 128, 128,
@ -183,7 +183,7 @@ static const uint16_t VP10_HIGH_VAR_OFFS_12[MAX_SB_SIZE] = {
128*16, 128*16, 128*16, 128*16, 128*16, 128*16, 128*16, 128*16
#endif // CONFIG_EXT_PARTITION
};
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
unsigned int vp10_get_sby_perpixel_variance(VP10_COMP *cpi,
const struct buf_2d *ref,
@ -194,7 +194,7 @@ unsigned int vp10_get_sby_perpixel_variance(VP10_COMP *cpi,
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
unsigned int vp10_high_get_sby_perpixel_variance(
VP10_COMP *cpi, const struct buf_2d *ref, BLOCK_SIZE bs, int bd) {
unsigned int var, sse;
@ -218,7 +218,7 @@ unsigned int vp10_high_get_sby_perpixel_variance(
}
return ROUND_POWER_OF_TWO(var, num_pels_log2_lookup[bs]);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static unsigned int get_sby_perpixel_diff_variance(VP10_COMP *cpi,
const struct buf_2d *ref,
@ -609,7 +609,7 @@ void vp10_set_variance_partition_thresholds(VP10_COMP *cpi, int q) {
// Compute the minmax over the 8x8 subblocks.
static int compute_minmax_8x8(const uint8_t *src, int src_stride,
const uint8_t *ref, int ref_stride,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int highbd,
#endif
int pixels_wide,
@ -626,7 +626,7 @@ static int compute_minmax_8x8(const uint8_t *src, int src_stride,
if (x8_idx < pixels_wide && y8_idx < pixels_high) {
const int src_offset = y8_idx * src_stride + x8_idx;
const int ref_offset = y8_idx * ref_stride + x8_idx;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (highbd) {
vpx_highbd_minmax_8x8(src + src_offset, src_stride,
ref + ref_offset, ref_stride,
@ -650,7 +650,7 @@ static int compute_minmax_8x8(const uint8_t *src, int src_stride,
return (minmax_max - minmax_min);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE int avg_4x4(const uint8_t *const src, const int stride,
const int highbd) {
if (highbd) {
@ -665,7 +665,7 @@ static INLINE int avg_4x4(const uint8_t *const src, const int stride) {
}
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE int avg_8x8(const uint8_t *const src, const int stride,
const int highbd) {
if (highbd) {
@ -681,7 +681,7 @@ static INLINE int avg_8x8(const uint8_t *const src, const int stride) {
#endif
static void init_variance_tree(VAR_TREE *const vt,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int highbd,
#endif
BLOCK_SIZE bsize,
@ -703,42 +703,42 @@ static void init_variance_tree(VAR_TREE *const vt,
vt->width = width;
vt->height = height;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vt->highbd = highbd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (bsize > leaf_size) {
const BLOCK_SIZE subsize = get_subsize(bsize, PARTITION_SPLIT);
const int px = num_4x4_blocks_wide_lookup[subsize] * 4;
init_variance_tree(vt->split[0],
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd,
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
subsize, leaf_size,
VPXMIN(px, width), VPXMIN(px, height),
src, src_stride,
ref, ref_stride);
init_variance_tree(vt->split[1],
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd,
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
subsize, leaf_size,
width - px, VPXMIN(px, height),
src + px, src_stride,
ref + px, ref_stride);
init_variance_tree(vt->split[2],
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd,
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
subsize, leaf_size,
VPXMIN(px, width), height - px,
src + px * src_stride, src_stride,
ref + px * ref_stride, ref_stride);
init_variance_tree(vt->split[3],
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd,
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
subsize, leaf_size,
width - px, height - px,
src + px * src_stride + px, src_stride,
@ -834,7 +834,7 @@ static int check_split(VP10_COMP *const cpi,
// force split to 8x8 block for this 16x16 block.
int minmax = compute_minmax_8x8(vt->src, vt->src_stride,
vt->ref, vt->ref_stride,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vt->highbd,
#endif
vt->width, vt->height);
@ -1009,7 +1009,7 @@ static void choose_partitioning(VP10_COMP *const cpi,
} else {
ref = VP10_VAR_OFFS;
ref_stride = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
switch (xd->bd) {
case 10:
@ -1024,13 +1024,13 @@ static void choose_partitioning(VP10_COMP *const cpi,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
init_variance_tree(vt,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH,
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
cm->sb_size,
(is_key_frame || low_res) ? BLOCK_4X4 : BLOCK_8X8,
pixels_wide, pixels_high,
@ -1748,7 +1748,7 @@ static void rd_pick_sb_modes(VP10_COMP *cpi,
// Set to zero to make sure we do not use the previous encoded frame stats
mbmi->skip = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->source_variance =
vp10_high_get_sby_perpixel_variance(cpi, &x->plane[0].src,
@ -1760,7 +1760,7 @@ static void rd_pick_sb_modes(VP10_COMP *cpi,
#else
x->source_variance =
vp10_get_sby_perpixel_variance(cpi, &x->plane[0].src, bsize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Save rdmult before it might be changed, so it can be restored later.
orig_rdmult = x->rdmult;
@ -5111,13 +5111,13 @@ static void encode_superblock(VP10_COMP *cpi, ThreadData *td,
#if CONFIG_OBMC
if (mbmi->motion_variation == OBMC_CAUSAL) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
#else
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[MAX_MB_PLANE * MAX_SB_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
uint8_t *dst_buf1[MAX_MB_PLANE], *dst_buf2[MAX_MB_PLANE];
int dst_stride1[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
int dst_stride2[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
@ -5128,7 +5128,7 @@ static void encode_superblock(VP10_COMP *cpi, ThreadData *td,
assert(mbmi->sb_type >= BLOCK_8X8);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -5138,16 +5138,16 @@ static void encode_superblock(VP10_COMP *cpi, ThreadData *td,
dst_buf2[1] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * len);
dst_buf2[2] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * 2 * len);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_SB_SQUARE;
dst_buf1[2] = tmp_buf1 + MAX_SB_SQUARE * 2;
dst_buf2[0] = tmp_buf2;
dst_buf2[1] = tmp_buf2 + MAX_SB_SQUARE;
dst_buf2[2] = tmp_buf2 + MAX_SB_SQUARE * 2;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vp10_build_prediction_by_above_preds(cm, xd, mi_row, mi_col, dst_buf1,
dst_width1, dst_height1,
dst_stride1);
@ -5631,7 +5631,7 @@ static void predict_sb_complex(VP10_COMP *cpi, ThreadData *td,
if (mi_row >= cm->mi_rows || mi_col >= cm->mi_cols)
return;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -5644,7 +5644,7 @@ static void predict_sb_complex(VP10_COMP *cpi, ThreadData *td,
dst_buf3[1] = CONVERT_TO_BYTEPTR(tmp_buf3 + MAX_TX_SQUARE * len);
dst_buf3[2] = CONVERT_TO_BYTEPTR(tmp_buf3 + 2 * MAX_TX_SQUARE * len);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_TX_SQUARE;
dst_buf1[2] = tmp_buf1 + 2 * MAX_TX_SQUARE;
@ -5654,9 +5654,9 @@ static void predict_sb_complex(VP10_COMP *cpi, ThreadData *td,
dst_buf3[0] = tmp_buf3;
dst_buf3[1] = tmp_buf3 + MAX_TX_SQUARE;
dst_buf3[2] = tmp_buf3 + 2 * MAX_TX_SQUARE;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (output_enabled && bsize < top_bsize)
cm->counts.partition[ctx][partition]++;

View File

@ -35,14 +35,14 @@ void vp10_subtract_plane(MACROBLOCK *x, BLOCK_SIZE bsize, int plane) {
const int bw = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
const int bh = 4 * num_4x4_blocks_high_lookup[plane_bsize];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (x->e_mbd.cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vpx_highbd_subtract_block(bh, bw, p->src_diff, bw, p->src.buf,
p->src.stride, pd->dst.buf, pd->dst.stride,
x->e_mbd.bd);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_subtract_block(bh, bw, p->src_diff, bw, p->src.buf, p->src.stride,
pd->dst.buf, pd->dst.stride);
}
@ -105,7 +105,7 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block,
int best, band = (eob < default_eob) ?
band_translate[eob] : band_translate[eob - 1];
int pt, i, final_eob;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int *cat6_high_cost = vp10_get_high_cost_table(xd->bd);
#else
const int *cat6_high_cost = vp10_get_high_cost_table(8);
@ -172,11 +172,11 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block,
}
dx = (dqcoeff[rc] - coeff[rc]) * (1 << shift);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx >>= xd->bd - 8;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
d2 = (int64_t)dx * dx;
tokens[i][0].rate += (best ? rate1 : rate0);
tokens[i][0].error = d2 + (best ? error1 : error0);
@ -271,13 +271,13 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block,
dx = vp10_dequant_coeff_nuq(
x, dequant_ptr[rc != 0],
dequant_val[band_translate[i]]) - (coeff[rc] << shift);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx >>= xd->bd - 8;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#else // CONFIG_NEW_QUANT
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
dx -= ((dequant_ptr[rc != 0] >> (xd->bd - 8)) + sz) ^ sz;
} else {
@ -285,7 +285,7 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block,
}
#else
dx -= (dequant_ptr[rc != 0] + sz) ^ sz;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_NEW_QUANT
d2 = (int64_t)dx * dx;
@ -382,7 +382,7 @@ int vp10_optimize_b(MACROBLOCK *mb, int plane, int block,
return final_eob;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef enum QUANT_FUNC {
QUANT_FUNC_LOWBD = 0,
QUANT_FUNC_HIGHBD = 1,
@ -444,7 +444,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row,
src_diff = &p->src_diff[4 * (blk_row * diff_stride + blk_col)];
qparam.log_scale = get_tx_scale(xd, tx_type, tx_size);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
@ -459,7 +459,7 @@ void vp10_xform_quant(MACROBLOCK *x, int plane, int block, int blk_row,
}
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (xform_quant_idx != VP10_XFORM_QUANT_SKIP_QUANT) {
@ -505,7 +505,7 @@ void vp10_xform_quant_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
// TODO(sarahparker) add all of these new quant quantize functions
// to quant_func_list, just trying to get this expr to work for now
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
@ -529,7 +529,7 @@ void vp10_xform_quant_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
}
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (tx_size == TX_32X32) {
@ -581,7 +581,7 @@ void vp10_xform_quant_fp_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
// TODO(sarahparker) add all of these new quant quantize functions
// to quant_func_list, just trying to get this expr to work for now
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
@ -606,7 +606,7 @@ void vp10_xform_quant_fp_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
}
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (tx_size == TX_32X32) {
@ -658,7 +658,7 @@ void vp10_xform_quant_dc_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
// TODO(sarahparker) add all of these new quant quantize functions
// to quant_func_list, just trying to get this expr to work for now
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
@ -679,7 +679,7 @@ void vp10_xform_quant_dc_nuq(MACROBLOCK *x, int plane, int block, int blk_row,
}
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (tx_size == TX_32X32) {
@ -726,7 +726,7 @@ void vp10_xform_quant_dc_fp_nuq(MACROBLOCK *x, int plane, int block,
// TODO(sarahparker) add all of these new quant quantize functions
// to quant_func_list, just trying to get this expr to work for now
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
fwd_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
@ -746,7 +746,7 @@ void vp10_xform_quant_dc_fp_nuq(MACROBLOCK *x, int plane, int block,
}
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
fwd_txfm(src_diff, coeff, diff_stride, &fwd_txfm_param);
if (tx_size == TX_32X32) {
@ -840,13 +840,13 @@ static void encode_block(int plane, int block, int blk_row, int blk_col,
inv_txfm_param.eob = p->eobs[block];
inv_txfm_param.lossless = xd->lossless[xd->mi[0]->mbmi.segment_id];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
inv_txfm_param.bd = xd->bd;
highbd_inv_txfm_add(dqcoeff, dst, pd->dst.stride, &inv_txfm_param);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
inv_txfm_add(dqcoeff, dst, pd->dst.stride, &inv_txfm_param);
}
@ -930,7 +930,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
#endif // CONFIG_NEW_QUANT
if (p->eobs[block] > 0) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
vp10_highbd_iwht4x4_add(dqcoeff, dst, pd->dst.stride,
@ -941,7 +941,7 @@ static void encode_block_pass1(int plane, int block, int blk_row, int blk_col,
}
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (xd->lossless[xd->mi[0]->mbmi.segment_id]) {
vp10_iwht4x4_add(dqcoeff, dst, pd->dst.stride, p->eobs[block]);
} else {
@ -1073,7 +1073,7 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col,
mode = plane == 0 ? get_y_mode(xd->mi[0], block) : mbmi->uv_mode;
vp10_predict_intra_block(xd, bwl, bhl, tx_size, mode, dst, dst_stride, dst,
dst_stride, blk_col, blk_row, plane);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vpx_highbd_subtract_block(tx1d_height, tx1d_width, src_diff, diff_stride,
src, src_stride, dst, dst_stride, xd->bd);
@ -1084,7 +1084,7 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col,
#else
vpx_subtract_block(tx1d_height, tx1d_width, src_diff, diff_stride, src,
src_stride, dst, dst_stride);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
a = &args->ta[blk_col];
l = &args->tl[blk_row];
@ -1115,7 +1115,7 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col,
inv_txfm_param.tx_size = tx_size;
inv_txfm_param.eob = *eob;
inv_txfm_param.lossless = xd->lossless[mbmi->segment_id];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
inv_txfm_param.bd = xd->bd;
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_inv_txfm_add(dqcoeff, dst, dst_stride, &inv_txfm_param);
@ -1124,7 +1124,7 @@ void vp10_encode_block_intra(int plane, int block, int blk_row, int blk_col,
}
#else
inv_txfm_add(dqcoeff, dst, dst_stride, &inv_txfm_param);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
*(args->skip) = 0;
}

View File

@ -721,7 +721,7 @@ static void alloc_raw_frame_buffers(VP10_COMP *cpi) {
if (!cpi->lookahead)
cpi->lookahead = vp10_lookahead_init(oxcf->width, oxcf->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
oxcf->lag_in_frames);
@ -733,7 +733,7 @@ static void alloc_raw_frame_buffers(VP10_COMP *cpi) {
if (vpx_realloc_frame_buffer(&cpi->alt_ref_buffer,
oxcf->width, oxcf->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -747,7 +747,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
if (vpx_realloc_frame_buffer(&cpi->last_frame_uf,
cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -759,7 +759,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
if (vpx_realloc_frame_buffer(&cpi->last_frame_db,
cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -771,7 +771,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
if (vpx_realloc_frame_buffer(&cpi->scaled_source,
cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -782,7 +782,7 @@ static void alloc_util_frame_buffers(VP10_COMP *cpi) {
if (vpx_realloc_frame_buffer(&cpi->scaled_last_source,
cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -924,7 +924,7 @@ static void init_config(struct VP10_COMP *cpi, VP10EncoderConfig *oxcf) {
cm->profile = oxcf->profile;
cm->bit_depth = oxcf->bit_depth;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth = oxcf->use_highbitdepth;
#endif
cm->color_space = oxcf->color_space;
@ -960,7 +960,7 @@ static void set_rc_buffer_sizes(RATE_CONTROL *rc,
: maximum * bandwidth / 1000;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define HIGHBD_BFP(BT, SDF, SDAF, VF, SVF, SVAF, SDX3F, SDX8F, SDX4DF) \
cpi->fn_ptr[BT].sdf = SDF; \
cpi->fn_ptr[BT].sdaf = SDAF; \
@ -2180,7 +2180,7 @@ static void highbd_set_var_fns(VP10_COMP *const cpi) {
}
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static void realloc_segmentation_maps(VP10_COMP *cpi) {
VP10_COMMON *const cm = &cpi->common;
@ -2224,9 +2224,9 @@ void vp10_change_config(struct VP10_COMP *cpi, const VP10EncoderConfig *oxcf) {
assert(cm->bit_depth > VPX_BITS_8);
cpi->oxcf = *oxcf;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cpi->td.mb.e_mbd.bd = (int)cm->bit_depth;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if ((oxcf->pass == 0) && (oxcf->rc_mode == VPX_Q)) {
rc->baseline_gf_interval = FIXED_GF_INTERVAL;
@ -2325,7 +2325,7 @@ void vp10_change_config(struct VP10_COMP *cpi, const VP10EncoderConfig *oxcf) {
cpi->ext_refresh_frame_flags_pending = 0;
cpi->ext_refresh_frame_context_pending = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd_set_var_fns(cpi);
#endif
}
@ -2755,7 +2755,7 @@ VP10_COMP *vp10_create_compressor(VP10EncoderConfig *oxcf,
vpx_masked_sub_pixel_variance4x4)
#endif // CONFIG_EXT_INTER
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
highbd_set_var_fns(cpi);
#endif
@ -2936,7 +2936,7 @@ static void generate_psnr_packet(VP10_COMP *cpi) {
struct vpx_codec_cx_pkt pkt;
int i;
PSNR_STATS psnr;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_calc_highbd_psnr(cpi->Source, cpi->common.frame_to_show, &psnr,
cpi->td.mb.e_mbd.bd, cpi->oxcf.input_bit_depth);
#else
@ -3083,7 +3083,7 @@ void vp10_write_one_yuv_frame(VP10_COMMON *cm, YV12_BUFFER_CONFIG *s) {
uint8_t *src = s->y_buffer;
int h = cm->height;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (s->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *src16 = CONVERT_TO_SHORTPTR(s->y_buffer);
@ -3111,7 +3111,7 @@ void vp10_write_one_yuv_frame(VP10_COMMON *cm, YV12_BUFFER_CONFIG *s) {
fflush(yuv_rec_file);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
do {
fwrite(src, s->y_width, 1, yuv_rec_file);
@ -3138,14 +3138,14 @@ void vp10_write_one_yuv_frame(VP10_COMMON *cm, YV12_BUFFER_CONFIG *s) {
}
#endif // OUTPUT_YUV_REC
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst,
int bd) {
#else
static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst) {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// TODO(dkovalev): replace YV12_BUFFER_CONFIG with vpx_image_t
int i;
const uint8_t *const srcs[3] = {src->y_buffer, src->u_buffer, src->v_buffer};
@ -3162,7 +3162,7 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
dst->uv_crop_height};
for (i = 0; i < MAX_MB_PLANE; ++i) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (src->flags & YV12_FLAG_HIGHBITDEPTH) {
vp10_highbd_resize_plane(srcs[i], src_heights[i], src_widths[i],
src_strides[i], dsts[i], dst_heights[i],
@ -3174,19 +3174,19 @@ static void scale_and_extend_frame_nonnormative(const YV12_BUFFER_CONFIG *src,
#else
vp10_resize_plane(srcs[i], src_heights[i], src_widths[i], src_strides[i],
dsts[i], dst_heights[i], dst_widths[i], dst_strides[i]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
vpx_extend_frame_borders(dst);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst, int planes,
int bd) {
#else
static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst, int planes) {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const int src_w = src->y_crop_width;
const int src_h = src->y_crop_height;
const int dst_w = dst->y_crop_width;
@ -3213,7 +3213,7 @@ static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
src_stride + (x / factor) * src_w / dst_w;
uint8_t *dst_ptr = dsts[i] + (y / factor) * dst_stride + (x / factor);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (src->flags & YV12_FLAG_HIGHBITDEPTH) {
vpx_highbd_convolve8(src_ptr, src_stride, dst_ptr, dst_stride,
&kernel[(x_q4 & 0xf) * taps], 16 * src_w / dst_w,
@ -3230,7 +3230,7 @@ static void scale_and_extend_frame(const YV12_BUFFER_CONFIG *src,
&kernel[(x_q4 & 0xf) * taps], 16 * src_w / dst_w,
&kernel[(y_q4 & 0xf) * taps], 16 * src_h / dst_h,
16 / factor, 16 / factor);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
}
@ -3322,7 +3322,7 @@ static INLINE int upsample_ref_frame(VP10_COMP *cpi,
if (vpx_realloc_frame_buffer(upsampled_ref,
(cm->width << 3), (cm->height << 3),
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
(VPX_ENC_BORDER_IN_PIXELS << 3),
@ -3332,7 +3332,7 @@ static INLINE int upsample_ref_frame(VP10_COMP *cpi,
"Failed to allocate up-sampled frame buffer");
// Currently, only Y plane is up-sampled, U, V are not used.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
scale_and_extend_frame(ref, upsampled_ref, 1, (int)cm->bit_depth);
#else
scale_and_extend_frame(ref, upsampled_ref, 1);
@ -3735,7 +3735,7 @@ void vp10_scale_references(VP10_COMP *cpi) {
continue;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (ref->y_crop_width != cm->width || ref->y_crop_height != cm->height) {
RefCntBuffer *new_fb_ptr = NULL;
int force_scaling = 0;
@ -3787,7 +3787,7 @@ void vp10_scale_references(VP10_COMP *cpi) {
cpi->scaled_ref_idx[ref_frame - 1] = new_fb;
alloc_frame_mvs(cm, new_fb);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (cpi->sf.use_upsampled_references && (force_scaling ||
new_fb_ptr->buf.y_crop_width != cm->width ||
@ -3799,7 +3799,7 @@ void vp10_scale_references(VP10_COMP *cpi) {
if (vpx_realloc_frame_buffer(&ubuf->buf,
(cm->width << 3), (cm->height << 3),
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
(VPX_ENC_BORDER_IN_PIXELS << 3),
@ -3807,7 +3807,7 @@ void vp10_scale_references(VP10_COMP *cpi) {
NULL, NULL, NULL))
vpx_internal_error(&cm->error, VPX_CODEC_MEM_ERROR,
"Failed to allocate up-sampled frame buffer");
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
scale_and_extend_frame(&new_fb_ptr->buf, &ubuf->buf, 1,
(int)cm->bit_depth);
#else
@ -4082,7 +4082,7 @@ static void set_frame_size(VP10_COMP *cpi) {
// Reset the frame pointers to the current frame size.
if (vpx_realloc_frame_buffer(get_frame_new_buffer(cm), cm->width, cm->height,
cm->subsampling_x, cm->subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS, cm->byte_alignment,
@ -4102,7 +4102,7 @@ static void set_frame_size(VP10_COMP *cpi) {
if (buf_idx != INVALID_IDX) {
YV12_BUFFER_CONFIG *const buf = &cm->buffer_pool->frame_bufs[buf_idx].buf;
ref_buf->buf = buf;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vp10_setup_scale_factors_for_frame(&ref_buf->sf,
buf->y_crop_width, buf->y_crop_height,
cm->width, cm->height,
@ -4112,7 +4112,7 @@ static void set_frame_size(VP10_COMP *cpi) {
vp10_setup_scale_factors_for_frame(&ref_buf->sf,
buf->y_crop_width, buf->y_crop_height,
cm->width, cm->height);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (vp10_is_scaled(&ref_buf->sf))
vpx_extend_frame_borders(buf);
} else {
@ -4382,7 +4382,7 @@ static void encode_with_recode_loop(VP10_COMP *cpi,
int64_t high_err_target = cpi->ambient_err;
int64_t low_err_target = cpi->ambient_err >> 1;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
kf_err = vpx_highbd_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
} else {
@ -4390,7 +4390,7 @@ static void encode_with_recode_loop(VP10_COMP *cpi,
}
#else
kf_err = vpx_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Prevent possible divide by zero error below for perfect KF
kf_err += !kf_err;
@ -4637,11 +4637,11 @@ YV12_BUFFER_CONFIG *vp10_scale_if_required(VP10_COMMON *cm,
YV12_BUFFER_CONFIG *scaled) {
if (cm->mi_cols * MI_SIZE != unscaled->y_width ||
cm->mi_rows * MI_SIZE != unscaled->y_height) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
scale_and_extend_frame_nonnormative(unscaled, scaled, (int)cm->bit_depth);
#else
scale_and_extend_frame_nonnormative(unscaled, scaled);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
return scaled;
} else {
return unscaled;
@ -4913,7 +4913,7 @@ static void encode_frame_to_data_rate(VP10_COMP *cpi,
// fixed interval. Note the reconstruction error if it is the frame before
// the force key frame
if (cpi->rc.next_key_frame_forced && cpi->rc.frames_to_key == 1) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
cpi->ambient_err = vpx_highbd_get_y_sse(cpi->Source,
get_frame_new_buffer(cm));
@ -4922,7 +4922,7 @@ static void encode_frame_to_data_rate(VP10_COMP *cpi,
}
#else
cpi->ambient_err = vpx_get_y_sse(cpi->Source, get_frame_new_buffer(cm));
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
// If the encoder forced a KEY_FRAME decision
@ -5093,21 +5093,21 @@ static void init_ref_frame_bufs(VP10_COMMON *cm) {
}
static void check_initial_width(VP10_COMP *cpi,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int use_highbitdepth,
#endif
int subsampling_x, int subsampling_y) {
VP10_COMMON *const cm = &cpi->common;
if (!cpi->initial_width ||
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth != use_highbitdepth ||
#endif
cm->subsampling_x != subsampling_x ||
cm->subsampling_y != subsampling_y) {
cm->subsampling_x = subsampling_x;
cm->subsampling_y = subsampling_y;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
cm->use_highbitdepth = use_highbitdepth;
#endif
@ -5131,22 +5131,22 @@ int vp10_receive_raw_frame(VP10_COMP *cpi, unsigned int frame_flags,
int res = 0;
const int subsampling_x = sd->subsampling_x;
const int subsampling_y = sd->subsampling_y;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int use_highbitdepth = (sd->flags & YV12_FLAG_HIGHBITDEPTH) != 0;
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
check_initial_width(cpi, use_highbitdepth, subsampling_x, subsampling_y);
#else
check_initial_width(cpi, subsampling_x, subsampling_y);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_usec_timer_start(&timer);
if (vp10_lookahead_push(cpi->lookahead, sd, time_stamp, end_time,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
use_highbitdepth,
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
frame_flags))
res = -1;
vpx_usec_timer_mark(&timer);
@ -5306,7 +5306,7 @@ static void compute_internal_stats(VP10_COMP *cpi) {
uint32_t in_bit_depth = 8;
uint32_t bit_depth = 8;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
in_bit_depth = cpi->oxcf.input_bit_depth;
bit_depth = cm->bit_depth;
@ -5323,11 +5323,11 @@ static void compute_internal_stats(VP10_COMP *cpi) {
double frame_ssim2 = 0.0, weight = 0.0;
vpx_clear_system_state();
// TODO(yaowu): unify these two versions into one.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vpx_calc_highbd_psnr(orig, recon, &psnr, bit_depth, in_bit_depth);
#else
vpx_calc_psnr(orig, recon, &psnr);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
adjust_image_stat(psnr.psnr[1], psnr.psnr[2], psnr.psnr[3],
psnr.psnr[0], &cpi->psnr);
@ -5335,7 +5335,7 @@ static void compute_internal_stats(VP10_COMP *cpi) {
cpi->total_samples += psnr.samples[0];
samples = psnr.samples[0];
// TODO(yaowu): unify these two versions into one.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth)
frame_ssim2 = vpx_highbd_calc_ssim(orig, recon, &weight,
bit_depth, in_bit_depth);
@ -5343,7 +5343,7 @@ static void compute_internal_stats(VP10_COMP *cpi) {
frame_ssim2 = vpx_calc_ssim(orig, recon, &weight);
#else
frame_ssim2 = vpx_calc_ssim(orig, recon, &weight);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
cpi->worst_ssim= VPXMIN(cpi->worst_ssim, frame_ssim2);
cpi->summed_quality += frame_ssim2 * weight;
@ -5360,7 +5360,7 @@ static void compute_internal_stats(VP10_COMP *cpi) {
#endif
}
if (cpi->b_calculate_blockiness) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (!cm->use_highbitdepth)
#endif
{
@ -5372,7 +5372,7 @@ static void compute_internal_stats(VP10_COMP *cpi) {
}
if (cpi->b_calculate_consistency) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (!cm->use_highbitdepth)
#endif
{
@ -5741,11 +5741,11 @@ int vp10_set_internal_size(VP10_COMP *cpi,
int vp10_set_size_literal(VP10_COMP *cpi, unsigned int width,
unsigned int height) {
VP10_COMMON *cm = &cpi->common;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
check_initial_width(cpi, cm->use_highbitdepth, 1, 1);
#else
check_initial_width(cpi, 1, 1);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (width) {
cm->width = width;

View File

@ -248,7 +248,7 @@ typedef struct VP10EncoderConfig {
vpx_tune_metric tuning;
vpx_tune_content content;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int use_highbitdepth;
#endif
vpx_color_space_t color_space;

View File

@ -57,7 +57,7 @@ static void copy_and_extend_plane(const uint8_t *src, int src_pitch,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_copy_and_extend_plane(const uint8_t *src8, int src_pitch,
uint8_t *dst8, int dst_pitch,
int w, int h,
@ -101,7 +101,7 @@ static void highbd_copy_and_extend_plane(const uint8_t *src8, int src_pitch,
dst_ptr2 += dst_pitch;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src,
YV12_BUFFER_CONFIG *dst) {
@ -125,7 +125,7 @@ void vp10_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src,
const int eb_uv = eb_y >> uv_height_subsampling;
const int er_uv = er_y >> uv_width_subsampling;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (src->flags & YV12_FLAG_HIGHBITDEPTH) {
highbd_copy_and_extend_plane(src->y_buffer, src->y_stride,
dst->y_buffer, dst->y_stride,
@ -143,7 +143,7 @@ void vp10_copy_and_extend_frame(const YV12_BUFFER_CONFIG *src,
et_uv, el_uv, eb_uv, er_uv);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
copy_and_extend_plane(src->y_buffer, src->y_stride,
dst->y_buffer, dst->y_stride,

View File

@ -320,7 +320,7 @@ static unsigned int get_prediction_error(BLOCK_SIZE bsize,
return sse;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static vpx_variance_fn_t highbd_get_block_variance_fn(BLOCK_SIZE bsize,
int bd) {
switch (bd) {
@ -372,7 +372,7 @@ static unsigned int highbd_get_prediction_error(BLOCK_SIZE bsize,
fn(src->buf, src->stride, ref->buf, ref->stride, &sse);
return sse;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Refine the motion search range according to the frame dimension
// for first pass test.
@ -404,11 +404,11 @@ static void first_pass_motion_search(VP10_COMP *cpi, MACROBLOCK *x,
// Override the default variance function to use MSE.
v_fn_ptr.vf = get_block_variance_fn(bsize);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
v_fn_ptr.vf = highbd_get_block_variance_fn(bsize, xd->bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Center the initial step/diamond search on best mv.
tmp_err = cpi->diamond_search_sad(x, &cpi->ss_cfg, &ref_mv_full, &tmp_mv,
@ -640,7 +640,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
image_data_start_row = mb_row;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
switch (cm->bit_depth) {
case VPX_BITS_8:
@ -657,7 +657,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
return;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_clear_system_state();
log_intra = log(this_error + 1.0);
@ -666,7 +666,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
else
intra_factor += 1.0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth)
level_sample = CONVERT_TO_SHORTPTR(x->plane[0].src.buf)[0];
else
@ -711,7 +711,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
struct buf_2d unscaled_last_source_buf_2d;
xd->plane[0].pre[0].buf = first_ref_buf->y_buffer + recon_yoffset;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
motion_error = highbd_get_prediction_error(
bsize, &x->plane[0].src, &xd->plane[0].pre[0], xd->bd);
@ -722,7 +722,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
#else
motion_error = get_prediction_error(
bsize, &x->plane[0].src, &xd->plane[0].pre[0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Compute the motion error of the 0,0 motion using the last source
// frame as the reference. Skip the further motion search on
@ -731,7 +731,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
cpi->unscaled_last_source->y_buffer + recon_yoffset;
unscaled_last_source_buf_2d.stride =
cpi->unscaled_last_source->y_stride;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
raw_motion_error = highbd_get_prediction_error(
bsize, &x->plane[0].src, &unscaled_last_source_buf_2d, xd->bd);
@ -742,7 +742,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
#else
raw_motion_error = get_prediction_error(
bsize, &x->plane[0].src, &unscaled_last_source_buf_2d);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// TODO(pengchong): Replace the hard-coded threshold
if (raw_motion_error > 25) {
@ -768,7 +768,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
int gf_motion_error;
xd->plane[0].pre[0].buf = gld_yv12->y_buffer + recon_yoffset;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
gf_motion_error = highbd_get_prediction_error(
bsize, &x->plane[0].src, &xd->plane[0].pre[0], xd->bd);
@ -779,7 +779,7 @@ void vp10_first_pass(VP10_COMP *cpi, const struct lookahead_entry *source) {
#else
gf_motion_error = get_prediction_error(
bsize, &x->plane[0].src, &xd->plane[0].pre[0]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
first_pass_motion_search(cpi, x, &zero_mv, &tmp_mv,
&gf_motion_error);

View File

@ -188,7 +188,7 @@ static void fwd_txfm_32x32(int rd_transform, const int16_t *src_diff,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_fwd_txfm_4x4(const int16_t *src_diff, tran_low_t *coeff,
int diff_stride, TX_TYPE tx_type, int lossless,
const int bd) {
@ -358,7 +358,7 @@ static void highbd_fwd_txfm_32x32(int rd_transform, const int16_t *src_diff,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void fwd_txfm(const int16_t *src_diff, tran_low_t *coeff, int diff_stride,
FWD_TXFM_PARAM *fwd_txfm_param) {
@ -395,7 +395,7 @@ void fwd_txfm(const int16_t *src_diff, tran_low_t *coeff, int diff_stride,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void highbd_fwd_txfm(const int16_t *src_diff, tran_low_t *coeff,
int diff_stride, FWD_TXFM_PARAM *fwd_txfm_param) {
const int fwd_txfm_opt = fwd_txfm_param->fwd_txfm_opt;
@ -436,4 +436,4 @@ void highbd_fwd_txfm(const int16_t *src_diff, tran_low_t *coeff,
break;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -21,9 +21,9 @@ typedef struct FWD_TXFM_PARAM {
FWD_TXFM_OPT fwd_txfm_opt;
int rd_transform;
int lossless;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int bd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} FWD_TXFM_PARAM;
#ifdef __cplusplus
@ -33,10 +33,10 @@ extern "C" {
void fwd_txfm(const int16_t *src_diff, tran_low_t *coeff, int diff_stride,
FWD_TXFM_PARAM *fwd_txfm_param);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void highbd_fwd_txfm(const int16_t *src_diff, tran_low_t *coeff,
int diff_stride, FWD_TXFM_PARAM *fwd_txfm_param);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

View File

@ -50,7 +50,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width,
unsigned int height,
unsigned int subsampling_x,
unsigned int subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int use_highbitdepth,
#endif
unsigned int depth) {
@ -74,7 +74,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width,
for (i = 0; i < depth; i++)
if (vpx_alloc_frame_buffer(&ctx->buf[i].img,
width, height, subsampling_x, subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS,
@ -91,7 +91,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width,
int vp10_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src,
int64_t ts_start, int64_t ts_end,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int use_highbitdepth,
#endif
unsigned int flags) {
@ -174,7 +174,7 @@ int vp10_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src,
memset(&new_img, 0, sizeof(new_img));
if (vpx_alloc_frame_buffer(&new_img,
width, height, subsampling_x, subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
use_highbitdepth,
#endif
VPX_ENC_BORDER_IN_PIXELS,

View File

@ -47,7 +47,7 @@ struct lookahead_ctx *vp10_lookahead_init(unsigned int width,
unsigned int height,
unsigned int subsampling_x,
unsigned int subsampling_y,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int use_highbitdepth,
#endif
unsigned int depth);
@ -75,7 +75,7 @@ void vp10_lookahead_destroy(struct lookahead_ctx *ctx);
*/
int vp10_lookahead_push(struct lookahead_ctx *ctx, YV12_BUFFER_CONFIG *src,
int64_t ts_start, int64_t ts_end,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int use_highbitdepth,
#endif
unsigned int flags);

View File

@ -351,7 +351,7 @@ static unsigned int setup_center_error(const MACROBLOCKD *xd,
unsigned int *sse1,
int *distortion) {
unsigned int besterr;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (second_pred != NULL) {
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t, comp_pred16[MAX_SB_SQUARE]);
@ -380,7 +380,7 @@ static unsigned int setup_center_error(const MACROBLOCKD *xd,
}
*distortion = besterr;
besterr += mv_err_cost(bestmv, ref_mv, mvjcost, mvcost, error_per_bit);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
return besterr;
}
@ -680,7 +680,7 @@ static int upsampled_pref_error(const MACROBLOCKD *xd,
const uint8_t *second_pred,
int w, int h, unsigned int *sse) {
unsigned int besterr;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t, pred16[MAX_SB_SQUARE]);
if (second_pred != NULL)
@ -696,7 +696,7 @@ static int upsampled_pref_error(const MACROBLOCKD *xd,
#else
DECLARE_ALIGNED(16, uint8_t, pred[MAX_SB_SQUARE]);
(void) xd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (second_pred != NULL)
vpx_comp_avg_upsampled_pred(pred, second_pred, w, h, y,
y_stride);
@ -704,7 +704,7 @@ static int upsampled_pref_error(const MACROBLOCKD *xd,
vpx_upsampled_pred(pred, w, h, y, y_stride);
besterr = vfp->vf(pred, w, src, src_stride, sse);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif
return besterr;
@ -1818,7 +1818,7 @@ unsigned int vp10_int_pro_motion_estimation(const VP10_COMP *cpi, MACROBLOCK *x,
vp10_setup_pre_planes(xd, 0, scaled_ref_frame, mi_row, mi_col, NULL);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
{
unsigned int this_sad;
tmp_mv->row = 0;
@ -2632,7 +2632,7 @@ static int upsampled_masked_pref_error(const MACROBLOCKD *xd,
const uint8_t *const y, int y_stride,
int w, int h, unsigned int *sse) {
unsigned int besterr;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t, pred16[MAX_SB_SQUARE]);
vpx_highbd_upsampled_pred(pred16, w, h, y, y_stride);
@ -2644,12 +2644,12 @@ static int upsampled_masked_pref_error(const MACROBLOCKD *xd,
#else
DECLARE_ALIGNED(16, uint8_t, pred[MAX_SB_SQUARE]);
(void) xd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_upsampled_pred(pred, w, h, y, y_stride);
besterr = vfp->mvf(pred, w, src, src_stride,
mask, mask_stride, sse);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif
return besterr;
@ -3178,7 +3178,7 @@ static int upsampled_obmc_pref_error(const MACROBLOCKD *xd,
const uint8_t *const y, int y_stride,
int w, int h, unsigned int *sse) {
unsigned int besterr;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
DECLARE_ALIGNED(16, uint16_t, pred16[MAX_SB_SQUARE]);
vpx_highbd_upsampled_pred(pred16, w, h, y, y_stride);
@ -3189,11 +3189,11 @@ static int upsampled_obmc_pref_error(const MACROBLOCKD *xd,
#else
DECLARE_ALIGNED(16, uint8_t, pred[MAX_SB_SQUARE]);
(void) xd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vpx_upsampled_pred(pred, w, h, y, y_stride);
besterr = vfp->ovf(pred, w, wsrc, mask, sse);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif
return besterr;

View File

@ -165,7 +165,7 @@ int vp10_count_colors(const uint8_t *src, int stride, int rows, int cols) {
return n;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int vp10_count_colors_highbd(const uint8_t *src8, int stride, int rows,
int cols, int bit_depth) {
int n = 0, r, c, i;
@ -190,6 +190,6 @@ int vp10_count_colors_highbd(const uint8_t *src8, int stride, int rows,
return n;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -23,10 +23,10 @@ void vp10_calc_indices(const float *data, const float *centroids,
int vp10_k_means(const float *data, float *centroids, uint8_t *indices,
uint8_t *pre_indices, int n, int k, int dim, int max_itr);
int vp10_count_colors(const uint8_t *src, int stride, int rows, int cols);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int vp10_count_colors_highbd(const uint8_t *src8, int stride, int rows,
int cols, int bit_depth);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

View File

@ -55,7 +55,7 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd,
1, partial_frame);
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
filt_err = vpx_highbd_get_y_sse(sd, cm->frame_to_show);
} else {
@ -63,7 +63,7 @@ static int64_t try_filter_frame(const YV12_BUFFER_CONFIG *sd,
}
#else
filt_err = vpx_get_y_sse(sd, cm->frame_to_show);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Re-instate the unfiltered frame
vpx_yv12_copy_y(&cpi->last_frame_uf, cm->frame_to_show);
@ -177,7 +177,7 @@ void vp10_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi,
const int q = vp10_ac_quant(cm->base_qindex, 0, cm->bit_depth);
// These values were determined by linear fitting the result of the
// searched level, filt_guess = q * 0.316206 + 3.87252
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int filt_guess;
switch (cm->bit_depth) {
case VPX_BITS_8:
@ -196,7 +196,7 @@ void vp10_pick_filter_level(const YV12_BUFFER_CONFIG *sd, VP10_COMP *cpi,
}
#else
int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (cm->frame_type == KEY_FRAME)
filt_guess -= 4;
lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level);

View File

@ -36,7 +36,7 @@ static int64_t try_restoration_frame(const YV12_BUFFER_CONFIG *sd,
int64_t filt_err;
vp10_loop_restoration_frame(cm->frame_to_show, cm,
rsi, 1, partial_frame);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth) {
filt_err = vpx_highbd_get_y_sse(sd, cm->frame_to_show);
} else {
@ -44,7 +44,7 @@ static int64_t try_restoration_frame(const YV12_BUFFER_CONFIG *sd,
}
#else
filt_err = vpx_get_y_sse(sd, cm->frame_to_show);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Re-instate the unfiltered frame
vpx_yv12_copy_y(&cpi->last_frame_db, cm->frame_to_show);
@ -237,7 +237,7 @@ static void compute_stats(uint8_t *dgd, uint8_t *src, int width, int height,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static double find_average_highbd(uint16_t *src,
int width, int height, int stride) {
uint64_t sum = 0;
@ -283,7 +283,7 @@ static void compute_stats_highbd(
}
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Solves Ax = b, where x and b are column vectors
static int linsolve(int n, double *A, int stride, double *b, double *x) {
@ -542,12 +542,12 @@ static int search_wiener_filter(const YV12_BUFFER_CONFIG *src,
cost_norestore = RDCOST_DBL(x->rdmult, x->rddiv,
(bits << (VP9_PROB_COST_SHIFT - 4)), err);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cm->use_highbitdepth)
compute_stats_highbd(dgd->y_buffer, src->y_buffer, width, height,
dgd_stride, src_stride, M, H);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
compute_stats(dgd->y_buffer, src->y_buffer, width, height,
dgd_stride, src_stride, M, H);
@ -612,7 +612,7 @@ void vp10_pick_filter_restoration(
const int q = vp10_ac_quant(cm->base_qindex, 0, cm->bit_depth);
// These values were determined by linear fitting the result of the
// searched level, filt_guess = q * 0.316206 + 3.87252
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int filt_guess;
switch (cm->bit_depth) {
case VPX_BITS_8:
@ -631,7 +631,7 @@ void vp10_pick_filter_restoration(
}
#else
int filt_guess = ROUND_POWER_OF_TWO(q * 20723 + 1015158, 18);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (cm->frame_type == KEY_FRAME)
filt_guess -= 4;
lf->filter_level = clamp(filt_guess, min_filter_level, max_filter_level);

View File

@ -485,7 +485,7 @@ void vp10_quantize_dc_facade(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_quantize_fp_facade(
const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p,
tran_low_t *qcoeff_ptr, const MACROBLOCKD_PLANE *pd,
@ -927,7 +927,7 @@ void highbd_quantize_dc_32x32_fp_nuq(const tran_low_t *coeff_ptr,
*eob_ptr = eob + 1;
}
#endif // CONFIG_NEW_QUANT
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block,
@ -969,7 +969,7 @@ void vp10_quantize_fp_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
*eob_ptr = eob + 1;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_quantize_fp_c(const tran_low_t *coeff_ptr,
intptr_t count,
int skip_block,
@ -1016,7 +1016,7 @@ void vp10_highbd_quantize_fp_c(const tran_low_t *coeff_ptr,
*eob_ptr = eob + 1;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// TODO(jingning) Refactor this file and combine functions with similar
// operations.
@ -1060,7 +1060,7 @@ void vp10_quantize_fp_32x32_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
*eob_ptr = eob + 1;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
int skip_block, const int16_t *zbin_ptr,
const int16_t *round_ptr,
@ -1129,7 +1129,7 @@ void vp10_highbd_quantize_b_c(const tran_low_t *coeff_ptr, intptr_t n_coeffs,
}
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_quantize_dc(const tran_low_t *coeff_ptr,
int n_coeffs, int skip_block,
const int16_t *round_ptr, const int16_t quant,
@ -1169,7 +1169,7 @@ static void invert_quant(int16_t *quant, int16_t *shift, int d) {
static int get_qzbin_factor(int q, vpx_bit_depth_t bit_depth) {
const int quant = vp10_dc_quant(q, 0, bit_depth);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth) {
case VPX_BITS_8:
return q == 0 ? 64 : (quant < 148 ? 84 : 80);

View File

@ -141,7 +141,7 @@ void quantize_dc_32x32_fp_nuq(const tran_low_t *coeff_ptr,
uint16_t *eob_ptr);
#endif // CONFIG_NEW_QUANT
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_quantize_fp_facade(
const tran_low_t *coeff_ptr, intptr_t n_coeffs, const MACROBLOCK_PLANE *p,
tran_low_t *qcoeff_ptr, const MACROBLOCKD_PLANE *pd,
@ -213,7 +213,7 @@ void highbd_quantize_dc_32x32_fp_nuq(const tran_low_t *coeff_ptr,
uint16_t *eob_ptr);
#endif // CONFIG_NEW_QUANT
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

View File

@ -45,7 +45,7 @@
#define FRAME_OVERHEAD_BITS 200
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#define ASSIGN_MINQ_TABLE(bit_depth, name) \
do { \
switch (bit_depth) { \
@ -80,7 +80,7 @@ static int arfgf_high_motion_minq_8[QINDEX_RANGE];
static int inter_minq_8[QINDEX_RANGE];
static int rtc_minq_8[QINDEX_RANGE];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static int kf_low_motion_minq_10[QINDEX_RANGE];
static int kf_high_motion_minq_10[QINDEX_RANGE];
static int arfgf_low_motion_minq_10[QINDEX_RANGE];
@ -141,7 +141,7 @@ void vp10_rc_init_minq_luts(void) {
init_minq_luts(kf_low_motion_minq_8, kf_high_motion_minq_8,
arfgf_low_motion_minq_8, arfgf_high_motion_minq_8,
inter_minq_8, rtc_minq_8, VPX_BITS_8);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
init_minq_luts(kf_low_motion_minq_10, kf_high_motion_minq_10,
arfgf_low_motion_minq_10, arfgf_high_motion_minq_10,
inter_minq_10, rtc_minq_10, VPX_BITS_10);
@ -156,7 +156,7 @@ void vp10_rc_init_minq_luts(void) {
// tables if and when things settle down in the experimental bitstream
double vp10_convert_qindex_to_q(int qindex, vpx_bit_depth_t bit_depth) {
// Convert the index to a real Q value (scaled down to match old Q values)
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth) {
case VPX_BITS_8:
return vp10_ac_quant(qindex, 0, bit_depth) / 4.0;

View File

@ -187,7 +187,7 @@ void vp10_fill_token_costs(vp10_coeff_cost *c,
static int sad_per_bit16lut_8[QINDEX_RANGE];
static int sad_per_bit4lut_8[QINDEX_RANGE];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static int sad_per_bit16lut_10[QINDEX_RANGE];
static int sad_per_bit4lut_10[QINDEX_RANGE];
static int sad_per_bit16lut_12[QINDEX_RANGE];
@ -210,7 +210,7 @@ static void init_me_luts_bd(int *bit16lut, int *bit4lut, int range,
void vp10_init_me_luts(void) {
init_me_luts_bd(sad_per_bit16lut_8, sad_per_bit4lut_8, QINDEX_RANGE,
VPX_BITS_8);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
init_me_luts_bd(sad_per_bit16lut_10, sad_per_bit4lut_10, QINDEX_RANGE,
VPX_BITS_10);
init_me_luts_bd(sad_per_bit16lut_12, sad_per_bit4lut_12, QINDEX_RANGE,
@ -232,7 +232,7 @@ static const int rd_frame_type_factor[FRAME_UPDATE_TYPES] = {
int vp10_compute_rd_mult(const VP10_COMP *cpi, int qindex) {
const int64_t q = vp10_dc_quant(qindex, 0, cpi->common.bit_depth);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int64_t rdmult = 0;
switch (cpi->common.bit_depth) {
case VPX_BITS_8:
@ -250,7 +250,7 @@ int vp10_compute_rd_mult(const VP10_COMP *cpi, int qindex) {
}
#else
int64_t rdmult = 88 * q * q / 24;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (cpi->oxcf.pass == 2 && (cpi->common.frame_type != KEY_FRAME)) {
const GF_GROUP *const gf_group = &cpi->twopass.gf_group;
const FRAME_UPDATE_TYPE frame_type = gf_group->update_type[gf_group->index];
@ -266,7 +266,7 @@ int vp10_compute_rd_mult(const VP10_COMP *cpi, int qindex) {
static int compute_rd_thresh_factor(int qindex, vpx_bit_depth_t bit_depth) {
double q;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth) {
case VPX_BITS_8:
q = vp10_dc_quant(qindex, 0, VPX_BITS_8) / 4.0;
@ -284,14 +284,14 @@ static int compute_rd_thresh_factor(int qindex, vpx_bit_depth_t bit_depth) {
#else
(void) bit_depth;
q = vp10_dc_quant(qindex, 0, VPX_BITS_8) / 4.0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// TODO(debargha): Adjust the function below.
return VPXMAX((int)(pow(q, RD_THRESH_POW) * 5.12), 8);
}
void vp10_initialize_me_consts(const VP10_COMP *cpi, MACROBLOCK *x,
int qindex) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (cpi->common.bit_depth) {
case VPX_BITS_8:
x->sadperbit16 = sad_per_bit16lut_8[qindex];
@ -312,7 +312,7 @@ void vp10_initialize_me_consts(const VP10_COMP *cpi, MACROBLOCK *x,
(void)cpi;
x->sadperbit16 = sad_per_bit16lut_8[qindex];
x->sadperbit4 = sad_per_bit4lut_8[qindex];
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
static void set_block_thresholds(const VP10_COMMON *cm, RD_OPT *rd) {
@ -1094,7 +1094,7 @@ void vp10_update_rd_thresh_fact(const VP10_COMMON *const cm,
int vp10_get_intra_cost_penalty(int qindex, int qdelta,
vpx_bit_depth_t bit_depth) {
const int q = vp10_dc_quant(qindex, qdelta, bit_depth);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
switch (bit_depth) {
case VPX_BITS_8:
return 20 * q;
@ -1108,6 +1108,6 @@ int vp10_get_intra_cost_penalty(int qindex, int qdelta,
}
#else
return 20 * q;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}

View File

@ -497,7 +497,7 @@ static void get_energy_distribution_fine(const VP10_COMP *cpi,
int i, j, index;
int w_shift = bw == 8 ? 1 : 2;
int h_shift = bh == 8 ? 1 : 2;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth) {
uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
uint16_t *dst16 = CONVERT_TO_SHORTPTR(dst);
@ -510,7 +510,7 @@ static void get_energy_distribution_fine(const VP10_COMP *cpi,
dst16[j + i * dst_stride]);
}
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (i = 0; i < bh; ++i)
for (j = 0; j < bw; ++j) {
@ -518,9 +518,9 @@ static void get_energy_distribution_fine(const VP10_COMP *cpi,
esq[index] += (src[j + i * src_stride] - dst[j + i * dst_stride]) *
(src[j + i * src_stride] - dst[j + i * dst_stride]);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} else {
var[0] = cpi->fn_ptr[f_index].vf(src, src_stride,
dst, dst_stride, &esq[0]);
@ -797,10 +797,10 @@ static void model_rd_from_sse(const VP10_COMP *const cpi,
int64_t *dist) {
const struct macroblockd_plane *const pd = &xd->plane[plane];
const int dequant_shift =
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
(xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ?
xd->bd - 5 :
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
3;
// Fast approximate the modelling function.
@ -899,7 +899,7 @@ int64_t vp10_block_error_fp_c(const int16_t *coeff, const int16_t *dqcoeff,
return error;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int64_t vp10_highbd_block_error_c(const tran_low_t *coeff,
const tran_low_t *dqcoeff,
intptr_t block_size,
@ -921,7 +921,7 @@ int64_t vp10_highbd_block_error_c(const tran_low_t *coeff,
*ssz = sqcoeff;
return error;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
/* The trailing '0' is a terminator which is used inside cost_coeffs() to
* decide whether to include cost of a trailing EOB node or not (i.e. we
@ -956,7 +956,7 @@ static int cost_coeffs(MACROBLOCK *x,
int pt = combine_entropy_contexts(*A, *L);
#endif
int c, cost;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int *cat6_high_cost = vp10_get_high_cost_table(xd->bd);
#else
const int *cat6_high_cost = vp10_get_high_cost_table(8);
@ -1066,14 +1066,14 @@ static void dist_block(const VP10_COMP *cpi, MACROBLOCK *x, int plane,
int shift = (MAX_TX_SCALE - get_tx_scale(xd, tx_type, tx_size)) * 2;
tran_low_t *const coeff = BLOCK_OFFSET(p->coeff, block);
tran_low_t *const dqcoeff = BLOCK_OFFSET(pd->dqcoeff, block);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int bd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? xd->bd : 8;
*out_dist = vp10_highbd_block_error(coeff, dqcoeff, 16 << ss_txfrm_size,
&this_sse, bd) >> shift;
#else
*out_dist = vp10_block_error(coeff, dqcoeff, 16 << ss_txfrm_size,
&this_sse) >> shift;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
*out_sse = this_sse >> shift;
} else {
const BLOCK_SIZE tx_bsize = txsize_to_bsize[tx_size];
@ -1097,12 +1097,12 @@ static void dist_block(const VP10_COMP *cpi, MACROBLOCK *x, int plane,
if (eob) {
const MB_MODE_INFO *mbmi = &xd->mi[0]->mbmi;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, recon16[MAX_TX_SQUARE]);
uint8_t *recon = (uint8_t*)recon16;
#else
DECLARE_ALIGNED(16, uint8_t, recon[MAX_TX_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const PLANE_TYPE plane_type = plane == 0 ? PLANE_TYPE_Y : PLANE_TYPE_UV;
@ -1113,7 +1113,7 @@ static void dist_block(const VP10_COMP *cpi, MACROBLOCK *x, int plane,
inv_txfm_param.eob = eob;
inv_txfm_param.lossless = xd->lossless[mbmi->segment_id];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
recon = CONVERT_TO_BYTEPTR(recon);
inv_txfm_param.bd = xd->bd;
@ -1121,7 +1121,7 @@ static void dist_block(const VP10_COMP *cpi, MACROBLOCK *x, int plane,
NULL, 0, NULL, 0, bsw, bsh, xd->bd);
highbd_inv_txfm_add(dqcoeff, recon, MAX_TX_SIZE, &inv_txfm_param);
} else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
vpx_convolve_copy(dst, dst_stride, recon, MAX_TX_SIZE,
NULL, 0, NULL, 0, bsw, bsh);
@ -1225,10 +1225,10 @@ static void block_rd_txfm(int plane, int block, int blk_row, int blk_col,
unsigned int tmp;
sse = sum_squares_2d(diff, diff_stride, tx_size);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
sse = ROUND_POWER_OF_TWO(sse, (xd->bd - 8) * 2);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
sse = (int64_t)sse * 16;
variance(src, src_stride, dst, dst_stride, &tmp);
@ -1841,12 +1841,12 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
const int src_stride = x->plane[0].src.stride;
const uint8_t *const src = x->plane[0].src.buf;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth)
colors = vp10_count_colors_highbd(src, src_stride, rows, cols,
cpi->common.bit_depth);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
colors = vp10_count_colors(src, src_stride, rows, cols);
palette_mode_info->palette_size[0] = 0;
#if CONFIG_EXT_INTRA
@ -1866,15 +1866,15 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
float lb, ub, val;
MB_MODE_INFO *const mbmi = &mic->mbmi;
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *src16 = CONVERT_TO_SHORTPTR(src);
if (cpi->common.use_highbitdepth)
lb = ub = src16[0];
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
lb = ub = src[0];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth) {
for (r = 0; r < rows; ++r) {
for (c = 0; c < cols; ++c) {
@ -1887,7 +1887,7 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
}
}
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (r = 0; r < rows; ++r) {
for (c = 0; c < cols; ++c) {
val = src[r * src_stride + c];
@ -1898,9 +1898,9 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
ub = val;
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
mbmi->mode = DC_PRED;
#if CONFIG_EXT_INTRA
@ -1937,13 +1937,13 @@ static int rd_pick_palette_intra_sby(VP10_COMP *cpi, MACROBLOCK *x,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth)
for (i = 0; i < k; ++i)
pmi->palette_colors[i] = clip_pixel_highbd((int)lroundf(centroids[i]),
cpi->common.bit_depth);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (i = 0; i < k; ++i)
pmi->palette_colors[i] = clip_pixel((int)lroundf(centroids[i]));
pmi->palette_size[0] = k;
@ -2017,7 +2017,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x,
const int num_4x4_blocks_high = num_4x4_blocks_high_lookup[bsize];
int idx, idy;
uint8_t best_dst[8 * 8];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t best_dst16[8 * 8];
#endif
@ -2026,7 +2026,7 @@ static int64_t rd_pick_intra4x4block(VP10_COMP *cpi, MACROBLOCK *x,
xd->mi[0]->mbmi.tx_size = TX_4X4;
xd->mi[0]->mbmi.palette_mode_info.palette_size[0] = 0;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
for (mode = DC_PRED; mode <= TM_PRED; ++mode) {
int64_t this_rd;
@ -2160,7 +2160,7 @@ next_highbd:
return best_rd;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (mode = DC_PRED; mode <= TM_PRED; ++mode) {
int64_t this_rd;
@ -2694,7 +2694,7 @@ static void angle_estimation(const uint8_t *src, int src_stride,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_angle_estimation(const uint8_t *src8, int src_stride,
int rows, int cols,
uint8_t *directional_mode_skip_mask) {
@ -2746,7 +2746,7 @@ static void highbd_angle_estimation(const uint8_t *src8, int src_stride,
}
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_EXT_INTRA
// This function is used only for intra_only frames
@ -2795,7 +2795,7 @@ static int64_t rd_pick_intra_sby_mode(VP10_COMP *cpi, MACROBLOCK *x,
mic->mbmi.angle_delta[0] = 0;
memset(directional_mode_skip_mask, 0,
sizeof(directional_mode_skip_mask[0]) * INTRA_MODES);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
highbd_angle_estimation(src, src_stride, rows, cols,
directional_mode_skip_mask);
@ -2965,12 +2965,12 @@ void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
int src_stride = p->src.stride;
uint8_t *src = &p->src.buf[4 * blk_row * src_stride + 4 * blk_col];
uint8_t *dst = &pd->dst.buf[4 * blk_row * pd->dst.stride + 4 * blk_col];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, rec_buffer16[MAX_TX_SQUARE]);
uint8_t *rec_buffer;
#else
DECLARE_ALIGNED(16, uint8_t, rec_buffer[MAX_TX_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
const int diff_stride = 4 * num_4x4_blocks_wide_lookup[plane_bsize];
const int16_t *diff = &p->src_diff[4 * (blk_row * diff_stride + blk_col)];
@ -2997,7 +2997,7 @@ void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
vp10_optimize_b(x, plane, block, tx_size, coeff_ctx);
// TODO(any): Use dist_block to compute distortion
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
rec_buffer = CONVERT_TO_BYTEPTR(rec_buffer16);
vpx_highbd_convolve_copy(dst, pd->dst.stride, rec_buffer, MAX_TX_SIZE,
@ -3010,7 +3010,7 @@ void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
#else
vpx_convolve_copy(dst, pd->dst.stride, rec_buffer, MAX_TX_SIZE,
NULL, 0, NULL, 0, bh, bh);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (blk_row + (bh >> 2) > max_blocks_high ||
blk_col + (bh >> 2) > max_blocks_wide) {
@ -3028,10 +3028,10 @@ void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
tmp = vpx_sum_squares_2d_i16(diff, diff_stride, bh);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
tmp = ROUND_POWER_OF_TWO(tmp, (xd->bd - 8) * 2);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
*bsse += tmp * 16;
if (p->eobs[block] > 0) {
@ -3040,16 +3040,16 @@ void vp10_tx_block_rd_b(const VP10_COMP *cpi, MACROBLOCK *x, TX_SIZE tx_size,
inv_txfm_param.tx_size = tx_size;
inv_txfm_param.eob = p->eobs[block];
inv_txfm_param.lossless = xd->lossless[xd->mi[0]->mbmi.segment_id];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
inv_txfm_param.bd = xd->bd;
highbd_inv_txfm_add(dqcoeff, rec_buffer, MAX_TX_SIZE, &inv_txfm_param);
} else {
inv_txfm_add(dqcoeff, rec_buffer, MAX_TX_SIZE, &inv_txfm_param);
}
#else // CONFIG_VP9_HIGHBITDEPTH
#else // CONFIG_VPX_HIGHBITDEPTH
inv_txfm_add(dqcoeff, rec_buffer, MAX_TX_SIZE, &inv_txfm_param);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if ((bh >> 2) + blk_col > max_blocks_wide ||
(bh >> 2) + blk_row > max_blocks_high) {
@ -3720,19 +3720,19 @@ static void rd_pick_palette_intra_sbuv(VP10_COMP *cpi, MACROBLOCK *x,
mbmi->ext_intra_mode_info.use_ext_intra_mode[1] = 0;
#endif // CONFIG_EXT_INTRA
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth) {
colors_u = vp10_count_colors_highbd(src_u, src_stride, rows, cols,
cpi->common.bit_depth);
colors_v = vp10_count_colors_highbd(src_v, src_stride, rows, cols,
cpi->common.bit_depth);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
colors_u = vp10_count_colors(src_u, src_stride, rows, cols);
colors_v = vp10_count_colors(src_v, src_stride, rows, cols);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
colors = colors_u > colors_v ? colors_u : colors_v;
if (colors > 1 && colors <= 64) {
@ -3750,7 +3750,7 @@ static void rd_pick_palette_intra_sbuv(VP10_COMP *cpi, MACROBLOCK *x,
uint8_t *const color_map = xd->plane[1].color_index_map;
PALETTE_MODE_INFO *const pmi = &mbmi->palette_mode_info;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
uint16_t *src_u16 = CONVERT_TO_SHORTPTR(src_u);
uint16_t *src_v16 = CONVERT_TO_SHORTPTR(src_v);
if (cpi->common.use_highbitdepth) {
@ -3759,14 +3759,14 @@ static void rd_pick_palette_intra_sbuv(VP10_COMP *cpi, MACROBLOCK *x,
lb_v = src_v16[0];
ub_v = src_v16[0];
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
lb_u = src_u[0];
ub_u = src_u[0];
lb_v = src_v[0];
ub_v = src_v[0];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
mbmi->uv_mode = DC_PRED;
#if CONFIG_EXT_INTRA
@ -3774,21 +3774,21 @@ static void rd_pick_palette_intra_sbuv(VP10_COMP *cpi, MACROBLOCK *x,
#endif // CONFIG_EXT_INTRA
for (r = 0; r < rows; ++r) {
for (c = 0; c < cols; ++c) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth) {
val_u = src_u16[r * src_stride + c];
val_v = src_v16[r * src_stride + c];
data[(r * cols + c) * 2 ] = val_u;
data[(r * cols + c) * 2 + 1] = val_v;
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
val_u = src_u[r * src_stride + c];
val_v = src_v[r * src_stride + c];
data[(r * cols + c) * 2 ] = val_u;
data[(r * cols + c) * 2 + 1] = val_v;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (val_u < lb_u)
lb_u = val_u;
else if (val_u > ub_u)
@ -3812,13 +3812,13 @@ static void rd_pick_palette_intra_sbuv(VP10_COMP *cpi, MACROBLOCK *x,
pmi->palette_size[1] = n;
for (i = 1; i < 3; ++i) {
for (j = 0; j < n; ++j) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth)
pmi->palette_colors[i * PALETTE_MAX_SIZE + j] =
clip_pixel_highbd((int)lroundf(centroids[j * 2 + i - 1]),
cpi->common.bit_depth);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
pmi->palette_colors[i * PALETTE_MAX_SIZE + j] =
clip_pixel((int)lroundf(centroids[j * 2 + i - 1]));
}
@ -4458,7 +4458,7 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi,
vp10_build_inter_predictor_sub8x8(xd, 0, i, ir, ic, mi_row, mi_col);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vpx_highbd_subtract_block(
height, width, vp10_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff),
@ -4472,7 +4472,7 @@ static int64_t encode_inter_mb_segment(VP10_COMP *cpi,
vpx_subtract_block(height, width,
vp10_raster_block_offset_int16(BLOCK_8X8, i, p->src_diff),
8, src, p->src.stride, dst, pd->dst.stride);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
k = i;
for (idy = 0; idy < height / 4; idy += num_4x4_h) {
@ -4750,12 +4750,12 @@ static void joint_motion_search(VP10_COMP *cpi, MACROBLOCK *x,
};
// Prediction buffer from second frame.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, second_pred_alloc_16[MAX_SB_SQUARE]);
uint8_t *second_pred;
#else
DECLARE_ALIGNED(16, uint8_t, second_pred[MAX_SB_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
for (ref = 0; ref < 2; ++ref) {
#if CONFIG_EXT_INTER
@ -4781,14 +4781,14 @@ static void joint_motion_search(VP10_COMP *cpi, MACROBLOCK *x,
// Since we have scaled the reference frames to match the size of the current
// frame we must use a unit scaling factor during mode selection.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vp10_setup_scale_factors_for_frame(&sf, cm->width, cm->height,
cm->width, cm->height,
cm->use_highbitdepth);
#else
vp10_setup_scale_factors_for_frame(&sf, cm->width, cm->height,
cm->width, cm->height);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Allow joint search multiple times iteratively for each reference frame
// and break out of the search loop if it couldn't find a better mv.
@ -4820,7 +4820,7 @@ static void joint_motion_search(VP10_COMP *cpi, MACROBLOCK *x,
#endif
// Get the prediction block from the 'other' reference frame.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
second_pred = CONVERT_TO_BYTEPTR(second_pred_alloc_16);
vp10_highbd_build_inter_predictor(ref_yv12[!id].buf,
@ -4849,7 +4849,7 @@ static void joint_motion_search(VP10_COMP *cpi, MACROBLOCK *x,
&sf, pw, ph, 0,
interp_filter, MV_PRECISION_Q3,
mi_col * MI_SIZE, mi_row * MI_SIZE);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// Do compound motion search on the current reference frame.
if (id)
@ -6558,12 +6558,12 @@ static int estimate_wedge_sign(const VP10_COMP *cpi,
uint32_t esq[2][4], var;
int64_t tl, br;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (x->e_mbd.cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
pred0 = CONVERT_TO_BYTEPTR(pred0);
pred1 = CONVERT_TO_BYTEPTR(pred1);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
var = cpi->fn_ptr[f_index].vf(
src, src_stride,
@ -6739,12 +6739,12 @@ static int64_t pick_wedge(const VP10_COMP *const cpi,
int wedge_types = (1 << get_wedge_bits_lookup(bsize));
const uint8_t *mask;
uint64_t sse;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int hbd = xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH;
const int bd_round = hbd ? (xd->bd - 8) * 2 : 0;
#else
const int bd_round = 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(32, int16_t, r0[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int16_t, r1[MAX_SB_SQUARE]);
@ -6753,7 +6753,7 @@ static int64_t pick_wedge(const VP10_COMP *const cpi,
int64_t sign_limit;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (hbd) {
vpx_highbd_subtract_block(bh, bw, r0, bw, src->buf, src->stride,
CONVERT_TO_BYTEPTR(p0), bw, xd->bd);
@ -6763,7 +6763,7 @@ static int64_t pick_wedge(const VP10_COMP *const cpi,
CONVERT_TO_BYTEPTR(p1), bw,
CONVERT_TO_BYTEPTR(p0), bw, xd->bd);
} else // NOLINT
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
vpx_subtract_block(bh, bw, r0, bw, src->buf, src->stride, p0, bw);
vpx_subtract_block(bh, bw, r1, bw, src->buf, src->stride, p1, bw);
@ -6817,17 +6817,17 @@ static int64_t pick_wedge_fixed_sign(const VP10_COMP *const cpi,
int wedge_types = (1 << get_wedge_bits_lookup(bsize));
const uint8_t *mask;
uint64_t sse;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int hbd = xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH;
const int bd_round = hbd ? (xd->bd - 8) * 2 : 0;
#else
const int bd_round = 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(32, int16_t, r1[MAX_SB_SQUARE]);
DECLARE_ALIGNED(32, int16_t, d10[MAX_SB_SQUARE]);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (hbd) {
vpx_highbd_subtract_block(bh, bw, r1, bw, src->buf, src->stride,
CONVERT_TO_BYTEPTR(p1), bw, xd->bd);
@ -6835,7 +6835,7 @@ static int64_t pick_wedge_fixed_sign(const VP10_COMP *const cpi,
CONVERT_TO_BYTEPTR(p1), bw,
CONVERT_TO_BYTEPTR(p0), bw, xd->bd);
} else // NOLINT
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
{
vpx_subtract_block(bh, bw, r1, bw, src->buf, src->stride, p1, bw);
vpx_subtract_block(bh, bw, d10, bw, p1, bw, p0, bw);
@ -6950,11 +6950,11 @@ static int64_t handle_inter_mode(
uint8_t ref_frame_type = vp10_ref_frame_type(mbmi->ref_frame);
#endif
#endif // CONFIG_EXT_INTER
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_buf_[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
#else
DECLARE_ALIGNED(16, uint8_t, tmp_buf_[MAX_MB_PLANE * MAX_SB_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
uint8_t *tmp_buf;
#if CONFIG_OBMC || CONFIG_WARPED_MOTION
@ -7023,11 +7023,11 @@ static int64_t handle_inter_mode(
mbmi->ref_frame, bsize, -1);
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
tmp_buf = CONVERT_TO_BYTEPTR(tmp_buf_);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
tmp_buf = tmp_buf_;
if (is_comp_pred) {
@ -7600,11 +7600,11 @@ static int64_t handle_inter_mode(
DECLARE_ALIGNED(16, uint8_t, intrapred_[2 * MAX_SB_SQUARE]);
uint8_t *intrapred;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
intrapred = CONVERT_TO_BYTEPTR(intrapred_);
else
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
intrapred = intrapred_;
mbmi->ref_frame[1] = NONE;
@ -8049,7 +8049,7 @@ static int64_t handle_inter_mode(
best_skippable = *skippable;
best_xskip = x->skip;
best_disable_skip = *disable_skip;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->recon_variance =
vp10_high_get_sby_perpixel_variance(
@ -8061,7 +8061,7 @@ static int64_t handle_inter_mode(
#else
x->recon_variance =
vp10_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -8090,7 +8090,7 @@ static int64_t handle_inter_mode(
single_skippable[this_mode][refs[0]] = *skippable;
#if !(CONFIG_OBMC || CONFIG_WARPED_MOTION)
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->recon_variance =
vp10_high_get_sby_perpixel_variance(cpi, &xd->plane[0].dst,
@ -8102,7 +8102,7 @@ static int64_t handle_inter_mode(
#else
x->recon_variance =
vp10_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // !(CONFIG_OBMC || CONFIG_WARPED_MOTION)
restore_dst_buf(xd, orig_dst, orig_dst_stride);
@ -8291,29 +8291,29 @@ static void restore_uv_color_map(VP10_COMP *cpi, MACROBLOCK *x) {
float centroids[2 * PALETTE_MAX_SIZE];
uint8_t *const color_map = xd->plane[1].color_index_map;
int r, c;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const uint16_t *const src_u16 = CONVERT_TO_SHORTPTR(src_u);
const uint16_t *const src_v16 = CONVERT_TO_SHORTPTR(src_v);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
(void)cpi;
for (r = 0; r < rows; ++r) {
for (c = 0; c < cols; ++c) {
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (cpi->common.use_highbitdepth) {
data[(r * cols + c) * 2 ] =
src_u16[r * src_stride + c];
data[(r * cols + c) * 2 + 1] =
src_v16[r * src_stride + c];
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
data[(r * cols + c) * 2 ] =
src_u[r * src_stride + c];
data[(r * cols + c) * 2 + 1] =
src_v[r * src_stride + c];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -8440,7 +8440,7 @@ static void pick_ext_intra_interframe(
}
distortion2 = distortion_y + distortion_uv;
vp10_encode_intra_block_plane(x, bsize, 0, 0);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->recon_variance =
vp10_high_get_sby_perpixel_variance(cpi, &xd->plane[0].dst,
@ -8452,7 +8452,7 @@ static void pick_ext_intra_interframe(
#else
x->recon_variance =
vp10_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
rate2 += ref_costs_single[INTRA_FRAME];
@ -8607,13 +8607,13 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
const MODE_INFO *above_mi = xd->above_mi;
const MODE_INFO *left_mi = xd->left_mi;
#if CONFIG_OBMC
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[2 * MAX_MB_PLANE * MAX_SB_SQUARE]);
#else
DECLARE_ALIGNED(16, uint8_t, tmp_buf1[MAX_MB_PLANE * MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, uint8_t, tmp_buf2[MAX_MB_PLANE * MAX_SB_SQUARE]);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, int32_t, weighted_src_buf[MAX_SB_SQUARE]);
DECLARE_ALIGNED(16, int32_t, mask2d_buf[MAX_SB_SQUARE]);
uint8_t *dst_buf1[MAX_MB_PLANE], *dst_buf2[MAX_MB_PLANE];
@ -8624,7 +8624,7 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
int dst_stride1[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
int dst_stride2[MAX_MB_PLANE] = {MAX_SB_SIZE, MAX_SB_SIZE, MAX_SB_SIZE};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int len = sizeof(uint16_t);
dst_buf1[0] = CONVERT_TO_BYTEPTR(tmp_buf1);
@ -8634,16 +8634,16 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
dst_buf2[1] = CONVERT_TO_BYTEPTR(tmp_buf2 + MAX_SB_SQUARE * len);
dst_buf2[2] = CONVERT_TO_BYTEPTR(tmp_buf2 + 2 * MAX_SB_SQUARE * len);
} else {
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
dst_buf1[0] = tmp_buf1;
dst_buf1[1] = tmp_buf1 + MAX_SB_SQUARE;
dst_buf1[2] = tmp_buf1 + 2 * MAX_SB_SQUARE;
dst_buf2[0] = tmp_buf2;
dst_buf2[1] = tmp_buf2 + MAX_SB_SQUARE;
dst_buf2[2] = tmp_buf2 + 2 * MAX_SB_SQUARE;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#endif // CONFIG_OBMC
vp10_zero(best_mbmode);
@ -9075,7 +9075,7 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
const uint8_t *src = x->plane[0].src.buf;
const int rows = 4 * num_4x4_blocks_high_lookup[bsize];
const int cols = 4 * num_4x4_blocks_wide_lookup[bsize];
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH)
highbd_angle_estimation(src, src_stride, rows, cols,
directional_mode_skip_mask);
@ -9203,7 +9203,7 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
rate2 += intra_cost_penalty;
distortion2 = distortion_y + distortion_uv;
vp10_encode_intra_block_plane(x, bsize, 0, 1);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
x->recon_variance =
vp10_high_get_sby_perpixel_variance(cpi, &xd->plane[0].dst,
@ -9215,7 +9215,7 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
#else
x->recon_variance =
vp10_get_sby_perpixel_variance(cpi, &xd->plane[0].dst, bsize);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} else {
#if CONFIG_REF_MV
int_mv backup_ref_mv[2];
@ -9613,11 +9613,11 @@ void vp10_rd_pick_inter_mode_sb(VP10_COMP *cpi,
int qstep = xd->plane[0].dequant[1];
// TODO(debargha): Enhance this by specializing for each mode_index
int scale = 4;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
qstep >>= (xd->bd - 8);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (x->source_variance < UINT_MAX) {
const int var_adjust = (x->source_variance < 16);
scale -= var_adjust;
@ -10965,11 +10965,11 @@ void vp10_rd_pick_inter_mode_sub8x8(struct VP10_COMP *cpi,
int qstep = xd->plane[0].dequant[1];
// TODO(debargha): Enhance this by specializing for each mode_index
int scale = 4;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
qstep >>= (xd->bd - 8);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
if (x->source_variance < UINT_MAX) {
const int var_adjust = (x->source_variance < 16);
scale -= var_adjust;
@ -11142,11 +11142,11 @@ static void calc_target_weighted_pred(
const int wsrc_stride = bw;
const int mask_stride = bw;
const int src_scale = VPX_BLEND_A64_MAX_ALPHA * VPX_BLEND_A64_MAX_ALPHA;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int is_hbd = (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) ? 1 : 0;
#else
const int is_hbd = 0;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
// plane 0 should not be subsampled
assert(xd->plane[0].subsampling_x == 0);
@ -11193,7 +11193,7 @@ static void calc_target_weighted_pred(
mask += mask_stride;
tmp += tmp_stride;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
const uint16_t *tmp = CONVERT_TO_SHORTPTR(above);
@ -11208,7 +11208,7 @@ static void calc_target_weighted_pred(
mask += mask_stride;
tmp += tmp_stride;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -11260,7 +11260,7 @@ static void calc_target_weighted_pred(
mask += mask_stride;
tmp += tmp_stride;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
const uint16_t *tmp = CONVERT_TO_SHORTPTR(left);
@ -11276,7 +11276,7 @@ static void calc_target_weighted_pred(
mask += mask_stride;
tmp += tmp_stride;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
@ -11295,7 +11295,7 @@ static void calc_target_weighted_pred(
wsrc_buf += wsrc_stride;
src += x->plane[0].src.stride;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
} else {
const uint16_t *src = CONVERT_TO_SHORTPTR(x->plane[0].src.buf);
@ -11306,7 +11306,7 @@ static void calc_target_weighted_pred(
wsrc_buf += wsrc_stride;
src += x->plane[0].src.stride;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
#endif // CONFIG_OBMC

View File

@ -32,7 +32,7 @@ void vp10_rd_pick_intra_mode_sb(struct VP10_COMP *cpi, struct macroblock *x,
unsigned int vp10_get_sby_perpixel_variance(VP10_COMP *cpi,
const struct buf_2d *ref,
BLOCK_SIZE bs);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
unsigned int vp10_high_get_sby_perpixel_variance(VP10_COMP *cpi,
const struct buf_2d *ref,
BLOCK_SIZE bs, int bd);

View File

@ -15,9 +15,9 @@
#include <stdlib.h>
#include <string.h>
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
#include "vpx_dsp/vpx_dsp_common.h"
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#include "vpx_ports/mem.h"
#include "vp10/common/common.h"
#include "vp10/encoder/resize.h"
@ -537,7 +537,7 @@ void vp10_resize_plane(const uint8_t *const input,
free(arrbuf2);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static void highbd_interpolate(const uint16_t *const input, int inlength,
uint16_t *output, int outlength, int bd) {
const int64_t delta =
@ -830,7 +830,7 @@ void vp10_highbd_resize_plane(const uint8_t *const input,
free(arrbuf);
free(arrbuf2);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
void vp10_resize_frame420(const uint8_t *const y,
int y_stride,
@ -878,7 +878,7 @@ void vp10_resize_frame444(const uint8_t *const y, int y_stride,
ov, oheight, owidth, ouv_stride);
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_resize_frame420(const uint8_t *const y,
int y_stride,
const uint8_t *const u, const uint8_t *const v,
@ -924,4 +924,4 @@ void vp10_highbd_resize_frame444(const uint8_t *const y, int y_stride,
vp10_highbd_resize_plane(v, height, width, uv_stride,
ov, oheight, owidth, ouv_stride, bd);
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH

View File

@ -69,7 +69,7 @@ void vp10_resize_frame444(const uint8_t *const y,
int oheight,
int owidth);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_resize_plane(const uint8_t *const input,
int height,
int width,
@ -124,7 +124,7 @@ void vp10_highbd_resize_frame444(const uint8_t *const y,
int oheight,
int owidth,
int bd);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
#ifdef __cplusplus
} // extern "C"

View File

@ -70,7 +70,7 @@ static void temporal_filter_predictors_mb_c(MACROBLOCKD *xd,
mv_precision_uv = MV_PRECISION_Q3;
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (xd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
vp10_highbd_build_inter_predictor(y_mb_ptr, stride,
&pred[0], 16,
@ -100,7 +100,7 @@ static void temporal_filter_predictors_mb_c(MACROBLOCKD *xd,
mv_precision_uv, x, y, xd->bd);
return;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
vp10_build_inter_predictor(y_mb_ptr, stride,
&pred[0], 16,
&mv,
@ -201,7 +201,7 @@ void vp10_temporal_filter_apply_c(uint8_t *frame1,
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
void vp10_highbd_temporal_filter_apply_c(uint8_t *frame1_8,
unsigned int stride,
uint8_t *frame2_8,
@ -270,7 +270,7 @@ void vp10_highbd_temporal_filter_apply_c(uint8_t *frame1_8,
byte += stride - block_width;
}
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static int temporal_filter_find_matching_mb_c(VP10_COMP *cpi,
uint8_t *arf_frame_buf,
@ -355,7 +355,7 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi,
MACROBLOCKD *mbd = &cpi->td.mb.e_mbd;
YV12_BUFFER_CONFIG *f = frames[alt_ref_index];
uint8_t *dst1, *dst2;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
DECLARE_ALIGNED(16, uint16_t, predictor16[16 * 16 * 3]);
DECLARE_ALIGNED(16, uint8_t, predictor8[16 * 16 * 3]);
uint8_t *predictor;
@ -368,7 +368,7 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi,
// Save input state
uint8_t* input_buffer[MAX_MB_PLANE];
int i;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (mbd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
predictor = CONVERT_TO_BYTEPTR(predictor16);
} else {
@ -445,7 +445,7 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi,
predictor, scale,
mb_col * 16, mb_row * 16);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (mbd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
int adj_strength = strength + 2 * (mbd->bd - 8);
// Apply the filter (YUV)
@ -498,11 +498,11 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi,
mb_uv_width, mb_uv_height, strength,
filter_weight, accumulator + 512,
count + 512);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (mbd->cur_buf->flags & YV12_FLAG_HIGHBITDEPTH) {
uint16_t *dst1_16;
uint16_t *dst2_16;
@ -643,7 +643,7 @@ static void temporal_filter_iterate_c(VP10_COMP *cpi,
}
byte += stride - mb_uv_width;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
mb_y_offset += 16;
mb_uv_offset += mb_uv_width;
}
@ -755,7 +755,7 @@ void vp10_temporal_filter(VP10_COMP *cpi, int distance) {
// Setup scaling factors. Scaling on each of the arnr frames is not
// supported.
// ARF is produced at the native frame size and resized when coded.
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
vp10_setup_scale_factors_for_frame(&sf,
frames[0]->y_crop_width,
frames[0]->y_crop_height,
@ -768,7 +768,7 @@ void vp10_temporal_filter(VP10_COMP *cpi, int distance) {
frames[0]->y_crop_height,
frames[0]->y_crop_width,
frames[0]->y_crop_height);
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
}
temporal_filter_iterate_c(cpi, frames, frames_to_blur,

View File

@ -147,7 +147,7 @@ const int vp10_cat6_high_cost[64] = {
10304, 12467, 12943, 15106, 7244, 9407, 9883, 12046, 10304, 12467, 12943,
15106, 10822, 12985, 13461, 15624, 13882, 16045, 16521, 18684};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const int vp10_cat6_high10_high_cost[256] = {
94, 2257, 2733, 4896, 3154, 5317, 5793, 7956, 3672, 5835, 6311,
8474, 6732, 8895, 9371, 11534, 3672, 5835, 6311, 8474, 6732, 8895,
@ -270,7 +270,7 @@ const int vp10_cat6_high12_high_cost[1024] = {
35068};
#endif
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static const vpx_tree_index cat1_high10[2] = {0, 0};
static const vpx_tree_index cat2_high10[4] = {2, 2, 0, 0};
static const vpx_tree_index cat3_high10[6] = {2, 2, 4, 4, 0, 0};
@ -304,7 +304,7 @@ const vp10_extra_bit vp10_extra_bits[ENTROPY_TOKENS] = {
{0, 0, 0, 0, zero_cost} // EOB_TOKEN
};
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
const vp10_extra_bit vp10_extra_bits_high10[ENTROPY_TOKENS] = {
{0, 0, 0, 0, zero_cost}, // ZERO
{0, 0, 0, 1, sign_cost}, // ONE

View File

@ -22,7 +22,7 @@ extern "C" {
#define EOSB_TOKEN 127 // Not signalled, encoder only
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
typedef int32_t EXTRABIT;
#else
typedef int16_t EXTRABIT;
@ -92,7 +92,7 @@ static INLINE int vp10_get_cost(int16_t token, EXTRABIT extrabits,
+ cat6_high_table[extrabits >> 9];
}
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
static INLINE const int* vp10_get_high_cost_table(int bit_depth) {
return bit_depth == 8 ? vp10_cat6_high_cost
: (bit_depth == 10 ? vp10_cat6_high10_high_cost :
@ -103,7 +103,7 @@ static INLINE const int* vp10_get_high_cost_table(int bit_depth) {
(void) bit_depth;
return vp10_cat6_high_cost;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
static INLINE void vp10_get_token_extra(int v, int16_t *token, EXTRABIT *extra) {
if (v >= CAT6_MIN_VAL || v <= -CAT6_MIN_VAL) {

View File

@ -50,9 +50,9 @@ typedef struct VAR_TREE {
int ref_stride;
int width;
int height;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
int highbd;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
} VAR_TREE;
void vp10_setup_var_tree(struct VP10Common *cm, struct ThreadData *td);

View File

@ -62,7 +62,7 @@ cglobal fwht4x4, 3, 4, 8, input, output, stride
psllw m0, 2
psllw m1, 2
%if CONFIG_VP9_HIGHBITDEPTH
%if CONFIG_VPX_HIGHBITDEPTH
; sign extension
mova m2, m0
mova m3, m1

View File

@ -74,7 +74,7 @@ VP10_COMMON_SRCS-yes += common/vp10_inv_txfm2d.c
VP10_COMMON_SRCS-yes += common/vp10_inv_txfm2d_cfg.h
VP10_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/vp10_convolve_ssse3.c
VP10_COMMON_SRCS-$(HAVE_SSSE3) += common/x86/vp10_convolve_filters_ssse3.c
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/vp10_highbd_convolve_sse4.c
VP10_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/vp10_highbd_convolve_filters_sse4.c
endif
@ -90,7 +90,7 @@ VP10_COMMON_SRCS-yes += common/warped_motion.h
VP10_COMMON_SRCS-yes += common/warped_motion.c
endif
ifneq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/itrans4_dspr2.c
VP10_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/itrans8_dspr2.c
VP10_COMMON_SRCS-$(HAVE_DSPR2) += common/mips/dspr2/itrans16_dspr2.c
@ -109,11 +109,11 @@ VP10_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/vp10_txfm1d_sse4.h
VP10_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/vp10_fwd_txfm1d_sse4.c
VP10_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/vp10_fwd_txfm2d_sse4.c
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_COMMON_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_txfm_utility_sse4.h
endif
ifneq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_COMMON_SRCS-$(HAVE_NEON) += common/arm/neon/iht4x4_add_neon.c
VP10_COMMON_SRCS-$(HAVE_NEON) += common/arm/neon/iht8x8_add_neon.c
endif

View File

@ -268,7 +268,7 @@ static vpx_codec_err_t validate_config(vpx_codec_alg_priv_t *ctx,
ERROR("rc_twopass_stats_in missing EOS stats packet");
}
#if !CONFIG_VP9_HIGHBITDEPTH
#if !CONFIG_VPX_HIGHBITDEPTH
if (cfg->g_profile > (unsigned int)PROFILE_1) {
ERROR("Profile > 1 not supported in this build configuration");
}
@ -769,7 +769,7 @@ static vpx_codec_err_t encoder_init(vpx_codec_ctx_t *ctx,
if (res == VPX_CODEC_OK) {
set_encoder_config(&priv->oxcf, &priv->cfg, &priv->extra_cfg);
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
priv->oxcf.use_highbitdepth =
(ctx->init_flags & VPX_CODEC_USE_HIGHBITDEPTH) ? 1 : 0;
#endif
@ -1436,7 +1436,7 @@ static vpx_codec_enc_cfg_map_t encoder_usage_cfg_map[] = {
CODEC_INTERFACE(vpx_codec_vp10_cx) = {
"WebM Project VP10 Encoder" VERSION_STRING,
VPX_CODEC_INTERNAL_ABI_VERSION,
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
VPX_CODEC_CAP_HIGHBITDEPTH |
#endif
VPX_CODEC_CAP_ENCODER | VPX_CODEC_CAP_PSNR, // vpx_codec_caps_t

View File

@ -55,7 +55,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
img->stride[VPX_PLANE_U] = yv12->uv_stride;
img->stride[VPX_PLANE_V] = yv12->uv_stride;
img->stride[VPX_PLANE_ALPHA] = yv12->y_stride;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (yv12->flags & YV12_FLAG_HIGHBITDEPTH) {
// vpx_image_t uses byte strides and a pointer to the first byte
// of the image.
@ -70,7 +70,7 @@ static void yuvconfig2image(vpx_image_t *img, const YV12_BUFFER_CONFIG *yv12,
img->stride[VPX_PLANE_V] = 2 * yv12->uv_stride;
img->stride[VPX_PLANE_ALPHA] = 2 * yv12->y_stride;
}
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
img->bps = bps;
img->user_priv = user_priv;
img->img_data = yv12->buffer_alloc;
@ -103,7 +103,7 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
yv12->color_space = img->cs;
yv12->color_range = img->range;
#if CONFIG_VP9_HIGHBITDEPTH
#if CONFIG_VPX_HIGHBITDEPTH
if (img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
// In vpx_image_t
// planes point to uint8 address of start of data
@ -127,7 +127,7 @@ static vpx_codec_err_t image2yuvconfig(const vpx_image_t *img,
yv12->border = (yv12->y_stride - img->w) / 2;
#else
yv12->border = (img->stride[VPX_PLANE_Y] - img->w) / 2;
#endif // CONFIG_VP9_HIGHBITDEPTH
#endif // CONFIG_VPX_HIGHBITDEPTH
yv12->subsampling_x = img->x_chroma_shift;
yv12->subsampling_y = img->y_chroma_shift;
return VPX_CODEC_OK;

View File

@ -93,7 +93,7 @@ VP10_CX_SRCS-yes += encoder/mbgraph.h
VP10_CX_SRCS-$(HAVE_SSE2) += encoder/x86/temporal_filter_apply_sse2.asm
VP10_CX_SRCS-$(HAVE_SSE2) += encoder/x86/quantize_sse2.c
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_CX_SRCS-$(HAVE_SSE2) += encoder/x86/highbd_block_error_intrin_sse2.c
endif
@ -106,7 +106,7 @@ endif
VP10_CX_SRCS-$(HAVE_SSE2) += encoder/x86/dct_intrin_sse2.c
VP10_CX_SRCS-$(HAVE_SSSE3) += encoder/x86/dct_ssse3.c
ifeq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifeq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/highbd_fwd_txfm_sse4.c
VP10_CX_SRCS-$(HAVE_SSE4_1) += common/x86/highbd_inv_txfm_sse4.c
VP10_CX_SRCS-$(HAVE_SSE4_1) += encoder/x86/vp10_highbd_quantize_sse4.c
@ -119,7 +119,7 @@ endif
VP10_CX_SRCS-$(HAVE_AVX2) += encoder/x86/error_intrin_avx2.c
ifneq ($(CONFIG_VP9_HIGHBITDEPTH),yes)
ifneq ($(CONFIG_VPX_HIGHBITDEPTH),yes)
VP10_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/dct_neon.c
VP10_CX_SRCS-$(HAVE_NEON) += encoder/arm/neon/error_neon.c
endif

Some files were not shown because too many files have changed in this diff Show More