@revizly/sharp-libvips-dev 1.0.30 → 1.0.32
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/include/archive.h +2 -2
- package/include/archive_entry.h +1 -1
- package/include/expat.h +14 -2
- package/include/expat_config.h +6 -3
- package/include/expat_external.h +3 -2
- package/include/glib-2.0/glib/gvarianttype.h +16 -16
- package/include/glib-2.0/glib/gversionmacros.h +13 -0
- package/include/harfbuzz/hb-cplusplus.hh +9 -1
- package/include/harfbuzz/hb-draw.h +52 -0
- package/include/harfbuzz/hb-paint.h +209 -2
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/hwy/aligned_allocator.h +44 -2
- package/include/hwy/auto_tune.h +22 -6
- package/include/hwy/base.h +60 -90
- package/include/hwy/bit_set.h +410 -0
- package/include/hwy/cache_control.h +3 -2
- package/include/hwy/detect_compiler_arch.h +134 -14
- package/include/hwy/detect_targets.h +82 -36
- package/include/hwy/highway.h +15 -0
- package/include/hwy/nanobenchmark.h +12 -3
- package/include/hwy/ops/arm_neon-inl.h +96 -25
- package/include/hwy/ops/arm_sve-inl.h +250 -95
- package/include/hwy/ops/emu128-inl.h +12 -7
- package/include/hwy/ops/generic_ops-inl.h +271 -131
- package/include/hwy/ops/loongarch_lasx-inl.h +31 -9
- package/include/hwy/ops/loongarch_lsx-inl.h +33 -12
- package/include/hwy/ops/ppc_vsx-inl.h +99 -19
- package/include/hwy/ops/rvv-inl.h +239 -130
- package/include/hwy/ops/scalar-inl.h +22 -7
- package/include/hwy/ops/set_macros-inl.h +158 -107
- package/include/hwy/ops/wasm_128-inl.h +13 -22
- package/include/hwy/ops/x86_128-inl.h +223 -120
- package/include/hwy/ops/x86_256-inl.h +70 -134
- package/include/hwy/ops/x86_512-inl.h +130 -134
- package/include/hwy/print-inl.h +2 -0
- package/include/hwy/profiler.h +355 -264
- package/include/hwy/robust_statistics.h +3 -1
- package/include/hwy/timer.h +44 -0
- package/include/lcms2.h +34 -4
- package/include/libexif/exif-utils.h +1 -1
- package/include/libheif/heif_aux_images.h +2 -2
- package/include/libheif/heif_brands.h +13 -4
- package/include/libheif/heif_color.h +14 -14
- package/include/libheif/heif_context.h +17 -4
- package/include/libheif/heif_decoding.h +2 -2
- package/include/libheif/heif_encoding.h +29 -5
- package/include/libheif/heif_error.h +4 -4
- package/include/libheif/heif_image.h +52 -8
- package/include/libheif/heif_image_handle.h +42 -0
- package/include/libheif/heif_library.h +2 -2
- package/include/libheif/heif_metadata.h +2 -2
- package/include/libheif/heif_plugin.h +4 -4
- package/include/libheif/heif_properties.h +16 -4
- package/include/libheif/heif_regions.h +2 -2
- package/include/libheif/heif_security.h +5 -0
- package/include/libheif/heif_sequences.h +22 -12
- package/include/libheif/heif_uncompressed.h +327 -23
- package/include/libheif/heif_uncompressed_types.h +143 -0
- package/include/libpng16/png.h +7 -7
- package/include/libpng16/pngconf.h +1 -1
- package/include/libpng16/pnglibconf.h +1 -1
- package/include/libxml2/libxml/xmlversion.h +4 -4
- package/include/png.h +7 -7
- package/include/pngconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- package/include/tiffconf.h +9 -10
- package/include/tiffio.h +9 -9
- package/include/tiffvers.h +1 -1
- package/package.json +1 -1
- package/versions.json +11 -11
|
@@ -123,8 +123,10 @@ T Median(T* values, const size_t num_values) {
|
|
|
123
123
|
if (num_values % 2) {
|
|
124
124
|
return values[half];
|
|
125
125
|
}
|
|
126
|
+
// For integers, round rather than truncate.
|
|
127
|
+
const T bias = hwy::IsInteger<T>() ? T{1} : T{0};
|
|
126
128
|
// Even count: return average of middle two.
|
|
127
|
-
return (values[half] + values[half - 1] +
|
|
129
|
+
return (values[half] + values[half - 1] + bias) / 2;
|
|
128
130
|
}
|
|
129
131
|
|
|
130
132
|
// Returns a robust measure of variability.
|
package/include/hwy/timer.h
CHANGED
|
@@ -232,6 +232,50 @@ static HWY_INLINE Ticks Stop() {
|
|
|
232
232
|
|
|
233
233
|
} // namespace timer
|
|
234
234
|
|
|
235
|
+
// Wrapper around Start/Stop that checks whether the CPU supports Stop.
|
|
236
|
+
class Timer {
|
|
237
|
+
public:
|
|
238
|
+
Timer() {
|
|
239
|
+
char cpu100[100];
|
|
240
|
+
have_timer_stop_ = platform::HaveTimerStop(cpu100);
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
// Before/After have fences to prevent the measured code 'leaking out'.
|
|
244
|
+
timer::Ticks Before() const { return timer::Start(); }
|
|
245
|
+
timer::Ticks After() const {
|
|
246
|
+
return have_timer_stop_ ? timer::Stop() : timer::Start();
|
|
247
|
+
}
|
|
248
|
+
|
|
249
|
+
private:
|
|
250
|
+
bool have_timer_stop_;
|
|
251
|
+
};
|
|
252
|
+
|
|
253
|
+
static inline double Seconds(timer::Ticks ticks) {
|
|
254
|
+
return static_cast<double>(ticks) / platform::InvariantTicksPerSecond();
|
|
255
|
+
}
|
|
256
|
+
|
|
257
|
+
// Measures elapsed time since construction, with automatic reset.
|
|
258
|
+
class Stopwatch {
|
|
259
|
+
public:
|
|
260
|
+
explicit Stopwatch(const Timer& timestamps) : timer_(timestamps) { Reset(); }
|
|
261
|
+
|
|
262
|
+
timer::Ticks Origin() const { return t0_; }
|
|
263
|
+
void Reset() { t0_ = timer_.Before(); }
|
|
264
|
+
|
|
265
|
+
// Also resets the start time to the current time to enable reuse without a
|
|
266
|
+
// second call to the timer.
|
|
267
|
+
timer::Ticks Elapsed() {
|
|
268
|
+
const timer::Ticks t1 = timer_.After();
|
|
269
|
+
const timer::Ticks elapsed = t1 - t0_;
|
|
270
|
+
t0_ = t1;
|
|
271
|
+
return elapsed;
|
|
272
|
+
}
|
|
273
|
+
|
|
274
|
+
private:
|
|
275
|
+
const Timer& timer_;
|
|
276
|
+
timer::Ticks t0_;
|
|
277
|
+
};
|
|
278
|
+
|
|
235
279
|
} // namespace hwy
|
|
236
280
|
|
|
237
281
|
#endif // HIGHWAY_HWY_TIMER_H_
|
package/include/lcms2.h
CHANGED
|
@@ -23,7 +23,7 @@
|
|
|
23
23
|
//
|
|
24
24
|
//---------------------------------------------------------------------------------
|
|
25
25
|
//
|
|
26
|
-
// Version 2.
|
|
26
|
+
// Version 2.19
|
|
27
27
|
//
|
|
28
28
|
|
|
29
29
|
#ifndef _lcms2_H
|
|
@@ -37,6 +37,13 @@
|
|
|
37
37
|
// "long long" type.
|
|
38
38
|
// #define CMS_DONT_USE_INT64 1
|
|
39
39
|
|
|
40
|
+
// Uncomment this one to enable large file support on file/stream I/O.
|
|
41
|
+
// LittleCMS is still limited by ICC 32-bit offsets and sizes, so the
|
|
42
|
+
// practical maximum remains 4 GiB minus profile overhead. Be careful
|
|
43
|
+
// because such huge profiles have to be loaded into memory and that's
|
|
44
|
+
// usually a very bad idea.
|
|
45
|
+
// #define CMS_LARGE_FILE_SUPPORT 1
|
|
46
|
+
|
|
40
47
|
// Uncomment this if your compiler doesn't work with fast floor function
|
|
41
48
|
// #define CMS_DONT_USE_FAST_FLOOR 1
|
|
42
49
|
|
|
@@ -87,7 +94,7 @@ extern "C" {
|
|
|
87
94
|
#endif
|
|
88
95
|
|
|
89
96
|
// Version/release
|
|
90
|
-
#define LCMS_VERSION
|
|
97
|
+
#define LCMS_VERSION 2190
|
|
91
98
|
|
|
92
99
|
// I will give the chance of redefining basic types for compilers that are not fully C99 compliant
|
|
93
100
|
#ifndef CMS_BASIC_TYPES_ALREADY_DEFINED
|
|
@@ -168,6 +175,9 @@ typedef double cmsFloat64Number;
|
|
|
168
175
|
#ifdef CMS_DONT_USE_INT64
|
|
169
176
|
typedef cmsUInt32Number cmsUInt64Number[2];
|
|
170
177
|
typedef cmsInt32Number cmsInt64Number[2];
|
|
178
|
+
# if defined(CMS_LARGE_FILE_SUPPORT)
|
|
179
|
+
# error "You need int64 for large file support"
|
|
180
|
+
# endif
|
|
171
181
|
#endif
|
|
172
182
|
|
|
173
183
|
// Derivative types
|
|
@@ -504,7 +514,13 @@ typedef enum {
|
|
|
504
514
|
cmsSigLinkClass = 0x6C696E6B, // 'link'
|
|
505
515
|
cmsSigAbstractClass = 0x61627374, // 'abst'
|
|
506
516
|
cmsSigColorSpaceClass = 0x73706163, // 'spac'
|
|
507
|
-
cmsSigNamedColorClass = 0x6e6d636c
|
|
517
|
+
cmsSigNamedColorClass = 0x6e6d636c, // 'nmcl'
|
|
518
|
+
|
|
519
|
+
// iccMAX only
|
|
520
|
+
cmsSigColorEncodingSpaceClass = 0x63656E63, // 'cenc'
|
|
521
|
+
cmsSigMultiplexIdentificationClass = 0x6D696420, // 'mid '
|
|
522
|
+
cmsSigMultiplexLinkClass = 0x6d6c6e6b, // 'mlnk'
|
|
523
|
+
cmsSigMultiplexVisualizationClass = 0x6d766973 // 'mvis'
|
|
508
524
|
|
|
509
525
|
} cmsProfileClassSignature;
|
|
510
526
|
|
|
@@ -1078,8 +1094,12 @@ CMSAPI int CMSEXPORT cmsGetEncodedCMMversion(void);
|
|
|
1078
1094
|
// Support of non-standard functions --------------------------------------------------------------------------------------
|
|
1079
1095
|
|
|
1080
1096
|
CMSAPI int CMSEXPORT cmsstrcasecmp(const char* s1, const char* s2);
|
|
1081
|
-
CMSAPI long int CMSEXPORT cmsfilelength(FILE* f);
|
|
1082
1097
|
|
|
1098
|
+
#ifdef CMS_LARGE_FILE_SUPPORT
|
|
1099
|
+
CMSAPI long long int CMSEXPORT cmsfilelength(FILE* f);
|
|
1100
|
+
#else
|
|
1101
|
+
CMSAPI long int CMSEXPORT cmsfilelength(FILE* f);
|
|
1102
|
+
#endif
|
|
1083
1103
|
|
|
1084
1104
|
// Context handling --------------------------------------------------------------------------------------------------------
|
|
1085
1105
|
|
|
@@ -1502,6 +1522,7 @@ CMSAPI cmsHPROFILE CMSEXPORT cmsCreateProfilePlaceholder(cmsContext Contex
|
|
|
1502
1522
|
CMSAPI cmsContext CMSEXPORT cmsGetProfileContextID(cmsHPROFILE hProfile);
|
|
1503
1523
|
CMSAPI cmsInt32Number CMSEXPORT cmsGetTagCount(cmsHPROFILE hProfile);
|
|
1504
1524
|
CMSAPI cmsTagSignature CMSEXPORT cmsGetTagSignature(cmsHPROFILE hProfile, cmsUInt32Number n);
|
|
1525
|
+
CMSAPI cmsBool CMSEXPORT cmsGetTagOffsetAndSize(cmsHPROFILE hProfile, cmsUInt32Number n, cmsUInt32Number* offset, cmsUInt32Number* size);
|
|
1505
1526
|
CMSAPI cmsBool CMSEXPORT cmsIsTag(cmsHPROFILE hProfile, cmsTagSignature sig);
|
|
1506
1527
|
|
|
1507
1528
|
// Read and write pre-formatted data
|
|
@@ -1525,6 +1546,8 @@ CMSAPI void CMSEXPORT cmsGetHeaderAttributes(cmsHPROFILE hProfile,
|
|
|
1525
1546
|
CMSAPI void CMSEXPORT cmsGetHeaderProfileID(cmsHPROFILE hProfile, cmsUInt8Number* ProfileID);
|
|
1526
1547
|
CMSAPI cmsBool CMSEXPORT cmsGetHeaderCreationDateTime(cmsHPROFILE hProfile, struct tm *Dest);
|
|
1527
1548
|
CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderRenderingIntent(cmsHPROFILE hProfile);
|
|
1549
|
+
CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderCMM(cmsHPROFILE hProfile);
|
|
1550
|
+
|
|
1528
1551
|
|
|
1529
1552
|
CMSAPI void CMSEXPORT cmsSetHeaderFlags(cmsHPROFILE hProfile, cmsUInt32Number Flags);
|
|
1530
1553
|
CMSAPI cmsUInt32Number CMSEXPORT cmsGetHeaderManufacturer(cmsHPROFILE hProfile);
|
|
@@ -1867,6 +1890,13 @@ CMSAPI cmsContext CMSEXPORT cmsGetTransformContextID(cmsHTRANSFORM hTransf
|
|
|
1867
1890
|
CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformInputFormat(cmsHTRANSFORM hTransform);
|
|
1868
1891
|
CMSAPI cmsUInt32Number CMSEXPORT cmsGetTransformOutputFormat(cmsHTRANSFORM hTransform);
|
|
1869
1892
|
|
|
1893
|
+
// Access the optimized pipeline and gamut-check pipeline inside a transform.
|
|
1894
|
+
CMSAPI cmsPipeline* CMSEXPORT cmsGetTransformPipeline(cmsHTRANSFORM hTransform);
|
|
1895
|
+
CMSAPI cmsPipeline* CMSEXPORT cmsGetTransformGamutCheckPipeline(cmsHTRANSFORM hTransform);
|
|
1896
|
+
// Grab colorants
|
|
1897
|
+
CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsGetTransformInputColorants(cmsHTRANSFORM hTransform);
|
|
1898
|
+
CMSAPI cmsNAMEDCOLORLIST* CMSEXPORT cmsGetTransformOutputColorants(cmsHTRANSFORM hTransform);
|
|
1899
|
+
|
|
1870
1900
|
// For backwards compatibility
|
|
1871
1901
|
CMSAPI cmsBool CMSEXPORT cmsChangeBuffersFormat(cmsHTRANSFORM hTransform,
|
|
1872
1902
|
cmsUInt32Number InputFormat,
|
|
@@ -170,7 +170,7 @@ void exif_set_srational (unsigned char *b, ExifByteOrder order,
|
|
|
170
170
|
ExifSRational value);
|
|
171
171
|
|
|
172
172
|
/*! \internal */
|
|
173
|
-
void exif_convert_utf16_to_utf8 (char *out, const unsigned char *in, int
|
|
173
|
+
void exif_convert_utf16_to_utf8 (char *out, unsigned int outlen, const unsigned char *in, unsigned int inlen);
|
|
174
174
|
|
|
175
175
|
/* Please do not use this function outside of the library. */
|
|
176
176
|
|
|
@@ -51,12 +51,12 @@ heif_error heif_image_handle_get_depth_image_handle(const heif_image_handle* han
|
|
|
51
51
|
heif_image_handle** out_depth_handle);
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
enum heif_depth_representation_type {
|
|
54
|
+
typedef enum heif_depth_representation_type {
|
|
55
55
|
heif_depth_representation_type_uniform_inverse_Z = 0,
|
|
56
56
|
heif_depth_representation_type_uniform_disparity = 1,
|
|
57
57
|
heif_depth_representation_type_uniform_Z = 2,
|
|
58
58
|
heif_depth_representation_type_nonuniform_disparity = 3
|
|
59
|
-
};
|
|
59
|
+
} heif_depth_representation_type;
|
|
60
60
|
|
|
61
61
|
typedef struct heif_depth_representation_info {
|
|
62
62
|
uint8_t version;
|
|
@@ -250,6 +250,15 @@ typedef uint32_t heif_brand2;
|
|
|
250
250
|
#define heif_brand2_avci heif_fourcc('a','v','c','i')
|
|
251
251
|
#define heif_brand2_avcs heif_fourcc('a','v','c','s')
|
|
252
252
|
|
|
253
|
+
/**
|
|
254
|
+
* Unified ID namespace (`unif`) brand.
|
|
255
|
+
*
|
|
256
|
+
* All IDs (item, track, entity group) share a single global namespace.
|
|
257
|
+
*
|
|
258
|
+
* See ISO/IEC 14496-12.
|
|
259
|
+
*/
|
|
260
|
+
#define heif_brand2_unif heif_fourcc('u','n','i','f')
|
|
261
|
+
|
|
253
262
|
#define heif_brand2_iso8 heif_fourcc('i','s','o','8')
|
|
254
263
|
#define heif_brand2_isom heif_fourcc('i','s','o','m')
|
|
255
264
|
#define heif_brand2_mp41 heif_fourcc('m','p','4','1')
|
|
@@ -311,13 +320,13 @@ const char* heif_get_file_mime_type(const uint8_t* data, int len);
|
|
|
311
320
|
|
|
312
321
|
// ========================= file type check ======================
|
|
313
322
|
|
|
314
|
-
enum heif_filetype_result
|
|
323
|
+
typedef enum heif_filetype_result
|
|
315
324
|
{
|
|
316
325
|
heif_filetype_no,
|
|
317
326
|
heif_filetype_yes_supported, // it is heif and can be read by libheif
|
|
318
327
|
heif_filetype_yes_unsupported, // it is heif, but cannot be read by libheif
|
|
319
328
|
heif_filetype_maybe // not sure whether it is an heif, try detection with more input data
|
|
320
|
-
};
|
|
329
|
+
} heif_filetype_result;
|
|
321
330
|
|
|
322
331
|
// input data should be at least 12 bytes
|
|
323
332
|
LIBHEIF_API
|
|
@@ -342,7 +351,7 @@ int heif_check_jpeg_filetype(const uint8_t* data, int len);
|
|
|
342
351
|
// ===================== DEPRECATED =====================
|
|
343
352
|
|
|
344
353
|
// DEPRECATED, use heif_brand2 and the heif_brand2_* constants instead
|
|
345
|
-
enum heif_brand
|
|
354
|
+
typedef enum heif_brand
|
|
346
355
|
{
|
|
347
356
|
heif_unknown_brand,
|
|
348
357
|
heif_heic, // HEIF image with h265
|
|
@@ -362,7 +371,7 @@ enum heif_brand
|
|
|
362
371
|
heif_evbs, // EVC sequence
|
|
363
372
|
heif_j2ki, // JPEG2000 image
|
|
364
373
|
heif_j2is, // JPEG2000 image sequence
|
|
365
|
-
};
|
|
374
|
+
} heif_brand;
|
|
366
375
|
|
|
367
376
|
// input data should be at least 12 bytes
|
|
368
377
|
// DEPRECATED, use heif_read_main_brand() instead
|
|
@@ -31,7 +31,7 @@ extern "C" {
|
|
|
31
31
|
typedef struct heif_image heif_image;
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
enum heif_chroma_downsampling_algorithm
|
|
34
|
+
typedef enum heif_chroma_downsampling_algorithm
|
|
35
35
|
{
|
|
36
36
|
heif_chroma_downsampling_nearest_neighbor = 1,
|
|
37
37
|
heif_chroma_downsampling_average = 2,
|
|
@@ -39,13 +39,13 @@ enum heif_chroma_downsampling_algorithm
|
|
|
39
39
|
// Combine with 'heif_chroma_upsampling_bilinear' for best quality.
|
|
40
40
|
// Makes edges look sharper when using YUV 420 with bilinear chroma upsampling.
|
|
41
41
|
heif_chroma_downsampling_sharp_yuv = 3
|
|
42
|
-
};
|
|
42
|
+
} heif_chroma_downsampling_algorithm;
|
|
43
43
|
|
|
44
|
-
enum heif_chroma_upsampling_algorithm
|
|
44
|
+
typedef enum heif_chroma_upsampling_algorithm
|
|
45
45
|
{
|
|
46
46
|
heif_chroma_upsampling_nearest_neighbor = 1,
|
|
47
47
|
heif_chroma_upsampling_bilinear = 2
|
|
48
|
-
};
|
|
48
|
+
} heif_chroma_upsampling_algorithm;
|
|
49
49
|
|
|
50
50
|
|
|
51
51
|
typedef struct heif_color_conversion_options
|
|
@@ -71,12 +71,12 @@ typedef struct heif_color_conversion_options
|
|
|
71
71
|
} heif_color_conversion_options;
|
|
72
72
|
|
|
73
73
|
|
|
74
|
-
enum heif_alpha_composition_mode
|
|
74
|
+
typedef enum heif_alpha_composition_mode
|
|
75
75
|
{
|
|
76
76
|
heif_alpha_composition_mode_none,
|
|
77
77
|
heif_alpha_composition_mode_solid_color,
|
|
78
78
|
heif_alpha_composition_mode_checkerboard,
|
|
79
|
-
};
|
|
79
|
+
} heif_alpha_composition_mode;
|
|
80
80
|
|
|
81
81
|
|
|
82
82
|
typedef struct heif_color_conversion_options_ext
|
|
@@ -111,13 +111,13 @@ void heif_color_conversion_options_ext_free(heif_color_conversion_options_ext*);
|
|
|
111
111
|
|
|
112
112
|
// ------------------------- color profiles -------------------------
|
|
113
113
|
|
|
114
|
-
enum heif_color_profile_type
|
|
114
|
+
typedef enum heif_color_profile_type
|
|
115
115
|
{
|
|
116
116
|
heif_color_profile_type_not_present = 0,
|
|
117
117
|
heif_color_profile_type_nclx = heif_fourcc('n', 'c', 'l', 'x'),
|
|
118
118
|
heif_color_profile_type_rICC = heif_fourcc('r', 'I', 'C', 'C'),
|
|
119
119
|
heif_color_profile_type_prof = heif_fourcc('p', 'r', 'o', 'f')
|
|
120
|
-
};
|
|
120
|
+
} heif_color_profile_type;
|
|
121
121
|
|
|
122
122
|
|
|
123
123
|
// Returns 'heif_color_profile_type_not_present' if there is no color profile.
|
|
@@ -137,7 +137,7 @@ struct heif_error heif_image_handle_get_raw_color_profile(const heif_image_handl
|
|
|
137
137
|
void* out_data);
|
|
138
138
|
|
|
139
139
|
|
|
140
|
-
enum heif_color_primaries
|
|
140
|
+
typedef enum heif_color_primaries
|
|
141
141
|
{
|
|
142
142
|
heif_color_primaries_ITU_R_BT_709_5 = 1, // g=0.3;0.6, b=0.15;0.06, r=0.64;0.33, w=0.3127,0.3290
|
|
143
143
|
heif_color_primaries_unspecified = 2,
|
|
@@ -151,9 +151,9 @@ enum heif_color_primaries
|
|
|
151
151
|
heif_color_primaries_SMPTE_RP_431_2 = 11,
|
|
152
152
|
heif_color_primaries_SMPTE_EG_432_1 = 12,
|
|
153
153
|
heif_color_primaries_EBU_Tech_3213_E = 22
|
|
154
|
-
};
|
|
154
|
+
} heif_color_primaries;
|
|
155
155
|
|
|
156
|
-
enum heif_transfer_characteristics
|
|
156
|
+
typedef enum heif_transfer_characteristics
|
|
157
157
|
{
|
|
158
158
|
heif_transfer_characteristic_ITU_R_BT_709_5 = 1,
|
|
159
159
|
heif_transfer_characteristic_unspecified = 2,
|
|
@@ -172,9 +172,9 @@ enum heif_transfer_characteristics
|
|
|
172
172
|
heif_transfer_characteristic_ITU_R_BT_2100_0_PQ = 16,
|
|
173
173
|
heif_transfer_characteristic_SMPTE_ST_428_1 = 17,
|
|
174
174
|
heif_transfer_characteristic_ITU_R_BT_2100_0_HLG = 18
|
|
175
|
-
};
|
|
175
|
+
} heif_transfer_characteristics;
|
|
176
176
|
|
|
177
|
-
enum heif_matrix_coefficients
|
|
177
|
+
typedef enum heif_matrix_coefficients
|
|
178
178
|
{
|
|
179
179
|
heif_matrix_coefficients_RGB_GBR = 0,
|
|
180
180
|
heif_matrix_coefficients_ITU_R_BT_709_5 = 1, // TODO: or 709-6 according to h.273
|
|
@@ -190,7 +190,7 @@ enum heif_matrix_coefficients
|
|
|
190
190
|
heif_matrix_coefficients_chromaticity_derived_non_constant_luminance = 12,
|
|
191
191
|
heif_matrix_coefficients_chromaticity_derived_constant_luminance = 13,
|
|
192
192
|
heif_matrix_coefficients_ICtCp = 14
|
|
193
|
-
};
|
|
193
|
+
} heif_matrix_coefficients;
|
|
194
194
|
|
|
195
195
|
typedef struct heif_color_profile_nclx
|
|
196
196
|
{
|
|
@@ -35,7 +35,7 @@ extern "C" {
|
|
|
35
35
|
/**
|
|
36
36
|
* libheif known compression formats.
|
|
37
37
|
*/
|
|
38
|
-
enum heif_compression_format
|
|
38
|
+
typedef enum heif_compression_format
|
|
39
39
|
{
|
|
40
40
|
/**
|
|
41
41
|
* Unspecified / undefined compression format.
|
|
@@ -115,7 +115,7 @@ enum heif_compression_format
|
|
|
115
115
|
* The core encoding is defined in ISO/IEC 15444-15, or ITU-T T.814.
|
|
116
116
|
*/
|
|
117
117
|
heif_compression_HTJ2K = 10
|
|
118
|
-
};
|
|
118
|
+
} heif_compression_format;
|
|
119
119
|
|
|
120
120
|
|
|
121
121
|
// ========================= heif_context =========================
|
|
@@ -136,13 +136,13 @@ void heif_context_free(heif_context*);
|
|
|
136
136
|
|
|
137
137
|
typedef struct heif_reading_options heif_reading_options;
|
|
138
138
|
|
|
139
|
-
enum heif_reader_grow_status
|
|
139
|
+
typedef enum heif_reader_grow_status
|
|
140
140
|
{
|
|
141
141
|
heif_reader_grow_status_size_reached, // requested size has been reached, we can read until this point
|
|
142
142
|
heif_reader_grow_status_timeout, // size has not been reached yet, but it may still grow further (deprecated)
|
|
143
143
|
heif_reader_grow_status_size_beyond_eof, // size has not been reached and never will. The file has grown to its full size
|
|
144
144
|
heif_reader_grow_status_error // an error has occurred
|
|
145
|
-
};
|
|
145
|
+
} heif_reader_grow_status;
|
|
146
146
|
|
|
147
147
|
|
|
148
148
|
typedef struct heif_reader_range_request_result
|
|
@@ -295,6 +295,19 @@ heif_error heif_context_get_image_handle(heif_context* ctx,
|
|
|
295
295
|
LIBHEIF_API
|
|
296
296
|
void heif_context_debug_dump_boxes_to_file(heif_context* ctx, int fd);
|
|
297
297
|
|
|
298
|
+
// ====================================================================================================
|
|
299
|
+
// Mini format (experimental)
|
|
300
|
+
|
|
301
|
+
// Enable writing in the compact 'mini' box format (ISO/IEC 23008-12 DAmd2).
|
|
302
|
+
// When enabled, the output file will use a single 'mini' box instead of the standard
|
|
303
|
+
// meta+mdat box structure, if the file content is compatible with the mini format.
|
|
304
|
+
// If the content cannot be represented as a mini box, the standard format is used as fallback.
|
|
305
|
+
// Requires ENABLE_EXPERIMENTAL_MINI_FORMAT to be enabled at compile time.
|
|
306
|
+
// Default: disabled.
|
|
307
|
+
LIBHEIF_API
|
|
308
|
+
void heif_context_set_write_mini_format(heif_context*, int enable);
|
|
309
|
+
|
|
310
|
+
|
|
298
311
|
// ====================================================================================================
|
|
299
312
|
// Write the heif_context to a HEIF file
|
|
300
313
|
|
|
@@ -46,11 +46,11 @@ LIBHEIF_API
|
|
|
46
46
|
int heif_have_decoder_for_format(enum heif_compression_format format);
|
|
47
47
|
|
|
48
48
|
|
|
49
|
-
enum heif_progress_step
|
|
49
|
+
typedef enum heif_progress_step
|
|
50
50
|
{
|
|
51
51
|
heif_progress_step_total = 0,
|
|
52
52
|
heif_progress_step_load_tile = 1
|
|
53
|
-
};
|
|
53
|
+
} heif_progress_step;
|
|
54
54
|
|
|
55
55
|
|
|
56
56
|
typedef struct heif_decoding_options
|
|
@@ -33,6 +33,7 @@ extern "C" {
|
|
|
33
33
|
#include <libheif/heif_context.h>
|
|
34
34
|
#include <libheif/heif_brands.h>
|
|
35
35
|
#include <libheif/heif_color.h>
|
|
36
|
+
#include <libheif/heif_uncompressed_types.h>
|
|
36
37
|
|
|
37
38
|
|
|
38
39
|
// ----- encoder -----
|
|
@@ -146,12 +147,12 @@ LIBHEIF_API
|
|
|
146
147
|
const char* heif_encoder_parameter_get_name(const heif_encoder_parameter*);
|
|
147
148
|
|
|
148
149
|
|
|
149
|
-
enum heif_encoder_parameter_type
|
|
150
|
+
typedef enum heif_encoder_parameter_type
|
|
150
151
|
{
|
|
151
152
|
heif_encoder_parameter_type_integer = 1,
|
|
152
153
|
heif_encoder_parameter_type_boolean = 2,
|
|
153
154
|
heif_encoder_parameter_type_string = 3
|
|
154
|
-
};
|
|
155
|
+
} heif_encoder_parameter_type;
|
|
155
156
|
|
|
156
157
|
// Return the parameter type.
|
|
157
158
|
LIBHEIF_API
|
|
@@ -256,7 +257,7 @@ int heif_encoder_has_default(heif_encoder*,
|
|
|
256
257
|
|
|
257
258
|
|
|
258
259
|
// The orientation values are defined equal to the EXIF Orientation tag.
|
|
259
|
-
enum heif_orientation
|
|
260
|
+
typedef enum heif_orientation
|
|
260
261
|
{
|
|
261
262
|
heif_orientation_normal = 1,
|
|
262
263
|
heif_orientation_flip_horizontally = 2,
|
|
@@ -266,7 +267,11 @@ enum heif_orientation
|
|
|
266
267
|
heif_orientation_rotate_90_cw = 6,
|
|
267
268
|
heif_orientation_rotate_90_cw_then_flip_vertically = 7,
|
|
268
269
|
heif_orientation_rotate_270_cw = 8
|
|
269
|
-
};
|
|
270
|
+
} heif_orientation;
|
|
271
|
+
|
|
272
|
+
|
|
273
|
+
LIBHEIF_API
|
|
274
|
+
heif_orientation heif_orientation_concat(heif_orientation first, heif_orientation second);
|
|
270
275
|
|
|
271
276
|
|
|
272
277
|
typedef struct heif_encoding_options
|
|
@@ -297,7 +302,7 @@ typedef struct heif_encoding_options
|
|
|
297
302
|
// version 5 options
|
|
298
303
|
|
|
299
304
|
// libheif will generate irot/imir boxes to match these orientations
|
|
300
|
-
|
|
305
|
+
heif_orientation image_orientation;
|
|
301
306
|
|
|
302
307
|
// version 6 options
|
|
303
308
|
|
|
@@ -308,6 +313,12 @@ typedef struct heif_encoding_options
|
|
|
308
313
|
// Set this to true to use compressed form of uncC where possible.
|
|
309
314
|
uint8_t prefer_uncC_short_form;
|
|
310
315
|
|
|
316
|
+
// version 8 options
|
|
317
|
+
|
|
318
|
+
// Set this to enable compression for 'unci' images encoded through heif_context_encode_image().
|
|
319
|
+
// Default: heif_unci_compression_off
|
|
320
|
+
heif_unci_compression unci_compression;
|
|
321
|
+
|
|
311
322
|
// TODO: we should add a flag to force MIAF compatible outputs. E.g. this will put restrictions on grid tile sizes and
|
|
312
323
|
// might add a clap box when the grid output size does not match the color subsampling factors.
|
|
313
324
|
// Since some of these constraints have to be known before actually encoding the image, "forcing MIAF compatibility"
|
|
@@ -364,6 +375,19 @@ LIBHEIF_API
|
|
|
364
375
|
void heif_context_add_compatible_brand(heif_context* ctx,
|
|
365
376
|
heif_brand2 compatible_brand);
|
|
366
377
|
|
|
378
|
+
/**
|
|
379
|
+
* Enable the unified ID namespace ('unif' brand).
|
|
380
|
+
*
|
|
381
|
+
* When enabled, item IDs, track IDs, and entity group IDs share a single
|
|
382
|
+
* global counter so no ID value is reused across categories. The 'unif'
|
|
383
|
+
* compatible brand is automatically added to the output file.
|
|
384
|
+
*
|
|
385
|
+
* @param ctx the encoding context
|
|
386
|
+
* @param flag non-zero to enable, zero to disable
|
|
387
|
+
*/
|
|
388
|
+
LIBHEIF_API
|
|
389
|
+
void heif_context_set_unif(heif_context* ctx, int flag);
|
|
390
|
+
|
|
367
391
|
// --- deprecated functions ---
|
|
368
392
|
|
|
369
393
|
// DEPRECATED, typo in function name
|
|
@@ -29,7 +29,7 @@ extern "C" {
|
|
|
29
29
|
#include <stdint.h>
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
enum heif_error_code
|
|
32
|
+
typedef enum heif_error_code
|
|
33
33
|
{
|
|
34
34
|
// Everything ok, no error occurred.
|
|
35
35
|
heif_error_Ok = 0,
|
|
@@ -71,10 +71,10 @@ enum heif_error_code
|
|
|
71
71
|
heif_error_Canceled = 12,
|
|
72
72
|
|
|
73
73
|
heif_error_End_of_sequence = 13
|
|
74
|
-
};
|
|
74
|
+
} heif_error_code;
|
|
75
75
|
|
|
76
76
|
|
|
77
|
-
enum heif_suberror_code
|
|
77
|
+
typedef enum heif_suberror_code
|
|
78
78
|
{
|
|
79
79
|
// no further information available
|
|
80
80
|
heif_suberror_Unspecified = 0,
|
|
@@ -278,7 +278,7 @@ enum heif_suberror_code
|
|
|
278
278
|
heif_suberror_Plugin_is_not_loaded = 6001, // trying to remove a plugin that is not loaded
|
|
279
279
|
heif_suberror_Cannot_read_plugin_directory = 6002, // error while scanning the directory for plugins
|
|
280
280
|
heif_suberror_No_matching_decoder_installed = 6003 // no decoder found for that compression format
|
|
281
|
-
};
|
|
281
|
+
} heif_suberror_code;
|
|
282
282
|
|
|
283
283
|
|
|
284
284
|
typedef struct heif_error
|
|
@@ -31,7 +31,7 @@ extern "C" {
|
|
|
31
31
|
#include <stdint.h>
|
|
32
32
|
|
|
33
33
|
|
|
34
|
-
enum heif_chroma
|
|
34
|
+
typedef enum heif_chroma
|
|
35
35
|
{
|
|
36
36
|
heif_chroma_undefined = 99,
|
|
37
37
|
heif_chroma_monochrome = 0,
|
|
@@ -44,14 +44,14 @@ enum heif_chroma
|
|
|
44
44
|
heif_chroma_interleaved_RRGGBBAA_BE = 13, // HDR, big endian.
|
|
45
45
|
heif_chroma_interleaved_RRGGBB_LE = 14, // HDR, little endian.
|
|
46
46
|
heif_chroma_interleaved_RRGGBBAA_LE = 15 // HDR, little endian.
|
|
47
|
-
};
|
|
47
|
+
} heif_chroma;
|
|
48
48
|
|
|
49
49
|
// DEPRECATED ENUM NAMES
|
|
50
50
|
#define heif_chroma_interleaved_24bit heif_chroma_interleaved_RGB
|
|
51
51
|
#define heif_chroma_interleaved_32bit heif_chroma_interleaved_RGBA
|
|
52
52
|
|
|
53
53
|
|
|
54
|
-
enum heif_colorspace
|
|
54
|
+
typedef enum heif_colorspace
|
|
55
55
|
{
|
|
56
56
|
heif_colorspace_undefined = 99,
|
|
57
57
|
|
|
@@ -75,10 +75,12 @@ enum heif_colorspace
|
|
|
75
75
|
heif_colorspace_monochrome = 2,
|
|
76
76
|
|
|
77
77
|
// Indicates that this image has no visual channels.
|
|
78
|
-
heif_colorspace_nonvisual = 3
|
|
79
|
-
};
|
|
78
|
+
heif_colorspace_nonvisual = 3,
|
|
80
79
|
|
|
81
|
-
|
|
80
|
+
heif_colorspace_filter_array = 4
|
|
81
|
+
} heif_colorspace;
|
|
82
|
+
|
|
83
|
+
typedef enum heif_channel
|
|
82
84
|
{
|
|
83
85
|
heif_channel_Y = 0,
|
|
84
86
|
heif_channel_Cb = 1,
|
|
@@ -90,9 +92,44 @@ enum heif_channel
|
|
|
90
92
|
heif_channel_interleaved = 10,
|
|
91
93
|
heif_channel_filter_array = 11,
|
|
92
94
|
heif_channel_depth = 12,
|
|
93
|
-
heif_channel_disparity = 13
|
|
94
|
-
|
|
95
|
+
heif_channel_disparity = 13,
|
|
96
|
+
heif_channel_unknown = 65535
|
|
97
|
+
} heif_channel;
|
|
95
98
|
|
|
99
|
+
#if HEIF_WITH_OMAF
|
|
100
|
+
/**
|
|
101
|
+
* OMAF Image projection.
|
|
102
|
+
*
|
|
103
|
+
* The image projection for most images is flat - it is projected as intended to be shown on
|
|
104
|
+
* a flat screen or print. For immersive or omnidirectional media (e.g. VR headsets, or
|
|
105
|
+
* equivalent), there are alternatives such as an equirectangular projection or cubemap projection.
|
|
106
|
+
*
|
|
107
|
+
* See ISO/IEC 23090-2 "Omnidirectional media format" for more information.
|
|
108
|
+
*/
|
|
109
|
+
typedef enum heif_omaf_image_projection
|
|
110
|
+
{
|
|
111
|
+
/**
|
|
112
|
+
* Equirectangular projection.
|
|
113
|
+
*/
|
|
114
|
+
heif_omaf_image_projection_equirectangular = 0x00,
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Cube map.
|
|
118
|
+
*/
|
|
119
|
+
heif_omaf_image_projection_cube_map = 0x01,
|
|
120
|
+
|
|
121
|
+
/* Values 2 through 31 are reserved in ISO/IEC 23090-2:2023 Table 10. */
|
|
122
|
+
/**
|
|
123
|
+
* Projection is specified, but not recognised.
|
|
124
|
+
*/
|
|
125
|
+
heif_omaf_image_projection_unknown = 0xFE,
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* Flat projection, assumed if no projection information provided.
|
|
129
|
+
*/
|
|
130
|
+
heif_omaf_image_projection_flat = 0xFF,
|
|
131
|
+
} heif_omaf_image_projection;
|
|
132
|
+
#endif
|
|
96
133
|
|
|
97
134
|
// An heif_image contains a decoded pixel image in various colorspaces, chroma formats,
|
|
98
135
|
// and bit depths.
|
|
@@ -265,6 +302,13 @@ void heif_image_set_pixel_aspect_ratio(heif_image*, uint32_t aspect_h, uint32_t
|
|
|
265
302
|
LIBHEIF_API
|
|
266
303
|
void heif_image_handle_set_pixel_aspect_ratio(heif_image_handle*, uint32_t aspect_h, uint32_t aspect_v);
|
|
267
304
|
|
|
305
|
+
#if HEIF_WITH_OMAF
|
|
306
|
+
LIBHEIF_API
|
|
307
|
+
heif_omaf_image_projection heif_image_get_omaf_image_projection(const heif_image*);
|
|
308
|
+
|
|
309
|
+
LIBHEIF_API
|
|
310
|
+
void heif_image_set_omaf_image_projection(const heif_image*, heif_omaf_image_projection image_projection);
|
|
311
|
+
#endif
|
|
268
312
|
|
|
269
313
|
// --- heif_image allocation
|
|
270
314
|
|
|
@@ -122,6 +122,48 @@ heif_context* heif_image_handle_get_context(const heif_image_handle* handle);
|
|
|
122
122
|
LIBHEIF_API
|
|
123
123
|
const char* heif_image_handle_get_gimi_content_id(const heif_image_handle* handle);
|
|
124
124
|
|
|
125
|
+
LIBHEIF_API
|
|
126
|
+
void heif_image_handle_set_gimi_content_id(heif_image_handle* handle, const char* content_id);
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
// --- cmpd component queries
|
|
130
|
+
|
|
131
|
+
// Returns the number of components in the cmpd box, or 0 if no cmpd property exists.
|
|
132
|
+
LIBHEIF_API
|
|
133
|
+
uint32_t heif_image_handle_get_number_of_cmpd_components(const heif_image_handle*);
|
|
134
|
+
|
|
135
|
+
// Returns the component_type for the given cmpd component index.
|
|
136
|
+
// Returns 0 if out of range or no cmpd property.
|
|
137
|
+
LIBHEIF_API
|
|
138
|
+
uint16_t heif_image_handle_get_cmpd_component_type(const heif_image_handle*, uint32_t component_idx);
|
|
139
|
+
|
|
140
|
+
// Returns the component_type_uri for the given cmpd component index (component_type >= 0x8000).
|
|
141
|
+
// Returns NULL if the component does not have a URI.
|
|
142
|
+
// The returned string must be freed with heif_string_release().
|
|
143
|
+
LIBHEIF_API
|
|
144
|
+
const char* heif_image_handle_get_cmpd_component_type_uri(const heif_image_handle*, uint32_t component_idx);
|
|
145
|
+
|
|
146
|
+
|
|
147
|
+
// --- GIMI component content IDs (handle-level)
|
|
148
|
+
|
|
149
|
+
// Returns non-zero (count of content IDs) if an ItemComponentContentIDProperty is set, 0 otherwise.
|
|
150
|
+
LIBHEIF_API
|
|
151
|
+
int heif_image_handle_has_gimi_component_content_ids(const heif_image_handle*);
|
|
152
|
+
|
|
153
|
+
// Returns the GIMI component content ID for the given component index.
|
|
154
|
+
// Returns NULL if no ItemComponentContentIDProperty is set or index is out of range.
|
|
155
|
+
// The returned string must be freed with heif_string_release().
|
|
156
|
+
LIBHEIF_API
|
|
157
|
+
const char* heif_image_handle_get_gimi_component_content_id(const heif_image_handle*, uint32_t component_idx);
|
|
158
|
+
|
|
159
|
+
// Set a GIMI component content ID for a single component.
|
|
160
|
+
// If an ItemComponentContentIDProperty does not yet exist, one will be created.
|
|
161
|
+
// The content IDs array is resized as needed (new entries default to empty).
|
|
162
|
+
LIBHEIF_API
|
|
163
|
+
void heif_image_handle_set_gimi_component_content_id(heif_image_handle*,
|
|
164
|
+
uint32_t component_idx,
|
|
165
|
+
const char* content_id);
|
|
166
|
+
|
|
125
167
|
#ifdef __cplusplus
|
|
126
168
|
}
|
|
127
169
|
#endif
|