libjxl

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

libjpeg_test_util.h (1425B)


      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_LIBJPEG_TEST_UTIL_H_
      7 #define LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_
      8 
      9 #include <stddef.h>
     10 #include <stdint.h>
     11 
     12 #include <vector>
     13 
     14 #include "lib/jpegli/test_params.h"
     15 
     16 namespace jpegli {
     17 
     18 // Verifies that an image encoded with libjpegli can be decoded with libjpeg,
     19 // and checks that the jpeg coding metadata matches jparams.
     20 void DecodeAllScansWithLibjpeg(const CompressParams& jparams,
     21                                const DecompressParams& dparams,
     22                                const std::vector<uint8_t>& compressed,
     23                                std::vector<TestImage>* output_progression);
     24 // Returns the number of bytes read from compressed.
     25 size_t DecodeWithLibjpeg(const CompressParams& jparams,
     26                          const DecompressParams& dparams,
     27                          const uint8_t* table_stream, size_t table_stream_size,
     28                          const uint8_t* compressed, size_t len,
     29                          TestImage* output);
     30 void DecodeWithLibjpeg(const CompressParams& jparams,
     31                        const DecompressParams& dparams,
     32                        const std::vector<uint8_t>& compressed,
     33                        TestImage* output);
     34 
     35 }  // namespace jpegli
     36 
     37 #endif  // LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_