Remove compressed header related code

Removed compressed header related code that is not used anymore.

Change-Id: I8e4881ecf9a4e0a25bd59a456eab9815d4bdd418
diff --git a/av1/decoder/decodeframe.c b/av1/decoder/decodeframe.c
index 829039e..2602c28 100644
--- a/av1/decoder/decodeframe.c
+++ b/av1/decoder/decodeframe.c
@@ -1829,7 +1829,7 @@
   int first_tile_in_tg = 0;
 #if !CONFIG_OBU
   struct aom_read_bit_buffer rb_tg_hdr;
-  const size_t hdr_size = pbi->uncomp_hdr_size + pbi->first_partition_size;
+  const size_t hdr_size = pbi->uncomp_hdr_size;
   const int tg_size_bit_offset = pbi->tg_size_bit_offset;
 #endif
 
@@ -2491,8 +2491,8 @@
 }
 #endif  // CONFIG_FWD_KF
 
-static size_t read_uncompressed_header(AV1Decoder *pbi,
-                                       struct aom_read_bit_buffer *rb) {
+static int read_uncompressed_header(AV1Decoder *pbi,
+                                    struct aom_read_bit_buffer *rb) {
   AV1_COMMON *const cm = &pbi->common;
   MACROBLOCKD *const xd = &pbi->mb;
   BufferPool *const pool = cm->buffer_pool;
@@ -3149,23 +3149,6 @@
   read_tile_info(pbi, rb);
 #endif
 
-  size_t sz;
-  if (use_compressed_header(cm)) {
-    sz = aom_rb_read_literal(rb, 16);
-    if (sz == 0)
-      aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
-                         "Invalid header size");
-  } else {
-    sz = 0;
-  }
-  return sz;
-}
-
-static int read_compressed_header(AV1Decoder *pbi, const uint8_t *data,
-                                  size_t partition_size) {
-  (void)pbi;
-  (void)data;
-  (void)partition_size;
   return 0;
 }
 
@@ -3273,9 +3256,9 @@
   }
 }
 
-size_t av1_decode_frame_headers_and_setup(AV1Decoder *pbi, const uint8_t *data,
-                                          const uint8_t *data_end,
-                                          const uint8_t **p_data_end) {
+int av1_decode_frame_headers_and_setup(AV1Decoder *pbi, const uint8_t *data,
+                                       const uint8_t *data_end,
+                                       const uint8_t **p_data_end) {
   AV1_COMMON *const cm = &pbi->common;
   MACROBLOCKD *const xd = &pbi->mb;
 
@@ -3293,8 +3276,8 @@
   xd->global_motion = cm->global_motion;
 
   struct aom_read_bit_buffer rb;
-  const size_t first_partition_size = read_uncompressed_header(
-      pbi, av1_init_read_bit_buffer(pbi, &rb, data, data_end));
+  read_uncompressed_header(pbi,
+                           av1_init_read_bit_buffer(pbi, &rb, data, data_end));
 
 #if CONFIG_EXT_TILE
   // If cm->single_tile_decoding = 0, the independent decoding of a single tile
@@ -3306,7 +3289,6 @@
   }
 #endif  // CONFIG_EXT_TILE
 
-  pbi->first_partition_size = first_partition_size;
   pbi->uncomp_hdr_size = aom_rb_bytes_read(&rb);
   YV12_BUFFER_CONFIG *new_fb = get_frame_new_buffer(cm);
   xd->cur_buf = new_fb;
@@ -3343,12 +3325,6 @@
     return 0;
   }
 
-  data += aom_rb_bytes_read(&rb);
-  if (first_partition_size)
-    if (!read_is_valid(data, first_partition_size, data_end))
-      aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
-                         "Truncated packet or corrupt header length");
-
   cm->setup_mi(cm);
 
 #if CONFIG_SEGMENT_PRED_LAST
@@ -3380,13 +3356,7 @@
   av1_zero(cm->counts);
 
   xd->corrupted = 0;
-  if (first_partition_size) {
-    new_fb->corrupted = read_compressed_header(pbi, data, first_partition_size);
-    if (new_fb->corrupted)
-      aom_internal_error(&cm->error, AOM_CODEC_CORRUPT_FRAME,
-                         "Decode failed. Frame data header is corrupted.");
-  }
-  return first_partition_size;
+  return 0;
 }
 
 // Once-per-frame initialization
diff --git a/av1/decoder/decodeframe.h b/av1/decoder/decodeframe.h
index 5e153a5..9cc511d 100644
--- a/av1/decoder/decodeframe.h
+++ b/av1/decoder/decodeframe.h
@@ -37,10 +37,10 @@
 // This function is now obsolete
 void av1_decode_frame(struct AV1Decoder *pbi, const uint8_t *data,
                       const uint8_t *data_end, const uint8_t **p_data_end);
-size_t av1_decode_frame_headers_and_setup(struct AV1Decoder *pbi,
-                                          const uint8_t *data,
-                                          const uint8_t *data_end,
-                                          const uint8_t **p_data_end);
+int av1_decode_frame_headers_and_setup(struct AV1Decoder *pbi,
+                                       const uint8_t *data,
+                                       const uint8_t *data_end,
+                                       const uint8_t **p_data_end);
 
 void av1_decode_tg_tiles_and_wrapup(struct AV1Decoder *pbi, const uint8_t *data,
                                     const uint8_t *data_end,
diff --git a/av1/decoder/decoder.c b/av1/decoder/decoder.c
index 8a5aaab..08d423a 100644
--- a/av1/decoder/decoder.c
+++ b/av1/decoder/decoder.c
@@ -374,8 +374,7 @@
 #if !CONFIG_OBU
   av1_decode_frame_headers_and_setup(pbi, source, source + size, psource);
   if (!cm->show_existing_frame) {
-    const uint8_t *data =
-        source + pbi->uncomp_hdr_size + pbi->first_partition_size;
+    const uint8_t *data = source + pbi->uncomp_hdr_size;
     av1_decode_tg_tiles_and_wrapup(pbi, data, source + size, psource, 0,
                                    cm->tile_rows * cm->tile_cols - 1, 1);
   }
diff --git a/av1/decoder/decoder.h b/av1/decoder/decoder.h
index e7547ed..7b56a04 100644
--- a/av1/decoder/decoder.h
+++ b/av1/decoder/decoder.h
@@ -92,10 +92,9 @@
   int acct_enabled;
   Accounting accounting;
 #endif
-  size_t uncomp_hdr_size;       // Size of the uncompressed header
-  size_t first_partition_size;  // Size of the compressed header
-  int tg_size;                  // Number of tiles in the current tilegroup
-  int tg_start;                 // First tile in the current tilegroup
+  size_t uncomp_hdr_size;  // Size of the uncompressed header
+  int tg_size;             // Number of tiles in the current tilegroup
+  int tg_start;            // First tile in the current tilegroup
   int tg_size_bit_offset;
 #if CONFIG_INSPECTION
   aom_inspect_cb inspect_cb;
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index e540aca..5f8675c 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -62,9 +62,8 @@
 static uint32_t read_frame_header_obu(AV1Decoder *pbi, const uint8_t *data,
                                       const uint8_t *data_end,
                                       const uint8_t **p_data_end) {
-  const size_t header_size =
-      av1_decode_frame_headers_and_setup(pbi, data, data_end, p_data_end);
-  return (uint32_t)(pbi->uncomp_hdr_size + header_size);
+  av1_decode_frame_headers_and_setup(pbi, data, data_end, p_data_end);
+  return (uint32_t)(pbi->uncomp_hdr_size);
 }
 
 static uint32_t read_tile_group_header(AV1Decoder *pbi,