Make OBU_SIZING work with EXT_TILE In OBU_SIZING, length_field_size is determined adaptively after an OBU unit is encoded. The positions to write tile_col_size and tile_size need to be adjusted accordingly after frame header is re-positioned. This patch fixed the issue and re-enabled LEB128 OBU size fields. BUG=aomedia:1439 Change-Id: Ia090d3482048411f34f0c9c687b7f92fb34262dc
diff --git a/av1/encoder/bitstream.c b/av1/encoder/bitstream.c index 5aae9f7..27e3a66 100644 --- a/av1/encoder/bitstream.c +++ b/av1/encoder/bitstream.c
@@ -4112,6 +4112,11 @@ #endif // CONFIG_OBU_SIZING data += obu_size + length_field_size; +#if CONFIG_EXT_TILE + // Since length_field_size is determined adaptively after frame header + // encoding, saved_wb must be adjusted accordingly. + saved_wb.bit_buffer += length_field_size; +#endif if (cm->show_existing_frame) { data_size = 0;
diff --git a/build/cmake/aom_config_defaults.cmake b/build/cmake/aom_config_defaults.cmake index 4a0fd49..0625ce4 100644 --- a/build/cmake/aom_config_defaults.cmake +++ b/build/cmake/aom_config_defaults.cmake
@@ -126,7 +126,7 @@ set(CONFIG_MONO_VIDEO 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_NO_FRAME_CONTEXT_SIGNALING 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_OBU_NO_IVF 0 CACHE NUMBER "AV1 experiment flag.") -set(CONFIG_OBU_SIZING 0 CACHE NUMBER "AV1 experiment flag.") +set(CONFIG_OBU_SIZING 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_OPT_REF_MV 1 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_RD_DEBUG 0 CACHE NUMBER "AV1 experiment flag.") set(CONFIG_SCALABILITY 1 CACHE NUMBER "AV1 experiment flag.")