Backed out 3 changesets (bug 1790375) for causing wd failures on fetch_error.py....
[gecko.git] / third_party / jpeg-xl / lib / jpegli / libjpeg_test_util.h
blob18cc1e57b54a1c435c1f50875986f8abd1790c50
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.
6 #ifndef LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_
7 #define LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_
9 #include <stddef.h>
10 #include <stdint.h>
12 #include <vector>
14 #include "lib/jpegli/test_params.h"
16 namespace jpegli {
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);
35 } // namespace jpegli
37 #endif // LIB_JPEGLI_LIBJPEG_TEST_UTIL_H_