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

LibVideo/VP9: Pass the sub-block transform type around as a parameter

The sub-block transform types set and then used in a very small scope,
so now it is just stored in a variable and passed to the two functions
that need it, Parser::tokens() and Decoder::reconstruct().
This commit is contained in:
Zaggy1024 2022-11-25 20:22:35 -06:00 committed by Andreas Kling
parent fedbc12c4d
commit b6f41fe7d9
4 changed files with 54 additions and 51 deletions

View file

@ -117,8 +117,7 @@ private:
DecoderErrorOr<MotionVector> read_motion_vector(BlockContext const&, BlockMotionVectorCandidates const&, ReferenceIndex);
DecoderErrorOr<i32> read_single_motion_vector_component(u8 component);
DecoderErrorOr<bool> residual(BlockContext&, bool has_block_above, bool has_block_left);
DecoderErrorOr<bool> tokens(BlockContext&, size_t plane, u32 x, u32 y, TXSize tx_size, u32 block_index);
u32 const* get_scan(BlockContext const&, size_t plane, TXSize tx_size, u32 block_index);
DecoderErrorOr<bool> tokens(BlockContext&, size_t plane, u32 x, u32 y, TXSize tx_size, u8 transform_type);
DecoderErrorOr<i32> read_coef(u8 bit_depth, Token token);
/* (6.5) Motion Vector Prediction */
@ -158,7 +157,6 @@ private:
Vector<u16> m_frame_store[NUM_REF_FRAMES][3];
u8 m_tx_type { 0 };
u8 m_token_cache[1024];
i32 m_tokens[1024];
bool m_use_hp { false };