WebP/Lossy: Variable naming fix for constants from last pull request

This commit is contained in:
Nico Weber 2023-05-27 16:06:33 -04:00 committed by Andrew Kaster
parent bd5290dd45
commit ea54c58930
Notes: sideshowbarker 2024-07-17 01:21:02 +09:00
2 changed files with 5 additions and 5 deletions

View File

@ -235,7 +235,7 @@ ErrorOr<FrameHeader> decode_VP8_frame_header(BooleanDecoder& decoder)
u8 refresh_entropy_probs = TRY(L(1)); // Has no effect in webp files.
dbgln_if(WEBP_DEBUG, "refresh_entropy_probs {}", refresh_entropy_probs);
memcpy(header.coefficient_probabilities, default_coeff_probs, sizeof(header.coefficient_probabilities));
memcpy(header.coefficient_probabilities, DEFAULT_COEFFICIENT_PROBABILITIES, sizeof(header.coefficient_probabilities));
TRY(decode_VP8_frame_header_coefficient_probabilities(decoder, header.coefficient_probabilities));
// https://datatracker.ietf.org/doc/html/rfc6386#section-9.11 "Remaining Frame Header Data (Key Frame)"
@ -376,7 +376,7 @@ ErrorOr<void> decode_VP8_frame_header_coefficient_probabilities(BooleanDecoder&
for (int l = 0; l < 11; l++) {
// token_prob_update() says L(1) and L(8), but it's actually B(p) and L(8).
// https://datatracker.ietf.org/doc/html/rfc6386#section-13.4 "Token Probability Updates" describes it correctly.
if (TRY(B(coeff_update_probs[i][j][k][l])))
if (TRY(B(COEFFICIENT_UPDATE_PROBABILITIES[i][j][k][l])))
coefficient_probabilities[i][j][k][l] = TRY(L(8));
}
}

View File

@ -221,7 +221,7 @@ const Prob KEYFRAME_BLOCK_MODE_PROBABILITIES[num_intra_bmodes][num_intra_bmodes]
// clang-format on
// https://datatracker.ietf.org/doc/html/rfc6386#section-13.2 "Coding of Individual Coefficient Values"
enum dct_token {
enum DCTToken {
DCT_0, /* value 0 */
DCT_1, /* 1 */
DCT_2, /* 2 */
@ -239,7 +239,7 @@ enum dct_token {
// https://datatracker.ietf.org/doc/html/rfc6386#section-13.4 "Token Probability Updates"
// clang-format off
static Prob constexpr coeff_update_probs[4][8][3][num_dct_tokens - 1] = {
static Prob constexpr COEFFICIENT_UPDATE_PROBABILITIES[4][8][3][num_dct_tokens - 1] = {
{
{
{ 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255 },
@ -413,7 +413,7 @@ static Prob constexpr coeff_update_probs[4][8][3][num_dct_tokens - 1] = {
// https://datatracker.ietf.org/doc/html/rfc6386#section-13.5 "Default Token Probability Table"
// clang-format off
static Prob constexpr default_coeff_probs[4][8][3][num_dct_tokens - 1] = {
static Prob constexpr DEFAULT_COEFFICIENT_PROBABILITIES[4][8][3][num_dct_tokens - 1] = {
{
{
{ 128, 128, 128, 128, 128, 128, 128, 128, 128, 128, 128 },