mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:27:46 +00:00
LibVideo: Move parsing of Partition to its own TreeParser function
This adds a tree-parsing function that can be called statically from specific trees' implementations in TreeParser, of which Partition is the first. This way, all calls to tree parses will take the context they need to be able to select a tree and probabilities, which will allow removal of the state dependence in TreeParser on fields from itself and Parser.
This commit is contained in:
parent
69e6feaf32
commit
6192a33e79
3 changed files with 91 additions and 50 deletions
|
@ -916,7 +916,7 @@ DecoderErrorOr<void> Parser::decode_partition(u32 row, u32 col, BlockSubsize blo
|
|||
m_has_cols = (col + half_block_8x8) < m_mi_cols;
|
||||
m_row = row;
|
||||
m_col = col;
|
||||
auto partition = TRY_READ(m_tree_parser->parse_tree(SyntaxElementType::Partition));
|
||||
auto partition = TRY_READ(TreeParser::parse_partition(*m_bit_stream, *m_probability_tables, *m_syntax_element_counter, m_has_rows, m_has_cols, m_block_subsize, m_num_8x8, m_above_partition_context, m_left_partition_context, row, col, m_frame_is_intra));
|
||||
|
||||
auto subsize = subsize_lookup[partition][block_subsize];
|
||||
if (subsize < Block_8x8 || partition == PartitionNone) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue