Remove config flag CONFIG_COLORSPACE_HEADERS

This tool is fully adopted.

Change-Id: I458aa2afe1a843998ef1b24c08f27c752079c5ad
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index a82744e..689dad0 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -445,14 +445,10 @@
   RANGE_CHECK(extra_cfg, matrix_coefficients, AOM_CICP_MC_BT_709,
               AOM_CICP_MC_ICTCP);
 #else
-#if CONFIG_COLORSPACE_HEADERS
   RANGE_CHECK(extra_cfg, color_space, AOM_CS_UNKNOWN, AOM_CS_ICTCP);
   RANGE_CHECK(extra_cfg, transfer_function, AOM_TF_UNKNOWN, AOM_TF_HLG);
   RANGE_CHECK(extra_cfg, chroma_sample_position, AOM_CSP_UNKNOWN,
               AOM_CSP_COLOCATED);
-#else
-  RANGE_CHECK(extra_cfg, color_space, AOM_CS_UNKNOWN, AOM_CS_SRGB);
-#endif  // CONFIG_COLORSPACE_HEADERS
 #endif  // CONFIG_CICP
   RANGE_CHECK(extra_cfg, color_range, 0, 1);
 
@@ -678,19 +674,10 @@
 #else
   oxcf->color_space = extra_cfg->color_space;
 #endif  // CONFIG_CICP
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   oxcf->transfer_function = extra_cfg->transfer_function;
 #endif
   oxcf->chroma_sample_position = extra_cfg->chroma_sample_position;
-#else
-#if !CONFIG_CICP
-  if (extra_cfg->transfer_function != AOM_TF_UNKNOWN)
-    return AOM_CODEC_UNSUP_FEATURE;
-#endif
-  if (extra_cfg->chroma_sample_position != AOM_CSP_UNKNOWN)
-    return AOM_CODEC_UNSUP_FEATURE;
-#endif
 
   oxcf->color_range = extra_cfg->color_range;
   oxcf->render_width = extra_cfg->render_width;
@@ -1693,30 +1680,18 @@
 
 static aom_codec_err_t ctrl_set_transfer_function(aom_codec_alg_priv_t *ctx,
                                                   va_list args) {
-#if CONFIG_COLORSPACE_HEADERS
   struct av1_extracfg extra_cfg = ctx->extra_cfg;
   extra_cfg.transfer_function = CAST(AV1E_SET_TRANSFER_FUNCTION, args);
   return update_extra_cfg(ctx, &extra_cfg);
-#else
-  (void)ctx;
-  (void)args;
-  return AOM_CODEC_UNSUP_FEATURE;
-#endif
 }
 #endif
 
 static aom_codec_err_t ctrl_set_chroma_sample_position(
     aom_codec_alg_priv_t *ctx, va_list args) {
-#if CONFIG_COLORSPACE_HEADERS
   struct av1_extracfg extra_cfg = ctx->extra_cfg;
   extra_cfg.chroma_sample_position =
       CAST(AV1E_SET_CHROMA_SAMPLE_POSITION, args);
   return update_extra_cfg(ctx, &extra_cfg);
-#else
-  (void)ctx;
-  (void)args;
-  return AOM_CODEC_UNSUP_FEATURE;
-#endif
 }
 
 static aom_codec_err_t ctrl_set_color_range(aom_codec_alg_priv_t *ctx,
diff --git a/av1/av1_iface_common.h b/av1/av1_iface_common.h
index a08f925..c0cf8da 100644
--- a/av1/av1_iface_common.h
+++ b/av1/av1_iface_common.h
@@ -46,12 +46,10 @@
   img->cs = yv12->color_space;
 #endif
   img->monochrome = yv12->monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   img->tf = yv12->transfer_function;
 #endif
   img->csp = yv12->chroma_sample_position;
-#endif
   img->range = yv12->color_range;
   img->bit_depth = 8;
   img->w = yv12->y_stride;
@@ -121,12 +119,10 @@
   yv12->color_space = img->cs;
 #endif
   yv12->monochrome = img->monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   yv12->transfer_function = img->tf;
 #endif
   yv12->chroma_sample_position = img->csp;
-#endif
   yv12->color_range = img->range;
 
   if (img->fmt & AOM_IMG_FMT_HIGHBITDEPTH) {
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index fefea5b..8db2870 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1296,14 +1296,12 @@
   pool->frame_bufs[cm->new_fb_idx].buf.color_space = cm->color_space;
 #endif
   pool->frame_bufs[cm->new_fb_idx].buf.monochrome = cm->seq_params.monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   pool->frame_bufs[cm->new_fb_idx].buf.transfer_function =
       cm->transfer_function;
 #endif
   pool->frame_bufs[cm->new_fb_idx].buf.chroma_sample_position =
       cm->chroma_sample_position;
-#endif
   pool->frame_bufs[cm->new_fb_idx].buf.color_range = cm->color_range;
   pool->frame_bufs[cm->new_fb_idx].buf.render_width = cm->render_width;
   pool->frame_bufs[cm->new_fb_idx].buf.render_height = cm->render_height;
@@ -1415,14 +1413,12 @@
   pool->frame_bufs[cm->new_fb_idx].buf.color_space = cm->color_space;
 #endif
   pool->frame_bufs[cm->new_fb_idx].buf.monochrome = cm->seq_params.monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   pool->frame_bufs[cm->new_fb_idx].buf.transfer_function =
       cm->transfer_function;
 #endif
   pool->frame_bufs[cm->new_fb_idx].buf.chroma_sample_position =
       cm->chroma_sample_position;
-#endif
   pool->frame_bufs[cm->new_fb_idx].buf.color_range = cm->color_range;
   pool->frame_bufs[cm->new_fb_idx].buf.render_width = cm->render_width;
   pool->frame_bufs[cm->new_fb_idx].buf.render_height = cm->render_height;
@@ -2309,19 +2305,13 @@
   }
 #else
   cm->color_space = AOM_CS_UNKNOWN;
-#if CONFIG_COLORSPACE_HEADERS
   if (!is_monochrome) cm->color_space = aom_rb_read_literal(rb, 5);
   cm->transfer_function = aom_rb_read_literal(rb, 5);
-#else
-  if (!is_monochrome) cm->color_space = aom_rb_read_literal(rb, 4);
-#endif  // CONFIG_COLORSPACE_HEADERS
 #endif  // CONFIG_CICP
   if (is_monochrome) {
     cm->color_range = AOM_CR_FULL_RANGE;
     cm->subsampling_y = cm->subsampling_x = 1;
-#if CONFIG_COLORSPACE_HEADERS
     cm->chroma_sample_position = AOM_CSP_UNKNOWN;
-#endif  // CONFIG_COLORSPACE_HEADERS
     cm->separate_uv_delta_q = 0;
     return;
   }
@@ -2362,11 +2352,9 @@
         cm->subsampling_y = 0;
       }
     }
-#if CONFIG_COLORSPACE_HEADERS
     if (cm->subsampling_x == 1 && cm->subsampling_y == 1) {
       cm->chroma_sample_position = aom_rb_read_literal(rb, 2);
     }
-#endif  // CONFIG_COLORSPACE_HEADERS
   }
   cm->separate_uv_delta_q = aom_rb_read_bit(rb);
 }
@@ -3062,12 +3050,10 @@
   get_frame_new_buffer(cm)->color_space = cm->color_space;
 #endif
   get_frame_new_buffer(cm)->monochrome = cm->seq_params.monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   get_frame_new_buffer(cm)->transfer_function = cm->transfer_function;
 #endif
   get_frame_new_buffer(cm)->chroma_sample_position = cm->chroma_sample_position;
-#endif
   get_frame_new_buffer(cm)->color_range = cm->color_range;
   get_frame_new_buffer(cm)->render_width = cm->render_width;
   get_frame_new_buffer(cm)->render_height = cm->render_height;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index f252202..368f60c 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2838,12 +2838,8 @@
     aom_wb_write_literal(wb, cm->matrix_coefficients, 8);
   }
 #else
-#if CONFIG_COLORSPACE_HEADERS
   if (!is_monochrome) aom_wb_write_literal(wb, cm->color_space, 5);
   aom_wb_write_literal(wb, cm->transfer_function, 5);
-#else
-  if (!is_monochrome) aom_wb_write_literal(wb, cm->color_space, 4);
-#endif  // CONFIG_COLORSPACE_HEADERS
 #endif  // CONFIG_CICP
   if (is_monochrome) return;
 #if CONFIG_CICP
@@ -2882,11 +2878,9 @@
         assert(cm->subsampling_x == 1 && cm->subsampling_y == 0);
       }
     }
-#if CONFIG_COLORSPACE_HEADERS
     if (cm->subsampling_x == 1 && cm->subsampling_y == 1) {
       aom_wb_write_literal(wb, cm->chroma_sample_position, 2);
     }
-#endif
   }
   aom_wb_write_bit(wb, cm->separate_uv_delta_q);
 }
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index 928bf34..391e47a 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -1091,12 +1091,10 @@
   cm->color_space = oxcf->color_space;
 #endif  // CONFIG_CICP
   cm->seq_params.monochrome = oxcf->monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   cm->transfer_function = oxcf->transfer_function;
 #endif
   cm->chroma_sample_position = oxcf->chroma_sample_position;
-#endif
   cm->color_range = oxcf->color_range;
 #if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   cm->timing_info_present = oxcf->timing_info_present;
@@ -3137,12 +3135,10 @@
   cm->color_space = oxcf->color_space;
 #endif
   cm->seq_params.monochrome = oxcf->monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   cm->transfer_function = oxcf->transfer_function;
 #endif
   cm->chroma_sample_position = oxcf->chroma_sample_position;
-#endif
   cm->color_range = oxcf->color_range;
 
   assert(IMPLIES(cm->profile <= PROFILE_1, cm->bit_depth <= AOM_BITS_10));
@@ -6085,12 +6081,10 @@
   cm->frame_to_show->color_space = cm->color_space;
 #endif
   cm->frame_to_show->monochrome = cm->seq_params.monochrome;
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   cm->frame_to_show->transfer_function = cm->transfer_function;
 #endif
   cm->frame_to_show->chroma_sample_position = cm->chroma_sample_position;
-#endif
   cm->frame_to_show->color_range = cm->color_range;
   cm->frame_to_show->render_width = cm->render_width;
   cm->frame_to_show->render_height = cm->render_height;
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index b704ddc..35a9424 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -92,7 +92,6 @@
 set(CONFIG_CDF_UPDATE_MODE 0 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_CFL 1 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_CICP 1 CACHE NUMBER "AV1 experiment flag.")
-set(CONFIG_COLORSPACE_HEADERS 1 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_DEPENDENT_HORZTILEGROUPS 0 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_DEPENDENT_HORZTILES 0 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_DIST_8X8 1 CACHE NUMBER "AV1 experiment flag.")
diff --git a/test/encoder_parms_get_to_decoder.cc b/test/encoder_parms_get_to_decoder.cc
index 671cf99..c54ad95 100644
--- a/test/encoder_parms_get_to_decoder.cc
+++ b/test/encoder_parms_get_to_decoder.cc
@@ -47,18 +47,16 @@
 #else
   aom_color_space_t cs;
 #endif
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
   aom_transfer_function_t tf;
 #endif
   aom_chroma_sample_position_t csp;
-#endif
   int render_size[2];
   // TODO(JBB): quantizers / bitrate
 };
 
 const EncodeParameters kAV1EncodeParameterSet[] = {
-#if CONFIG_CICP && CONFIG_COLORSPACE_HEADERS
+#if CONFIG_CICP
   { 0,
     0,
     1,
@@ -104,7 +102,6 @@
     AOM_CSP_VERTICAL,
     { 0, 0 } },
 #else
-#if CONFIG_COLORSPACE_HEADERS
   { 0,
     0,
     1,
@@ -115,12 +112,6 @@
     AOM_TF_BT_709,
     AOM_CSP_COLOCATED,
     { 0, 0 } },
-#else
-  { 0, 0, 1, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_2020{ 0, 0 } },
-  { 0, 0, 0, 1, 0, AOM_CR_STUDIO_RANGE, AOM_CS_BT_601, { 0, 0 } },
-  { 0, 0, 0, 0, 0, AOM_CR_FULL_RANGE, AOM_CS_BT_709, { 0, 0 } },
-  { 0, 2, 0, 0, 1, AOM_CR_STUDIO_RANGE, AOM_CS_UNKNOWN, { 640, 480 } },
-#endif
 #endif
   // TODO(JBB): Test profiles (requires more work).
 };
@@ -156,12 +147,10 @@
 #else
       encoder->Control(AV1E_SET_COLOR_SPACE, encode_parms.cs);
 #endif
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
       encoder->Control(AV1E_SET_TRANSFER_FUNCTION, encode_parms.tf);
 #endif
       encoder->Control(AV1E_SET_CHROMA_SAMPLE_POSITION, encode_parms.csp);
-#endif
       encoder->Control(AV1E_SET_COLOR_RANGE, encode_parms.color_range);
       encoder->Control(AV1E_SET_LOSSLESS, encode_parms.lossless);
       encoder->Control(AV1E_SET_FRAME_PARALLEL_DECODING,
@@ -207,12 +196,10 @@
 #else
     EXPECT_EQ(encode_parms.cs, common->color_space);
 #endif
-#if CONFIG_COLORSPACE_HEADERS
 #if !CONFIG_CICP
     EXPECT_EQ(encode_parms.tf, common->transfer_function);
 #endif
     EXPECT_EQ(encode_parms.csp, common->chroma_sample_position);
-#endif
     if (encode_parms.render_size[0] > 0 && encode_parms.render_size[1] > 0) {
       EXPECT_EQ(encode_parms.render_size[0], common->render_width);
       EXPECT_EQ(encode_parms.render_size[1], common->render_height);