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

LibVideo/VP9: Replace (DCT|ADST)_(DCT_ADST) with struct TransformSet

Those previous constants were only set and used to select the first and
second transforms done by the Decoder class. By turning it into a
struct, we can make the code a bit more legible while keeping those
transform modes the same size as before or smaller.
This commit is contained in:
Zaggy1024 2022-11-25 20:45:56 -06:00 committed by Andreas Kling
parent 062da60443
commit facb779b99
9 changed files with 65 additions and 55 deletions

View file

@ -60,6 +60,21 @@ enum TXSize : u8 {
TX_32x32 = 3,
};
enum class TransformType : u8 {
DCT = 0,
ADST = 1,
};
struct TransformSet {
TransformType first_transform : 1;
TransformType second_transform : 1;
bool operator==(TransformSet const& other) const
{
return first_transform == other.first_transform && second_transform == other.second_transform;
}
};
enum ReferenceMode : u8 {
SingleReference = 0,
CompoundReference = 1,