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/bitstream.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/jpegli/bitstream.cc')
-rw-r--r-- | third_party/jpeg-xl/lib/jpegli/bitstream.cc | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/third_party/jpeg-xl/lib/jpegli/bitstream.cc b/third_party/jpeg-xl/lib/jpegli/bitstream.cc index 3448367dde..4dbeb738bb 100644 --- a/third_party/jpeg-xl/lib/jpegli/bitstream.cc +++ b/third_party/jpeg-xl/lib/jpegli/bitstream.cc @@ -90,8 +90,8 @@ bool EncodeDQT(j_compress_ptr cinfo, bool write_all_tables) { JPEGLI_ERROR("Missing quant table %d", i); } int precision = 0; - for (size_t k = 0; k < DCTSIZE2; ++k) { - if (quant_table->quantval[k] > 255) { + for (UINT16 q : quant_table->quantval) { + if (q > 255) { precision = 1; is_baseline = false; } @@ -123,7 +123,6 @@ bool EncodeDQT(j_compress_ptr cinfo, bool write_all_tables) { void EncodeSOF(j_compress_ptr cinfo, bool is_baseline) { if (cinfo->data_precision != kJpegPrecision) { - is_baseline = false; JPEGLI_ERROR("Unsupported data precision %d", cinfo->data_precision); } const uint8_t marker = cinfo->progressive_mode ? 0xc2 @@ -302,7 +301,7 @@ void WriteBlock(const int32_t* JXL_RESTRICT symbols, namespace { -static JXL_INLINE void EmitMarker(JpegBitWriter* bw, int marker) { +JXL_INLINE void EmitMarker(JpegBitWriter* bw, int marker) { bw->data[bw->pos++] = 0xFF; bw->data[bw->pos++] = marker; } |