@revizly/sharp-libvips-dev 1.0.53 → 1.0.54
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -0
- package/include/brotli/decode.h +409 -0
- package/include/brotli/encode.h +505 -0
- package/include/brotli/port.h +302 -0
- package/include/brotli/shared_dictionary.h +100 -0
- package/include/brotli/types.h +83 -0
- package/include/jxl/cms.h +24 -0
- package/include/jxl/cms_interface.h +255 -0
- package/include/jxl/codestream_header.h +433 -0
- package/include/jxl/color_encoding.h +161 -0
- package/include/jxl/compressed_icc.h +75 -0
- package/include/jxl/decode.h +1475 -0
- package/include/jxl/decode_cxx.h +58 -0
- package/include/jxl/encode.h +1629 -0
- package/include/jxl/encode_cxx.h +58 -0
- package/include/jxl/gain_map.h +129 -0
- package/include/jxl/jxl_cms_export.h +42 -0
- package/include/jxl/jxl_export.h +42 -0
- package/include/jxl/jxl_threads_export.h +42 -0
- package/include/jxl/memory_manager.h +73 -0
- package/include/jxl/parallel_runner.h +164 -0
- package/include/jxl/resizable_parallel_runner.h +77 -0
- package/include/jxl/resizable_parallel_runner_cxx.h +65 -0
- package/include/jxl/stats.h +103 -0
- package/include/jxl/thread_parallel_runner.h +71 -0
- package/include/jxl/thread_parallel_runner_cxx.h +66 -0
- package/include/jxl/types.h +154 -0
- package/include/jxl/version.h +44 -0
- package/include/vips/version.h +1 -1
- package/package.json +1 -1
- package/versions.json +2 -0
|
@@ -0,0 +1,65 @@
|
|
|
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
|
+
/// @addtogroup libjxl_cpp
|
|
7
|
+
/// @{
|
|
8
|
+
///
|
|
9
|
+
/// @file resizable_parallel_runner_cxx.h
|
|
10
|
+
/// @ingroup libjxl_threads
|
|
11
|
+
/// @brief C++ header-only helper for @ref resizable_parallel_runner.h.
|
|
12
|
+
///
|
|
13
|
+
/// There's no binary library associated with the header since this is a header
|
|
14
|
+
/// only library.
|
|
15
|
+
|
|
16
|
+
#ifndef JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
|
|
17
|
+
#define JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
|
|
18
|
+
|
|
19
|
+
#include <jxl/memory_manager.h>
|
|
20
|
+
#include <jxl/resizable_parallel_runner.h>
|
|
21
|
+
|
|
22
|
+
#include <memory>
|
|
23
|
+
|
|
24
|
+
#ifndef __cplusplus
|
|
25
|
+
#error \
|
|
26
|
+
"This a C++ only header. Use jxl/jxl_resizable_parallel_runner.h from C" \
|
|
27
|
+
"sources."
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
/// Struct to call JxlResizableParallelRunnerDestroy from the
|
|
31
|
+
/// JxlResizableParallelRunnerPtr unique_ptr.
|
|
32
|
+
struct JxlResizableParallelRunnerDestroyStruct {
|
|
33
|
+
/// Calls @ref JxlResizableParallelRunnerDestroy() on the passed runner.
|
|
34
|
+
void operator()(void* runner) { JxlResizableParallelRunnerDestroy(runner); }
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/// std::unique_ptr<> type that calls JxlResizableParallelRunnerDestroy() when
|
|
38
|
+
/// releasing the runner.
|
|
39
|
+
///
|
|
40
|
+
/// Use this helper type from C++ sources to ensure the runner is destroyed and
|
|
41
|
+
/// their internal resources released.
|
|
42
|
+
typedef std::unique_ptr<void, JxlResizableParallelRunnerDestroyStruct>
|
|
43
|
+
JxlResizableParallelRunnerPtr;
|
|
44
|
+
|
|
45
|
+
/// Creates an instance of JxlResizableParallelRunner into a
|
|
46
|
+
/// JxlResizableParallelRunnerPtr and initializes it.
|
|
47
|
+
///
|
|
48
|
+
/// This function returns a unique_ptr that will call
|
|
49
|
+
/// JxlResizableParallelRunnerDestroy() when releasing the pointer. See @ref
|
|
50
|
+
/// JxlResizableParallelRunnerCreate for details on the instance creation.
|
|
51
|
+
///
|
|
52
|
+
/// @param memory_manager custom allocator function. It may be NULL. The memory
|
|
53
|
+
/// manager will be copied internally.
|
|
54
|
+
/// @return a @c NULL JxlResizableParallelRunnerPtr if the instance can not be
|
|
55
|
+
/// allocated or initialized
|
|
56
|
+
/// @return initialized JxlResizableParallelRunnerPtr instance otherwise.
|
|
57
|
+
static inline JxlResizableParallelRunnerPtr JxlResizableParallelRunnerMake(
|
|
58
|
+
const JxlMemoryManager* memory_manager) {
|
|
59
|
+
return JxlResizableParallelRunnerPtr(
|
|
60
|
+
JxlResizableParallelRunnerCreate(memory_manager));
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
#endif // JXL_RESIZABLE_PARALLEL_RUNNER_CXX_H_
|
|
64
|
+
|
|
65
|
+
/// @}
|
|
@@ -0,0 +1,103 @@
|
|
|
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
|
+
|
|
7
|
+
/** @addtogroup libjxl_encoder
|
|
8
|
+
* @{
|
|
9
|
+
* @file stats.h
|
|
10
|
+
* @brief API to collect various statistics from JXL encoder.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef JXL_STATS_H_
|
|
14
|
+
#define JXL_STATS_H_
|
|
15
|
+
|
|
16
|
+
#include <jxl/jxl_export.h>
|
|
17
|
+
#include <stddef.h>
|
|
18
|
+
|
|
19
|
+
#ifdef __cplusplus
|
|
20
|
+
extern "C" {
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Opaque structure that holds the encoder statistics.
|
|
25
|
+
*
|
|
26
|
+
* Allocated and initialized with @ref JxlEncoderStatsCreate().
|
|
27
|
+
* Cleaned up and deallocated with @ref JxlEncoderStatsDestroy().
|
|
28
|
+
*/
|
|
29
|
+
typedef struct JxlEncoderStats JxlEncoderStats;
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* Creates an instance of JxlEncoderStats and initializes it.
|
|
33
|
+
*
|
|
34
|
+
* @return pointer to initialized @ref JxlEncoderStats instance
|
|
35
|
+
*/
|
|
36
|
+
JXL_EXPORT JxlEncoderStats* JxlEncoderStatsCreate(void);
|
|
37
|
+
|
|
38
|
+
/**
|
|
39
|
+
* Deinitializes and frees JxlEncoderStats instance.
|
|
40
|
+
*
|
|
41
|
+
* @param stats instance to be cleaned up and deallocated. No-op if stats is
|
|
42
|
+
* null pointer.
|
|
43
|
+
*/
|
|
44
|
+
JXL_EXPORT void JxlEncoderStatsDestroy(JxlEncoderStats* stats);
|
|
45
|
+
|
|
46
|
+
/** Data type for querying @ref JxlEncoderStats object
|
|
47
|
+
*/
|
|
48
|
+
typedef enum {
|
|
49
|
+
JXL_ENC_STAT_HEADER_BITS,
|
|
50
|
+
JXL_ENC_STAT_TOC_BITS,
|
|
51
|
+
JXL_ENC_STAT_DICTIONARY_BITS,
|
|
52
|
+
JXL_ENC_STAT_SPLINES_BITS,
|
|
53
|
+
JXL_ENC_STAT_NOISE_BITS,
|
|
54
|
+
JXL_ENC_STAT_QUANT_BITS,
|
|
55
|
+
JXL_ENC_STAT_MODULAR_TREE_BITS,
|
|
56
|
+
JXL_ENC_STAT_MODULAR_GLOBAL_BITS,
|
|
57
|
+
JXL_ENC_STAT_DC_BITS,
|
|
58
|
+
JXL_ENC_STAT_MODULAR_DC_GROUP_BITS,
|
|
59
|
+
JXL_ENC_STAT_CONTROL_FIELDS_BITS,
|
|
60
|
+
JXL_ENC_STAT_COEF_ORDER_BITS,
|
|
61
|
+
JXL_ENC_STAT_AC_HISTOGRAM_BITS,
|
|
62
|
+
JXL_ENC_STAT_AC_BITS,
|
|
63
|
+
JXL_ENC_STAT_MODULAR_AC_GROUP_BITS,
|
|
64
|
+
JXL_ENC_STAT_NUM_SMALL_BLOCKS,
|
|
65
|
+
JXL_ENC_STAT_NUM_DCT4X8_BLOCKS,
|
|
66
|
+
JXL_ENC_STAT_NUM_AFV_BLOCKS,
|
|
67
|
+
JXL_ENC_STAT_NUM_DCT8_BLOCKS,
|
|
68
|
+
JXL_ENC_STAT_NUM_DCT8X32_BLOCKS,
|
|
69
|
+
JXL_ENC_STAT_NUM_DCT16_BLOCKS,
|
|
70
|
+
JXL_ENC_STAT_NUM_DCT16X32_BLOCKS,
|
|
71
|
+
JXL_ENC_STAT_NUM_DCT32_BLOCKS,
|
|
72
|
+
JXL_ENC_STAT_NUM_DCT32X64_BLOCKS,
|
|
73
|
+
JXL_ENC_STAT_NUM_DCT64_BLOCKS,
|
|
74
|
+
JXL_ENC_STAT_NUM_BUTTERAUGLI_ITERS,
|
|
75
|
+
JXL_ENC_NUM_STATS,
|
|
76
|
+
} JxlEncoderStatsKey;
|
|
77
|
+
|
|
78
|
+
/** Returns the value of the statistics corresponding the given key.
|
|
79
|
+
*
|
|
80
|
+
* @param stats object that was passed to the encoder with a
|
|
81
|
+
* @ref JxlEncoderCollectStats function
|
|
82
|
+
* @param key the particular statistics to query
|
|
83
|
+
*
|
|
84
|
+
* @return the value of the statistics
|
|
85
|
+
*/
|
|
86
|
+
JXL_EXPORT size_t JxlEncoderStatsGet(const JxlEncoderStats* stats,
|
|
87
|
+
JxlEncoderStatsKey key);
|
|
88
|
+
|
|
89
|
+
/** Updates the values of the given stats object with that of an other.
|
|
90
|
+
*
|
|
91
|
+
* @param stats object whose values will be updated (usually added together)
|
|
92
|
+
* @param other stats object whose values will be merged with stats
|
|
93
|
+
*/
|
|
94
|
+
JXL_EXPORT void JxlEncoderStatsMerge(JxlEncoderStats* stats,
|
|
95
|
+
const JxlEncoderStats* other);
|
|
96
|
+
|
|
97
|
+
#ifdef __cplusplus
|
|
98
|
+
}
|
|
99
|
+
#endif
|
|
100
|
+
|
|
101
|
+
#endif /* JXL_STATS_H_ */
|
|
102
|
+
|
|
103
|
+
/** @}*/
|
|
@@ -0,0 +1,71 @@
|
|
|
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
|
+
|
|
7
|
+
/** @addtogroup libjxl_threads
|
|
8
|
+
* @{
|
|
9
|
+
* @file thread_parallel_runner.h
|
|
10
|
+
* @brief implementation using std::thread of a ::JxlParallelRunner.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
/** Implementation of JxlParallelRunner than can be used to enable
|
|
14
|
+
* multithreading when using the JPEG XL library. This uses std::thread
|
|
15
|
+
* internally and related synchronization functions. The number of threads
|
|
16
|
+
* created is fixed at construction time and the threads are re-used for every
|
|
17
|
+
* ThreadParallelRunner::Runner call. Only one concurrent
|
|
18
|
+
* JxlThreadParallelRunner call per instance is allowed at a time.
|
|
19
|
+
*
|
|
20
|
+
* This is a scalable, lower-overhead thread pool runner, especially suitable
|
|
21
|
+
* for data-parallel computations in the fork-join model, where clients need to
|
|
22
|
+
* know when all tasks have completed.
|
|
23
|
+
*
|
|
24
|
+
* This thread pool can efficiently load-balance millions of tasks using an
|
|
25
|
+
* atomic counter, thus avoiding per-task virtual or system calls. With 48
|
|
26
|
+
* hyperthreads and 1M tasks that add to an atomic counter, overall runtime is
|
|
27
|
+
* 10-20x higher when using std::async, and ~200x for a queue-based thread
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
#ifndef JXL_THREAD_PARALLEL_RUNNER_H_
|
|
31
|
+
#define JXL_THREAD_PARALLEL_RUNNER_H_
|
|
32
|
+
|
|
33
|
+
#include <jxl/jxl_threads_export.h>
|
|
34
|
+
#include <jxl/memory_manager.h>
|
|
35
|
+
#include <jxl/parallel_runner.h>
|
|
36
|
+
#include <stddef.h>
|
|
37
|
+
#include <stdint.h>
|
|
38
|
+
#include <stdlib.h>
|
|
39
|
+
|
|
40
|
+
#ifdef __cplusplus
|
|
41
|
+
extern "C" {
|
|
42
|
+
#endif
|
|
43
|
+
|
|
44
|
+
/** Parallel runner internally using std::thread. Use as @ref JxlParallelRunner.
|
|
45
|
+
*/
|
|
46
|
+
JXL_THREADS_EXPORT JxlParallelRetCode JxlThreadParallelRunner(
|
|
47
|
+
void* runner_opaque, void* jpegxl_opaque, JxlParallelRunInit init,
|
|
48
|
+
JxlParallelRunFunction func, uint32_t start_range, uint32_t end_range);
|
|
49
|
+
|
|
50
|
+
/** Creates the runner for @ref JxlThreadParallelRunner. Use as the opaque
|
|
51
|
+
* runner.
|
|
52
|
+
*/
|
|
53
|
+
JXL_THREADS_EXPORT void* JxlThreadParallelRunnerCreate(
|
|
54
|
+
const JxlMemoryManager* memory_manager, size_t num_worker_threads);
|
|
55
|
+
|
|
56
|
+
/** Destroys the runner created by @ref JxlThreadParallelRunnerCreate.
|
|
57
|
+
*/
|
|
58
|
+
JXL_THREADS_EXPORT void JxlThreadParallelRunnerDestroy(void* runner_opaque);
|
|
59
|
+
|
|
60
|
+
/** Returns a default num_worker_threads value for
|
|
61
|
+
* @ref JxlThreadParallelRunnerCreate.
|
|
62
|
+
*/
|
|
63
|
+
JXL_THREADS_EXPORT size_t JxlThreadParallelRunnerDefaultNumWorkerThreads(void);
|
|
64
|
+
|
|
65
|
+
#ifdef __cplusplus
|
|
66
|
+
}
|
|
67
|
+
#endif
|
|
68
|
+
|
|
69
|
+
#endif /* JXL_THREAD_PARALLEL_RUNNER_H_ */
|
|
70
|
+
|
|
71
|
+
/** @}*/
|
|
@@ -0,0 +1,66 @@
|
|
|
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
|
+
/// @addtogroup libjxl_cpp
|
|
7
|
+
/// @{
|
|
8
|
+
///
|
|
9
|
+
/// @file thread_parallel_runner_cxx.h
|
|
10
|
+
/// @brief C++ header-only helper for @ref thread_parallel_runner.h.
|
|
11
|
+
///
|
|
12
|
+
/// There's no binary library associated with the header since this is a header
|
|
13
|
+
/// only library.
|
|
14
|
+
|
|
15
|
+
#ifndef JXL_THREAD_PARALLEL_RUNNER_CXX_H_
|
|
16
|
+
#define JXL_THREAD_PARALLEL_RUNNER_CXX_H_
|
|
17
|
+
|
|
18
|
+
#include <jxl/memory_manager.h>
|
|
19
|
+
#include <jxl/thread_parallel_runner.h>
|
|
20
|
+
|
|
21
|
+
#include <cstddef>
|
|
22
|
+
#include <memory>
|
|
23
|
+
|
|
24
|
+
#ifndef __cplusplus
|
|
25
|
+
#error \
|
|
26
|
+
"This a C++ only header. Use jxl/jxl_thread_parallel_runner.h from C" \
|
|
27
|
+
"sources."
|
|
28
|
+
#endif
|
|
29
|
+
|
|
30
|
+
/// Struct to call JxlThreadParallelRunnerDestroy from the
|
|
31
|
+
/// JxlThreadParallelRunnerPtr unique_ptr.
|
|
32
|
+
struct JxlThreadParallelRunnerDestroyStruct {
|
|
33
|
+
/// Calls @ref JxlThreadParallelRunnerDestroy() on the passed runner.
|
|
34
|
+
void operator()(void* runner) { JxlThreadParallelRunnerDestroy(runner); }
|
|
35
|
+
};
|
|
36
|
+
|
|
37
|
+
/// std::unique_ptr<> type that calls JxlThreadParallelRunnerDestroy() when
|
|
38
|
+
/// releasing the runner.
|
|
39
|
+
///
|
|
40
|
+
/// Use this helper type from C++ sources to ensure the runner is destroyed and
|
|
41
|
+
/// their internal resources released.
|
|
42
|
+
typedef std::unique_ptr<void, JxlThreadParallelRunnerDestroyStruct>
|
|
43
|
+
JxlThreadParallelRunnerPtr;
|
|
44
|
+
|
|
45
|
+
/// Creates an instance of JxlThreadParallelRunner into a
|
|
46
|
+
/// JxlThreadParallelRunnerPtr and initializes it.
|
|
47
|
+
///
|
|
48
|
+
/// This function returns a unique_ptr that will call
|
|
49
|
+
/// JxlThreadParallelRunnerDestroy() when releasing the pointer. See @ref
|
|
50
|
+
/// JxlThreadParallelRunnerCreate for details on the instance creation.
|
|
51
|
+
///
|
|
52
|
+
/// @param memory_manager custom allocator function. It may be NULL. The memory
|
|
53
|
+
/// manager will be copied internally.
|
|
54
|
+
/// @param num_worker_threads the number of worker threads to create.
|
|
55
|
+
/// @return a @c NULL JxlThreadParallelRunnerPtr if the instance can not be
|
|
56
|
+
/// allocated or initialized
|
|
57
|
+
/// @return initialized JxlThreadParallelRunnerPtr instance otherwise.
|
|
58
|
+
static inline JxlThreadParallelRunnerPtr JxlThreadParallelRunnerMake(
|
|
59
|
+
const JxlMemoryManager* memory_manager, size_t num_worker_threads) {
|
|
60
|
+
return JxlThreadParallelRunnerPtr(
|
|
61
|
+
JxlThreadParallelRunnerCreate(memory_manager, num_worker_threads));
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
#endif // JXL_THREAD_PARALLEL_RUNNER_CXX_H_
|
|
65
|
+
|
|
66
|
+
/// @}
|
|
@@ -0,0 +1,154 @@
|
|
|
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
|
+
|
|
7
|
+
/** @addtogroup libjxl_common
|
|
8
|
+
* @{
|
|
9
|
+
* @file types.h
|
|
10
|
+
* @brief Data types for the JPEG XL API, for both encoding and decoding.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef JXL_TYPES_H_
|
|
14
|
+
#define JXL_TYPES_H_
|
|
15
|
+
|
|
16
|
+
#include <stddef.h>
|
|
17
|
+
#include <stdint.h>
|
|
18
|
+
|
|
19
|
+
#ifdef __cplusplus
|
|
20
|
+
extern "C" {
|
|
21
|
+
#endif
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* A portable @c bool replacement.
|
|
25
|
+
*
|
|
26
|
+
* ::JXL_BOOL is a "documentation" type: actually it is @c int, but in API it
|
|
27
|
+
* denotes a type, whose only values are ::JXL_TRUE and ::JXL_FALSE.
|
|
28
|
+
*/
|
|
29
|
+
#define JXL_BOOL int
|
|
30
|
+
/** Portable @c true replacement. */
|
|
31
|
+
#define JXL_TRUE 1
|
|
32
|
+
/** Portable @c false replacement. */
|
|
33
|
+
#define JXL_FALSE 0
|
|
34
|
+
/** Converts of bool-like value to either ::JXL_TRUE or ::JXL_FALSE. */
|
|
35
|
+
#define TO_JXL_BOOL(C) (!!(C) ? JXL_TRUE : JXL_FALSE)
|
|
36
|
+
/** Converts JXL_BOOL to C++ bool. */
|
|
37
|
+
#define FROM_JXL_BOOL(C) (static_cast<bool>(C))
|
|
38
|
+
|
|
39
|
+
/** Data type for the sample values per channel per pixel.
|
|
40
|
+
*/
|
|
41
|
+
typedef enum {
|
|
42
|
+
/** Use 32-bit single-precision floating point values, with range 0.0-1.0
|
|
43
|
+
* (within gamut, may go outside this range for wide color gamut). Floating
|
|
44
|
+
* point output, either ::JXL_TYPE_FLOAT or ::JXL_TYPE_FLOAT16, is recommended
|
|
45
|
+
* for HDR and wide gamut images when color profile conversion is required. */
|
|
46
|
+
JXL_TYPE_FLOAT = 0,
|
|
47
|
+
|
|
48
|
+
/** Use type uint8_t. May clip wide color gamut data.
|
|
49
|
+
*/
|
|
50
|
+
JXL_TYPE_UINT8 = 2,
|
|
51
|
+
|
|
52
|
+
/** Use type uint16_t. May clip wide color gamut data.
|
|
53
|
+
*/
|
|
54
|
+
JXL_TYPE_UINT16 = 3,
|
|
55
|
+
|
|
56
|
+
/** Use 16-bit IEEE 754 half-precision floating point values */
|
|
57
|
+
JXL_TYPE_FLOAT16 = 5,
|
|
58
|
+
} JxlDataType;
|
|
59
|
+
|
|
60
|
+
/** Ordering of multi-byte data.
|
|
61
|
+
*/
|
|
62
|
+
typedef enum {
|
|
63
|
+
/** Use the endianness of the system, either little endian or big endian,
|
|
64
|
+
* without forcing either specific endianness. Do not use if pixel data
|
|
65
|
+
* should be exported to a well defined format.
|
|
66
|
+
*/
|
|
67
|
+
JXL_NATIVE_ENDIAN = 0,
|
|
68
|
+
/** Force little endian */
|
|
69
|
+
JXL_LITTLE_ENDIAN = 1,
|
|
70
|
+
/** Force big endian */
|
|
71
|
+
JXL_BIG_ENDIAN = 2,
|
|
72
|
+
} JxlEndianness;
|
|
73
|
+
|
|
74
|
+
/** Data type for the sample values per channel per pixel for the output buffer
|
|
75
|
+
* for pixels. This is not necessarily the same as the data type encoded in the
|
|
76
|
+
* codestream. The channels are interleaved per pixel. The pixels are
|
|
77
|
+
* organized row by row, left to right, top to bottom.
|
|
78
|
+
* TODO(lode): support different channel orders if needed (RGB, BGR, ...)
|
|
79
|
+
*/
|
|
80
|
+
typedef struct {
|
|
81
|
+
/** Amount of channels available in a pixel buffer.
|
|
82
|
+
* 1: single-channel data, e.g. grayscale or a single extra channel
|
|
83
|
+
* 2: single-channel + alpha
|
|
84
|
+
* 3: trichromatic, e.g. RGB
|
|
85
|
+
* 4: trichromatic + alpha
|
|
86
|
+
* TODO(lode): this needs finetuning. It is not yet defined how the user
|
|
87
|
+
* chooses output color space. CMYK+alpha needs 5 channels.
|
|
88
|
+
*/
|
|
89
|
+
uint32_t num_channels;
|
|
90
|
+
|
|
91
|
+
/** Data type of each channel.
|
|
92
|
+
*/
|
|
93
|
+
JxlDataType data_type;
|
|
94
|
+
|
|
95
|
+
/** Whether multi-byte data types are represented in big endian or little
|
|
96
|
+
* endian format. This applies to ::JXL_TYPE_UINT16 and ::JXL_TYPE_FLOAT.
|
|
97
|
+
*/
|
|
98
|
+
JxlEndianness endianness;
|
|
99
|
+
|
|
100
|
+
/** Align scanlines to a multiple of align bytes, or 0 to require no
|
|
101
|
+
* alignment at all (which has the same effect as value 1)
|
|
102
|
+
*/
|
|
103
|
+
size_t align;
|
|
104
|
+
} JxlPixelFormat;
|
|
105
|
+
|
|
106
|
+
/** Settings for the interpretation of UINT input and output buffers.
|
|
107
|
+
* (buffers using a FLOAT data type are not affected by this)
|
|
108
|
+
*/
|
|
109
|
+
typedef enum {
|
|
110
|
+
/** This is the default setting, where the encoder expects the input pixels
|
|
111
|
+
* to use the full range of the pixel format data type (e.g. for UINT16, the
|
|
112
|
+
* input range is 0 .. 65535 and the value 65535 is mapped to 1.0 when
|
|
113
|
+
* converting to float), and the decoder uses the full range to output
|
|
114
|
+
* pixels. If the bit depth in the basic info is different from this, the
|
|
115
|
+
* encoder expects the values to be rescaled accordingly (e.g. multiplied by
|
|
116
|
+
* 65535/4095 for a 12-bit image using UINT16 input data type). */
|
|
117
|
+
JXL_BIT_DEPTH_FROM_PIXEL_FORMAT = 0,
|
|
118
|
+
|
|
119
|
+
/** If this setting is selected, the encoder expects the input pixels to be
|
|
120
|
+
* in the range defined by the bits_per_sample value of the basic info (e.g.
|
|
121
|
+
* for 12-bit images using UINT16 input data types, the allowed range is
|
|
122
|
+
* 0 .. 4095 and the value 4095 is mapped to 1.0 when converting to float),
|
|
123
|
+
* and the decoder outputs pixels in this range. */
|
|
124
|
+
JXL_BIT_DEPTH_FROM_CODESTREAM = 1,
|
|
125
|
+
|
|
126
|
+
/** This setting can only be used in the decoder to select a custom range for
|
|
127
|
+
* pixel output */
|
|
128
|
+
JXL_BIT_DEPTH_CUSTOM = 2,
|
|
129
|
+
} JxlBitDepthType;
|
|
130
|
+
|
|
131
|
+
/** Data type for describing the interpretation of the input and output buffers
|
|
132
|
+
* in terms of the range of allowed input and output pixel values. */
|
|
133
|
+
typedef struct {
|
|
134
|
+
/** Bit depth setting, see comment on @ref JxlBitDepthType */
|
|
135
|
+
JxlBitDepthType type;
|
|
136
|
+
|
|
137
|
+
/** Custom bits per sample */
|
|
138
|
+
uint32_t bits_per_sample;
|
|
139
|
+
|
|
140
|
+
/** Custom exponent bits per sample */
|
|
141
|
+
uint32_t exponent_bits_per_sample;
|
|
142
|
+
} JxlBitDepth;
|
|
143
|
+
|
|
144
|
+
/** Data type holding the 4-character type name of an ISOBMFF box.
|
|
145
|
+
*/
|
|
146
|
+
typedef char JxlBoxType[4];
|
|
147
|
+
|
|
148
|
+
#ifdef __cplusplus
|
|
149
|
+
}
|
|
150
|
+
#endif
|
|
151
|
+
|
|
152
|
+
#endif /* JXL_TYPES_H_ */
|
|
153
|
+
|
|
154
|
+
/** @}*/
|
|
@@ -0,0 +1,44 @@
|
|
|
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
|
+
|
|
7
|
+
/** @addtogroup libjxl_common
|
|
8
|
+
* @{
|
|
9
|
+
* @file version.h
|
|
10
|
+
* @brief libjxl version information
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
#ifndef JXL_VERSION_H_
|
|
14
|
+
#define JXL_VERSION_H_
|
|
15
|
+
|
|
16
|
+
#if defined(JPEGXL_MAJOR_VERSION) || defined(JPEGXL_MINOR_VERSION) || \
|
|
17
|
+
defined(JPEGXL_PATCH_VERSION)
|
|
18
|
+
#error JPEGXL_VERSION is already defined
|
|
19
|
+
#endif
|
|
20
|
+
|
|
21
|
+
#define JPEGXL_MAJOR_VERSION 0 ///< JPEG XL Major version
|
|
22
|
+
#define JPEGXL_MINOR_VERSION 12 ///< JPEG XL Minor version
|
|
23
|
+
#define JPEGXL_PATCH_VERSION 0 ///< JPEG XL Patch version
|
|
24
|
+
|
|
25
|
+
/** Can be used to conditionally compile code for a specific JXL version
|
|
26
|
+
* @param[maj] major version
|
|
27
|
+
* @param[min] minor version
|
|
28
|
+
*
|
|
29
|
+
* @code
|
|
30
|
+
* #if JPEGXL_NUMERIC_VERSION < JPEGXL_COMPUTE_NUMERIC_VERSION(0,8,0)
|
|
31
|
+
* // use old/deprecated api
|
|
32
|
+
* #else
|
|
33
|
+
* // use current api
|
|
34
|
+
* #endif
|
|
35
|
+
* @endcode
|
|
36
|
+
*/
|
|
37
|
+
#define JPEGXL_COMPUTE_NUMERIC_VERSION(major,minor,patch) (((major)<<24) | ((minor)<<16) | ((patch)<<8) | 0)
|
|
38
|
+
|
|
39
|
+
/* Numeric representation of the version */
|
|
40
|
+
#define JPEGXL_NUMERIC_VERSION JPEGXL_COMPUTE_NUMERIC_VERSION(JPEGXL_MAJOR_VERSION, JPEGXL_MINOR_VERSION, JPEGXL_PATCH_VERSION)
|
|
41
|
+
|
|
42
|
+
#endif /* JXL_VERSION_H_ */
|
|
43
|
+
|
|
44
|
+
/** @}*/
|
package/include/vips/version.h
CHANGED
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
#define VIPS_LIBRARY_REVISION (7)
|
|
17
17
|
#define VIPS_LIBRARY_AGE (20)
|
|
18
18
|
|
|
19
|
-
#define VIPS_CONFIG "enable debug: false\nenable deprecated: false\nenable modules: false\nenable C++ binding: true\nenable RAD load/save: false\nenable Analyze7 load: false\nenable PPM load/save: false\nenable GIF load: true\nFFTs with fftw: false\nSIMD support with libhwy: true\nICC profile support with lcms2: true\ndeflate compression with zlib: true\ntext rendering with pangocairo: true\nfont file support with fontconfig: true\nEXIF metadata support with libexif: true\nJPEG load/save with libjpeg: true\nUHDR load/save with libuhdr: true\nJXL load/save with libjxl:
|
|
19
|
+
#define VIPS_CONFIG "enable debug: false\nenable deprecated: false\nenable modules: false\nenable C++ binding: true\nenable RAD load/save: false\nenable Analyze7 load: false\nenable PPM load/save: false\nenable GIF load: true\nFFTs with fftw: false\nSIMD support with libhwy: true\nICC profile support with lcms2: true\ndeflate compression with zlib: true\ntext rendering with pangocairo: true\nfont file support with fontconfig: true\nEXIF metadata support with libexif: true\nJPEG load/save with libjpeg: true\nUHDR load/save with libuhdr: true\nJXL load/save with libjxl: true (dynamic module: false)\nJPEG2000 load/save with OpenJPEG: false\nPNG load/save with libpng: true\nimage quantisation with imagequant: true\nTIFF load/save with libtiff-4: true\nimage pyramid save with libarchive: true\nHEIC/AVIF load/save with libheif: true (dynamic module: false)\nWebP load/save with libwebp: true\nPDF load with PDFium or Poppler: false (dynamic module: false)\nSVG load with librsvg-2.0: true\nEXR load with OpenEXR: false\nWSI load with OpenSlide: false (dynamic module: false)\nMatlab load with Matio: false\nNIfTI load/save with libnifti: false\nFITS load/save with cfitsio: false\nGIF save with cgif: true\nRAW load with libraw: false\nMagick load/save with MagickCore: false (dynamic module: false)"
|
|
20
20
|
|
|
21
21
|
/* Not really anything to do with versions, but this is a handy place to put
|
|
22
22
|
* it.
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@revizly/sharp-libvips-dev",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.54",
|
|
4
4
|
"description": "Header files and C++ sources for libvips and dependencies required when compiling sharp from source",
|
|
5
5
|
"author": "Lovell Fuller <npm@lovell.info>",
|
|
6
6
|
"homepage": "https://sharp.pixelplumbing.com",
|
package/versions.json
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"aom": "3.15.1",
|
|
3
3
|
"archive": "3.8.9",
|
|
4
|
+
"brotli": "1.2.0",
|
|
4
5
|
"cairo": "1.18.6",
|
|
5
6
|
"cgif": "0.5.4",
|
|
6
7
|
"de265": "1.1.3",
|
|
@@ -15,6 +16,7 @@
|
|
|
15
16
|
"heif": "1.23.6",
|
|
16
17
|
"highway": "1.4.0",
|
|
17
18
|
"imagequant": "2.4.1",
|
|
19
|
+
"jxl": "0.12.0",
|
|
18
20
|
"lcms": "2.19.1",
|
|
19
21
|
"mozjpeg": "0826579",
|
|
20
22
|
"pango": "1.58.2",
|