@img/sharp-libvips-dev 1.0.2 → 1.0.4
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/freetype2/freetype/config/ftoption.h +1 -1
- package/include/fribidi/fribidi-config.h +2 -2
- package/include/fribidi/fribidi-unicode-version.h +3 -3
- package/include/glib-2.0/gio/gappinfo.h +40 -25
- 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/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/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/gqsort.h +8 -1
- package/include/glib-2.0/glib/gstrfuncs.h +0 -12
- package/include/glib-2.0/glib/gstrvbuilder.h +3 -0
- 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/gmodule/gmodule-visibility.h +34 -0
- package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
- 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 +48 -1
- package/include/hwy/base.h +235 -34
- package/include/hwy/detect_compiler_arch.h +84 -10
- package/include/hwy/detect_targets.h +95 -29
- package/include/hwy/foreach_target.h +12 -1
- package/include/hwy/highway.h +205 -50
- package/include/hwy/ops/arm_neon-inl.h +841 -99
- package/include/hwy/ops/arm_sve-inl.h +413 -141
- package/include/hwy/ops/emu128-inl.h +373 -360
- package/include/hwy/ops/generic_ops-inl.h +804 -401
- package/include/hwy/ops/inside-inl.h +691 -0
- package/include/hwy/ops/ppc_vsx-inl.h +456 -166
- package/include/hwy/ops/rvv-inl.h +537 -249
- package/include/hwy/ops/scalar-inl.h +169 -79
- package/include/hwy/ops/set_macros-inl.h +106 -18
- package/include/hwy/ops/shared-inl.h +23 -0
- package/include/hwy/ops/wasm_128-inl.h +130 -108
- package/include/hwy/ops/x86_128-inl.h +1892 -577
- package/include/hwy/ops/x86_256-inl.h +625 -184
- package/include/hwy/ops/x86_512-inl.h +733 -131
- package/include/hwy/targets.h +22 -21
- package/include/hwy/timer-inl.h +3 -3
- package/include/hwy/timer.h +5 -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/pnglibconf.h +1 -1
- 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 +61 -55
- 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 -4
- 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 +3 -3
- 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/pnglibconf.h +1 -1
- package/include/vips/util.h +1 -2
- 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 +14 -15
package/include/webp/mux.h
CHANGED
|
@@ -16,12 +16,13 @@
|
|
|
16
16
|
#define WEBP_WEBP_MUX_H_
|
|
17
17
|
|
|
18
18
|
#include "./mux_types.h"
|
|
19
|
+
#include "./types.h"
|
|
19
20
|
|
|
20
21
|
#ifdef __cplusplus
|
|
21
22
|
extern "C" {
|
|
22
23
|
#endif
|
|
23
24
|
|
|
24
|
-
#define WEBP_MUX_ABI_VERSION
|
|
25
|
+
#define WEBP_MUX_ABI_VERSION 0x0109 // MAJOR(8b) + MINOR(8b)
|
|
25
26
|
|
|
26
27
|
//------------------------------------------------------------------------------
|
|
27
28
|
// Mux API
|
|
@@ -70,7 +71,7 @@ typedef struct WebPMuxAnimParams WebPMuxAnimParams;
|
|
|
70
71
|
typedef struct WebPAnimEncoderOptions WebPAnimEncoderOptions;
|
|
71
72
|
|
|
72
73
|
// Error codes
|
|
73
|
-
typedef enum WebPMuxError {
|
|
74
|
+
typedef enum WEBP_NODISCARD WebPMuxError {
|
|
74
75
|
WEBP_MUX_OK = 1,
|
|
75
76
|
WEBP_MUX_NOT_FOUND = 0,
|
|
76
77
|
WEBP_MUX_INVALID_ARGUMENT = -1,
|
|
@@ -104,13 +105,13 @@ WEBP_EXTERN int WebPGetMuxVersion(void);
|
|
|
104
105
|
// Life of a Mux object
|
|
105
106
|
|
|
106
107
|
// Internal, version-checked, entry point
|
|
107
|
-
WEBP_EXTERN WebPMux* WebPNewInternal(int);
|
|
108
|
+
WEBP_NODISCARD WEBP_EXTERN WebPMux* WebPNewInternal(int);
|
|
108
109
|
|
|
109
110
|
// Creates an empty mux object.
|
|
110
111
|
// Returns:
|
|
111
112
|
// A pointer to the newly created empty mux object.
|
|
112
113
|
// Or NULL in case of memory error.
|
|
113
|
-
static WEBP_INLINE WebPMux* WebPMuxNew(void) {
|
|
114
|
+
WEBP_NODISCARD static WEBP_INLINE WebPMux* WebPMuxNew(void) {
|
|
114
115
|
return WebPNewInternal(WEBP_MUX_ABI_VERSION);
|
|
115
116
|
}
|
|
116
117
|
|
|
@@ -123,18 +124,21 @@ WEBP_EXTERN void WebPMuxDelete(WebPMux* mux);
|
|
|
123
124
|
// Mux creation.
|
|
124
125
|
|
|
125
126
|
// Internal, version-checked, entry point
|
|
126
|
-
WEBP_EXTERN WebPMux* WebPMuxCreateInternal(const WebPData*, int,
|
|
127
|
+
WEBP_NODISCARD WEBP_EXTERN WebPMux* WebPMuxCreateInternal(const WebPData*, int,
|
|
128
|
+
int);
|
|
127
129
|
|
|
128
130
|
// Creates a mux object from raw data given in WebP RIFF format.
|
|
129
131
|
// Parameters:
|
|
130
132
|
// bitstream - (in) the bitstream data in WebP RIFF format
|
|
131
133
|
// copy_data - (in) value 1 indicates given data WILL be copied to the mux
|
|
132
|
-
// object and value 0 indicates data will NOT be copied.
|
|
134
|
+
// object and value 0 indicates data will NOT be copied. If the
|
|
135
|
+
// data is not copied, it must exist for the lifetime of the
|
|
136
|
+
// mux object.
|
|
133
137
|
// Returns:
|
|
134
138
|
// A pointer to the mux object created from given data - on success.
|
|
135
139
|
// NULL - In case of invalid data or memory error.
|
|
136
|
-
static WEBP_INLINE WebPMux* WebPMuxCreate(
|
|
137
|
-
|
|
140
|
+
WEBP_NODISCARD static WEBP_INLINE WebPMux* WebPMuxCreate(
|
|
141
|
+
const WebPData* bitstream, int copy_data) {
|
|
138
142
|
return WebPMuxCreateInternal(bitstream, copy_data, WEBP_MUX_ABI_VERSION);
|
|
139
143
|
}
|
|
140
144
|
|
|
@@ -154,7 +158,9 @@ static WEBP_INLINE WebPMux* WebPMuxCreate(const WebPData* bitstream,
|
|
|
154
158
|
// e.g., "ICCP", "XMP ", "EXIF" etc.
|
|
155
159
|
// chunk_data - (in) the chunk data to be added
|
|
156
160
|
// copy_data - (in) value 1 indicates given data WILL be copied to the mux
|
|
157
|
-
// object and value 0 indicates data will NOT be copied.
|
|
161
|
+
// object and value 0 indicates data will NOT be copied. If the
|
|
162
|
+
// data is not copied, it must exist until a call to
|
|
163
|
+
// WebPMuxAssemble() is made.
|
|
158
164
|
// Returns:
|
|
159
165
|
// WEBP_MUX_INVALID_ARGUMENT - if mux, fourcc or chunk_data is NULL
|
|
160
166
|
// or if fourcc corresponds to an image chunk.
|
|
@@ -217,7 +223,9 @@ struct WebPMuxFrameInfo {
|
|
|
217
223
|
// bitstream - (in) can be a raw VP8/VP8L bitstream or a single-image
|
|
218
224
|
// WebP file (non-animated)
|
|
219
225
|
// copy_data - (in) value 1 indicates given data WILL be copied to the mux
|
|
220
|
-
// object and value 0 indicates data will NOT be copied.
|
|
226
|
+
// object and value 0 indicates data will NOT be copied. If the
|
|
227
|
+
// data is not copied, it must exist until a call to
|
|
228
|
+
// WebPMuxAssemble() is made.
|
|
221
229
|
// Returns:
|
|
222
230
|
// WEBP_MUX_INVALID_ARGUMENT - if mux is NULL or bitstream is NULL.
|
|
223
231
|
// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
|
|
@@ -235,7 +243,9 @@ WEBP_EXTERN WebPMuxError WebPMuxSetImage(
|
|
|
235
243
|
// mux - (in/out) object to which the frame is to be added
|
|
236
244
|
// frame - (in) frame data.
|
|
237
245
|
// copy_data - (in) value 1 indicates given data WILL be copied to the mux
|
|
238
|
-
// object and value 0 indicates data will NOT be copied.
|
|
246
|
+
// object and value 0 indicates data will NOT be copied. If the
|
|
247
|
+
// data is not copied, it must exist until a call to
|
|
248
|
+
// WebPMuxAssemble() is made.
|
|
239
249
|
// Returns:
|
|
240
250
|
// WEBP_MUX_INVALID_ARGUMENT - if mux or frame is NULL
|
|
241
251
|
// or if content of 'frame' is invalid.
|
|
@@ -449,7 +459,7 @@ WEBP_EXTERN int WebPAnimEncoderOptionsInitInternal(
|
|
|
449
459
|
// structure before modification. Returns false in case of version mismatch.
|
|
450
460
|
// WebPAnimEncoderOptionsInit() must have succeeded before using the
|
|
451
461
|
// 'enc_options' object.
|
|
452
|
-
static WEBP_INLINE int WebPAnimEncoderOptionsInit(
|
|
462
|
+
WEBP_NODISCARD static WEBP_INLINE int WebPAnimEncoderOptionsInit(
|
|
453
463
|
WebPAnimEncoderOptions* enc_options) {
|
|
454
464
|
return WebPAnimEncoderOptionsInitInternal(enc_options, WEBP_MUX_ABI_VERSION);
|
|
455
465
|
}
|
|
@@ -490,7 +500,7 @@ static WEBP_INLINE WebPAnimEncoder* WebPAnimEncoderNew(
|
|
|
490
500
|
// Returns:
|
|
491
501
|
// On error, returns false and frame->error_code is set appropriately.
|
|
492
502
|
// Otherwise, returns true.
|
|
493
|
-
WEBP_EXTERN int WebPAnimEncoderAdd(
|
|
503
|
+
WEBP_NODISCARD WEBP_EXTERN int WebPAnimEncoderAdd(
|
|
494
504
|
WebPAnimEncoder* enc, struct WebPPicture* frame, int timestamp_ms,
|
|
495
505
|
const struct WebPConfig* config);
|
|
496
506
|
|
|
@@ -503,8 +513,8 @@ WEBP_EXTERN int WebPAnimEncoderAdd(
|
|
|
503
513
|
// webp_data - (out) generated WebP bitstream.
|
|
504
514
|
// Returns:
|
|
505
515
|
// True on success.
|
|
506
|
-
WEBP_EXTERN int WebPAnimEncoderAssemble(WebPAnimEncoder* enc,
|
|
507
|
-
|
|
516
|
+
WEBP_NODISCARD WEBP_EXTERN int WebPAnimEncoderAssemble(WebPAnimEncoder* enc,
|
|
517
|
+
WebPData* webp_data);
|
|
508
518
|
|
|
509
519
|
// Get error string corresponding to the most recent call using 'enc'. The
|
|
510
520
|
// returned string is owned by 'enc' and is valid only until the next call to
|
|
@@ -521,6 +531,57 @@ WEBP_EXTERN const char* WebPAnimEncoderGetError(WebPAnimEncoder* enc);
|
|
|
521
531
|
// enc - (in/out) object to be deleted
|
|
522
532
|
WEBP_EXTERN void WebPAnimEncoderDelete(WebPAnimEncoder* enc);
|
|
523
533
|
|
|
534
|
+
//------------------------------------------------------------------------------
|
|
535
|
+
// Non-image chunks.
|
|
536
|
+
|
|
537
|
+
// Note: Only non-image related chunks should be managed through chunk APIs.
|
|
538
|
+
// (Image related chunks are: "ANMF", "VP8 ", "VP8L" and "ALPH").
|
|
539
|
+
|
|
540
|
+
// Adds a chunk with id 'fourcc' and data 'chunk_data' in the enc object.
|
|
541
|
+
// Any existing chunk(s) with the same id will be removed.
|
|
542
|
+
// Parameters:
|
|
543
|
+
// enc - (in/out) object to which the chunk is to be added
|
|
544
|
+
// fourcc - (in) a character array containing the fourcc of the given chunk;
|
|
545
|
+
// e.g., "ICCP", "XMP ", "EXIF", etc.
|
|
546
|
+
// chunk_data - (in) the chunk data to be added
|
|
547
|
+
// copy_data - (in) value 1 indicates given data WILL be copied to the enc
|
|
548
|
+
// object and value 0 indicates data will NOT be copied. If the
|
|
549
|
+
// data is not copied, it must exist until a call to
|
|
550
|
+
// WebPAnimEncoderAssemble() is made.
|
|
551
|
+
// Returns:
|
|
552
|
+
// WEBP_MUX_INVALID_ARGUMENT - if enc, fourcc or chunk_data is NULL.
|
|
553
|
+
// WEBP_MUX_MEMORY_ERROR - on memory allocation error.
|
|
554
|
+
// WEBP_MUX_OK - on success.
|
|
555
|
+
WEBP_EXTERN WebPMuxError WebPAnimEncoderSetChunk(
|
|
556
|
+
WebPAnimEncoder* enc, const char fourcc[4], const WebPData* chunk_data,
|
|
557
|
+
int copy_data);
|
|
558
|
+
|
|
559
|
+
// Gets a reference to the data of the chunk with id 'fourcc' in the enc object.
|
|
560
|
+
// The caller should NOT free the returned data.
|
|
561
|
+
// Parameters:
|
|
562
|
+
// enc - (in) object from which the chunk data is to be fetched
|
|
563
|
+
// fourcc - (in) a character array containing the fourcc of the chunk;
|
|
564
|
+
// e.g., "ICCP", "XMP ", "EXIF", etc.
|
|
565
|
+
// chunk_data - (out) returned chunk data
|
|
566
|
+
// Returns:
|
|
567
|
+
// WEBP_MUX_INVALID_ARGUMENT - if enc, fourcc or chunk_data is NULL.
|
|
568
|
+
// WEBP_MUX_NOT_FOUND - If enc does not contain a chunk with the given id.
|
|
569
|
+
// WEBP_MUX_OK - on success.
|
|
570
|
+
WEBP_EXTERN WebPMuxError WebPAnimEncoderGetChunk(
|
|
571
|
+
const WebPAnimEncoder* enc, const char fourcc[4], WebPData* chunk_data);
|
|
572
|
+
|
|
573
|
+
// Deletes the chunk with the given 'fourcc' from the enc object.
|
|
574
|
+
// Parameters:
|
|
575
|
+
// enc - (in/out) object from which the chunk is to be deleted
|
|
576
|
+
// fourcc - (in) a character array containing the fourcc of the chunk;
|
|
577
|
+
// e.g., "ICCP", "XMP ", "EXIF", etc.
|
|
578
|
+
// Returns:
|
|
579
|
+
// WEBP_MUX_INVALID_ARGUMENT - if enc or fourcc is NULL.
|
|
580
|
+
// WEBP_MUX_NOT_FOUND - If enc does not contain a chunk with the given fourcc.
|
|
581
|
+
// WEBP_MUX_OK - on success.
|
|
582
|
+
WEBP_EXTERN WebPMuxError WebPAnimEncoderDeleteChunk(
|
|
583
|
+
WebPAnimEncoder* enc, const char fourcc[4]);
|
|
584
|
+
|
|
524
585
|
//------------------------------------------------------------------------------
|
|
525
586
|
|
|
526
587
|
#ifdef __cplusplus
|
package/include/webp/mux_types.h
CHANGED
|
@@ -79,7 +79,8 @@ static WEBP_INLINE void WebPDataClear(WebPData* webp_data) {
|
|
|
79
79
|
|
|
80
80
|
// Allocates necessary storage for 'dst' and copies the contents of 'src'.
|
|
81
81
|
// Returns true on success.
|
|
82
|
-
static WEBP_INLINE int WebPDataCopy(const WebPData* src,
|
|
82
|
+
WEBP_NODISCARD static WEBP_INLINE int WebPDataCopy(const WebPData* src,
|
|
83
|
+
WebPData* dst) {
|
|
83
84
|
if (src == NULL || dst == NULL) return 0;
|
|
84
85
|
WebPDataInit(dst);
|
|
85
86
|
if (src->bytes != NULL && src->size != 0) {
|
|
@@ -22,22 +22,37 @@ extern "C" {
|
|
|
22
22
|
#else
|
|
23
23
|
// This explicitly marks library functions and allows for changing the
|
|
24
24
|
// signature for e.g., Windows DLL builds.
|
|
25
|
-
#if defined(
|
|
26
|
-
#define SHARPYUV_EXTERN extern __attribute__((visibility("default")))
|
|
27
|
-
#else
|
|
28
|
-
#if defined(_MSC_VER) && defined(WEBP_DLL)
|
|
25
|
+
#if defined(_WIN32) && defined(WEBP_DLL)
|
|
29
26
|
#define SHARPYUV_EXTERN __declspec(dllexport)
|
|
27
|
+
#elif defined(__GNUC__) && __GNUC__ >= 4
|
|
28
|
+
#define SHARPYUV_EXTERN extern __attribute__((visibility("default")))
|
|
30
29
|
#else
|
|
31
30
|
#define SHARPYUV_EXTERN extern
|
|
32
|
-
#endif /*
|
|
33
|
-
#endif /* __GNUC__ >= 4 */
|
|
31
|
+
#endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
|
34
32
|
#endif /* WEBP_EXTERN */
|
|
35
33
|
#endif /* SHARPYUV_EXTERN */
|
|
36
34
|
|
|
35
|
+
#ifndef SHARPYUV_INLINE
|
|
36
|
+
#ifdef WEBP_INLINE
|
|
37
|
+
#define SHARPYUV_INLINE WEBP_INLINE
|
|
38
|
+
#else
|
|
39
|
+
#ifndef _MSC_VER
|
|
40
|
+
#if defined(__cplusplus) || !defined(__STRICT_ANSI__) || \
|
|
41
|
+
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L)
|
|
42
|
+
#define SHARPYUV_INLINE inline
|
|
43
|
+
#else
|
|
44
|
+
#define SHARPYUV_INLINE
|
|
45
|
+
#endif
|
|
46
|
+
#else
|
|
47
|
+
#define SHARPYUV_INLINE __forceinline
|
|
48
|
+
#endif /* _MSC_VER */
|
|
49
|
+
#endif /* WEBP_INLINE */
|
|
50
|
+
#endif /* SHARPYUV_INLINE */
|
|
51
|
+
|
|
37
52
|
// SharpYUV API version following the convention from semver.org
|
|
38
53
|
#define SHARPYUV_VERSION_MAJOR 0
|
|
39
|
-
#define SHARPYUV_VERSION_MINOR
|
|
40
|
-
#define SHARPYUV_VERSION_PATCH
|
|
54
|
+
#define SHARPYUV_VERSION_MINOR 4
|
|
55
|
+
#define SHARPYUV_VERSION_PATCH 0
|
|
41
56
|
// Version as a uint32_t. The major number is the high 8 bits.
|
|
42
57
|
// The minor number is the middle 8 bits. The patch number is the low 16 bits.
|
|
43
58
|
#define SHARPYUV_MAKE_VERSION(MAJOR, MINOR, PATCH) \
|
|
@@ -61,6 +76,33 @@ typedef struct {
|
|
|
61
76
|
int rgb_to_v[4];
|
|
62
77
|
} SharpYuvConversionMatrix;
|
|
63
78
|
|
|
79
|
+
typedef struct SharpYuvOptions SharpYuvOptions;
|
|
80
|
+
|
|
81
|
+
// Enums for transfer functions, as defined in H.273,
|
|
82
|
+
// https://www.itu.int/rec/T-REC-H.273-202107-I/en
|
|
83
|
+
typedef enum SharpYuvTransferFunctionType {
|
|
84
|
+
// 0 is reserved
|
|
85
|
+
kSharpYuvTransferFunctionBt709 = 1,
|
|
86
|
+
// 2 is unspecified
|
|
87
|
+
// 3 is reserved
|
|
88
|
+
kSharpYuvTransferFunctionBt470M = 4,
|
|
89
|
+
kSharpYuvTransferFunctionBt470Bg = 5,
|
|
90
|
+
kSharpYuvTransferFunctionBt601 = 6,
|
|
91
|
+
kSharpYuvTransferFunctionSmpte240 = 7,
|
|
92
|
+
kSharpYuvTransferFunctionLinear = 8,
|
|
93
|
+
kSharpYuvTransferFunctionLog100 = 9,
|
|
94
|
+
kSharpYuvTransferFunctionLog100_Sqrt10 = 10,
|
|
95
|
+
kSharpYuvTransferFunctionIec61966 = 11,
|
|
96
|
+
kSharpYuvTransferFunctionBt1361 = 12,
|
|
97
|
+
kSharpYuvTransferFunctionSrgb = 13,
|
|
98
|
+
kSharpYuvTransferFunctionBt2020_10Bit = 14,
|
|
99
|
+
kSharpYuvTransferFunctionBt2020_12Bit = 15,
|
|
100
|
+
kSharpYuvTransferFunctionSmpte2084 = 16, // PQ
|
|
101
|
+
kSharpYuvTransferFunctionSmpte428 = 17,
|
|
102
|
+
kSharpYuvTransferFunctionHlg = 18,
|
|
103
|
+
kSharpYuvTransferFunctionNum
|
|
104
|
+
} SharpYuvTransferFunctionType;
|
|
105
|
+
|
|
64
106
|
// Converts RGB to YUV420 using a downsampling algorithm that minimizes
|
|
65
107
|
// artefacts caused by chroma subsampling.
|
|
66
108
|
// This is slower than standard downsampling (averaging of 4 UV values).
|
|
@@ -85,6 +127,8 @@ typedef struct {
|
|
|
85
127
|
// adjacent pixels on the y, u and v channels. If yuv_bit_depth > 8, they
|
|
86
128
|
// should be multiples of 2.
|
|
87
129
|
// width, height: width and height of the image in pixels
|
|
130
|
+
// This function calls SharpYuvConvertWithOptions with a default transfer
|
|
131
|
+
// function of kSharpYuvTransferFunctionSrgb.
|
|
88
132
|
SHARPYUV_EXTERN int SharpYuvConvert(const void* r_ptr, const void* g_ptr,
|
|
89
133
|
const void* b_ptr, int rgb_step,
|
|
90
134
|
int rgb_stride, int rgb_bit_depth,
|
|
@@ -93,6 +137,31 @@ SHARPYUV_EXTERN int SharpYuvConvert(const void* r_ptr, const void* g_ptr,
|
|
|
93
137
|
int yuv_bit_depth, int width, int height,
|
|
94
138
|
const SharpYuvConversionMatrix* yuv_matrix);
|
|
95
139
|
|
|
140
|
+
struct SharpYuvOptions {
|
|
141
|
+
// This matrix cannot be NULL and can be initialized by
|
|
142
|
+
// SharpYuvComputeConversionMatrix.
|
|
143
|
+
const SharpYuvConversionMatrix* yuv_matrix;
|
|
144
|
+
SharpYuvTransferFunctionType transfer_type;
|
|
145
|
+
};
|
|
146
|
+
|
|
147
|
+
// Internal, version-checked, entry point
|
|
148
|
+
SHARPYUV_EXTERN int SharpYuvOptionsInitInternal(const SharpYuvConversionMatrix*,
|
|
149
|
+
SharpYuvOptions*, int);
|
|
150
|
+
|
|
151
|
+
// Should always be called, to initialize a fresh SharpYuvOptions
|
|
152
|
+
// structure before modification. SharpYuvOptionsInit() must have succeeded
|
|
153
|
+
// before using the 'options' object.
|
|
154
|
+
static SHARPYUV_INLINE int SharpYuvOptionsInit(
|
|
155
|
+
const SharpYuvConversionMatrix* yuv_matrix, SharpYuvOptions* options) {
|
|
156
|
+
return SharpYuvOptionsInitInternal(yuv_matrix, options, SHARPYUV_VERSION);
|
|
157
|
+
}
|
|
158
|
+
|
|
159
|
+
SHARPYUV_EXTERN int SharpYuvConvertWithOptions(
|
|
160
|
+
const void* r_ptr, const void* g_ptr, const void* b_ptr, int rgb_step,
|
|
161
|
+
int rgb_stride, int rgb_bit_depth, void* y_ptr, int y_stride, void* u_ptr,
|
|
162
|
+
int u_stride, void* v_ptr, int v_stride, int yuv_bit_depth, int width,
|
|
163
|
+
int height, const SharpYuvOptions* options);
|
|
164
|
+
|
|
96
165
|
// TODO(b/194336375): Add YUV444 to YUV420 conversion. Maybe also add 422
|
|
97
166
|
// support (it's rarely used in practice, especially for images).
|
|
98
167
|
|
package/include/webp/types.h
CHANGED
|
@@ -36,18 +36,39 @@ typedef long long int int64_t;
|
|
|
36
36
|
#define WEBP_INLINE __forceinline
|
|
37
37
|
#endif /* _MSC_VER */
|
|
38
38
|
|
|
39
|
+
#ifndef WEBP_NODISCARD
|
|
40
|
+
#if defined(WEBP_ENABLE_NODISCARD) && WEBP_ENABLE_NODISCARD
|
|
41
|
+
#if (defined(__cplusplus) && __cplusplus >= 201700L) || \
|
|
42
|
+
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L)
|
|
43
|
+
#define WEBP_NODISCARD [[nodiscard]]
|
|
44
|
+
#else
|
|
45
|
+
// gcc's __has_attribute does not work for enums.
|
|
46
|
+
#if defined(__clang__) && defined(__has_attribute)
|
|
47
|
+
#if __has_attribute(warn_unused_result)
|
|
48
|
+
#define WEBP_NODISCARD __attribute__((warn_unused_result))
|
|
49
|
+
#else
|
|
50
|
+
#define WEBP_NODISCARD
|
|
51
|
+
#endif /* __has_attribute(warn_unused_result) */
|
|
52
|
+
#else
|
|
53
|
+
#define WEBP_NODISCARD
|
|
54
|
+
#endif /* defined(__clang__) && defined(__has_attribute) */
|
|
55
|
+
#endif /* (defined(__cplusplus) && __cplusplus >= 201700L) ||
|
|
56
|
+
(defined(__STDC_VERSION__) && __STDC_VERSION__ >= 202311L) */
|
|
57
|
+
#else
|
|
58
|
+
#define WEBP_NODISCARD
|
|
59
|
+
#endif /* defined(WEBP_ENABLE_NODISCARD) && WEBP_ENABLE_NODISCARD */
|
|
60
|
+
#endif /* WEBP_NODISCARD */
|
|
61
|
+
|
|
39
62
|
#ifndef WEBP_EXTERN
|
|
40
63
|
// This explicitly marks library functions and allows for changing the
|
|
41
64
|
// signature for e.g., Windows DLL builds.
|
|
42
|
-
# if defined(
|
|
65
|
+
# if defined(_WIN32) && defined(WEBP_DLL)
|
|
66
|
+
# define WEBP_EXTERN __declspec(dllexport)
|
|
67
|
+
# elif defined(__GNUC__) && __GNUC__ >= 4
|
|
43
68
|
# define WEBP_EXTERN extern __attribute__ ((visibility ("default")))
|
|
44
69
|
# else
|
|
45
|
-
#
|
|
46
|
-
#
|
|
47
|
-
# else
|
|
48
|
-
# define WEBP_EXTERN extern
|
|
49
|
-
# endif
|
|
50
|
-
# endif /* __GNUC__ >= 4 */
|
|
70
|
+
# define WEBP_EXTERN extern
|
|
71
|
+
# endif /* defined(_WIN32) && defined(WEBP_DLL) */
|
|
51
72
|
#endif /* WEBP_EXTERN */
|
|
52
73
|
|
|
53
74
|
// Macro to check ABI compatibility (same major revision number)
|
|
@@ -60,7 +81,7 @@ extern "C" {
|
|
|
60
81
|
// Allocates 'size' bytes of memory. Returns NULL upon error. Memory
|
|
61
82
|
// must be deallocated by calling WebPFree(). This function is made available
|
|
62
83
|
// by the core 'libwebp' library.
|
|
63
|
-
WEBP_EXTERN void* WebPMalloc(size_t size);
|
|
84
|
+
WEBP_NODISCARD WEBP_EXTERN void* WebPMalloc(size_t size);
|
|
64
85
|
|
|
65
86
|
// Releases memory returned by the WebPDecode*() functions (from decode.h).
|
|
66
87
|
WEBP_EXTERN void WebPFree(void* ptr);
|
package/include/zconf.h
CHANGED
package/include/zlib.h
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
#ifndef ZLIB_H_
|
|
2
2
|
#define ZLIB_H_
|
|
3
3
|
/* zlib.h -- interface of the 'zlib-ng' compression library
|
|
4
|
-
Forked from and compatible with zlib 1.
|
|
4
|
+
Forked from and compatible with zlib 1.3.1
|
|
5
5
|
|
|
6
|
-
Copyright (C) 1995-
|
|
6
|
+
Copyright (C) 1995-2024 Jean-loup Gailly and Mark Adler
|
|
7
7
|
|
|
8
8
|
This software is provided 'as-is', without any express or implied
|
|
9
9
|
warranty. In no event will the authors be held liable for any damages
|
|
@@ -49,20 +49,20 @@
|
|
|
49
49
|
extern "C" {
|
|
50
50
|
#endif
|
|
51
51
|
|
|
52
|
-
#define ZLIBNG_VERSION "2.1
|
|
53
|
-
#define ZLIBNG_VERNUM
|
|
52
|
+
#define ZLIBNG_VERSION "2.2.1"
|
|
53
|
+
#define ZLIBNG_VERNUM 0x020201F0L /* MMNNRRSM: major minor revision status modified */
|
|
54
54
|
#define ZLIBNG_VER_MAJOR 2
|
|
55
|
-
#define ZLIBNG_VER_MINOR
|
|
56
|
-
#define ZLIBNG_VER_REVISION
|
|
55
|
+
#define ZLIBNG_VER_MINOR 2
|
|
56
|
+
#define ZLIBNG_VER_REVISION 1
|
|
57
57
|
#define ZLIBNG_VER_STATUS F /* 0=devel, 1-E=beta, F=Release (DEPRECATED) */
|
|
58
58
|
#define ZLIBNG_VER_STATUSH 0xF /* Hex values: 0=devel, 1-E=beta, F=Release */
|
|
59
59
|
#define ZLIBNG_VER_MODIFIED 0 /* non-zero if modified externally from zlib-ng */
|
|
60
60
|
|
|
61
|
-
#define ZLIB_VERSION "1.3.
|
|
62
|
-
#define ZLIB_VERNUM
|
|
61
|
+
#define ZLIB_VERSION "1.3.1.zlib-ng"
|
|
62
|
+
#define ZLIB_VERNUM 0x131f
|
|
63
63
|
#define ZLIB_VER_MAJOR 1
|
|
64
64
|
#define ZLIB_VER_MINOR 3
|
|
65
|
-
#define ZLIB_VER_REVISION
|
|
65
|
+
#define ZLIB_VER_REVISION 1
|
|
66
66
|
#define ZLIB_VER_SUBREVISION 15 /* 15=fork (0xf) */
|
|
67
67
|
|
|
68
68
|
/*
|
|
@@ -220,7 +220,7 @@ typedef gz_header *gz_headerp;
|
|
|
220
220
|
#define Z_DEFLATED 8
|
|
221
221
|
/* The deflate compression method (the only one supported in this version) */
|
|
222
222
|
|
|
223
|
-
#define Z_NULL
|
|
223
|
+
#define Z_NULL 0 /* for compatibility with zlib, was for initializing zalloc, zfree, opaque */
|
|
224
224
|
|
|
225
225
|
#define zlib_version zlibVersion()
|
|
226
226
|
/* for compatibility with versions < 1.0.2 */
|
|
@@ -1732,14 +1732,14 @@ Z_EXTERN unsigned long Z_EXPORT crc32_combine(unsigned long crc1, unsigned long
|
|
|
1732
1732
|
seq1 and seq2 with lengths len1 and len2, CRC-32 check values were
|
|
1733
1733
|
calculated for each, crc1 and crc2. crc32_combine() returns the CRC-32
|
|
1734
1734
|
check value of seq1 and seq2 concatenated, requiring only crc1, crc2, and
|
|
1735
|
-
len2.
|
|
1735
|
+
len2. len2 must be non-negative.
|
|
1736
1736
|
*/
|
|
1737
1737
|
|
|
1738
1738
|
/*
|
|
1739
1739
|
Z_EXTERN unsigned long Z_EXPORT crc32_combine_gen(z_off_t len2);
|
|
1740
1740
|
|
|
1741
1741
|
Return the operator corresponding to length len2, to be used with
|
|
1742
|
-
crc32_combine_op().
|
|
1742
|
+
crc32_combine_op(). len2 must be non-negative.
|
|
1743
1743
|
*/
|
|
1744
1744
|
|
|
1745
1745
|
Z_EXTERN unsigned long Z_EXPORT crc32_combine_op(unsigned long crc1, unsigned long crc2,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@img/sharp-libvips-dev",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.4",
|
|
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,31 +1,30 @@
|
|
|
1
1
|
{
|
|
2
|
-
"aom": "3.
|
|
3
|
-
"archive": "3.7.
|
|
2
|
+
"aom": "3.9.1",
|
|
3
|
+
"archive": "3.7.4",
|
|
4
4
|
"cairo": "1.18.0",
|
|
5
|
-
"cgif": "0.
|
|
5
|
+
"cgif": "0.4.1",
|
|
6
6
|
"exif": "0.6.24",
|
|
7
7
|
"expat": "2.6.2",
|
|
8
8
|
"ffi": "3.4.6",
|
|
9
9
|
"fontconfig": "2.15.0",
|
|
10
10
|
"freetype": "2.13.2",
|
|
11
|
-
"fribidi": "1.0.
|
|
12
|
-
"
|
|
13
|
-
"
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"highway": "1.1.0",
|
|
11
|
+
"fribidi": "1.0.15",
|
|
12
|
+
"glib": "2.81.1",
|
|
13
|
+
"harfbuzz": "9.0.0",
|
|
14
|
+
"heif": "1.18.2",
|
|
15
|
+
"highway": "1.2.0",
|
|
17
16
|
"imagequant": "2.4.1",
|
|
18
17
|
"lcms": "2.16",
|
|
19
18
|
"mozjpeg": "4.1.5",
|
|
20
|
-
"pango": "1.
|
|
19
|
+
"pango": "1.54.0",
|
|
21
20
|
"pixman": "0.43.4",
|
|
22
21
|
"png": "1.6.43",
|
|
23
22
|
"proxy-libintl": "0.4",
|
|
24
|
-
"rsvg": "2.
|
|
23
|
+
"rsvg": "2.58.93",
|
|
25
24
|
"spng": "0.7.4",
|
|
26
25
|
"tiff": "4.6.0",
|
|
27
|
-
"vips": "8.15.
|
|
28
|
-
"webp": "1.
|
|
29
|
-
"xml": "2.
|
|
30
|
-
"zlib-ng": "2.1
|
|
26
|
+
"vips": "8.15.3",
|
|
27
|
+
"webp": "1.4.0",
|
|
28
|
+
"xml": "2.13.3",
|
|
29
|
+
"zlib-ng": "2.2.1"
|
|
31
30
|
}
|