libjxl

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

decode_scan.h (1076B)


      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_JPEGLI_DECODE_SCAN_H_
      7 #define LIB_JPEGLI_DECODE_SCAN_H_
      8 
      9 #include <stdint.h>
     10 
     11 #include "lib/jpegli/common.h"
     12 
     13 namespace jpegli {
     14 
     15 // Reads the available input in the source manager's input buffer until the end
     16 // of the next iMCU row.
     17 // The corresponding fields of cinfo are updated with the processed input data.
     18 // Upon return, the input buffer will be at the start of an MCU, or at the end
     19 // of the scan.
     20 // Return value is one of:
     21 //   * JPEG_SUSPENDED, if the input buffer ends before the end of an iMCU row;
     22 //   * JPEG_ROW_COMPLETED, if the next iMCU row (but not the scan) is reached;
     23 //   * JPEG_SCAN_COMPLETED, if the end of the scan is reached.
     24 int ProcessScan(j_decompress_ptr cinfo, const uint8_t* data, size_t len,
     25                 size_t* pos, size_t* bit_pos);
     26 
     27 void PrepareForiMCURow(j_decompress_ptr cinfo);
     28 
     29 }  // namespace jpegli
     30 
     31 #endif  // LIB_JPEGLI_DECODE_SCAN_H_