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_QUANT_WEIGHTS_H_ 7 #define LIB_JXL_ENC_QUANT_WEIGHTS_H_ 8 9 #include "lib/jxl/quant_weights.h" 10 11 namespace jxl { 12 13 Status DequantMatricesEncode( 14 const DequantMatrices* matrices, BitWriter* writer, size_t layer, 15 AuxOut* aux_out, ModularFrameEncoder* modular_frame_encoder = nullptr); 16 Status DequantMatricesEncodeDC(const DequantMatrices* matrices, 17 BitWriter* writer, size_t layer, 18 AuxOut* aux_out); 19 // For consistency with QuantEncoding, higher values correspond to more 20 // precision. 21 void DequantMatricesSetCustomDC(DequantMatrices* matrices, const float* dc); 22 23 void DequantMatricesSetCustom(DequantMatrices* matrices, 24 const std::vector<QuantEncoding>& encodings, 25 ModularFrameEncoder* encoder); 26 27 } // namespace jxl 28 29 #endif // LIB_JXL_ENC_QUANT_WEIGHTS_H_ 30