mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 16:57:46 +00:00
LibVideo/VP9: Refactor how above & left contexts are stored & cleared
These make more sense as Vectors, and it makes it much easier to manage their sizing.
This commit is contained in:
parent
91572a49c4
commit
cbff7c386a
2 changed files with 27 additions and 35 deletions
|
@ -21,7 +21,6 @@ class Decoder {
|
|||
|
||||
public:
|
||||
Decoder();
|
||||
~Decoder();
|
||||
bool parse_frame(ByteBuffer const&);
|
||||
void dump_info();
|
||||
|
||||
|
@ -40,6 +39,10 @@ private:
|
|||
return StudioSwing;
|
||||
}
|
||||
|
||||
/* Utilities */
|
||||
void clear_context(Vector<u8>& context, size_t size);
|
||||
void clear_context(Vector<Vector<u8>>& context, size_t outer_size, size_t inner_size);
|
||||
|
||||
/* (6.2) Uncompressed Header Syntax */
|
||||
bool uncompressed_header();
|
||||
bool frame_sync_code();
|
||||
|
@ -158,12 +161,12 @@ private:
|
|||
i8 m_loop_filter_ref_deltas[MAX_REF_FRAMES];
|
||||
i8 m_loop_filter_mode_deltas[2];
|
||||
|
||||
u8** m_above_nonzero_context { nullptr };
|
||||
u8** m_left_nonzero_context { nullptr };
|
||||
u8* m_above_seg_pred_context { nullptr };
|
||||
u8* m_left_seg_pred_context { nullptr };
|
||||
u8* m_above_partition_context { nullptr };
|
||||
u8* m_left_partition_context { nullptr };
|
||||
Vector<Vector<u8>> m_above_nonzero_context;
|
||||
Vector<Vector<u8>> m_left_nonzero_context;
|
||||
Vector<u8> m_above_seg_pred_context;
|
||||
Vector<u8> m_left_seg_pred_context;
|
||||
Vector<u8> m_above_partition_context;
|
||||
Vector<u8> m_left_partition_context;
|
||||
u32 m_mi_row_start { 0 };
|
||||
u32 m_mi_row_end { 0 };
|
||||
u32 m_mi_col_start { 0 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue