mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 08:57:47 +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:
parent
6e6cc1ddb2
commit
094b0d8a78
8 changed files with 46 additions and 29 deletions
|
@ -243,11 +243,14 @@ struct PersistentBlockContext {
|
|||
u8 segment_id { 0 };
|
||||
};
|
||||
|
||||
struct SegmentFeature {
|
||||
struct SegmentFeatureStatus {
|
||||
bool enabled { false };
|
||||
u8 value { 0 };
|
||||
};
|
||||
|
||||
using SegmentFeatures = Array<SegmentFeatureStatus, to_underlying(SegmentFeature::Sentinel)>;
|
||||
using SegmentationFeatures = Array<SegmentFeatures, MAX_SEGMENTS>;
|
||||
|
||||
struct ColorConfig {
|
||||
u8 bit_depth { 8 };
|
||||
ColorSpace color_space { ColorSpace::Bt601 };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue