mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 11:37:34 +00:00
LibVideo/VP9: Retain adjacent block contexts storage between frames
Re-allocating the storage is unnecessary, since the size will rarely change during playback.
This commit is contained in:
parent
ea7a6f343b
commit
396972bb69
3 changed files with 11 additions and 2 deletions
|
@ -147,7 +147,10 @@ DecoderErrorOr<ColorRange> Parser::read_color_range()
|
|||
/* (6.2) */
|
||||
DecoderErrorOr<FrameContext> Parser::uncompressed_header()
|
||||
{
|
||||
FrameContext frame_context;
|
||||
// NOTE: m_reusable_frame_block_contexts does not need to retain any data between frame decodes.
|
||||
// This is only stored so that we don't need to allocate a frame's block contexts on each
|
||||
// call to this function, since it will rarely change sizes.
|
||||
FrameContext frame_context { m_reusable_frame_block_contexts };
|
||||
frame_context.color_config = m_previous_color_config;
|
||||
|
||||
auto frame_marker = TRY_READ(m_bit_stream->read_bits(2));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue