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/jxl/jpeg/enc_jpeg_data_reader.cc | |
parent | Adding upstream version 124.0.1. (diff) | |
download | firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.tar.xz firefox-40a355a42d4a9444dc753c04c6608dade2f06a23.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/jxl/jpeg/enc_jpeg_data_reader.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data_reader.cc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data_reader.cc b/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data_reader.cc index ce64dae47b..d1e8476db6 100644 --- a/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data_reader.cc +++ b/third_party/jpeg-xl/lib/jxl/jpeg/enc_jpeg_data_reader.cc @@ -23,7 +23,7 @@ namespace jxl { namespace jpeg { namespace { -static const int kBrunsliMaxSampling = 15; +const int kBrunsliMaxSampling = 15; // Macros for commonly used error conditions. @@ -234,7 +234,7 @@ bool ProcessDHT(const uint8_t* data, const size_t len, JpegReadMode mode, JPEGHuffmanCode huff; huff.slot_id = ReadUint8(data, pos); int huffman_index = huff.slot_id; - int is_ac_table = (huff.slot_id & 0x10) != 0; + bool is_ac_table = ((huff.slot_id & 0x10) != 0); HuffmanTableEntry* huff_lut; if (is_ac_table) { huffman_index -= 0x10; @@ -292,7 +292,7 @@ bool ProcessDHT(const uint8_t* data, const size_t len, JpegReadMode mode, } huff.is_last = (*pos == start_pos + marker_len); if (mode == JpegReadMode::kReadAll) { - BuildJpegHuffmanTable(&huff.counts[0], &huff.values[0], huff_lut); + BuildJpegHuffmanTable(huff.counts.data(), huff.values.data(), huff_lut); } jpg->huffman_code.push_back(huff); } @@ -419,7 +419,7 @@ struct BitReaderState { if (bits_left_ <= 16) { while (bits_left_ <= 56) { val_ <<= 8; - val_ |= (uint64_t)GetNextByte(); + val_ |= static_cast<uint64_t>(GetNextByte()); bits_left_ += 8; } } |