1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 01:37:35 +00:00

LibVideo/VP9: Move the left non-zero tokens context to TileContext

The array containing the vertical line of bools indicating whether non-
zero tokens were decoded in each sub-block is moved to TileContext, and
a span of the valid range for a block to read and write to is created
when we construct a BlockContext.
This commit is contained in:
Zaggy1024 2022-11-27 04:13:12 -06:00 committed by Andreas Kling
parent 06082d310f
commit 4e7e9d8479
7 changed files with 96 additions and 43 deletions

View file

@ -45,6 +45,11 @@ inline T brev(C bit_count, T value)
return result;
}
inline BlockSubsize get_subsampled_block_size(BlockSubsize size, bool subsampling_x, bool subsampling_y)
{
return ss_size_lookup[size < Block_8x8 ? Block_8x8 : size][subsampling_x][subsampling_y];
}
inline Gfx::Size<u8> block_size_to_sub_blocks(BlockSubsize size)
{
return Gfx::Size<u8>(num_4x4_blocks_wide_lookup[size], num_4x4_blocks_high_lookup[size]);