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

LibVideo/VP9: Use an enum to select segment features

This throws out some ugly `#define`s we had that were taking the role
of an enum anyway. We now have some nice getters in the contexts that
take the place of the combo of `seg_feature_active()` and then doing a
lookup in `FrameContext::m_segmentation_features` directly.
This commit is contained in:
Zaggy1024 2023-04-16 23:29:48 -05:00 committed by Tim Flynn
parent 6e6cc1ddb2
commit 094b0d8a78
8 changed files with 46 additions and 29 deletions

View file

@ -98,7 +98,6 @@ 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);
static bool seg_feature_active(BlockContext const&, u8 feature);
DecoderErrorOr<TransformSize> 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&);
@ -130,7 +129,7 @@ private:
Array<i8, MAX_REF_FRAMES> m_previous_loop_filter_ref_deltas;
Array<i8, 2> m_previous_loop_filter_mode_deltas;
bool m_previous_should_use_absolute_segment_base_quantizer;
Array<Array<SegmentFeature, SEG_LVL_MAX>, MAX_SEGMENTS> m_previous_segmentation_features;
SegmentationFeatures m_previous_segmentation_features;
ReferenceFrame m_reference_frames[NUM_REF_FRAMES];