1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 13:47:46 +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

@ -50,7 +50,7 @@ private:
/* (8.4) Probability Adaptation Process */
u8 merge_prob(u8 pre_prob, u32 count_0, u32 count_1, u8 count_sat, u8 max_update_factor);
u32 merge_probs(int const* tree, int index, u8* probs, u32* counts, u8 count_sat, u8 max_update_factor);
DecoderErrorOr<void> adapt_coef_probs(bool is_inter_predicted_frame);
DecoderErrorOr<void> adapt_coef_probs(FrameContext const&);
DecoderErrorOr<void> adapt_non_coef_probs(FrameContext const&);
void adapt_probs(int const* tree, u8* probs, u32* counts);
u8 adapt_prob(u8 prob, u32 counts[2]);