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

LibVideo/VP9: Move TreeSelection class to TreeParser.cpp

The class no longer needs to be defined in the header, as it is only
used in static functions.
This commit is contained in:
Zaggy1024 2023-01-22 17:43:30 -06:00 committed by Linus Groh
parent c4a3af12fc
commit 42606c87e3
2 changed files with 40 additions and 41 deletions

View file

@ -30,35 +30,6 @@ struct TokensContext {
class TreeParser {
public:
// FIXME: Move or remove this class once it is unused in the header.
class TreeSelection {
public:
union TreeSelectionValue {
int const* m_tree;
int m_value;
};
constexpr TreeSelection(int const* values)
: m_is_single_value(false)
, m_value { .m_tree = values }
{
}
constexpr TreeSelection(int value)
: m_is_single_value(true)
, m_value { .m_value = value }
{
}
bool is_single_value() const { return m_is_single_value; }
int single_value() const { return m_value.m_value; }
int const* tree() const { return m_value.m_tree; }
private:
bool m_is_single_value;
TreeSelectionValue m_value;
};
static ErrorOr<Partition> parse_partition(BitStream&, ProbabilityTables const&, SyntaxElementCounter&, bool has_rows, bool has_columns, BlockSubsize block_subsize, u8 num_8x8, PartitionContextView above_partition_context, PartitionContextView left_partition_context, u32 row, u32 column, bool frame_is_intra);
static ErrorOr<PredictionMode> parse_default_intra_mode(BitStream&, ProbabilityTables const&, BlockSubsize mi_size, FrameBlockContext above, FrameBlockContext left, Array<PredictionMode, 4> const& block_sub_modes, u8 index_x, u8 index_y);
static ErrorOr<PredictionMode> parse_default_uv_mode(BitStream&, ProbabilityTables const&, PredictionMode y_mode);