diff options
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; } } |