Remove vp10's build dependency on vp9

CONFIG_VP9_HIGHBITDEPTH is currently used by both vp9 and vp10, but in
many place outside vp9/vp10, the macro was used in conjunction of
CONFIG_VP9. This created a dependency on vp9 for vp10 to build. This
commit removes the dependency by use CONFIG_VP9_HIGHBITDEPTH only in
these places.

Change-Id: I8cc007fc9cf132394c6498ce6759e606b64a6ad0
diff --git a/vpxenc.c b/vpxenc.c
index 7b3da9c..c2d8171 100644
--- a/vpxenc.c
+++ b/vpxenc.c
@@ -201,7 +201,7 @@
     "y", "disable-warning-prompt", 0,
     "Display warnings, but do not prompt user to continue.");
 
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
 static const arg_def_t test16bitinternalarg = ARG_DEF(
     NULL, "test-16bit-internal", 0, "Force use of 16 bit internal buffer");
 #endif
@@ -251,7 +251,7 @@
 #endif
   &timebase, &framerate,
   &error_resilient,
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   &test16bitinternalarg,
 #endif
   &lag_in_frames, NULL
@@ -419,7 +419,7 @@
     NULL, "color-space", 1,
     "The color space of input content:", color_space_enum);
 
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
 static const struct arg_enum_list bitdepth_enum[] = {
   {"8",  VPX_BITS_8},
   {"10", VPX_BITS_10},
@@ -452,7 +452,7 @@
   &frame_parallel_decoding, &aq_mode, &frame_periodic_boost,
   &noise_sens, &tune_content, &input_color_space,
   &min_gf_interval, &max_gf_interval,
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   &bitdeptharg, &inbitdeptharg,
 #endif
   NULL
@@ -527,7 +527,7 @@
 
 #define mmin(a, b)  ((a) < (b) ? (a) : (b))
 
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
 static void find_mismatch_high(const vpx_image_t *const img1,
                                const vpx_image_t *const img2,
                                int yloc[4], int uloc[4], int vloc[4]) {
@@ -725,7 +725,7 @@
   match &= (img1->fmt == img2->fmt);
   match &= (img1->d_w == img2->d_w);
   match &= (img1->d_h == img2->d_h);
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   if (img1->fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
     l_w *= 2;
     c_w *= 2;
@@ -780,7 +780,7 @@
   int                       arg_ctrl_cnt;
   int                       write_webm;
   int                       have_kf_max_dist;
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   // whether to use 16bit internal buffers
   int                       use_16bit_internal;
 #endif
@@ -1066,7 +1066,7 @@
   static const int        *ctrl_args_map = NULL;
   struct stream_config    *config = &stream->config;
   int                      eos_mark_found = 0;
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   int                      test_16bit_internal = 0;
 #endif
 
@@ -1129,7 +1129,7 @@
       config->cfg.g_w = arg_parse_uint(&arg);
     } else if (arg_match(&arg, &height, argi)) {
       config->cfg.g_h = arg_parse_uint(&arg);
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
     } else if (arg_match(&arg, &bitdeptharg, argi)) {
       config->cfg.g_bit_depth = arg_parse_enum_or_int(&arg);
     } else if (arg_match(&arg, &inbitdeptharg, argi)) {
@@ -1202,7 +1202,7 @@
       config->have_kf_max_dist = 1;
     } else if (arg_match(&arg, &kf_disabled, argi)) {
       config->cfg.kf_mode = VPX_KF_DISABLED;
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
     } else if (arg_match(&arg, &test16bitinternalarg, argi)) {
       if (strcmp(global->codec->name, "vp9") == 0 ||
           strcmp(global->codec->name, "vp10") == 0) {
@@ -1238,7 +1238,7 @@
         argj++;
     }
   }
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   if (strcmp(global->codec->name, "vp9") == 0 ||
       strcmp(global->codec->name, "vp10") == 0) {
     config->use_16bit_internal = test_16bit_internal |
@@ -1524,7 +1524,7 @@
 
   flags |= global->show_psnr ? VPX_CODEC_USE_PSNR : 0;
   flags |= global->out_part ? VPX_CODEC_USE_OUTPUT_PARTITION : 0;
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   flags |= stream->config.use_16bit_internal ? VPX_CODEC_USE_HIGHBITDEPTH : 0;
 #endif
 
@@ -1572,7 +1572,7 @@
                      / cfg->g_timebase.num / global->framerate.num;
 
   /* Scale if necessary */
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   if (img) {
     if ((img->fmt & VPX_IMG_FMT_HIGHBITDEPTH) &&
         (img->d_w != cfg->g_w || img->d_h != cfg->g_h)) {
@@ -1823,7 +1823,7 @@
     enc_img = ref_enc.img;
     vpx_codec_control(&stream->decoder, VP9_GET_REFERENCE, &ref_dec);
     dec_img = ref_dec.img;
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
     if ((enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) !=
         (dec_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH)) {
       if (enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
@@ -1844,7 +1844,7 @@
 
   if (!compare_img(&enc_img, &dec_img)) {
     int y[4], u[4], v[4];
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
     if (enc_img.fmt & VPX_IMG_FMT_HIGHBITDEPTH) {
       find_mismatch_high(&enc_img, &dec_img, y, u, v);
     } else {
@@ -1894,7 +1894,7 @@
 int main(int argc, const char **argv_) {
   int pass;
   vpx_image_t raw;
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   vpx_image_t raw_shift;
   int allocated_raw_shift = 0;
   int use_16bit_internal = 0;
@@ -2080,7 +2080,7 @@
                                     &input.pixel_aspect_ratio));
     FOREACH_STREAM(initialize_encoder(stream, &global));
 
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
     if (strcmp(global.codec->name, "vp9") == 0 ||
         strcmp(global.codec->name, "vp10") == 0) {
       // Check to see if at least one stream uses 16 bit internal.
@@ -2137,7 +2137,7 @@
         frame_avail = 0;
 
       if (frames_in > global.skip_frames) {
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
         vpx_image_t *frame_to_encode;
         if (input_shift || (use_16bit_internal && input.bit_depth == 8)) {
           assert(use_16bit_internal);
@@ -2298,7 +2298,7 @@
     });
 #endif
 
-#if CONFIG_VP9 && CONFIG_VP9_HIGHBITDEPTH
+#if CONFIG_VP9_HIGHBITDEPTH
   if (allocated_raw_shift)
     vpx_img_free(&raw_shift);
 #endif