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

LibVideo/VP9: Select and read motion vectors without fields in Parser

Candidate vector selections are only used to calculate the new vectors
for the current block, so we only need to keep those for the duration
of the inter_block_mode_info() call.

Candidate vectors are now stored in BlockMotionVectorCandidates, which
contains the fields necessary to choose the vector to use to sample
from the selected reference frame.

Most functions related to motion vectors were renamed to more verbose
but meaningful names.
This commit is contained in:
Zaggy1024 2022-11-23 20:00:58 -06:00 committed by Andreas Kling
parent 368687a74f
commit ea7a6f343b
3 changed files with 124 additions and 113 deletions

View file

@ -410,4 +410,17 @@ struct BlockContext {
Array<MotionVectorPair, 4> sub_block_motion_vectors;
};
struct BlockMotionVectorCandidateSet {
MotionVector near_vector;
MotionVector nearest_vector;
MotionVector best_vector;
};
using BlockMotionVectorCandidates = Pair<BlockMotionVectorCandidateSet>;
struct MotionVectorCandidate {
ReferenceFrameType type;
MotionVector vector;
};
}