libjxl

FORK: libjxl patches used on blog
git clone https://git.neptards.moe/blog/libjxl.git
Log | Files | Refs | Submodules | README | LICENSE

enc_noise.h (965B)


      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_NOISE_H_
      7 #define LIB_JXL_ENC_NOISE_H_
      8 
      9 // Noise parameter estimation.
     10 
     11 #include <stddef.h>
     12 
     13 #include "lib/jxl/base/status.h"
     14 #include "lib/jxl/enc_bit_writer.h"
     15 #include "lib/jxl/image.h"
     16 #include "lib/jxl/noise.h"
     17 
     18 namespace jxl {
     19 
     20 struct AuxOut;
     21 
     22 // Get parameters of the noise for NoiseParams model
     23 // Returns whether a valid noise model (with HasAny()) is set.
     24 Status GetNoiseParameter(const Image3F& opsin, NoiseParams* noise_params,
     25                          float quality_coef);
     26 
     27 // Does not write anything if `noise_params` are empty. Otherwise, caller must
     28 // set FrameHeader.flags.kNoise.
     29 void EncodeNoise(const NoiseParams& noise_params, BitWriter* writer,
     30                  size_t layer, AuxOut* aux_out);
     31 
     32 }  // namespace jxl
     33 
     34 #endif  // LIB_JXL_ENC_NOISE_H_