mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 01:37:35 +00:00
LibVideo/VP9: Implement more TreeParser probability calculations
Now TreeParser has mostly complete probability calculation implementations for all currently used syntax elements. Some of these calculation methods aren't actually finished because they use data we have yet to parse in the Decoder, but they're close to finished.
This commit is contained in:
parent
f85f557a1f
commit
e4f015ce3d
4 changed files with 407 additions and 23 deletions
|
@ -47,13 +47,39 @@ public:
|
|||
u8 select_tree_probability(SyntaxElementType type, u8 node);
|
||||
void count_syntax_element(SyntaxElementType type, int value);
|
||||
|
||||
void set_default_intra_mode_variables(u8 idx, u8 idy)
|
||||
{
|
||||
m_idx = idx;
|
||||
m_idy = idy;
|
||||
}
|
||||
|
||||
private:
|
||||
u8 calculate_partition_probability(u8 node);
|
||||
u8 calculate_default_intra_mode_probability(u8 node);
|
||||
u8 calculate_default_uv_mode_probability(u8 node);
|
||||
u8 calculate_intra_mode_probability(u8 node);
|
||||
u8 calculate_sub_intra_mode_probability(u8 node);
|
||||
u8 calculate_uv_mode_probability(u8 node);
|
||||
u8 calculate_segment_id_probability(u8 node);
|
||||
u8 calculate_skip_probability();
|
||||
u8 calculate_seg_id_predicted_probability();
|
||||
u8 calculate_is_inter_probability();
|
||||
u8 calculate_comp_mode_probability();
|
||||
u8 calculate_comp_ref_probability();
|
||||
u8 calculate_single_ref_p1_probability();
|
||||
u8 calculate_single_ref_p2_probability();
|
||||
u8 calculate_tx_size_probability(u8 node);
|
||||
u8 calculate_inter_mode_probability(u8 node);
|
||||
u8 calculate_interp_filter_probability(u8 node);
|
||||
|
||||
Decoder& m_decoder;
|
||||
// m_ctx is a member variable because it is required for syntax element counting (section 9.3.4)
|
||||
u8 m_ctx { 0 };
|
||||
|
||||
// These are variables necessary for parsing tree data, but aren't useful otherwise, so they're
|
||||
// not stored in the Decoder itself.
|
||||
u8 m_idx { 0 };
|
||||
u8 m_idy { 0 };
|
||||
};
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue