mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 08:17: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:
parent
7d27273dc7
commit
7dcd5ed206
2 changed files with 7 additions and 4 deletions
|
@ -1,5 +1,6 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
|
||||
* Copyright (c) 2022, Gregory Bertilson <zaggy1024@gmail.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
@ -1172,7 +1173,7 @@ KfUVModeProbs const& ProbabilityTables::kf_uv_mode_prob() const
|
|||
|
||||
void ProbabilityTables::save_probs(size_t index)
|
||||
{
|
||||
m_saved_probability_tables.insert(index, m_current_probability_table);
|
||||
m_saved_probability_tables[index] = m_current_probability_table;
|
||||
}
|
||||
|
||||
void ProbabilityTables::reset_probs()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue