1 // Copyright (c) the JPEG XL Project Authors. All rights reserved.
3 // Use of this source code is governed by a BSD-style
4 // license that can be found in the LICENSE file.
6 #ifndef LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_
7 #define LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_
14 #include "lib/jpegli/test_params.h"
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
,
30 void DecodeWithLibjpeg(const CompressParams
& jparams
,
31 const DecompressParams
& dparams
,
32 const std::vector
<uint8_t>& compressed
,
37 #endif // LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_