libjxl

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

enc_entropy_coder.h (1553B)


      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_ENTROPY_CODER_H_
      7 #define LIB_JXL_ENC_ENTROPY_CODER_H_
      8 
      9 #include <stddef.h>
     10 #include <stdint.h>
     11 #include <stdlib.h>
     12 #include <string.h>
     13 #include <sys/types.h>
     14 
     15 #include <memory>
     16 #include <utility>
     17 #include <vector>
     18 
     19 #include "lib/jxl/ac_context.h"  // BlockCtxMap
     20 #include "lib/jxl/ac_strategy.h"
     21 #include "lib/jxl/enc_ans.h"
     22 #include "lib/jxl/field_encodings.h"
     23 #include "lib/jxl/frame_header.h"  // YCbCrChromaSubsampling
     24 #include "lib/jxl/image.h"
     25 
     26 // Entropy coding and context modeling of DC and AC coefficients, as well as AC
     27 // strategy and quantization field.
     28 
     29 namespace jxl {
     30 
     31 // Generate DCT NxN quantized AC values tokens.
     32 // Only the subset "rect" [in units of blocks] within all images.
     33 // See also DecodeACVarBlock.
     34 void TokenizeCoefficients(const coeff_order_t* JXL_RESTRICT orders,
     35                           const Rect& rect,
     36                           const int32_t* JXL_RESTRICT* JXL_RESTRICT ac_rows,
     37                           const AcStrategyImage& ac_strategy,
     38                           const YCbCrChromaSubsampling& cs,
     39                           Image3I* JXL_RESTRICT tmp_num_nzeroes,
     40                           std::vector<Token>* JXL_RESTRICT output,
     41                           const ImageB& qdc, const ImageI& qf,
     42                           const BlockCtxMap& block_ctx_map);
     43 
     44 }  // namespace jxl
     45 
     46 #endif  // LIB_JXL_ENC_ENTROPY_CODER_H_