mirror of
https://github.com/webmproject/libwebp.git
synced 2025-07-15 21:39:59 +02:00
address cosmetic comments from patch #71380
Change-Id: Iaba301b9e77aa4febe0efe1e6016fab42d5589f3
This commit is contained in:
@ -76,17 +76,16 @@ static WEBP_INLINE int NextTableBitSize(const int* const count,
|
||||
}
|
||||
|
||||
int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
|
||||
const int* const code_lengths,
|
||||
int code_lengths_size) {
|
||||
HuffmanCode* table; // next available space in table
|
||||
int len; // current code length
|
||||
int symbol; // symbol index in original or sorted table
|
||||
int total_size; // sum of root table size and 2nd level table sizes
|
||||
int* sorted = NULL; // symbols sorted by code length
|
||||
const int code_lengths[], int code_lengths_size) {
|
||||
HuffmanCode* table = root_table; // next available space in table
|
||||
int total_size = 1 << root_bits; // total size root table + 2nd level table
|
||||
int* sorted = NULL; // symbols sorted by code length
|
||||
int len; // current code length
|
||||
int symbol; // symbol index in original or sorted table
|
||||
// number of codes of each length:
|
||||
int count[MAX_ALLOWED_CODE_LENGTH + 1] = { 0 };
|
||||
// number of codes of each length
|
||||
// offsets in sorted table for each length:
|
||||
int offset[MAX_ALLOWED_CODE_LENGTH + 1];
|
||||
// offsets in sorted table for each length
|
||||
|
||||
assert(code_lengths_size != 0);
|
||||
assert(code_lengths != NULL);
|
||||
@ -128,9 +127,6 @@ int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
|
||||
}
|
||||
}
|
||||
|
||||
table = root_table;
|
||||
total_size = 1 << root_bits;
|
||||
|
||||
// Special case code with only one value.
|
||||
if (offset[MAX_ALLOWED_CODE_LENGTH] == 1) {
|
||||
HuffmanCode code;
|
||||
|
@ -53,8 +53,7 @@ void VP8LHtreeGroupsFree(HTreeGroup* const htree_groups);
|
||||
// Returns built table size or 0 in case of error (invalid tree or
|
||||
// memory error).
|
||||
int VP8LBuildHuffmanTable(HuffmanCode* const root_table, int root_bits,
|
||||
const int* const code_lengths,
|
||||
int code_lengths_size);
|
||||
const int code_lengths[], int code_lengths_size);
|
||||
|
||||
#ifdef __cplusplus
|
||||
} // extern "C"
|
||||
|
Reference in New Issue
Block a user