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

LibVideo/VP9: Count syntax elements in TileContext, and sum at the end

Syntax element counters were previously accessed across tiles, which
would cause a race condition updating the counts in a tile-threaded
mode.
This commit is contained in:
Zaggy1024 2023-02-13 17:13:16 -06:00 committed by Jelle Raaijmakers
parent a8604d9356
commit 1fcac52e77
7 changed files with 120 additions and 48 deletions

View file

@ -108,7 +108,7 @@ private:
DecoderErrorOr<void> read_ref_frames(BlockContext&, FrameBlockContext above_context, FrameBlockContext left_context);
DecoderErrorOr<MotionVectorPair> get_motion_vector(BlockContext const&, BlockMotionVectorCandidates const&);
DecoderErrorOr<MotionVector> read_motion_vector(BlockContext const&, BlockMotionVectorCandidates const&, ReferenceIndex);
DecoderErrorOr<i32> read_single_motion_vector_component(BooleanDecoder&, u8 component, bool use_high_precision);
DecoderErrorOr<i32> read_single_motion_vector_component(BooleanDecoder&, SyntaxElementCounter&, u8 component, bool use_high_precision);
DecoderErrorOr<bool> residual(BlockContext&, bool has_block_above, bool has_block_left);
DecoderErrorOr<bool> tokens(BlockContext&, size_t plane, u32 x, u32 y, TransformSize, TransformSet, Array<u8, 1024> token_cache);
DecoderErrorOr<i32> read_coef(BooleanDecoder&, u8 bit_depth, Token token);
@ -140,7 +140,6 @@ private:
Vector2D<PersistentBlockContext> m_previous_block_contexts;
OwnPtr<ProbabilityTables> m_probability_tables;
OwnPtr<SyntaxElementCounter> m_syntax_element_counter;
Decoder& m_decoder;
};