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

LibVideo/VP9: Use a struct for block context to keep between frames

There are three fields that we need to store from FrameBlockContext to
keep between frames, which are used to parse for those same fields for
the next frame.
This commit is contained in:
Zaggy1024 2022-11-20 12:42:17 -06:00 committed by Andreas Kling
parent 5275a1101e
commit 4a4aa697d9
4 changed files with 75 additions and 28 deletions

View file

@ -259,7 +259,6 @@ private:
ReferenceFramePair m_comp_var_ref;
// FIXME: Use Array<MotionVectorPair, 4> instead.
Array<Array<MotionVector, 4>, 2> m_block_mvs;
Vector<u8> m_prev_segment_ids;
// FIXME: From spec: NOTE We are using a 2D array to store the SubModes for clarity. It is possible to reduce memory
// consumption by only storing one intra mode for each 8x8 horizontal and vertical position, i.e. to use two 1D
@ -273,8 +272,7 @@ private:
u8 m_ref_mv_count { 0 };
MotionVectorPair m_ref_list_mv;
bool m_use_prev_frame_mvs;
Vector<ReferenceFramePair> m_prev_ref_frames;
Vector<MotionVectorPair> m_prev_mvs;
Vector2D<PersistentBlockContext> m_previous_block_contexts;
// Indexed by ReferenceFrame enum.
u8 m_mode_context[4] { INVALID_CASE };