1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 15:37:46 +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:
Zaggy1024 2023-04-17 00:27:13 -05:00 committed by Tim Flynn
parent 094b0d8a78
commit 90c0e1ad8f
6 changed files with 104 additions and 70 deletions

View file

@ -163,9 +163,9 @@ enum Token : u8 {
enum class SegmentFeature : u8 {
// SEG_LVL_ALT_Q
UseAlternativeQuantizerBase,
AlternativeQuantizerBase,
// SEG_LVL_ALT_L
UseAlternativeLoopFilterBase,
AlternativeLoopFilterBase,
// SEG_LVL_REF_FRAME
ReferenceFrameOverride,
// SEG_LVL_SKIP