mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 21:27:35 +00:00
LibVideo/VP9: Move partitioning contexts to TileContext
Like the non-zero tokens and segmentation IDs, these can be moved into the tile decoding loop for above context and allocated by TileContext for left context.
This commit is contained in:
parent
720fc5a853
commit
71aac25635
7 changed files with 38 additions and 25 deletions
|
@ -44,7 +44,7 @@ inline void increment_counter(u8& counter)
|
|||
counter = min(static_cast<u32>(counter) + 1, 255);
|
||||
}
|
||||
|
||||
ErrorOr<Partition> TreeParser::parse_partition(BitStream& bit_stream, ProbabilityTables const& probability_table, SyntaxElementCounter& counter, bool has_rows, bool has_columns, BlockSubsize block_subsize, u8 num_8x8, Vector<u8> const& above_partition_context, Vector<u8> const& left_partition_context, u32 row, u32 column, bool frame_is_intra)
|
||||
ErrorOr<Partition> TreeParser::parse_partition(BitStream& bit_stream, ProbabilityTables const& probability_table, SyntaxElementCounter& counter, bool has_rows, bool has_columns, BlockSubsize block_subsize, u8 num_8x8, PartitionContextView above_partition_context, PartitionContextView left_partition_context, u32 row, u32 column, bool frame_is_intra)
|
||||
{
|
||||
// Tree array
|
||||
TreeParser::TreeSelection tree = { PartitionSplit };
|
||||
|
@ -61,7 +61,11 @@ ErrorOr<Partition> TreeParser::parse_partition(BitStream& bit_stream, Probabilit
|
|||
auto bsl = mi_width_log2_lookup[block_subsize];
|
||||
auto block_offset = mi_width_log2_lookup[Block_64x64] - bsl;
|
||||
for (auto i = 0; i < num_8x8; i++) {
|
||||
if (column + i >= above_partition_context.size())
|
||||
dbgln("column={}, i={}, size={}", column, i, above_partition_context.size());
|
||||
above |= above_partition_context[column + i];
|
||||
if (row + i >= left_partition_context.size())
|
||||
dbgln("row={}, i={}, size={}", row, i, left_partition_context.size());
|
||||
left |= left_partition_context[row + i];
|
||||
}
|
||||
above = (above & (1 << block_offset)) > 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue