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

LibVideo: Make probability tables save to the specified index

Previously, saved probability tables were being inserted, causing the
Vector to increase in size when it should say fixed at a size of 4. This
changes the Vector to an Array<T, 4> which will default-initalize and
allow assigning to any index without previously setting size.
This commit is contained in:
Zaggy1024 2022-09-25 03:23:25 -05:00 committed by Andrew Kaster
parent 7d27273dc7
commit 7dcd5ed206
2 changed files with 7 additions and 4 deletions

View file

@ -1,14 +1,16 @@
/*
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
* Copyright (c) 2022, Gregory Bertilson <zaggy1024@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include "Symbols.h"
#include <AK/Array.h>
#include <AK/Types.h>
#include <AK/Vector.h>
#include "Symbols.h"
namespace Video::VP9 {
@ -97,7 +99,7 @@ private:
CoefProbs coef_probs;
};
Vector<ProbabilityTable, 4> m_saved_probability_tables;
Array<ProbabilityTable, 4> m_saved_probability_tables;
ProbabilityTable m_current_probability_table;
};