tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

enc_noise.h (1003B)


      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 <cstdint>
     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 enum class LayerType : uint8_t;
     22 
     23 // Get parameters of the noise for NoiseParams model
     24 // Returns whether a valid noise model (with HasAny()) is set.
     25 Status GetNoiseParameter(const Image3F& opsin, NoiseParams* noise_params,
     26                         float quality_coef);
     27 
     28 // Does not write anything if `noise_params` are empty. Otherwise, caller must
     29 // set FrameHeader.flags.kNoise.
     30 Status EncodeNoise(const NoiseParams& noise_params, BitWriter* writer,
     31                   LayerType layer, AuxOut* aux_out);
     32 
     33 }  // namespace jxl
     34 
     35 #endif  // LIB_JXL_ENC_NOISE_H_