enc_fields.h (1290B)
1 // Copyright (c) the JPEG XL Project Authors. All rights reserved. 2 // 3 // Use of this source code is governed by a BSD-style 4 // license that can be found in the LICENSE file. 5 6 #ifndef LIB_JXL_ENC_FIELDS_H_ 7 #define LIB_JXL_ENC_FIELDS_H_ 8 9 #include <cstdint> 10 11 #include "lib/jxl/base/compiler_specific.h" 12 #include "lib/jxl/base/status.h" 13 #include "lib/jxl/enc_bit_writer.h" 14 #include "lib/jxl/frame_header.h" 15 #include "lib/jxl/headers.h" 16 #include "lib/jxl/image_metadata.h" 17 #include "lib/jxl/quantizer.h" 18 19 namespace jxl { 20 21 struct AuxOut; 22 enum class LayerType : uint8_t; 23 24 // Write headers from the CodecMetadata. Also may modify nonserialized_... 25 // fields of the metadata. 26 Status WriteCodestreamHeaders(CodecMetadata* metadata, BitWriter* writer, 27 AuxOut* aux_out); 28 29 Status WriteFrameHeader(const FrameHeader& frame, 30 BitWriter* JXL_RESTRICT writer, AuxOut* aux_out); 31 32 Status WriteQuantizerParams(const QuantizerParams& params, 33 BitWriter* JXL_RESTRICT writer, LayerType layer, 34 AuxOut* aux_out); 35 36 Status WriteSizeHeader(const SizeHeader& size, BitWriter* JXL_RESTRICT writer, 37 LayerType layer, AuxOut* aux_out); 38 39 } // namespace jxl 40 41 #endif // LIB_JXL_ENC_FIELDS_H_