Remove MONO_VIDEO config flag.

This tool is fully adopted.

Change-Id: I7a7e8bb8761aeb731d5650eacb064cf498aa07bd
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index 4468229..a82744e 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -374,9 +374,7 @@
 #if CONFIG_EXT_TILE
   }
 #endif  // CONFIG_EXT_TILE
-#if CONFIG_MONO_VIDEO
   RANGE_CHECK_HI(cfg, monochrome, 1);
-#endif  // CONFIG_MONO_VIDEO
 
 #if CONFIG_EXT_TILE
   if (cfg->large_scale_tile && extra_cfg->aq_mode)
@@ -750,9 +748,7 @@
 #if CONFIG_EXT_TILE
   }
 #endif  // CONFIG_EXT_TILE
-#if CONFIG_MONO_VIDEO
   oxcf->monochrome = cfg->monochrome;
-#endif  // CONFIG_MONO_VIDEO
   oxcf->enable_dual_filter = extra_cfg->use_dual_filter;
 #if CONFIG_JNT_COMP
   oxcf->enable_jnt_comp = extra_cfg->use_jnt_comp;
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index 3d9a363..ad38c23 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -229,9 +229,7 @@
                          // 1 - force to integer
                          // 2 - adaptive
 #endif
-#if CONFIG_MONO_VIDEO
   int monochrome;
-#endif                     // CONFIG_MONO_VIDEO
   int enable_dual_filter;  // 0 - disable dual interpolation filter
                            // 1 - enable vertical and horiz filter selection
 #if CONFIG_JNT_COMP
@@ -772,12 +770,7 @@
 #endif  // CONFIG_CFL
 
 static INLINE int av1_num_planes(const AV1_COMMON *cm) {
-#if CONFIG_MONO_VIDEO
   return cm->seq_params.monochrome ? 1 : MAX_MB_PLANE;
-#else
-  (void)cm;
-  return MAX_MB_PLANE;
-#endif  // CONFIG_MONO_VIDEO
 }
 
 static INLINE void av1_init_macroblockd(AV1_COMMON *cm, MACROBLOCKD *xd,
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 91fa5d7..fefea5b 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1295,9 +1295,7 @@
 #else
   pool->frame_bufs[cm->new_fb_idx].buf.color_space = cm->color_space;
 #endif
-#if CONFIG_MONO_VIDEO
   pool->frame_bufs[cm->new_fb_idx].buf.monochrome = cm->seq_params.monochrome;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   pool->frame_bufs[cm->new_fb_idx].buf.transfer_function =
@@ -1416,9 +1414,7 @@
 #else
   pool->frame_bufs[cm->new_fb_idx].buf.color_space = cm->color_space;
 #endif
-#if CONFIG_MONO_VIDEO
   pool->frame_bufs[cm->new_fb_idx].buf.monochrome = cm->seq_params.monochrome;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   pool->frame_bufs[cm->new_fb_idx].buf.transfer_function =
@@ -2297,13 +2293,9 @@
   av1_read_bitdepth(cm, rb);
 
   cm->use_highbitdepth = cm->bit_depth > AOM_BITS_8 || !allow_lowbitdepth;
-#if CONFIG_MONO_VIDEO
   // monochrome bit (not needed for PROFILE_1)
   const int is_monochrome = cm->profile != PROFILE_1 ? aom_rb_read_bit(rb) : 0;
   cm->seq_params.monochrome = is_monochrome;
-#elif !CONFIG_CICP
-  const int is_monochrome = 0;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_CICP
   int color_description_present_flag = aom_rb_read_bit(rb);
   if (color_description_present_flag) {
@@ -2324,7 +2316,6 @@
   if (!is_monochrome) cm->color_space = aom_rb_read_literal(rb, 4);
 #endif  // CONFIG_COLORSPACE_HEADERS
 #endif  // CONFIG_CICP
-#if CONFIG_MONO_VIDEO
   if (is_monochrome) {
     cm->color_range = AOM_CR_FULL_RANGE;
     cm->subsampling_y = cm->subsampling_x = 1;
@@ -2334,7 +2325,6 @@
     cm->separate_uv_delta_q = 0;
     return;
   }
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_CICP
   if (cm->color_primaries == AOM_CICP_CP_BT_709 &&
       cm->transfer_characteristics == AOM_CICP_TC_SRGB &&
@@ -3071,9 +3061,7 @@
 #else
   get_frame_new_buffer(cm)->color_space = cm->color_space;
 #endif
-#if CONFIG_MONO_VIDEO
   get_frame_new_buffer(cm)->monochrome = cm->seq_params.monochrome;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   get_frame_new_buffer(cm)->transfer_function = cm->transfer_function;
@@ -3537,7 +3525,6 @@
 
   *p_data_end = decode_tiles(pbi, data, data_end, startTile, endTile);
 
-#if CONFIG_MONO_VIDEO
   const int num_planes = av1_num_planes(cm);
   // If the bit stream is monochrome, set the U and V buffers to a constant.
   if (num_planes < 3) {
@@ -3559,7 +3546,6 @@
       }
     }
   }
-#endif
 
   if (endTile != cm->tile_rows * cm->tile_cols - 1) {
     return;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 4c41891..f252202 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -1181,15 +1181,9 @@
                         ec_ctx->angle_delta_cdf[mode - V_PRED]);
     }
 
-#if CONFIG_MONO_VIDEO
     if (!cm->seq_params.monochrome &&
         is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
-                            xd->plane[1].subsampling_y))
-#else
-    if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
-                            xd->plane[1].subsampling_y))
-#endif  // CONFIG_MONO_VIDEO
-    {
+                            xd->plane[1].subsampling_y)) {
       const UV_PREDICTION_MODE uv_mode = mbmi->uv_mode;
 #if !CONFIG_CFL
       write_intra_uv_mode(ec_ctx, uv_mode, mode, w);
@@ -1510,15 +1504,9 @@
                       ec_ctx->angle_delta_cdf[mode - V_PRED]);
   }
 
-#if CONFIG_MONO_VIDEO
   if (!cm->seq_params.monochrome &&
       is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
-                          xd->plane[1].subsampling_y))
-#else
-  if (is_chroma_reference(mi_row, mi_col, bsize, xd->plane[1].subsampling_x,
-                          xd->plane[1].subsampling_y))
-#endif  // CONFIG_MONO_VIDEO
-  {
+                          xd->plane[1].subsampling_y)) {
     const UV_PREDICTION_MODE uv_mode = mbmi->uv_mode;
 #if !CONFIG_CFL
     write_intra_uv_mode(ec_ctx, uv_mode, mode, w);
@@ -2832,16 +2820,12 @@
 static void write_bitdepth_colorspace_sampling(
     AV1_COMMON *const cm, struct aom_write_bit_buffer *wb) {
   write_bitdepth(cm, wb);
-#if CONFIG_MONO_VIDEO
   const int is_monochrome = cm->seq_params.monochrome;
   // monochrome bit
   if (cm->profile != PROFILE_1)
     aom_wb_write_bit(wb, is_monochrome);
   else
     assert(!is_monochrome);
-#elif !CONFIG_CICP
-  const int is_monochrome = 0;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_CICP
   if (cm->color_primaries == AOM_CICP_CP_UNSPECIFIED &&
       cm->transfer_characteristics == AOM_CICP_TC_UNSPECIFIED &&
@@ -2861,9 +2845,7 @@
   if (!is_monochrome) aom_wb_write_literal(wb, cm->color_space, 4);
 #endif  // CONFIG_COLORSPACE_HEADERS
 #endif  // CONFIG_CICP
-#if CONFIG_MONO_VIDEO
   if (is_monochrome) return;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_CICP
   if (cm->color_primaries == AOM_CICP_CP_BT_709 &&
       cm->transfer_characteristics == AOM_CICP_TC_SRGB &&
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 59db1c0..928bf34 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -1090,9 +1090,7 @@
 #else
   cm->color_space = oxcf->color_space;
 #endif  // CONFIG_CICP
-#if CONFIG_MONO_VIDEO
   cm->seq_params.monochrome = oxcf->monochrome;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   cm->transfer_function = oxcf->transfer_function;
@@ -3138,9 +3136,7 @@
 #else
   cm->color_space = oxcf->color_space;
 #endif
-#if CONFIG_MONO_VIDEO
   cm->seq_params.monochrome = oxcf->monochrome;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   cm->transfer_function = oxcf->transfer_function;
@@ -6002,9 +5998,7 @@
 #endif  // CONFIG_REFERENCE_BUFFER
 #endif  // CONFIG_EXT_TILE
 
-#if CONFIG_MONO_VIDEO
   cm->seq_params.monochrome = oxcf->monochrome;
-#endif  // CONFIG_MONO_VIDEO
 
   // For 1 pass CBR, check if we are dropping this frame.
   // Never drop on key frame.
@@ -6090,9 +6084,7 @@
 #else
   cm->frame_to_show->color_space = cm->color_space;
 #endif
-#if CONFIG_MONO_VIDEO
   cm->frame_to_show->monochrome = cm->seq_params.monochrome;
-#endif  // CONFIG_MONO_VIDEO
 #if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   cm->frame_to_show->transfer_function = cm->transfer_function;
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 43af8df..3ae9646 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -318,9 +318,7 @@
   unsigned int large_scale_tile;
   unsigned int single_tile_decoding;
 #endif  // CONFIG_EXT_TILE
-#if CONFIG_MONO_VIDEO
   int monochrome;
-#endif  // CONFIG_MONO_VIDEO
   int enable_dual_filter;
   unsigned int motion_vector_unit_test;
   const cfg_options_t *cfg;