From 92400ab736590071f794746ca9891afcf0db959b Mon Sep 17 00:00:00 2001 From: Sebastien Alaiwan Date: Tue, 14 Mar 2017 10:39:29 +0100 Subject: [PATCH] Enable build support for high-bitdepth by default This causes the HBD operating path to be compiled by default, allowing default builds to handle all AV1 profiles, instead of only Profile 0. This doesn't change the current behaviour of the code. This will help ensuring the HBD operating path continues to compile. BUG=aomedia:460 Change-Id: I8774b9586b1da479ce3882df482ac3cd3048a9d5 --- av1/common/resize.c | 5 ++++- configure | 8 ++++++++ test/av1_convolve_test.cc | 2 ++ test/convolve_test.cc | 2 +- test/variance_test.cc | 6 +++--- 5 files changed, 18 insertions(+), 5 deletions(-) diff --git a/av1/common/resize.c b/av1/common/resize.c index ac19f37f5..7b88fd81c 100644 --- a/av1/common/resize.c +++ b/av1/common/resize.c @@ -234,6 +234,7 @@ static void interpolate(const uint8_t *const input, int inlength, } } +#ifndef __clang_analyzer__ static void down2_symeven(const uint8_t *const input, int length, uint8_t *output) { // Actual filter len = 2 * filter_len_half. @@ -288,6 +289,7 @@ static void down2_symeven(const uint8_t *const input, int length, } } } +#endif static void down2_symodd(const uint8_t *const input, int length, uint8_t *output) { @@ -526,7 +528,7 @@ static void highbd_interpolate(const uint16_t *const input, int inlength, } } } - +#ifndef __clang_analyzer__ static void highbd_down2_symeven(const uint16_t *const input, int length, uint16_t *output, int bd) { // Actual filter len = 2 * filter_len_half. @@ -634,6 +636,7 @@ static void highbd_down2_symodd(const uint16_t *const input, int length, } } } +#endif static void highbd_resize_multistep(const uint16_t *const input, int length, uint16_t *output, int olength, diff --git a/configure b/configure index 03466d3b9..97ac1c3a5 100755 --- a/configure +++ b/configure @@ -197,6 +197,7 @@ enable_feature dependency_tracking enable_feature spatial_resampling enable_feature multithread enable_feature os_support +enable_feature highbitdepth CODECS=" av1_encoder @@ -508,6 +509,13 @@ post_process_cmdline() { soft_enable alt_intra soft_enable palette_throughput + # Workaround features currently incompatible with highbitdepth + enabled intrabc && disable_feature highbitdepth + enabled pvq && disable_feature highbitdepth + enabled daala_dist && disable_feature highbitdepth + enabled tx64x64 && disable_feature highbitdepth + enabled ext_partition && disable_feature highbitdepth + # Fix up experiment dependencies enabled pvq && enable_feature ec_adapt enabled ec_adapt && enable_feature ec_multisymbol diff --git a/test/av1_convolve_test.cc b/test/av1_convolve_test.cc index 02ac8e7bb..9ea662381 100644 --- a/test/av1_convolve_test.cc +++ b/test/av1_convolve_test.cc @@ -262,6 +262,7 @@ INSTANTIATE_TEST_CASE_P( ::testing::ValuesIn(filter_ls))); #if CONFIG_HIGHBITDEPTH +#ifndef __clang_analyzer__ TEST(AV1ConvolveTest, av1_highbd_convolve) { ACMRandom rnd(ACMRandom::DeterministicSeed()); #if CONFIG_DUAL_FILTER @@ -322,6 +323,7 @@ TEST(AV1ConvolveTest, av1_highbd_convolve) { } } } +#endif TEST(AV1ConvolveTest, av1_highbd_convolve_avg) { ACMRandom rnd(ACMRandom::DeterministicSeed()); diff --git a/test/convolve_test.cc b/test/convolve_test.cc index a84ef4ec8..d0f14c147 100644 --- a/test/convolve_test.cc +++ b/test/convolve_test.cc @@ -212,7 +212,7 @@ void highbd_filter_block2d_8_c(const uint16_t *src_ptr, * = 23 * and filter_max_width = 16 */ - uint16_t intermediate_buffer[(kMaxDimension + 8) * kMaxDimension]; + uint16_t intermediate_buffer[(kMaxDimension + 8) * kMaxDimension] = { 0 }; const int intermediate_next_stride = 1 - static_cast(intermediate_height * output_width); diff --git a/test/variance_test.cc b/test/variance_test.cc index 5b1003ca7..1dc48154b 100644 --- a/test/variance_test.cc +++ b/test/variance_test.cc @@ -565,8 +565,8 @@ class SubpelVarianceTest aom_memalign(16, block_size_ * sizeof(uint16_t)))); sec_ = CONVERT_TO_BYTEPTR(reinterpret_cast( aom_memalign(16, block_size_ * sizeof(uint16_t)))); - ref_ = - CONVERT_TO_BYTEPTR(new uint16_t[block_size_ + width_ + height_ + 1]); + ref_ = CONVERT_TO_BYTEPTR(aom_memalign( + 16, (block_size_ + width_ + height_ + 1) * sizeof(uint16_t))); #endif // CONFIG_HIGHBITDEPTH } ASSERT_TRUE(src_ != NULL); @@ -582,7 +582,7 @@ class SubpelVarianceTest #if CONFIG_HIGHBITDEPTH } else { aom_free(CONVERT_TO_SHORTPTR(src_)); - delete[] CONVERT_TO_SHORTPTR(ref_); + aom_free(CONVERT_TO_SHORTPTR(ref_)); aom_free(CONVERT_TO_SHORTPTR(sec_)); #endif // CONFIG_HIGHBITDEPTH } -- GitLab