mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 14:37:45 +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
|
@ -15,8 +15,8 @@ namespace Video::VP9 {
|
|||
|
||||
static constexpr InterpolationFilter literal_to_type[4] = { EightTapSmooth, EightTap, EightTapSharp, Bilinear };
|
||||
static constexpr TransformSize tx_mode_to_biggest_tx_size[TX_MODES] = { Transform_4x4, Transform_8x8, Transform_16x16, Transform_32x32, Transform_32x32 };
|
||||
static constexpr u8 segmentation_feature_bits[SEG_LVL_MAX] = { 8, 6, 2, 0 };
|
||||
static constexpr bool segmentation_feature_signed[SEG_LVL_MAX] = { true, true, false, false };
|
||||
static constexpr u8 segmentation_feature_bits[to_underlying(SegmentFeature::Sentinel)] = { 8, 6, 2, 0 };
|
||||
static constexpr bool segmentation_feature_signed[to_underlying(SegmentFeature::Sentinel)] = { true, true, false, false };
|
||||
static constexpr u8 inv_map_table[MAX_PROB] = {
|
||||
7, 20, 33, 46, 59, 72, 85, 98, 111, 124, 137, 150, 163, 176, 189, 202, 215, 228, 241, 254,
|
||||
1, 2, 3, 4, 5, 6, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 21, 22, 23, 24, 25, 26, 27,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue