mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 02:07:35 +00:00
LibVideo/VP9: Pre-calculate the quantizers at the start of each frame
Quantizers are a constant for the whole frame, except when segment features override them, in which case they are a constant per segment ID. We take advantage of this by pre-calculating those after reading the quantization parameters and segmentation features for a frame. This results in a small 1.5% improvement (~12.9s -> ~12.7s).
This commit is contained in:
parent
094b0d8a78
commit
90c0e1ad8f
6 changed files with 104 additions and 70 deletions
|
@ -73,11 +73,11 @@ private:
|
|||
/* (8.6) Reconstruction and Dequantization */
|
||||
|
||||
// Returns the quantizer index for the current block
|
||||
static u8 get_base_quantizer_index(BlockContext const&);
|
||||
static u8 get_base_quantizer_index(SegmentFeatureStatus alternative_quantizer_feature, bool should_use_absolute_segment_base_quantizer, u8 base_quantizer_index);
|
||||
// Returns the quantizer value for the dc coefficient for a particular plane
|
||||
static u16 get_dc_quantizer(BlockContext const&, u8 plane);
|
||||
static u16 get_dc_quantizer(u8 bit_depth, u8 base, i8 delta);
|
||||
// Returns the quantizer value for the ac coefficient for a particular plane
|
||||
static u16 get_ac_quantizer(BlockContext const&, u8 plane);
|
||||
static u16 get_ac_quantizer(u8 bit_depth, u8 base, i8 delta);
|
||||
|
||||
// (8.6.2) Reconstruct process
|
||||
DecoderErrorOr<void> reconstruct(u8 plane, BlockContext const&, u32 transform_block_x, u32 transform_block_y, TransformSize transform_block_size, TransformSet);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue