@img/sharp-libvips-dev 1.0.1 → 1.0.3
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 +1 -2
- package/include/aom/aom_decoder.h +1 -1
- package/include/aom/aom_encoder.h +7 -1
- package/include/aom/aom_image.h +24 -12
- package/include/aom/aom_integer.h +3 -3
- package/include/aom/aomcx.h +15 -0
- package/include/aom/aomdx.h +5 -2
- package/include/archive.h +7 -5
- package/include/archive_entry.h +5 -3
- package/include/cgif.h +3 -0
- package/include/expat.h +21 -10
- package/include/expat_config.h +11 -5
- package/include/ffi.h +12 -25
- package/include/freetype2/freetype/config/ftoption.h +2 -2
- package/include/fribidi/fribidi-config.h +2 -2
- package/include/fribidi/fribidi-unicode-version.h +3 -3
- package/include/gio-unix-2.0/gio/gfiledescriptorbased.h +3 -2
- package/include/glib-2.0/gio/gappinfo.h +40 -25
- package/include/glib-2.0/gio/gapplication.h +6 -0
- package/include/glib-2.0/gio/gasyncresult.h +1 -1
- package/include/glib-2.0/gio/gconverter.h +5 -0
- package/include/glib-2.0/gio/gdbusintrospection.h +1 -1
- package/include/glib-2.0/gio/gfile.h +16 -0
- package/include/glib-2.0/gio/gio-visibility.h +34 -0
- package/include/glib-2.0/gio/giotypes.h +0 -1
- package/include/glib-2.0/gio/gsettings.h +8 -0
- package/include/glib-2.0/gio/gvfs.h +2 -2
- package/include/glib-2.0/girepository/gi-visibility.h +34 -0
- package/include/glib-2.0/girepository/giarginfo.h +23 -6
- package/include/glib-2.0/girepository/gibaseinfo.h +44 -18
- package/include/glib-2.0/girepository/gicallableinfo.h +26 -16
- package/include/glib-2.0/girepository/gicallbackinfo.h +17 -2
- package/include/glib-2.0/girepository/giconstantinfo.h +19 -4
- package/include/glib-2.0/girepository/gienuminfo.h +20 -21
- package/include/glib-2.0/girepository/gifieldinfo.h +22 -7
- package/include/glib-2.0/girepository/giflagsinfo.h +60 -0
- package/include/glib-2.0/girepository/gifunctioninfo.h +22 -7
- package/include/glib-2.0/girepository/giinterfaceinfo.h +33 -18
- package/include/glib-2.0/girepository/giobjectinfo.h +41 -26
- package/include/glib-2.0/girepository/gipropertyinfo.h +18 -3
- package/include/glib-2.0/girepository/giregisteredtypeinfo.h +22 -11
- package/include/glib-2.0/girepository/girepository-autocleanups.h +56 -0
- package/include/glib-2.0/girepository/girepository.h +53 -62
- package/include/glib-2.0/girepository/girffi.h +8 -7
- package/include/glib-2.0/girepository/gisignalinfo.h +18 -3
- package/include/glib-2.0/girepository/gistructinfo.h +26 -11
- package/include/glib-2.0/girepository/gitypeinfo.h +29 -16
- package/include/glib-2.0/girepository/gitypelib.h +9 -13
- package/include/glib-2.0/girepository/gitypes.h +52 -104
- package/include/glib-2.0/girepository/giunioninfo.h +28 -12
- package/include/glib-2.0/girepository/giunresolvedinfo.h +17 -2
- package/include/glib-2.0/girepository/givalueinfo.h +65 -0
- package/include/glib-2.0/girepository/givfuncinfo.h +23 -8
- package/include/glib-2.0/glib/deprecated/gthread.h +9 -5
- package/include/glib-2.0/glib/gbitlock.h +31 -0
- package/include/glib-2.0/glib/gbookmarkfile.h +1 -1
- package/include/glib-2.0/glib/giochannel.h +2 -2
- package/include/glib-2.0/glib/glib-visibility.h +34 -0
- package/include/glib-2.0/glib/gmacros.h +12 -5
- package/include/glib-2.0/glib/gmain.h +93 -7
- package/include/glib-2.0/glib/gmessages.h +8 -0
- package/include/glib-2.0/glib/gqsort.h +8 -1
- package/include/glib-2.0/glib/gslice.h +2 -0
- package/include/glib-2.0/glib/gstrfuncs.h +24 -30
- package/include/glib-2.0/glib/gstrvbuilder.h +3 -0
- package/include/glib-2.0/glib/gthread.h +191 -3
- package/include/glib-2.0/glib/gunicode.h +1 -1
- package/include/glib-2.0/glib/gversionmacros.h +9 -0
- package/include/glib-2.0/glib-unix.h +7 -1
- package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/genums.h +6 -6
- package/include/glib-2.0/gobject/glib-types.h +11 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- package/include/glib-2.0/gobject/gsignal.h +16 -6
- package/include/glib-2.0/gobject/gtype.h +6 -6
- package/include/harfbuzz/hb-buffer.h +6 -0
- package/include/harfbuzz/hb-common.h +6 -9
- package/include/harfbuzz/hb-cplusplus.hh +8 -11
- package/include/harfbuzz/hb-subset.h +17 -4
- package/include/harfbuzz/hb-version.h +3 -3
- package/include/hwy/abort.h +28 -0
- package/include/hwy/aligned_allocator.h +218 -6
- package/include/hwy/base.h +1935 -512
- package/include/hwy/cache_control.h +24 -6
- package/include/hwy/detect_compiler_arch.h +105 -10
- package/include/hwy/detect_targets.h +146 -37
- package/include/hwy/foreach_target.h +36 -1
- package/include/hwy/highway.h +222 -50
- package/include/hwy/ops/arm_neon-inl.h +2055 -894
- package/include/hwy/ops/arm_sve-inl.h +1476 -348
- package/include/hwy/ops/emu128-inl.h +711 -623
- package/include/hwy/ops/generic_ops-inl.h +4431 -2157
- package/include/hwy/ops/inside-inl.h +691 -0
- package/include/hwy/ops/ppc_vsx-inl.h +2186 -673
- package/include/hwy/ops/rvv-inl.h +1556 -536
- package/include/hwy/ops/scalar-inl.h +353 -233
- package/include/hwy/ops/set_macros-inl.h +171 -23
- package/include/hwy/ops/shared-inl.h +198 -56
- package/include/hwy/ops/wasm_128-inl.h +283 -244
- package/include/hwy/ops/x86_128-inl.h +3673 -1357
- package/include/hwy/ops/x86_256-inl.h +1737 -663
- package/include/hwy/ops/x86_512-inl.h +1697 -500
- package/include/hwy/per_target.h +4 -0
- package/include/hwy/profiler.h +648 -0
- package/include/hwy/robust_statistics.h +2 -2
- package/include/hwy/targets.h +40 -32
- package/include/hwy/timer-inl.h +3 -3
- package/include/hwy/timer.h +16 -1
- package/include/libheif/heif.h +170 -15
- package/include/libheif/heif_items.h +237 -0
- package/include/libheif/heif_properties.h +38 -2
- package/include/libheif/heif_regions.h +1 -1
- package/include/libheif/heif_version.h +2 -2
- package/include/libpng16/png.h +32 -29
- package/include/libpng16/pngconf.h +2 -2
- package/include/libpng16/pnglibconf.h +8 -3
- package/include/librsvg-2.0/librsvg/rsvg-cairo.h +1 -1
- package/include/librsvg-2.0/librsvg/rsvg-features.h +3 -4
- package/include/librsvg-2.0/librsvg/rsvg-pixbuf.h +235 -0
- package/include/librsvg-2.0/librsvg/rsvg-version.h +3 -3
- package/include/librsvg-2.0/librsvg/rsvg.h +55 -176
- package/include/libxml2/libxml/HTMLparser.h +12 -19
- package/include/libxml2/libxml/c14n.h +1 -12
- package/include/libxml2/libxml/debugXML.h +1 -1
- package/include/libxml2/libxml/encoding.h +9 -0
- package/include/libxml2/libxml/entities.h +12 -1
- package/include/libxml2/libxml/hash.h +19 -0
- package/include/libxml2/libxml/list.h +2 -2
- package/include/libxml2/libxml/nanohttp.h +17 -0
- package/include/libxml2/libxml/parser.h +73 -58
- package/include/libxml2/libxml/parserInternals.h +9 -1
- package/include/libxml2/libxml/pattern.h +6 -0
- package/include/libxml2/libxml/tree.h +32 -12
- package/include/libxml2/libxml/uri.h +11 -0
- package/include/libxml2/libxml/valid.h +29 -2
- package/include/libxml2/libxml/xinclude.h +7 -0
- package/include/libxml2/libxml/xmlIO.h +21 -5
- package/include/libxml2/libxml/xmlerror.h +14 -0
- package/include/libxml2/libxml/xmlexports.h +111 -15
- package/include/libxml2/libxml/xmlmemory.h +8 -45
- package/include/libxml2/libxml/xmlreader.h +2 -0
- package/include/libxml2/libxml/xmlsave.h +5 -0
- package/include/libxml2/libxml/xmlunicode.h +165 -1
- package/include/libxml2/libxml/xmlversion.h +15 -179
- package/include/libxml2/libxml/xmlwriter.h +1 -0
- package/include/libxml2/libxml/xpath.h +4 -0
- package/include/pango-1.0/pango/pango-features.h +2 -2
- package/include/pango-1.0/pango/pango-fontmap.h +7 -0
- package/include/pango-1.0/pango/pango-item.h +4 -2
- package/include/pango-1.0/pango/pango-version-macros.h +25 -0
- package/include/pango-1.0/pango/pangofc-font.h +2 -1
- package/include/pixman-1/pixman-version.h +2 -2
- package/include/png.h +32 -29
- package/include/pngconf.h +2 -2
- package/include/pnglibconf.h +8 -3
- package/include/vips/connection.h +9 -3
- package/include/vips/util.h +1 -11
- package/include/vips/version.h +4 -4
- package/include/webp/decode.h +58 -56
- package/include/webp/demux.h +25 -21
- package/include/webp/encode.h +44 -39
- package/include/webp/mux.h +76 -15
- package/include/webp/mux_types.h +2 -1
- package/include/webp/sharpyuv/sharpyuv.h +77 -8
- package/include/webp/types.h +29 -8
- package/include/zconf.h +1 -1
- package/include/zlib.h +12 -12
- package/package.json +1 -1
- package/versions.json +18 -19
package/include/hwy/targets.h
CHANGED
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
#include "hwy/detect_targets.h"
|
|
30
30
|
#include "hwy/highway_export.h"
|
|
31
31
|
|
|
32
|
-
#if !
|
|
32
|
+
#if !defined(HWY_NO_LIBCXX)
|
|
33
33
|
#include <atomic>
|
|
34
34
|
#endif
|
|
35
35
|
|
|
@@ -112,6 +112,8 @@ static inline HWY_MAYBE_UNUSED const char* TargetName(int64_t target) {
|
|
|
112
112
|
return "SVE2";
|
|
113
113
|
case HWY_SVE:
|
|
114
114
|
return "SVE";
|
|
115
|
+
case HWY_NEON_BF16:
|
|
116
|
+
return "NEON_BF16";
|
|
115
117
|
case HWY_NEON:
|
|
116
118
|
return "NEON";
|
|
117
119
|
case HWY_NEON_WITHOUT_AES:
|
|
@@ -127,6 +129,13 @@ static inline HWY_MAYBE_UNUSED const char* TargetName(int64_t target) {
|
|
|
127
129
|
return "PPC10";
|
|
128
130
|
#endif
|
|
129
131
|
|
|
132
|
+
#if HWY_ARCH_S390X
|
|
133
|
+
case HWY_Z14:
|
|
134
|
+
return "Z14";
|
|
135
|
+
case HWY_Z15:
|
|
136
|
+
return "Z15";
|
|
137
|
+
#endif
|
|
138
|
+
|
|
130
139
|
#if HWY_ARCH_WASM
|
|
131
140
|
case HWY_WASM:
|
|
132
141
|
return "WASM";
|
|
@@ -134,7 +143,7 @@ static inline HWY_MAYBE_UNUSED const char* TargetName(int64_t target) {
|
|
|
134
143
|
return "WASM_EMU256";
|
|
135
144
|
#endif
|
|
136
145
|
|
|
137
|
-
#if
|
|
146
|
+
#if HWY_ARCH_RISCV
|
|
138
147
|
case HWY_RVV:
|
|
139
148
|
return "RVV";
|
|
140
149
|
#endif
|
|
@@ -213,24 +222,24 @@ static inline HWY_MAYBE_UNUSED const char* TargetName(int64_t target) {
|
|
|
213
222
|
// See HWY_ARCH_X86 above for details.
|
|
214
223
|
#define HWY_MAX_DYNAMIC_TARGETS 15
|
|
215
224
|
#define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_ARM
|
|
216
|
-
#define HWY_CHOOSE_TARGET_LIST(func_name)
|
|
217
|
-
nullptr, /* reserved */
|
|
218
|
-
nullptr, /* reserved */
|
|
219
|
-
nullptr, /* reserved */
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
nullptr, /* reserved */
|
|
223
|
-
nullptr, /* reserved */
|
|
224
|
-
nullptr, /* reserved */
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
HWY_CHOOSE_NEON(func_name), /* NEON */
|
|
225
|
+
#define HWY_CHOOSE_TARGET_LIST(func_name) \
|
|
226
|
+
nullptr, /* reserved */ \
|
|
227
|
+
nullptr, /* reserved */ \
|
|
228
|
+
nullptr, /* reserved */ \
|
|
229
|
+
HWY_CHOOSE_SVE2_128(func_name), /* SVE2 128-bit */ \
|
|
230
|
+
HWY_CHOOSE_SVE_256(func_name), /* SVE 256-bit */ \
|
|
231
|
+
nullptr, /* reserved */ \
|
|
232
|
+
nullptr, /* reserved */ \
|
|
233
|
+
nullptr, /* reserved */ \
|
|
234
|
+
HWY_CHOOSE_SVE2(func_name), /* SVE2 */ \
|
|
235
|
+
HWY_CHOOSE_SVE(func_name), /* SVE */ \
|
|
236
|
+
nullptr, /* reserved */ \
|
|
237
|
+
HWY_CHOOSE_NEON_BF16(func_name), /* NEON + f16/dot/bf16 */ \
|
|
238
|
+
nullptr, /* reserved */ \
|
|
239
|
+
HWY_CHOOSE_NEON(func_name), /* NEON */ \
|
|
231
240
|
HWY_CHOOSE_NEON_WITHOUT_AES(func_name) /* NEON without AES */
|
|
232
241
|
|
|
233
|
-
#elif
|
|
242
|
+
#elif HWY_ARCH_RISCV
|
|
234
243
|
// See HWY_ARCH_X86 above for details.
|
|
235
244
|
#define HWY_MAX_DYNAMIC_TARGETS 9
|
|
236
245
|
#define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_RVV
|
|
@@ -245,20 +254,20 @@ static inline HWY_MAYBE_UNUSED const char* TargetName(int64_t target) {
|
|
|
245
254
|
HWY_CHOOSE_RVV(func_name), /* RVV */ \
|
|
246
255
|
nullptr /* reserved */
|
|
247
256
|
|
|
248
|
-
#elif HWY_ARCH_PPC
|
|
257
|
+
#elif HWY_ARCH_PPC || HWY_ARCH_S390X
|
|
249
258
|
// See HWY_ARCH_X86 above for details.
|
|
250
259
|
#define HWY_MAX_DYNAMIC_TARGETS 9
|
|
251
260
|
#define HWY_HIGHEST_TARGET_BIT HWY_HIGHEST_TARGET_BIT_PPC
|
|
252
|
-
#define HWY_CHOOSE_TARGET_LIST(func_name)
|
|
253
|
-
nullptr, /* reserved */
|
|
254
|
-
nullptr, /* reserved */
|
|
255
|
-
nullptr, /* reserved */
|
|
256
|
-
nullptr, /* reserved */
|
|
257
|
-
HWY_CHOOSE_PPC10(func_name), /* PPC10 */
|
|
258
|
-
HWY_CHOOSE_PPC9(func_name), /* PPC9 */
|
|
259
|
-
HWY_CHOOSE_PPC8(func_name), /* PPC8 */
|
|
260
|
-
|
|
261
|
-
|
|
261
|
+
#define HWY_CHOOSE_TARGET_LIST(func_name) \
|
|
262
|
+
nullptr, /* reserved */ \
|
|
263
|
+
nullptr, /* reserved */ \
|
|
264
|
+
nullptr, /* reserved */ \
|
|
265
|
+
nullptr, /* reserved */ \
|
|
266
|
+
HWY_CHOOSE_PPC10(func_name), /* PPC10 */ \
|
|
267
|
+
HWY_CHOOSE_PPC9(func_name), /* PPC9 */ \
|
|
268
|
+
HWY_CHOOSE_PPC8(func_name), /* PPC8 */ \
|
|
269
|
+
HWY_CHOOSE_Z15(func_name), /* Z15 */ \
|
|
270
|
+
HWY_CHOOSE_Z14(func_name) /* Z14 */
|
|
262
271
|
|
|
263
272
|
#elif HWY_ARCH_WASM
|
|
264
273
|
// See HWY_ARCH_X86 above for details.
|
|
@@ -316,8 +325,7 @@ struct ChosenTarget {
|
|
|
316
325
|
}
|
|
317
326
|
|
|
318
327
|
private:
|
|
319
|
-
|
|
320
|
-
#if HWY_ARCH_RVV || defined(HWY_NO_LIBCXX)
|
|
328
|
+
#if defined(HWY_NO_LIBCXX)
|
|
321
329
|
int64_t LoadMask() const { return mask_; }
|
|
322
330
|
void StoreMask(int64_t mask) { mask_ = mask; }
|
|
323
331
|
|
|
@@ -327,7 +335,7 @@ struct ChosenTarget {
|
|
|
327
335
|
void StoreMask(int64_t mask) { mask_.store(mask); }
|
|
328
336
|
|
|
329
337
|
std::atomic<int64_t> mask_{1}; // Initialized to 1 so GetIndex() returns 0.
|
|
330
|
-
#endif //
|
|
338
|
+
#endif // HWY_ARCH_RISCV
|
|
331
339
|
};
|
|
332
340
|
|
|
333
341
|
// For internal use (e.g. by FunctionCache and DisableTargets).
|
package/include/hwy/timer-inl.h
CHANGED
|
@@ -24,7 +24,6 @@
|
|
|
24
24
|
#endif
|
|
25
25
|
|
|
26
26
|
#include "hwy/highway.h"
|
|
27
|
-
#include "hwy/timer.h"
|
|
28
27
|
|
|
29
28
|
#if defined(_WIN32) || defined(_WIN64)
|
|
30
29
|
#ifndef NOMINMAX
|
|
@@ -50,6 +49,7 @@
|
|
|
50
49
|
#include <intrin.h>
|
|
51
50
|
#endif
|
|
52
51
|
|
|
52
|
+
#include <stdint.h>
|
|
53
53
|
#include <time.h> // clock_gettime
|
|
54
54
|
|
|
55
55
|
HWY_BEFORE_NAMESPACE();
|
|
@@ -139,8 +139,8 @@ inline Ticks Start() {
|
|
|
139
139
|
// "memory" avoids reordering. rdx = TSC >> 32.
|
|
140
140
|
// "cc" = flags modified by SHL.
|
|
141
141
|
: "rdx", "memory", "cc");
|
|
142
|
-
#elif
|
|
143
|
-
asm volatile("rdtime %0" : "=r"(t));
|
|
142
|
+
#elif HWY_ARCH_RISCV
|
|
143
|
+
asm volatile("fence; rdtime %0" : "=r"(t));
|
|
144
144
|
#elif defined(_WIN32) || defined(_WIN64)
|
|
145
145
|
LARGE_INTEGER counter;
|
|
146
146
|
(void)QueryPerformanceCounter(&counter);
|
package/include/hwy/timer.h
CHANGED
|
@@ -36,7 +36,7 @@ HWY_DLLEXPORT double Now();
|
|
|
36
36
|
|
|
37
37
|
// Returns whether it is safe to call timer::Stop without executing an illegal
|
|
38
38
|
// instruction; if false, fills cpu100 (a pointer to a 100 character buffer)
|
|
39
|
-
//
|
|
39
|
+
// via GetCpuString().
|
|
40
40
|
HWY_DLLEXPORT bool HaveTimerStop(char* cpu100);
|
|
41
41
|
|
|
42
42
|
// Returns tick rate, useful for converting timer::Ticks to seconds. Invariant
|
|
@@ -49,7 +49,22 @@ HWY_DLLEXPORT double InvariantTicksPerSecond();
|
|
|
49
49
|
// This call is expensive, callers should cache the result.
|
|
50
50
|
HWY_DLLEXPORT uint64_t TimerResolution();
|
|
51
51
|
|
|
52
|
+
// Returns false if no detailed description is available, otherwise fills
|
|
53
|
+
// `cpu100` with up to 100 characters (including \0) identifying the CPU model.
|
|
54
|
+
HWY_DLLEXPORT bool GetCpuString(char* cpu100);
|
|
55
|
+
|
|
52
56
|
} // namespace platform
|
|
57
|
+
|
|
58
|
+
struct Timestamp {
|
|
59
|
+
Timestamp() { t = platform::Now(); }
|
|
60
|
+
double t;
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
static inline double SecondsSince(const Timestamp& t0) {
|
|
64
|
+
const Timestamp t1;
|
|
65
|
+
return t1.t - t0.t;
|
|
66
|
+
}
|
|
67
|
+
|
|
53
68
|
} // namespace hwy
|
|
54
69
|
|
|
55
70
|
#endif // HIGHWAY_HWY_TIMER_H_
|
package/include/libheif/heif.h
CHANGED
|
@@ -229,6 +229,23 @@ enum heif_suberror_code
|
|
|
229
229
|
// Invalid specification of region item
|
|
230
230
|
heif_suberror_Invalid_region_data = 136,
|
|
231
231
|
|
|
232
|
+
// Image has no ispe property
|
|
233
|
+
heif_suberror_No_ispe_property = 137,
|
|
234
|
+
|
|
235
|
+
heif_suberror_Camera_intrinsic_matrix_undefined = 138,
|
|
236
|
+
|
|
237
|
+
heif_suberror_Camera_extrinsic_matrix_undefined = 139,
|
|
238
|
+
|
|
239
|
+
// Invalid JPEG 2000 codestream - usually a missing marker
|
|
240
|
+
heif_suberror_Invalid_J2K_codestream = 140,
|
|
241
|
+
|
|
242
|
+
heif_suberror_No_vvcC_box = 141,
|
|
243
|
+
|
|
244
|
+
// icbr is only needed in some situations, this error is for those cases
|
|
245
|
+
heif_suberror_No_icbr_box = 142,
|
|
246
|
+
|
|
247
|
+
// Decompressing generic compression or header compression data failed (e.g. bitstream corruption)
|
|
248
|
+
heif_suberror_Decompression_invalid_data = 150,
|
|
232
249
|
|
|
233
250
|
// --- Memory_allocation_error ---
|
|
234
251
|
|
|
@@ -237,6 +254,9 @@ enum heif_suberror_code
|
|
|
237
254
|
// security limits further.
|
|
238
255
|
heif_suberror_Security_limit_exceeded = 1000,
|
|
239
256
|
|
|
257
|
+
// There was an error from the underlying compression / decompression library.
|
|
258
|
+
// One possibility is lack of resources (e.g. memory).
|
|
259
|
+
heif_suberror_Compression_initialisation_error = 1001,
|
|
240
260
|
|
|
241
261
|
// --- Usage_error ---
|
|
242
262
|
|
|
@@ -285,6 +305,8 @@ enum heif_suberror_code
|
|
|
285
305
|
|
|
286
306
|
heif_suberror_Unsupported_header_compression_method = 3005,
|
|
287
307
|
|
|
308
|
+
// Generically compressed data used an unsupported compression method
|
|
309
|
+
heif_suberror_Unsupported_generic_compression_method = 3006,
|
|
288
310
|
|
|
289
311
|
// --- Encoder_plugin_error ---
|
|
290
312
|
|
|
@@ -304,9 +326,10 @@ enum heif_suberror_code
|
|
|
304
326
|
|
|
305
327
|
// --- Plugin loading error ---
|
|
306
328
|
|
|
307
|
-
heif_suberror_Plugin_loading_error = 6000,
|
|
308
|
-
heif_suberror_Plugin_is_not_loaded = 6001,
|
|
309
|
-
heif_suberror_Cannot_read_plugin_directory = 6002 // error while scanning the directory for plugins
|
|
329
|
+
heif_suberror_Plugin_loading_error = 6000, // a specific plugin file cannot be loaded
|
|
330
|
+
heif_suberror_Plugin_is_not_loaded = 6001, // trying to remove a plugin that is not loaded
|
|
331
|
+
heif_suberror_Cannot_read_plugin_directory = 6002, // error while scanning the directory for plugins
|
|
332
|
+
heif_suberror_No_matching_decoder_installed = 6003 // no decoder found for that compression format
|
|
310
333
|
};
|
|
311
334
|
|
|
312
335
|
|
|
@@ -408,7 +431,14 @@ enum heif_compression_format
|
|
|
408
431
|
*
|
|
409
432
|
* See ISO/IEC 23008-12:2022 Section 6.10.2
|
|
410
433
|
*/
|
|
411
|
-
heif_compression_mask = 9
|
|
434
|
+
heif_compression_mask = 9,
|
|
435
|
+
/**
|
|
436
|
+
* High Throughput JPEG 2000 (HT-J2K) compression.
|
|
437
|
+
*
|
|
438
|
+
* The encapsulation of HT-J2K is specified in ISO/IEC 15444-16:2021.
|
|
439
|
+
* The core encoding is defined in ISO/IEC 15444-15, or ITU-T T.814.
|
|
440
|
+
*/
|
|
441
|
+
heif_compression_HTJ2K = 10
|
|
412
442
|
};
|
|
413
443
|
|
|
414
444
|
enum heif_chroma
|
|
@@ -564,6 +594,18 @@ enum heif_filetype_result
|
|
|
564
594
|
LIBHEIF_API
|
|
565
595
|
enum heif_filetype_result heif_check_filetype(const uint8_t* data, int len);
|
|
566
596
|
|
|
597
|
+
/**
|
|
598
|
+
* Check the filetype box content for a supported file type.
|
|
599
|
+
*
|
|
600
|
+
* <p>The data is assumed to start from the start of the `ftyp` box.
|
|
601
|
+
*
|
|
602
|
+
* <p>This function checks the compatible brands.
|
|
603
|
+
*
|
|
604
|
+
* @returns heif_error_ok if a supported brand is found, or other error if not.
|
|
605
|
+
*/
|
|
606
|
+
LIBHEIF_API
|
|
607
|
+
struct heif_error heif_has_compatible_filetype(const uint8_t* data, int len);
|
|
608
|
+
|
|
567
609
|
LIBHEIF_API
|
|
568
610
|
int heif_check_jpeg_filetype(const uint8_t* data, int len);
|
|
569
611
|
|
|
@@ -1368,6 +1410,44 @@ struct heif_error heif_image_get_nclx_color_profile(const struct heif_image* ima
|
|
|
1368
1410
|
struct heif_color_profile_nclx** out_data);
|
|
1369
1411
|
|
|
1370
1412
|
|
|
1413
|
+
// ------------------------- intrinsic and extrinsic matrices -------------------------
|
|
1414
|
+
|
|
1415
|
+
struct heif_camera_intrinsic_matrix
|
|
1416
|
+
{
|
|
1417
|
+
double focal_length_x;
|
|
1418
|
+
double focal_length_y;
|
|
1419
|
+
double principal_point_x;
|
|
1420
|
+
double principal_point_y;
|
|
1421
|
+
double skew;
|
|
1422
|
+
};
|
|
1423
|
+
|
|
1424
|
+
|
|
1425
|
+
LIBHEIF_API
|
|
1426
|
+
int heif_image_handle_has_camera_intrinsic_matrix(const struct heif_image_handle* handle);
|
|
1427
|
+
|
|
1428
|
+
LIBHEIF_API
|
|
1429
|
+
struct heif_error heif_image_handle_get_camera_intrinsic_matrix(const struct heif_image_handle* handle,
|
|
1430
|
+
struct heif_camera_intrinsic_matrix* out_matrix);
|
|
1431
|
+
|
|
1432
|
+
|
|
1433
|
+
struct heif_camera_extrinsic_matrix;
|
|
1434
|
+
|
|
1435
|
+
LIBHEIF_API
|
|
1436
|
+
int heif_image_handle_has_camera_extrinsic_matrix(const struct heif_image_handle* handle);
|
|
1437
|
+
|
|
1438
|
+
LIBHEIF_API
|
|
1439
|
+
struct heif_error heif_image_handle_get_camera_extrinsic_matrix(const struct heif_image_handle* handle,
|
|
1440
|
+
struct heif_camera_extrinsic_matrix** out_matrix);
|
|
1441
|
+
|
|
1442
|
+
LIBHEIF_API
|
|
1443
|
+
void heif_camera_extrinsic_matrix_release(struct heif_camera_extrinsic_matrix*);
|
|
1444
|
+
|
|
1445
|
+
LIBHEIF_API
|
|
1446
|
+
struct heif_error heif_camera_extrinsic_matrix_get_rotation_matrix(const struct heif_camera_extrinsic_matrix*,
|
|
1447
|
+
double* out_matrix_row_major);
|
|
1448
|
+
|
|
1449
|
+
|
|
1450
|
+
|
|
1371
1451
|
// ========================= heif_image =========================
|
|
1372
1452
|
|
|
1373
1453
|
// An heif_image contains a decoded pixel image in various colorspaces, chroma formats,
|
|
@@ -1711,6 +1791,10 @@ struct heif_error heif_context_write(struct heif_context*,
|
|
|
1711
1791
|
struct heif_writer* writer,
|
|
1712
1792
|
void* userdata);
|
|
1713
1793
|
|
|
1794
|
+
// Add a compatible brand that is now added automatically by libheif when encoding images (e.g. some application brands like 'geo1').
|
|
1795
|
+
LIBHEIF_API
|
|
1796
|
+
void heif_context_add_compatible_brand(struct heif_context* ctx,
|
|
1797
|
+
heif_brand2 compatible_brand);
|
|
1714
1798
|
|
|
1715
1799
|
// ----- encoder -----
|
|
1716
1800
|
|
|
@@ -2016,6 +2100,11 @@ struct heif_encoding_options
|
|
|
2016
2100
|
// version 6 options
|
|
2017
2101
|
|
|
2018
2102
|
struct heif_color_conversion_options color_conversion_options;
|
|
2103
|
+
|
|
2104
|
+
// version 7 options
|
|
2105
|
+
|
|
2106
|
+
// Set this to true to use compressed form of uncC where possible
|
|
2107
|
+
uint8_t prefer_uncC_short_form;
|
|
2019
2108
|
};
|
|
2020
2109
|
|
|
2021
2110
|
LIBHEIF_API
|
|
@@ -2037,6 +2126,27 @@ struct heif_error heif_context_encode_image(struct heif_context*,
|
|
|
2037
2126
|
const struct heif_encoding_options* options,
|
|
2038
2127
|
struct heif_image_handle** out_image_handle);
|
|
2039
2128
|
|
|
2129
|
+
/**
|
|
2130
|
+
* @brief Encodes an array of images into a grid.
|
|
2131
|
+
*
|
|
2132
|
+
* @param ctx The file context
|
|
2133
|
+
* @param tiles User allocated array of images that will form the grid.
|
|
2134
|
+
* @param rows The number of rows in the grid.
|
|
2135
|
+
* @param columns The number of columns in the grid.
|
|
2136
|
+
* @param encoder Defines the encoder to use. See heif_context_get_encoder_for_format()
|
|
2137
|
+
* @param input_options Optional, may be nullptr.
|
|
2138
|
+
* @param out_image_handle Returns a handle to the grid. The caller is responsible for freeing it.
|
|
2139
|
+
* @return Returns an error if ctx, tiles, or encoder is nullptr. If rows or columns is 0.
|
|
2140
|
+
*/
|
|
2141
|
+
LIBHEIF_API
|
|
2142
|
+
struct heif_error heif_context_encode_grid(struct heif_context* ctx,
|
|
2143
|
+
struct heif_image** tiles,
|
|
2144
|
+
uint16_t rows,
|
|
2145
|
+
uint16_t columns,
|
|
2146
|
+
struct heif_encoder* encoder,
|
|
2147
|
+
const struct heif_encoding_options* input_options,
|
|
2148
|
+
struct heif_image_handle** out_image_handle);
|
|
2149
|
+
|
|
2040
2150
|
LIBHEIF_API
|
|
2041
2151
|
struct heif_error heif_context_set_primary_image(struct heif_context*,
|
|
2042
2152
|
struct heif_image_handle* image_handle);
|
|
@@ -2059,9 +2169,12 @@ struct heif_error heif_context_encode_thumbnail(struct heif_context*,
|
|
|
2059
2169
|
|
|
2060
2170
|
enum heif_metadata_compression
|
|
2061
2171
|
{
|
|
2062
|
-
heif_metadata_compression_off,
|
|
2063
|
-
heif_metadata_compression_auto,
|
|
2064
|
-
|
|
2172
|
+
heif_metadata_compression_off = 0,
|
|
2173
|
+
heif_metadata_compression_auto = 1,
|
|
2174
|
+
heif_metadata_compression_unknown = 2, // only used when reading unknown method from input file
|
|
2175
|
+
heif_metadata_compression_deflate = 3,
|
|
2176
|
+
heif_metadata_compression_zlib = 4, // do not use for header data
|
|
2177
|
+
heif_metadata_compression_brotli = 5
|
|
2065
2178
|
};
|
|
2066
2179
|
|
|
2067
2180
|
// Assign 'thumbnail_image' as the thumbnail image of 'master_image'.
|
|
@@ -2099,22 +2212,64 @@ struct heif_error heif_context_add_generic_metadata(struct heif_context* ctx,
|
|
|
2099
2212
|
const void* data, int size,
|
|
2100
2213
|
const char* item_type, const char* content_type);
|
|
2101
2214
|
|
|
2215
|
+
// Add generic metadata with item_type "uri ". Items with this type do not have a content_type, but
|
|
2216
|
+
// an item_uri_type and they have no content_encoding (they are always stored uncompressed).
|
|
2217
|
+
LIBHEIF_API
|
|
2218
|
+
struct heif_error heif_context_add_generic_uri_metadata(struct heif_context* ctx,
|
|
2219
|
+
const struct heif_image_handle* image_handle,
|
|
2220
|
+
const void* data, int size,
|
|
2221
|
+
const char* item_uri_type,
|
|
2222
|
+
heif_item_id* out_item_id);
|
|
2223
|
+
|
|
2102
2224
|
// --- heif_image allocation
|
|
2103
2225
|
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2226
|
+
/**
|
|
2227
|
+
* Create a new image of the specified resolution and colorspace.
|
|
2228
|
+
*
|
|
2229
|
+
* <p>This does not allocate memory for the image data. Use {@link heif_image_add_plane} to
|
|
2230
|
+
* add the corresponding planes to match the specified {@code colorspace} and {@code chroma}.
|
|
2231
|
+
*
|
|
2232
|
+
* @param width the width of the image in pixels
|
|
2233
|
+
* @param height the height of the image in pixels
|
|
2234
|
+
* @param colorspace the colorspace of the image
|
|
2235
|
+
* @param chroma the chroma of the image
|
|
2236
|
+
* @param out_image pointer to pointer of the resulting image
|
|
2237
|
+
* @return whether the creation succeeded or there was an error
|
|
2238
|
+
*/
|
|
2107
2239
|
LIBHEIF_API
|
|
2108
2240
|
struct heif_error heif_image_create(int width, int height,
|
|
2109
2241
|
enum heif_colorspace colorspace,
|
|
2110
2242
|
enum heif_chroma chroma,
|
|
2111
2243
|
struct heif_image** out_image);
|
|
2112
2244
|
|
|
2113
|
-
|
|
2114
|
-
|
|
2115
|
-
|
|
2116
|
-
|
|
2117
|
-
|
|
2245
|
+
/**
|
|
2246
|
+
* Add an image plane to the image.
|
|
2247
|
+
*
|
|
2248
|
+
* <p>The image plane needs to match the colorspace and chroma of the image. Note
|
|
2249
|
+
* that this does not need to be a single "planar" format - interleaved pixel channels
|
|
2250
|
+
* can also be used if the chroma is interleaved.
|
|
2251
|
+
*
|
|
2252
|
+
* <p>The indicated bit_depth corresponds to the bit depth per channel. For example,
|
|
2253
|
+
* with an interleaved format like RRGGBB where each color is represented by 10 bits,
|
|
2254
|
+
* the {@code bit_depth} would be {@code 10} rather than {@code 30}.
|
|
2255
|
+
*
|
|
2256
|
+
* <p>For backward compatibility, one can also specify 24bits for RGB and 32bits for RGBA,
|
|
2257
|
+
* instead of the preferred 8 bits. However, this use is deprecated.
|
|
2258
|
+
*
|
|
2259
|
+
* @param image the parent image to add the channel plane to
|
|
2260
|
+
* @param channel the channel of the plane to add
|
|
2261
|
+
* @param width the width of the plane
|
|
2262
|
+
* @param height the height of the plane
|
|
2263
|
+
* @param bit_depth the bit depth per color channel
|
|
2264
|
+
* @return whether the addition succeeded or there was an error
|
|
2265
|
+
*
|
|
2266
|
+
* @note The width and height are usually the same as the parent image, but can be
|
|
2267
|
+
* less for subsampling.
|
|
2268
|
+
*
|
|
2269
|
+
* @note The specified width can differ from the row stride of the resulting image plane.
|
|
2270
|
+
* Always use the result of {@link heif_image_get_plane} or {@link heif_image_get_plane_readonly}
|
|
2271
|
+
* to determine row stride.
|
|
2272
|
+
*/
|
|
2118
2273
|
LIBHEIF_API
|
|
2119
2274
|
struct heif_error heif_image_add_plane(struct heif_image* image,
|
|
2120
2275
|
enum heif_channel channel,
|