Remove CONFIG_OBU_FRAME
This tool is fully adopted.
Change-Id: I4588ccca120dcb3878fdd4c42a819e8dde8f817c
diff --git a/aom/src/aom_codec.c b/aom/src/aom_codec.c
index 2872a93..923b852 100644
--- a/aom/src/aom_codec.c
+++ b/aom/src/aom_codec.c
@@ -147,9 +147,7 @@
#if CONFIG_OBU_REDUNDANT_FRAME_HEADER
case OBU_REDUNDANT_FRAME_HEADER: return "OBU_REDUNDANT_FRAME_HEADER";
#endif // CONFIG_OBU_REDUNDANT_FRAME_HEADER
-#if CONFIG_OBU_FRAME
case OBU_FRAME: return "OBU_FRAME";
-#endif // CONFIG_OBU_FRAME
case OBU_TILE_GROUP: return "OBU_TILE_GROUP";
case OBU_METADATA: return "OBU_METADATA";
case OBU_PADDING: return "OBU_PADDING";
diff --git a/av1/decoder/obu.c b/av1/decoder/obu.c
index 1bb9d66..89e3e33 100644
--- a/av1/decoder/obu.c
+++ b/av1/decoder/obu.c
@@ -52,9 +52,7 @@
#if CONFIG_OBU_REDUNDANT_FRAME_HEADER
case OBU_REDUNDANT_FRAME_HEADER:
#endif // CONFIG_OBU_REDUNDANT_FRAME_HEADER
-#if CONFIG_OBU_FRAME
case OBU_FRAME:
-#endif // CONFIG_OBU_FRAME
case OBU_TILE_GROUP:
case OBU_METADATA:
case OBU_PADDING: break;
@@ -73,9 +71,7 @@
#if CONFIG_OBU_REDUNDANT_FRAME_HEADER
case OBU_REDUNDANT_FRAME_HEADER:
#endif // CONFIG_OBU_REDUNDANT_FRAME_HEADER
-#if CONFIG_OBU_FRAME
case OBU_FRAME:
-#endif // CONFIG_OBU_FRAME
case OBU_TILE_GROUP:
case OBU_METADATA:
case OBU_PADDING: valid_type = 1; break;
@@ -485,9 +481,7 @@
#if CONFIG_OBU_REDUNDANT_FRAME_HEADER
case OBU_REDUNDANT_FRAME_HEADER:
#endif // CONFIG_OBU_REDUNDANT_FRAME_HEADER
-#if CONFIG_OBU_FRAME
case OBU_FRAME:
-#endif // CONFIG_OBU_FRAME
#if CONFIG_OPERATING_POINTS
// don't decode obu if it's not in current operating mode
if (!is_obu_in_current_operating_point(pbi, obu_header)) {
@@ -516,16 +510,12 @@
frame_decoding_finished = 1;
break;
}
-#if CONFIG_OBU_FRAME
if (obu_header.type != OBU_FRAME) break;
obu_payload_offset = frame_header_size;
#if !CONFIG_TRAILING_BITS
av1_init_read_bit_buffer(pbi, &rb, data + obu_payload_offset, data_end);
#endif // !CONFIG_TRAILING_BITS
AOM_FALLTHROUGH_INTENDED; // fall through to read tile group.
-#else // CONFIG_OBU_FRAME
- break;
-#endif // CONFIG_OBU_FRAME
case OBU_TILE_GROUP:
if (!frame_header_received) {
cm->error.error_code = AOM_CODEC_CORRUPT_FRAME;
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c
index c65b613..9ab8a6b 100644
--- a/av1/encoder/bitstream.c
+++ b/av1/encoder/bitstream.c
@@ -3578,22 +3578,14 @@
cm->largest_tile_id = 0;
if (cm->large_scale_tile) {
-#if CONFIG_OBU_FRAME
// For large_scale_tile case, we always have only one tile group, so it can
// be written as an OBU_FRAME.
const OBU_TYPE obu_type = OBU_FRAME;
-#else
- const OBU_TYPE obu_type = OBU_TILE_GROUP;
-#endif // CONFIG_OBU_FRAME
const uint32_t tg_hdr_size = write_obu_header(obu_type, 0, data);
data += tg_hdr_size;
-#if CONFIG_OBU_FRAME
const uint32_t frame_header_size =
write_frame_header_obu(cpi, saved_wb, data);
-#else
- const uint32_t frame_header_size = 0;
-#endif // CONFIG_OBU_FRAME
data += frame_header_size;
total_size += frame_header_size;
@@ -3699,9 +3691,7 @@
assert(0);
}
total_size += (uint32_t)length_field_size;
-#if CONFIG_OBU_FRAME
saved_wb->bit_buffer += length_field_size;
-#endif // CONFIG_OBU_FRAME
// Now fill in the gaps in the uncompressed header.
if (have_tiles) {
@@ -3736,22 +3726,16 @@
// A new tile group begins at this tile. Write the obu header and
// tile group header
-#if CONFIG_OBU_FRAME
const OBU_TYPE obu_type =
(num_tg_hdrs == 1) ? OBU_FRAME : OBU_TILE_GROUP;
-#else
- const OBU_TYPE obu_type = OBU_TILE_GROUP;
-#endif
curr_tg_data_size =
write_obu_header(obu_type, obu_extension_header, data);
obu_header_size = curr_tg_data_size;
-#if CONFIG_OBU_FRAME
if (num_tg_hdrs == 1) {
curr_tg_data_size +=
write_frame_header_obu(cpi, saved_wb, data + curr_tg_data_size);
}
-#endif
curr_tg_data_size += write_tile_group_header(
data + curr_tg_data_size, tile_idx,
AOMMIN(tile_idx + tg_size - 1, tile_cols * tile_rows - 1),
@@ -3837,9 +3821,7 @@
curr_tg_data_size += (int)length_field_size;
total_size += (uint32_t)length_field_size;
tile_data_start += length_field_size;
-#if CONFIG_OBU_FRAME
saved_wb->bit_buffer += length_field_size;
-#endif // CONFIG_OBU_FRAME
if (!first_tg && cm->error_resilient_mode) {
// Make room for a duplicate Frame Header OBU.
@@ -3947,11 +3929,7 @@
data += obu_header_size + obu_payload_size + length_field_size;
}
-#if CONFIG_OBU_FRAME
const int write_frame_header = (cm->num_tg > 1 || cm->show_existing_frame);
-#else
- const int write_frame_header = 1;
-#endif // CONFIG_OBU_FRAME
struct aom_write_bit_buffer saved_wb;
if (write_frame_header) {
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake
index 9ac2748..a6ef664 100644
--- a/build/cmake/aom_config_defaults.cmake
+++ b/build/cmake/aom_config_defaults.cmake
@@ -101,7 +101,6 @@
set(CONFIG_INTER_STATS_ONLY 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_LOWPRECISION_BLEND 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_MONO_VIDEO 1 CACHE NUMBER "AV1 experiment flag.")
-set(CONFIG_OBU_FRAME 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_OBU_REDUNDANT_FRAME_HEADER 1 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_OPERATING_POINTS 0 CACHE NUMBER "AV1 experiment flag.")
set(CONFIG_RD_DEBUG 0 CACHE NUMBER "AV1 experiment flag.")
diff --git a/tools/obu_parser.cc b/tools/obu_parser.cc
index 243ca30..cbfc76d 100644
--- a/tools/obu_parser.cc
+++ b/tools/obu_parser.cc
@@ -69,9 +69,7 @@
#if CONFIG_OBU_REDUNDANT_FRAME_HEADER
case OBU_REDUNDANT_FRAME_HEADER:
#endif // CONFIG_OBU_REDUNDANT_FRAME_HEADER
-#if CONFIG_OBU_FRAME
case OBU_FRAME:
-#endif // CONFIG_OBU_FRAME
case OBU_METADATA:
case OBU_PADDING: return true;
}