libjxl

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

decode_marker.h (1201B)


      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_MARKER_H_
      7 #define LIB_JPEGLI_DECODE_MARKER_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 either
     16 // the end of the next SOS marker or the end of the input.
     17 // The corresponding fields of cinfo are updated with the processed input data.
     18 // Upon return, the input buffer will be at the start or at the end of a marker
     19 // data segment (inter-marker data is allowed).
     20 // Return value is one of:
     21 //   * JPEG_SUSPENDED, if the current input buffer ends before the next SOS or
     22 //       EOI marker. Input buffer refill is handled by the caller;
     23 //   * JPEG_REACHED_SOS, if the next SOS marker is found;
     24 //   * JPEG_REACHED_EOR, if the end of the input is found.
     25 int ProcessMarkers(j_decompress_ptr cinfo, const uint8_t* data, size_t len,
     26                    size_t* pos);
     27 
     28 jpeg_marker_parser_method GetMarkerProcessor(j_decompress_ptr cinfo);
     29 
     30 }  // namespace jpegli
     31 
     32 #endif  // LIB_JPEGLI_DECODE_MARKER_H_