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

LibVideo/VP9: Implement sections 6.1.2 and 8.4.1-8.4.4

These section implement the behavior to refresh the probability
tables after parsing a frame.
This commit is contained in:
FalseHonesty 2021-06-26 23:23:22 -04:00 committed by Andreas Kling
parent cf6b3d0ce9
commit d79c9c262f
8 changed files with 188 additions and 9 deletions

View file

@ -20,6 +20,14 @@ public:
void dump_frame_info();
private:
/* (8.4) Probability Adaptation Process */
u8 merge_prob(u8 pre_prob, u8 count_0, u8 count_1, u8 count_sat, u8 max_update_factor);
u8 merge_probs(int const* tree, int index, u8* probs, u8* counts, u8 count_sat, u8 max_update_factor);
bool adapt_coef_probs();
bool adapt_non_coef_probs();
void adapt_probs(int const* tree, u8* probs, u8* counts);
u8 adapt_prob(u8 prob, u8 counts[2]);
/* (8.5) Prediction Processes */
bool predict_intra(size_t plane, u32 x, u32 y, bool have_left, bool have_above, bool not_on_right, TXSize tx_size, u32 block_index);
bool predict_inter(size_t plane, u32 x, u32 y, u32 w, u32 h, u32 block_index);