mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 05:57:45 +00:00
LibVideo/VP9: Move segmentation parameters to FrameContext
Note that some of the previous segmentation feature settings must be preserved when a frame is decoded that doesn't use segmentation. This change also allowed a few functions in Decoder to be made static.
This commit is contained in:
parent
d82dc14bd9
commit
fedbc12c4d
7 changed files with 74 additions and 64 deletions
|
@ -67,7 +67,7 @@ private:
|
|||
DecoderErrorOr<void> loop_filter_params(FrameContext&);
|
||||
DecoderErrorOr<void> quantization_params(FrameContext&);
|
||||
DecoderErrorOr<i8> read_delta_q();
|
||||
DecoderErrorOr<void> segmentation_params();
|
||||
DecoderErrorOr<void> segmentation_params(FrameContext&);
|
||||
DecoderErrorOr<u8> read_prob();
|
||||
DecoderErrorOr<void> parse_tile_counts(FrameContext&);
|
||||
void setup_past_independence();
|
||||
|
@ -104,7 +104,7 @@ private:
|
|||
DecoderErrorOr<void> intra_frame_mode_info(BlockContext&, FrameBlockContext above_context, FrameBlockContext left_context);
|
||||
DecoderErrorOr<void> set_intra_segment_id(BlockContext&);
|
||||
DecoderErrorOr<bool> read_should_skip_residuals(BlockContext&, FrameBlockContext above_context, FrameBlockContext left_context);
|
||||
bool seg_feature_active(BlockContext const&, u8 feature);
|
||||
static bool seg_feature_active(BlockContext const&, u8 feature);
|
||||
DecoderErrorOr<TXSize> read_tx_size(BlockContext&, FrameBlockContext above_context, FrameBlockContext left_context, bool allow_select);
|
||||
DecoderErrorOr<void> inter_frame_mode_info(BlockContext&, FrameBlockContext above_context, FrameBlockContext left_context);
|
||||
DecoderErrorOr<void> set_inter_segment_id(BlockContext&);
|
||||
|
@ -139,14 +139,8 @@ private:
|
|||
FrameType m_previous_frame_type { FrameType::KeyFrame };
|
||||
Array<i8, MAX_REF_FRAMES> m_previous_loop_filter_ref_deltas;
|
||||
Array<i8, 2> m_previous_loop_filter_mode_deltas;
|
||||
u8 m_segmentation_tree_probs[7];
|
||||
u8 m_segmentation_pred_prob[3];
|
||||
bool m_feature_enabled[8][4];
|
||||
u8 m_feature_data[8][4];
|
||||
bool m_segmentation_enabled { false };
|
||||
bool m_segmentation_update_map { false };
|
||||
bool m_segmentation_temporal_update { false };
|
||||
bool m_segmentation_abs_or_delta_update { false };
|
||||
bool m_previous_should_use_absolute_segment_base_quantizer;
|
||||
Array<Array<SegmentFeature, SEG_LVL_MAX>, MAX_SEGMENTS> m_previous_segmentation_features;
|
||||
|
||||
// FIXME: Move above and left contexts to structs
|
||||
Array<Vector<bool>, 3> m_above_nonzero_context;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue