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
diff --git a/av1/common/resize.c b/av1/common/resize.c
index ac19f37..7b88fd8 100644
--- a/av1/common/resize.c
+++ b/av1/common/resize.c
@@ -234,6 +234,7 @@
   }
 }
 
+#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 @@
     }
   }
 }
+#endif
 
 static void down2_symodd(const uint8_t *const input, int length,
                          uint8_t *output) {
@@ -526,7 +528,7 @@
     }
   }
 }
-
+#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 @@
     }
   }
 }
+#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 03466d3..97ac1c3 100755
--- a/configure
+++ b/configure
@@ -197,6 +197,7 @@
 enable_feature spatial_resampling
 enable_feature multithread
 enable_feature os_support
+enable_feature highbitdepth
 
 CODECS="
     av1_encoder
@@ -508,6 +509,13 @@
     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 02ac8e7..9ea6623 100644
--- a/test/av1_convolve_test.cc
+++ b/test/av1_convolve_test.cc
@@ -262,6 +262,7 @@
                        ::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 @@
     }
   }
 }
+#endif
 
 TEST(AV1ConvolveTest, av1_highbd_convolve_avg) {
   ACMRandom rnd(ACMRandom::DeterministicSeed());
diff --git a/test/convolve_test.cc b/test/convolve_test.cc
index a84ef4e..d0f14c1 100644
--- a/test/convolve_test.cc
+++ b/test/convolve_test.cc
@@ -212,7 +212,7 @@
    *                               = 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<int>(intermediate_height * output_width);
 
diff --git a/test/variance_test.cc b/test/variance_test.cc
index 5b1003c..1dc4815 100644
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -565,8 +565,8 @@
           aom_memalign(16, block_size_ * sizeof(uint16_t))));
       sec_ = CONVERT_TO_BYTEPTR(reinterpret_cast<uint16_t *>(
           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 @@
 #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
     }