diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 19:33:14 +0000 |
commit | 36d22d82aa202bb199967e9512281e9a53db42c9 (patch) | |
tree | 105e8c98ddea1c1e4784a60a5a6410fa416be2de /third_party/jpeg-xl/lib/jpegli/bitstream.h | |
parent | Initial commit. (diff) | |
download | firefox-esr-upstream.tar.xz firefox-esr-upstream.zip |
Adding upstream version 115.7.0esr.upstream/115.7.0esrupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'third_party/jpeg-xl/lib/jpegli/bitstream.h')
-rw-r--r-- | third_party/jpeg-xl/lib/jpegli/bitstream.h | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/third_party/jpeg-xl/lib/jpegli/bitstream.h b/third_party/jpeg-xl/lib/jpegli/bitstream.h new file mode 100644 index 0000000000..18b6a09c29 --- /dev/null +++ b/third_party/jpeg-xl/lib/jpegli/bitstream.h @@ -0,0 +1,37 @@ +// Copyright (c) the JPEG XL Project Authors. All rights reserved. +// +// Use of this source code is governed by a BSD-style +// license that can be found in the LICENSE file. + +#ifndef LIB_JPEGLI_BITSTREAM_H_ +#define LIB_JPEGLI_BITSTREAM_H_ + +#include <initializer_list> +#include <vector> + +#include "lib/jpegli/encode_internal.h" + +namespace jpegli { + +void WriteOutput(j_compress_ptr cinfo, const uint8_t* buf, size_t bufsize); +void WriteOutput(j_compress_ptr cinfo, const std::vector<uint8_t>& bytes); +void WriteOutput(j_compress_ptr cinfo, std::initializer_list<uint8_t> bytes); + +void EncodeAPP0(j_compress_ptr cinfo); +void EncodeAPP14(j_compress_ptr cinfo); +void EncodeSOF(j_compress_ptr cinfo, bool is_baseline); +void EncodeSOS(j_compress_ptr cinfo, int scan_index); +void EncodeDHT(j_compress_ptr cinfo, const JPEGHuffmanCode* huffman_codes, + size_t num_huffman_codes, bool pre_shifted = false); +void EncodeDQT(j_compress_ptr cinfo, bool write_all_tables, bool* is_baseline); +bool EncodeDRI(j_compress_ptr cinfo); + +bool EncodeScan(j_compress_ptr cinfo, int scan_index); + +void EncodeSingleScan(j_compress_ptr cinfo); + +void WriteiMCURow(j_compress_ptr cinfo); + +} // namespace jpegli + +#endif // LIB_JPEGLI_BITSTREAM_H_ |