1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-06-01 10:08:10 +00:00

LibVideo/VP9: Convert token scan order indices to u16

They are directly taken from lookup tables that only need that bit
precision, so may as well shrink them.
This commit is contained in:
Zaggy1024 2022-11-28 08:21:23 -06:00 committed by Andreas Kling
parent b6f41fe7d9
commit 062da60443
4 changed files with 22 additions and 22 deletions

View file

@ -624,10 +624,10 @@ ErrorOr<bool> TreeParser::parse_motion_vector_hp(BitStream& bit_stream, Probabil
return value;
}
TokensContext TreeParser::get_tokens_context(bool subsampling_x, bool subsampling_y, u32 rows, u32 columns, Array<Vector<bool>, 3> const& above_nonzero_context, Array<Vector<bool>, 3> const& left_nonzero_context, u8 token_cache[1024], TXSize tx_size, u8 tx_type, u8 plane, u32 start_x, u32 start_y, u32 position, bool is_inter, u8 band, u32 c)
TokensContext TreeParser::get_tokens_context(bool subsampling_x, bool subsampling_y, u32 rows, u32 columns, Array<Vector<bool>, 3> const& above_nonzero_context, Array<Vector<bool>, 3> const& left_nonzero_context, u8 token_cache[1024], TXSize tx_size, u8 tx_type, u8 plane, u32 start_x, u32 start_y, u16 position, bool is_inter, u8 band, u16 coef_index)
{
u8 context;
if (c == 0) {
if (coef_index == 0) {
auto sx = plane > 0 ? subsampling_x : false;
auto sy = plane > 0 ? subsampling_y : false;
auto max_x = (2 * columns) >> sx;