diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-19 01:13:27 +0000 |
commit | 40a355a42d4a9444dc753c04c6608dade2f06a23 (patch) | |
tree | 871fc667d2de662f171103ce5ec067014ef85e61 /third_party/jpeg-xl/lib/jpegli/huffman.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-upstream/125.0.1.tar.xz firefox-upstream/125.0.1.zip |
Adding upstream version 125.0.1.upstream/125.0.1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jpegli/huffman.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jpegli/huffman.cc | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/third_party/jpeg-xl/lib/jpegli/huffman.cc b/third_party/jpeg-xl/lib/jpegli/huffman.cc index 1cf88a5536..5391030213 100644 --- a/third_party/jpeg-xl/lib/jpegli/huffman.cc +++ b/third_party/jpeg-xl/lib/jpegli/huffman.cc @@ -183,7 +183,8 @@ void CreateHuffmanTree(const uint32_t* data, const size_t length, size_t i = 0; // Points to the next leaf node. size_t j = n + 1; // Points to the next non-leaf node. for (size_t k = n - 1; k != 0; --k) { - size_t left, right; + size_t left; + size_t right; if (tree[i].total_count <= tree[j].total_count) { left = i; ++i; @@ -210,7 +211,7 @@ void CreateHuffmanTree(const uint32_t* data, const size_t length, tree.push_back(sentinel); } JXL_DASSERT(tree.size() == 2 * n + 1); - SetDepth(tree[2 * n - 1], &tree[0], depth, 0); + SetDepth(tree[2 * n - 1], tree.data(), depth, 0); // We need to pack the Huffman tree in tree_limit bits. // If this was not successful, add fake entities to the lowest values |