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

LibVideo/VP9: Move segmentation parameters to FrameContext

Note that some of the previous segmentation feature settings must be
preserved when a frame is decoded that doesn't use segmentation.

This change also allowed a few functions in Decoder to be made static.
This commit is contained in:
Zaggy1024 2022-11-25 17:20:07 -06:00 committed by Andreas Kling
parent d82dc14bd9
commit fedbc12c4d
7 changed files with 74 additions and 64 deletions

View file

@ -73,15 +73,12 @@ private:
/* (8.6) Reconstruction and Dequantization */
// FIXME: These should be inline or constexpr
u16 dc_q(u8 bit_depth, u8 b);
u16 ac_q(u8 bit_depth, u8 b);
// Returns the quantizer index for the current block
u8 get_base_quantizer_index(BlockContext const&);
static u8 get_base_quantizer_index(BlockContext const&);
// Returns the quantizer value for the dc coefficient for a particular plane
u16 get_dc_quantizer(BlockContext const&, u8 plane);
static u16 get_dc_quantizer(BlockContext const&, u8 plane);
// Returns the quantizer value for the ac coefficient for a particular plane
u16 get_ac_quantizer(BlockContext const&, u8 plane);
static u16 get_ac_quantizer(BlockContext const&, u8 plane);
// (8.6.2) Reconstruct process
DecoderErrorOr<void> reconstruct(u8 plane, BlockContext const&, u32 transform_block_x, u32 transform_block_y, TXSize transform_block_size);