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

@ -13,6 +13,8 @@ namespace Video::VP9 {
class SyntaxElementCounter final {
public:
SyntaxElementCounter();
/* (8.3) Clear Counts Process */
void clear_counts();
@ -38,6 +40,9 @@ public:
u32 m_counts_mv_hp[2][2];
u32 m_counts_token[TX_SIZES][BLOCK_TYPES][REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS][UNCONSTRAINED_NODES];
u32 m_counts_more_coefs[TX_SIZES][BLOCK_TYPES][REF_TYPES][COEF_BANDS][PREV_COEF_CONTEXTS][2];
SyntaxElementCounter operator+(SyntaxElementCounter const&) const;
SyntaxElementCounter& operator+=(SyntaxElementCounter const&);
};
}