Remove CONFIG_TIMING_INFO_IN_SEQ_HEADERS config flag

This tool is fully adopted.

Change-Id: I368a5be88b9740873fefb8f09268953ca6721844
diff --git a/aom_dsp/binary_codes_reader.c b/aom_dsp/binary_codes_reader.c
index ef64b75..0a97f88 100644
--- a/aom_dsp/binary_codes_reader.c
+++ b/aom_dsp/binary_codes_reader.c
@@ -144,7 +144,6 @@
   return aom_rb_read_primitive_refsubexpfin(rb, scaled_n, k, ref) - n + 1;
 }
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 uint32_t aom_rb_read_uvlc(struct aom_read_bit_buffer *rb) {
   int leading_zeros = 0;
 
@@ -155,4 +154,3 @@
 
   return value;
 }
-#endif
diff --git a/aom_dsp/binary_codes_reader.h b/aom_dsp/binary_codes_reader.h
index a27709d..48e7683 100644
--- a/aom_dsp/binary_codes_reader.h
+++ b/aom_dsp/binary_codes_reader.h
@@ -47,9 +47,7 @@
 int16_t aom_rb_read_signed_primitive_refsubexpfin(
     struct aom_read_bit_buffer *rb, uint16_t n, uint16_t k, int16_t ref);
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 uint32_t aom_rb_read_uvlc(struct aom_read_bit_buffer *rb);
-#endif
 
 #ifdef __cplusplus
 }  // extern "C"
diff --git a/aom_dsp/binary_codes_writer.c b/aom_dsp/binary_codes_writer.c
index 3db9a58..8f74f09 100644
--- a/aom_dsp/binary_codes_writer.c
+++ b/aom_dsp/binary_codes_writer.c
@@ -209,7 +209,6 @@
   return aom_count_primitive_refsubexpfin(scaled_n, k, ref, v);
 }
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 void aom_wb_write_uvlc(struct aom_write_bit_buffer *wb, uint32_t v) {
   int64_t shift_val = ++v;
   int leading_zeroes = 1;
@@ -221,4 +220,3 @@
   aom_wb_write_literal(wb, 0, leading_zeroes >> 1);
   aom_wb_write_unsigned_literal(wb, v, (leading_zeroes + 1) >> 1);
 }
-#endif
diff --git a/aom_dsp/binary_codes_writer.h b/aom_dsp/binary_codes_writer.h
index 69d383e..1ce708e 100644
--- a/aom_dsp/binary_codes_writer.h
+++ b/aom_dsp/binary_codes_writer.h
@@ -60,9 +60,7 @@
                                      uint16_t v);
 int aom_count_signed_primitive_refsubexpfin(uint16_t n, uint16_t k, int16_t ref,
                                             int16_t v);
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 void aom_wb_write_uvlc(struct aom_write_bit_buffer *wb, uint32_t v);
-#endif
 #ifdef __cplusplus
 }  // extern "C"
 #endif
diff --git a/aom_dsp/bitreader_buffer.c b/aom_dsp/bitreader_buffer.c
index 312fa56..898a3a3 100644
--- a/aom_dsp/bitreader_buffer.c
+++ b/aom_dsp/bitreader_buffer.c
@@ -35,7 +35,6 @@
   return value;
 }
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 uint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb,
                                       int bits) {
   uint32_t value = 0;
@@ -43,7 +42,6 @@
   for (bit = bits - 1; bit >= 0; bit--) value |= aom_rb_read_bit(rb) << bit;
   return value;
 }
-#endif
 
 int aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits) {
   const int nbits = sizeof(unsigned) * 8 - bits - 1;
diff --git a/aom_dsp/bitreader_buffer.h b/aom_dsp/bitreader_buffer.h
index 2c583a3..2dafe11 100644
--- a/aom_dsp/bitreader_buffer.h
+++ b/aom_dsp/bitreader_buffer.h
@@ -37,9 +37,7 @@
 
 int aom_rb_read_literal(struct aom_read_bit_buffer *rb, int bits);
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 uint32_t aom_rb_read_unsigned_literal(struct aom_read_bit_buffer *rb, int bits);
-#endif
 
 int aom_rb_read_inv_signed_literal(struct aom_read_bit_buffer *rb, int bits);
 
diff --git a/aom_dsp/bitwriter_buffer.c b/aom_dsp/bitwriter_buffer.c
index 6601b4c..75260a8 100644
--- a/aom_dsp/bitwriter_buffer.c
+++ b/aom_dsp/bitwriter_buffer.c
@@ -48,13 +48,11 @@
   for (bit = bits - 1; bit >= 0; bit--) aom_wb_write_bit(wb, (data >> bit) & 1);
 }
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 void aom_wb_write_unsigned_literal(struct aom_write_bit_buffer *wb,
                                    uint32_t data, int bits) {
   int bit;
   for (bit = bits - 1; bit >= 0; bit--) aom_wb_write_bit(wb, (data >> bit) & 1);
 }
-#endif
 
 void aom_wb_overwrite_literal(struct aom_write_bit_buffer *wb, int data,
                               int bits) {
diff --git a/aom_dsp/bitwriter_buffer.h b/aom_dsp/bitwriter_buffer.h
index ac328d5..85a7883 100644
--- a/aom_dsp/bitwriter_buffer.h
+++ b/aom_dsp/bitwriter_buffer.h
@@ -31,10 +31,8 @@
 
 void aom_wb_write_literal(struct aom_write_bit_buffer *wb, int data, int bits);
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 void aom_wb_write_unsigned_literal(struct aom_write_bit_buffer *wb,
                                    uint32_t data, int bits);
-#endif
 
 void aom_wb_overwrite_literal(struct aom_write_bit_buffer *wb, int data,
                               int bits);
diff --git a/aomenc.c b/aomenc.c
index a1a5c21..dc6f731 100644
--- a/aomenc.c
+++ b/aomenc.c
@@ -482,7 +482,6 @@
     ARG_DEF(NULL, "mtu-size", 1,
             "MTU size for a tile group, default is 0 (no MTU targeting), "
             "overrides maximum number of tile groups");
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 static const struct arg_enum_list timing_info_enum[] = {
   { "unspecified", AOM_TIMING_UNSPECIFIED },
   { "constant", AOM_TIMING_EQUAL },
@@ -491,7 +490,6 @@
 static const arg_def_t timing_info =
     ARG_DEF_ENUM(NULL, "timing-info", 1,
                  "Signal timing info in the bitstream:", timing_info_enum);
-#endif
 #if CONFIG_FILM_GRAIN
 static const arg_def_t film_grain_test =
     ARG_DEF(NULL, "film-grain-test", 1,
@@ -697,9 +695,7 @@
                                        &superblock_size,
                                        &num_tg,
                                        &mtu_size,
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
                                        &timing_info,
-#endif
 #if CONFIG_FILM_GRAIN
                                        &film_grain_test,
 #endif
@@ -764,9 +760,7 @@
                                         AV1E_SET_SUPERBLOCK_SIZE,
                                         AV1E_SET_NUM_TG,
                                         AV1E_SET_MTU,
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
                                         AV1E_SET_TIMING_INFO,
-#endif
 #if CONFIG_FILM_GRAIN
                                         AV1E_SET_FILM_GRAIN_TEST_VECTOR,
 #endif
@@ -2165,10 +2159,9 @@
     }
 #endif
 
-/* Use the frame rate from the file only if none was specified
- * on the command-line.
- */
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
+    /* Use the frame rate from the file only if none was specified
+     * on the command-line.
+     */
     if (!global.have_framerate) {
       global.framerate.num = input.framerate.numerator;
       global.framerate.den = input.framerate.denominator;
@@ -2177,16 +2170,6 @@
       stream->config.cfg.g_timebase.den = global.framerate.num;
       stream->config.cfg.g_timebase.num = global.framerate.den;
     }
-#else
-    if (!global.have_framerate) {
-      global.framerate.num = input.framerate.numerator;
-      global.framerate.den = input.framerate.denominator;
-      FOREACH_STREAM(stream, streams) {
-        stream->config.cfg.g_timebase.den = global.framerate.num;
-        stream->config.cfg.g_timebase.num = global.framerate.den;
-      }
-    }
-#endif
     /* Show configuration */
     if (global.verbose && pass == 0) {
       FOREACH_STREAM(stream, streams) {
diff --git a/av1/av1_cx_iface.c b/av1/av1_cx_iface.c
index fd8302c..b5a9af6 100644
--- a/av1/av1_cx_iface.c
+++ b/av1/av1_cx_iface.c
@@ -77,9 +77,7 @@
 #endif
   unsigned int num_tg;
   unsigned int mtu_size;
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   aom_timing_info_t timing_info;
-#endif
   unsigned int disable_tempmv;
   unsigned int frame_parallel_decoding_mode;
   int use_dual_filter;
@@ -158,15 +156,13 @@
 #if CONFIG_DIST_8X8
   0,
 #endif
-  1,  // max number of tile groups
-  0,  // mtu_size
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
+  1,                       // max number of tile groups
+  0,                       // mtu_size
   AOM_TIMING_UNSPECIFIED,  // No picture timing signaling in bitstream
-#endif
-  0,      // disable temporal mv prediction
-  1,      // frame_parallel_decoding_mode
-  1,      // enable dual filter
-  NO_AQ,  // aq_mode
+  0,                       // disable temporal mv prediction
+  1,                       // frame_parallel_decoding_mode
+  1,                       // enable dual filter
+  NO_AQ,                   // aq_mode
 #if CONFIG_EXT_DELTA_Q
   NO_DELTA_Q,  // deltaq_mode
 #endif
@@ -435,9 +431,7 @@
   RANGE_CHECK(extra_cfg, tuning, AOM_TUNE_PSNR, AOM_TUNE_SSIM);
 #endif
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   RANGE_CHECK(extra_cfg, timing_info, AOM_TIMING_UNSPECIFIED, AOM_TIMING_EQUAL);
-#endif
 
 #if CONFIG_FILM_GRAIN
   RANGE_CHECK(extra_cfg, film_grain_test_vector, 0, 16);
@@ -518,7 +512,6 @@
   oxcf->input_bit_depth = cfg->g_input_bit_depth;
   // guess a frame rate if out of whack, use 30
   oxcf->init_framerate = (double)cfg->g_timebase.den / cfg->g_timebase.num;
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   if (extra_cfg->timing_info == AOM_TIMING_EQUAL) {
     oxcf->timing_info_present = 1;
     oxcf->num_units_in_tick = cfg->g_timebase.num;
@@ -532,10 +525,6 @@
     oxcf->init_framerate = 30;
     oxcf->timing_info_present = 0;
   }
-#else
-  if (oxcf->init_framerate > 180) oxcf->init_framerate = 30;
-
-#endif
   oxcf->mode = GOOD;
   oxcf->cfg = &cfg->cfg;
 
@@ -1035,14 +1024,13 @@
   extra_cfg.mtu_size = CAST(AV1E_SET_MTU, args);
   return update_extra_cfg(ctx, &extra_cfg);
 }
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 static aom_codec_err_t ctrl_set_timing_info(aom_codec_alg_priv_t *ctx,
                                             va_list args) {
   struct av1_extracfg extra_cfg = ctx->extra_cfg;
   extra_cfg.timing_info = CAST(AV1E_SET_TIMING_INFO, args);
   return update_extra_cfg(ctx, &extra_cfg);
 }
-#endif
+
 static aom_codec_err_t ctrl_set_disable_tempmv(aom_codec_alg_priv_t *ctx,
                                                va_list args) {
   struct av1_extracfg extra_cfg = ctx->extra_cfg;
@@ -1726,9 +1714,7 @@
 #endif
   { AV1E_SET_NUM_TG, ctrl_set_num_tg },
   { AV1E_SET_MTU, ctrl_set_mtu },
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   { AV1E_SET_TIMING_INFO, ctrl_set_timing_info },
-#endif
   { AV1E_SET_DISABLE_TEMPMV, ctrl_set_disable_tempmv },
   { AV1E_SET_FRAME_PARALLEL_DECODING, ctrl_set_frame_parallel_decoding_mode },
   { AV1E_SET_ENABLE_DF, ctrl_set_enable_df },
diff --git a/av1/common/onyxc_int.h b/av1/common/onyxc_int.h
index cd07657..18bc1f0 100644
--- a/av1/common/onyxc_int.h
+++ b/av1/common/onyxc_int.h
@@ -248,13 +248,11 @@
   int render_height;
   int last_width;
   int last_height;
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   int timing_info_present;
   uint32_t num_units_in_tick;
   uint32_t time_scale;
   int equal_picture_interval;
   uint32_t num_ticks_per_picture;
-#endif
 
   // TODO(jkoleszar): this implies chroma ss right now, but could vary per
   // plane. Revisit as part of the future change to YV12_BUFFER_CONFIG to
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 50ac73f..237cd38 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -2336,7 +2336,6 @@
   cm->separate_uv_delta_q = aom_rb_read_bit(rb);
 }
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 void av1_read_timing_info_header(AV1_COMMON *cm,
                                  struct aom_read_bit_buffer *rb) {
   cm->timing_info_present = aom_rb_read_bit(rb);  // timing info present flag
@@ -2353,7 +2352,6 @@
     }
   }
 }
-#endif
 
 void read_sequence_header(SequenceHeader *seq_params,
                           struct aom_read_bit_buffer *rb) {
diff --git a/av1/decoder/decodeframe.h b/av1/decoder/decodeframe.h
index abeb62c..2bda1c3 100644
--- a/av1/decoder/decodeframe.h
+++ b/av1/decoder/decodeframe.h
@@ -43,10 +43,8 @@
 void av1_read_bitdepth_colorspace_sampling(AV1_COMMON *cm,
                                            struct aom_read_bit_buffer *rb,
                                            int allow_lowbitdepth);
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 void av1_read_timing_info_header(AV1_COMMON *cm,
                                  struct aom_read_bit_buffer *rb);
-#endif
 
 struct aom_read_bit_buffer *av1_init_read_bit_buffer(
     struct AV1Decoder *pbi, struct aom_read_bit_buffer *rb, const uint8_t *data,
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 89f7f6f..ae75220 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -108,9 +108,7 @@
 
   av1_read_bitdepth_colorspace_sampling(cm, rb, pbi->allow_lowbitdepth);
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   av1_read_timing_info_header(cm, rb);
-#endif
 
 #if CONFIG_FILM_GRAIN
   cm->film_grain_params_present = aom_rb_read_bit(rb);
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index 1366ab5..a36dc3b 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -2670,7 +2670,6 @@
   aom_wb_write_bit(wb, cm->separate_uv_delta_q);
 }
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 static void write_timing_info_header(AV1_COMMON *const cm,
                                      struct aom_write_bit_buffer *wb) {
   aom_wb_write_bit(wb, cm->timing_info_present);  // timing info present flag
@@ -2687,7 +2686,6 @@
     }
   }
 }
-#endif  // CONFIG_TIMING_INFO_IN_SEQ_HEADERS
 
 #if CONFIG_FILM_GRAIN
 static void write_film_grain_params(AV1_COMP *cpi,
@@ -3609,10 +3607,8 @@
   // color_config
   write_bitdepth_colorspace_sampling(cm, &wb);
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   // timing_info
   write_timing_info_header(cm, &wb);
-#endif
 
 #if CONFIG_FILM_GRAIN
   aom_wb_write_bit(&wb, cm->film_grain_params_present);
diff --git a/av1/encoder/encoder.c b/av1/encoder/encoder.c
index e87ea2c..39ee654 100644
--- a/av1/encoder/encoder.c
+++ b/av1/encoder/encoder.c
@@ -1030,13 +1030,11 @@
   cm->seq_params.monochrome = oxcf->monochrome;
   cm->chroma_sample_position = oxcf->chroma_sample_position;
   cm->color_range = oxcf->color_range;
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   cm->timing_info_present = oxcf->timing_info_present;
   cm->num_units_in_tick = oxcf->num_units_in_tick;
   cm->time_scale = oxcf->time_scale;
   cm->equal_picture_interval = oxcf->equal_picture_interval;
   cm->num_ticks_per_picture = oxcf->num_ticks_per_picture;
-#endif
   cm->seq_params.enable_dual_filter = oxcf->enable_dual_filter;
 #if CONFIG_JNT_COMP
   cm->seq_params.enable_jnt_comp = oxcf->enable_jnt_comp;
@@ -2936,13 +2934,11 @@
 
   assert(IMPLIES(cm->profile <= PROFILE_1, cm->bit_depth <= AOM_BITS_10));
 
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   cm->timing_info_present = oxcf->timing_info_present;
   cm->num_units_in_tick = oxcf->num_units_in_tick;
   cm->time_scale = oxcf->time_scale;
   cm->equal_picture_interval = oxcf->equal_picture_interval;
   cm->num_ticks_per_picture = oxcf->num_ticks_per_picture;
-#endif
 
 #if CONFIG_FILM_GRAIN
   update_film_grain_parameters(cpi, oxcf);
diff --git a/av1/encoder/encoder.h b/av1/encoder/encoder.h
index 2bccbe6..e557468 100644
--- a/av1/encoder/encoder.h
+++ b/av1/encoder/encoder.h
@@ -291,14 +291,12 @@
   int color_range;
   int render_width;
   int render_height;
-#if CONFIG_TIMING_INFO_IN_SEQ_HEADERS
   aom_timing_info_t timing_info;
   int timing_info_present;
   uint32_t num_units_in_tick;
   uint32_t time_scale;
   int equal_picture_interval;
   uint32_t num_ticks_per_picture;
-#endif
 #if CONFIG_FILM_GRAIN
   int film_grain_test_vector;
 #endif
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 6d20f3c..a05fd00 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -127,6 +127,5 @@
 set(CONFIG_SKIP_SGR 1 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_SPATIAL_SEGMENTATION 1 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_TILE_INFO_FIRST 0 CACHE NUMBER "AV1 experiment flag.")
-set(CONFIG_TIMING_INFO_IN_SEQ_HEADERS 1 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_TMV 1 CACHE NUMBER "AV1 experiment flag.")
 set(CONFIG_FILEOPTIONS 1 CACHE NUMBER "AV1 config option flag.")