mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-11 01:06:01 +03:00
7b92eff4a6
There were rare cases in which u8 was not large enough for the total count of values read, and increasing this to u32 should have no real effect on performance (hopefully).
38 lines
1.8 KiB
C++
38 lines
1.8 KiB
C++
/*
|
|
* Copyright (c) 2021, Hunter Salyer <thefalsehonesty@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include "SyntaxElementCounter.h"
|
|
|
|
namespace Video::VP9 {
|
|
|
|
void SyntaxElementCounter::clear_counts()
|
|
{
|
|
__builtin_memset(m_counts_intra_mode, 0, sizeof(m_counts_intra_mode));
|
|
__builtin_memset(m_counts_uv_mode, 0, sizeof(m_counts_uv_mode));
|
|
__builtin_memset(m_counts_partition, 0, sizeof(m_counts_partition));
|
|
__builtin_memset(m_counts_interp_filter, 0, sizeof(m_counts_interp_filter));
|
|
__builtin_memset(m_counts_inter_mode, 0, sizeof(m_counts_inter_mode));
|
|
__builtin_memset(m_counts_tx_size, 0, sizeof(m_counts_tx_size));
|
|
__builtin_memset(m_counts_is_inter, 0, sizeof(m_counts_is_inter));
|
|
__builtin_memset(m_counts_comp_mode, 0, sizeof(m_counts_comp_mode));
|
|
__builtin_memset(m_counts_single_ref, 0, sizeof(m_counts_single_ref));
|
|
__builtin_memset(m_counts_comp_ref, 0, sizeof(m_counts_comp_ref));
|
|
__builtin_memset(m_counts_skip, 0, sizeof(m_counts_skip));
|
|
__builtin_memset(m_counts_mv_joint, 0, sizeof(m_counts_mv_joint));
|
|
__builtin_memset(m_counts_mv_sign, 0, sizeof(m_counts_mv_sign));
|
|
__builtin_memset(m_counts_mv_class, 0, sizeof(m_counts_mv_class));
|
|
__builtin_memset(m_counts_mv_class0_bit, 0, sizeof(m_counts_mv_class0_bit));
|
|
__builtin_memset(m_counts_mv_class0_fr, 0, sizeof(m_counts_mv_class0_fr));
|
|
__builtin_memset(m_counts_mv_class0_hp, 0, sizeof(m_counts_mv_class0_hp));
|
|
__builtin_memset(m_counts_mv_bits, 0, sizeof(m_counts_mv_bits));
|
|
__builtin_memset(m_counts_mv_fr, 0, sizeof(m_counts_mv_fr));
|
|
__builtin_memset(m_counts_mv_hp, 0, sizeof(m_counts_mv_hp));
|
|
__builtin_memset(m_counts_token, 0, sizeof(m_counts_token));
|
|
__builtin_memset(m_counts_more_coefs, 0, sizeof(m_counts_more_coefs));
|
|
}
|
|
|
|
}
|