mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 21:07:34 +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
|
@ -30,6 +30,7 @@ struct FrameContext;
|
|||
struct TileContext;
|
||||
struct BlockContext;
|
||||
struct MotionVectorCandidate;
|
||||
struct QuantizationParameters;
|
||||
|
||||
class Parser {
|
||||
friend class TreeParser;
|
||||
|
@ -61,10 +62,10 @@ private:
|
|||
DecoderErrorOr<void> compute_image_size(FrameContext&);
|
||||
DecoderErrorOr<InterpolationFilter> read_interpolation_filter(BigEndianInputBitStream&);
|
||||
DecoderErrorOr<void> loop_filter_params(FrameContext&);
|
||||
DecoderErrorOr<void> quantization_params(FrameContext&);
|
||||
DecoderErrorOr<i8> read_delta_q(BigEndianInputBitStream&);
|
||||
DecoderErrorOr<void> segmentation_params(FrameContext&);
|
||||
DecoderErrorOr<u8> read_prob(BigEndianInputBitStream&);
|
||||
static void precalculate_quantizers(FrameContext& frame_context, QuantizationParameters quantization_parameters);
|
||||
DecoderErrorOr<void> parse_tile_counts(FrameContext&);
|
||||
void setup_past_independence();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue