Commit ce364d12 authored by Yushin Cho's avatar Yushin Cho Committed by Thomas Daede

[OBU] Start enabing OBU

Enable OBU Headers, also use the most recent code of libaom,
so that rav1e generated bitstream can be decodable by current version of
aomdec.

- Add OBU_Type enum
- write_obu_header() funcion
- Copy reference av1_pack_bitstream() C code fro libaom, where sequence
  and frame level OBUs are written.

[OBU] Add Sequence Header and revise its functions

[OBU] More on sequence header functions and types

- Revise the type of Sequence struct members.
- Add write_sequence_header2(), which is modified version of
  write_sequence_header() for OBU.
- Add new color_config(), i.e. updated color info.

TODO:
- The structure of OBU is three parts:
1) OBU header
2) Size of OBU (written in leb128() format of AV1)
3) OBU (with specific obu_type signlaed in OBU header)

So, need to figure out how to post-write the size of obu (i.e, payload size) after
writing obu. In libaom, this is implemented by calling obu_memmove() on byte buffer,
which moves the obu data by payload size in bytes to create a gap between obu header
and obu then write a obu size.
parent 920a6bd0
...@@ -42,7 +42,7 @@ fn main() { ...@@ -42,7 +42,7 @@ fn main() {
.define("CONFIG_UNIT_TESTS", "0") .define("CONFIG_UNIT_TESTS", "0")
.define("CONFIG_EXT_PARTITION", "0") .define("CONFIG_EXT_PARTITION", "0")
.define("CONFIG_EXT_PARTITION_TYPES", "0") .define("CONFIG_EXT_PARTITION_TYPES", "0")
.define("CONFIG_OBU", "0") .define("CONFIG_OBU", "1")
.define("CONFIG_FILTER_INTRA", "0") .define("CONFIG_FILTER_INTRA", "0")
.define("CONFIG_EXT_SKIP", "0") .define("CONFIG_EXT_SKIP", "0")
.define("CONFIG_LV_MAP", "1") .define("CONFIG_LV_MAP", "1")
......
...@@ -27,7 +27,7 @@ fn main() { ...@@ -27,7 +27,7 @@ fn main() {
let mut fi = let mut fi =
FrameInvariants::new(width, height, files.quantizer, files.speed); FrameInvariants::new(width, height, files.quantizer, files.speed);
let sequence = Sequence::new(); let mut sequence = Sequence::new(width, height);
write_ivf_header( write_ivf_header(
&mut files.output_file, &mut files.output_file,
width, width,
......
...@@ -30,7 +30,7 @@ fn main() { ...@@ -30,7 +30,7 @@ fn main() {
}; };
let mut fi = let mut fi =
FrameInvariants::new(width, height, files.quantizer, files.speed); FrameInvariants::new(width, height, files.quantizer, files.speed);
let sequence = Sequence::new(); let mut sequence = Sequence::new(width, height);
write_ivf_header( write_ivf_header(
&mut files.output_file, &mut files.output_file,
fi.padded_w, fi.padded_w,
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment