@revizly/sharp-libvips-dev 1.0.34 → 1.0.36
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/fontconfig/fontconfig.h +10 -2
- package/include/harfbuzz/hb-script-list.h +0 -1
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/libde265/de265-version.h +2 -2
- package/include/libde265/de265.h +23 -9
- package/include/libheif/heif_color.h +119 -3
- package/include/libheif/heif_components.h +33 -33
- package/include/libheif/heif_decoding.h +30 -0
- package/include/libheif/heif_error.h +2 -0
- package/include/libheif/heif_export.h +48 -0
- package/include/libheif/heif_library.h +8 -16
- package/include/libheif/heif_properties.h +4 -1
- package/include/libheif/heif_version.h +2 -2
- package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
- package/include/svt-av1/EbConfigMacros.h +84 -0
- package/include/svt-av1/EbDebugMacros.h +89 -0
- package/include/svt-av1/EbSvtAv1.h +428 -0
- package/include/svt-av1/EbSvtAv1Enc.h +1137 -0
- package/include/svt-av1/EbSvtAv1ErrorCodes.h +61 -0
- package/include/svt-av1/EbSvtAv1Formats.h +125 -0
- package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
- package/package.json +1 -1
- package/versions.json +5 -5
|
@@ -55,7 +55,7 @@ typedef int FcBool;
|
|
|
55
55
|
|
|
56
56
|
#define FC_MAJOR 2
|
|
57
57
|
#define FC_MINOR 18
|
|
58
|
-
#define FC_REVISION
|
|
58
|
+
#define FC_REVISION 1
|
|
59
59
|
|
|
60
60
|
#define FC_VERSION ((FC_MAJOR * 10000) + (FC_MINOR * 100) + (FC_REVISION))
|
|
61
61
|
|
|
@@ -224,6 +224,9 @@ typedef int FcBool;
|
|
|
224
224
|
#define FC_FAMILY_MATH 12
|
|
225
225
|
#define FC_FAMILY_FANGSONG 13
|
|
226
226
|
|
|
227
|
+
/* Warnings */
|
|
228
|
+
#define FC_WARN_INVALID_ATTR (1 << 0)
|
|
229
|
+
|
|
227
230
|
typedef enum _FcType {
|
|
228
231
|
FcTypeUnknown = -1,
|
|
229
232
|
FcTypeVoid,
|
|
@@ -513,6 +516,12 @@ FcConfigAppFontClear (FcConfig *config);
|
|
|
513
516
|
FcPublic void
|
|
514
517
|
FcConfigPreferAppFont (FcConfig *config, FcBool flag);
|
|
515
518
|
|
|
519
|
+
FcPublic void
|
|
520
|
+
FcConfigSetWarningFlags (FcConfig *config, int warn, FcBool flag);
|
|
521
|
+
|
|
522
|
+
FcPublic int
|
|
523
|
+
FcConfigGetWarningFlags (FcConfig *config);
|
|
524
|
+
|
|
516
525
|
FcPublic FcBool
|
|
517
526
|
FcConfigSubstituteWithPat (FcConfig *config,
|
|
518
527
|
FcPattern *p,
|
|
@@ -1204,7 +1213,6 @@ FcConfigFileGenerate (FcConfig *config,
|
|
|
1204
1213
|
FcPattern *pat,
|
|
1205
1214
|
const FcChar8 *font_path);
|
|
1206
1215
|
|
|
1207
|
-
|
|
1208
1216
|
_FCFUNCPROTOEND
|
|
1209
1217
|
|
|
1210
1218
|
#undef FC_ATTRIBUTE_SENTINEL
|
|
@@ -53,14 +53,14 @@ HB_BEGIN_DECLS
|
|
|
53
53
|
*
|
|
54
54
|
* The micro component of the library version available at compile-time.
|
|
55
55
|
*/
|
|
56
|
-
#define HB_VERSION_MICRO
|
|
56
|
+
#define HB_VERSION_MICRO 1
|
|
57
57
|
|
|
58
58
|
/**
|
|
59
59
|
* HB_VERSION_STRING:
|
|
60
60
|
*
|
|
61
61
|
* A string literal containing the library version available at compile-time.
|
|
62
62
|
*/
|
|
63
|
-
#define HB_VERSION_STRING "14.2.
|
|
63
|
+
#define HB_VERSION_STRING "14.2.1"
|
|
64
64
|
|
|
65
65
|
/**
|
|
66
66
|
* HB_VERSION_ATLEAST:
|
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
#define LIBDE265_VERSION_H
|
|
29
29
|
|
|
30
30
|
/* Numeric representation of the version */
|
|
31
|
-
#define LIBDE265_NUMERIC_VERSION
|
|
31
|
+
#define LIBDE265_NUMERIC_VERSION 0x1010100
|
|
32
32
|
|
|
33
33
|
/* Version string */
|
|
34
|
-
#define LIBDE265_VERSION "1.
|
|
34
|
+
#define LIBDE265_VERSION "1.1.1"
|
|
35
35
|
|
|
36
36
|
#endif
|
package/include/libde265/de265.h
CHANGED
|
@@ -28,8 +28,6 @@ extern "C" {
|
|
|
28
28
|
|
|
29
29
|
#include <libde265/de265-version.h>
|
|
30
30
|
|
|
31
|
-
//#define inline static __inline
|
|
32
|
-
|
|
33
31
|
|
|
34
32
|
#ifndef __STDC_LIMIT_MACROS
|
|
35
33
|
#define __STDC_LIMIT_MACROS 1
|
|
@@ -60,12 +58,6 @@ extern "C" {
|
|
|
60
58
|
#define LIBDE265_DEPRECATED
|
|
61
59
|
#endif
|
|
62
60
|
|
|
63
|
-
#if defined(_MSC_VER)
|
|
64
|
-
#define LIBDE265_INLINE __inline
|
|
65
|
-
#else
|
|
66
|
-
#define LIBDE265_INLINE inline
|
|
67
|
-
#endif
|
|
68
|
-
|
|
69
61
|
/* === version numbers === */
|
|
70
62
|
|
|
71
63
|
// version of linked libde265 library
|
|
@@ -103,6 +95,8 @@ typedef enum {
|
|
|
103
95
|
DE265_ERROR_NO_INITIAL_SLICE_HEADER=16,
|
|
104
96
|
DE265_ERROR_PREMATURE_END_OF_SLICE=17,
|
|
105
97
|
DE265_ERROR_UNSPECIFIED_DECODING_ERROR=18,
|
|
98
|
+
DE265_ERROR_IMAGE_SIZE_EXCEEDS_SECURITY_LIMIT=19,
|
|
99
|
+
DE265_ERROR_NAL_SIZE_EXCEEDS_SECURITY_LIMIT=20,
|
|
106
100
|
|
|
107
101
|
// --- errors that should become obsolete in later libde265 versions ---
|
|
108
102
|
|
|
@@ -148,7 +142,8 @@ typedef enum {
|
|
|
148
142
|
DE265_WARNING_REFERENCE_IMAGE_CHROMA_FORMAT_DOES_NOT_MATCH=1032,
|
|
149
143
|
DE265_WARNING_INVALID_SLICE_HEADER_INDEX_ACCESS=1033,
|
|
150
144
|
DE265_WARNING_INVALID_TU_BLOCK_SPLIT=1034,
|
|
151
|
-
DE265_WARNING_RICE_PARAMETER_OUT_OF_RANGE=1035
|
|
145
|
+
DE265_WARNING_RICE_PARAMETER_OUT_OF_RANGE=1035,
|
|
146
|
+
DE265_WARNING_MAX_NUMBER_OF_SEI_MESSAGES_EXCEEDED=1036
|
|
152
147
|
} de265_error;
|
|
153
148
|
|
|
154
149
|
LIBDE265_API const char* de265_get_error_text(de265_error err);
|
|
@@ -440,6 +435,25 @@ LIBDE265_API void de265_set_parameter_int(de265_decoder_context*, de265_param pa
|
|
|
440
435
|
LIBDE265_API int de265_get_parameter_bool(de265_decoder_context*, de265_param param);
|
|
441
436
|
|
|
442
437
|
|
|
438
|
+
/* --- security limits --- */
|
|
439
|
+
|
|
440
|
+
typedef struct de265_security_limits {
|
|
441
|
+
uint8_t version;
|
|
442
|
+
|
|
443
|
+
// --- version 1 ---
|
|
444
|
+
|
|
445
|
+
uint32_t max_image_size_pixels;
|
|
446
|
+
uint32_t max_NAL_size_bytes;
|
|
447
|
+
uint32_t max_SEI_messages; // max number of SEI messages per access unit (0 = unlimited)
|
|
448
|
+
|
|
449
|
+
} de265_security_limits;
|
|
450
|
+
|
|
451
|
+
LIBDE265_API de265_security_limits* de265_get_security_limits(de265_decoder_context*);
|
|
452
|
+
|
|
453
|
+
LIBDE265_API void de265_set_security_limits(de265_decoder_context*, const de265_security_limits* limits);
|
|
454
|
+
|
|
455
|
+
LIBDE265_API const de265_security_limits* de265_get_disabled_security_limits();
|
|
456
|
+
|
|
443
457
|
|
|
444
458
|
/* --- optional library initialization --- */
|
|
445
459
|
|
|
@@ -276,17 +276,34 @@ heif_error heif_image_set_nclx_color_profile(heif_image* image,
|
|
|
276
276
|
|
|
277
277
|
// --- content light level ---
|
|
278
278
|
|
|
279
|
-
//
|
|
280
|
-
//
|
|
279
|
+
// Semantics follow the H.265 'Content light level information' SEI message
|
|
280
|
+
// (ITU-T H.265 Annex D.3.35). Identifies upper bounds for the nominal
|
|
281
|
+
// target brightness light level of the pictures. The bounds are defined
|
|
282
|
+
// against samples in a 4:4:4 RGB representation in the linear light domain,
|
|
283
|
+
// in units of candelas per square metre (cd/m^2 = nits). A field value
|
|
284
|
+
// of 0 means "no upper bound indicated" (i.e. undefined).
|
|
281
285
|
typedef struct heif_content_light_level
|
|
282
286
|
{
|
|
287
|
+
// Upper bound on the maximum light level among all individual linear-light
|
|
288
|
+
// 4:4:4 RGB samples across the sequence, in cd/m^2 (= field).
|
|
289
|
+
// Also called MaxCLL.
|
|
283
290
|
uint16_t max_content_light_level;
|
|
291
|
+
|
|
292
|
+
// Upper bound on the maximum per-picture average light level among the
|
|
293
|
+
// linear-light 4:4:4 RGB samples (averaged over any individual picture),
|
|
294
|
+
// in cd/m^2 (= field). Also called MaxFALL (or MaxPALL).
|
|
295
|
+
// For letterboxed content the average is expected to be taken only over
|
|
296
|
+
// the visually relevant region (H.265 D.3.35 NOTE 3).
|
|
284
297
|
uint16_t max_pic_average_light_level;
|
|
285
298
|
} heif_content_light_level;
|
|
286
299
|
|
|
287
300
|
LIBHEIF_API
|
|
288
301
|
int heif_image_has_content_light_level(const heif_image*);
|
|
289
302
|
|
|
303
|
+
LIBHEIF_API
|
|
304
|
+
int heif_image_handle_has_content_light_level(const heif_image_handle*);
|
|
305
|
+
|
|
306
|
+
// TODO: this function should also return 'int' to be consistent to heif_image_handle_get_content_light_level.
|
|
290
307
|
LIBHEIF_API
|
|
291
308
|
void heif_image_get_content_light_level(const heif_image*, heif_content_light_level* out);
|
|
292
309
|
|
|
@@ -303,13 +320,43 @@ void heif_image_handle_set_content_light_level(const heif_image_handle*, const h
|
|
|
303
320
|
|
|
304
321
|
// --- mastering display colour volume ---
|
|
305
322
|
|
|
306
|
-
//
|
|
323
|
+
// Semantics follow the H.265 'Mastering display colour volume' SEI message
|
|
324
|
+
// (ITU-T H.265 Annex D.3.28) and SMPTE ST 2086. Identifies the colour
|
|
325
|
+
// volume (primaries, white point, luminance range) of the mastering display
|
|
326
|
+
// for the associated content. CIE 1931 chromaticity coordinates are defined
|
|
327
|
+
// by ISO 11664-1 (see also ISO 11664-3 and CIE 15).
|
|
328
|
+
//
|
|
329
|
+
// For RGB mastering displays, H.265 suggests the index order
|
|
330
|
+
// [0]=green, [1]=blue, [2]=red
|
|
331
|
+
// (see H.265 Annex E, Table E.3).
|
|
307
332
|
typedef struct heif_mastering_display_colour_volume
|
|
308
333
|
{
|
|
334
|
+
// CIE 1931 chromaticity coordinates of the three colour primaries, in
|
|
335
|
+
// normalized increments of 0.00002 (CIE value = field / 50000).
|
|
336
|
+
// Valid ranges per H.265: x in 5..37000, y in 5..42000 inclusive; values
|
|
337
|
+
// outside indicate "unknown / unspecified".
|
|
338
|
+
// Note: SMPTE ST 2086 uses four-decimal-place coordinates, i.e. multiples
|
|
339
|
+
// of 5 in this encoding.
|
|
309
340
|
uint16_t display_primaries_x[3];
|
|
310
341
|
uint16_t display_primaries_y[3];
|
|
342
|
+
|
|
343
|
+
// CIE 1931 chromaticity coordinates of the mastering display's white
|
|
344
|
+
// point, in normalized increments of 0.00002. Valid ranges as for the
|
|
345
|
+
// primaries (x in 5..37000, y in 5..42000).
|
|
346
|
+
// Note: ANSI/CTA 861-G uses (0,0) to indicate that the white point
|
|
347
|
+
// chromaticity is unknown.
|
|
311
348
|
uint16_t white_point_x;
|
|
312
349
|
uint16_t white_point_y;
|
|
350
|
+
|
|
351
|
+
// Nominal maximum / minimum display luminance of the mastering display,
|
|
352
|
+
// in units of 0.0001 candelas per square metre (cd/m^2 = field / 10000).
|
|
353
|
+
// Valid ranges per H.265:
|
|
354
|
+
// max in 50000..100000000 (5..10000 cd/m^2)
|
|
355
|
+
// min in 1..50000 (0.0001..5 cd/m^2)
|
|
356
|
+
// When max == 50000, min shall not equal 50000.
|
|
357
|
+
// Note: ANSI/CTA 861-G uses 0 to indicate "unknown".
|
|
358
|
+
// Note: SMPTE ST 2086 (2018) specifies max as a multiple of 1 cd/m^2, i.e.
|
|
359
|
+
// a multiple of 10000 in this encoding.
|
|
313
360
|
uint32_t max_display_mastering_luminance;
|
|
314
361
|
uint32_t min_display_mastering_luminance;
|
|
315
362
|
} heif_mastering_display_colour_volume;
|
|
@@ -325,9 +372,24 @@ typedef struct heif_decoded_mastering_display_colour_volume
|
|
|
325
372
|
double min_display_mastering_luminance;
|
|
326
373
|
} heif_decoded_mastering_display_colour_volume;
|
|
327
374
|
|
|
375
|
+
// Semantics follow the H.265 'Ambient viewing environment' SEI message
|
|
376
|
+
// (ITU-T H.265 Annex D.3.39). Identifies the nominal ambient viewing
|
|
377
|
+
// environment intended for display of the associated content.
|
|
328
378
|
typedef struct heif_ambient_viewing_environment
|
|
329
379
|
{
|
|
380
|
+
// Environmental illuminance of the ambient viewing environment, in units
|
|
381
|
+
// of 0.0001 lux (i.e. lux = value / 10000). In H.265 this field is called
|
|
382
|
+
// 'ambient_illuminance' and is required to be non-zero; 0 is treated here
|
|
383
|
+
// as "undefined".
|
|
330
384
|
uint32_t ambient_illumination;
|
|
385
|
+
|
|
386
|
+
// Normalized CIE 1931 chromaticity coordinates of the environmental
|
|
387
|
+
// ambient light, in units of 0.00002 (i.e. CIE x = value / 50000).
|
|
388
|
+
// Valid range per H.265 is 0..50000 inclusive. CIE 1931 x/y are defined
|
|
389
|
+
// by ISO 11664-1 (see also ISO 11664-3 and CIE 15).
|
|
390
|
+
//
|
|
391
|
+
// Example (Rec. ITU-R BT.2035, D65 background): ambient_illumination=100000,
|
|
392
|
+
// ambient_light_x=15635, ambient_light_y=16450.
|
|
331
393
|
uint16_t ambient_light_x;
|
|
332
394
|
uint16_t ambient_light_y;
|
|
333
395
|
} heif_ambient_viewing_environment;
|
|
@@ -335,6 +397,9 @@ typedef struct heif_ambient_viewing_environment
|
|
|
335
397
|
LIBHEIF_API
|
|
336
398
|
int heif_image_has_mastering_display_colour_volume(const heif_image*);
|
|
337
399
|
|
|
400
|
+
LIBHEIF_API
|
|
401
|
+
int heif_image_handle_has_mastering_display_colour_volume(const heif_image_handle*);
|
|
402
|
+
|
|
338
403
|
LIBHEIF_API
|
|
339
404
|
void heif_image_get_mastering_display_colour_volume(const heif_image*, heif_mastering_display_colour_volume* out);
|
|
340
405
|
|
|
@@ -349,6 +414,57 @@ LIBHEIF_API
|
|
|
349
414
|
void heif_image_handle_set_mastering_display_colour_volume(const heif_image_handle*, const heif_mastering_display_colour_volume* in);
|
|
350
415
|
|
|
351
416
|
|
|
417
|
+
// --- ambient viewing environment ---
|
|
418
|
+
|
|
419
|
+
LIBHEIF_API
|
|
420
|
+
int heif_image_has_ambient_viewing_environment(const heif_image*);
|
|
421
|
+
|
|
422
|
+
LIBHEIF_API
|
|
423
|
+
int heif_image_handle_has_ambient_viewing_environment(const heif_image_handle*);
|
|
424
|
+
|
|
425
|
+
// Returns whether the image has 'ambient viewing environment' information. If 0 is returned, the output is not filled.
|
|
426
|
+
LIBHEIF_API
|
|
427
|
+
int heif_image_get_ambient_viewing_environment(const heif_image*, heif_ambient_viewing_environment* out);
|
|
428
|
+
|
|
429
|
+
// Returns whether the image has 'ambient viewing environment' information. If 0 is returned, the output is not filled.
|
|
430
|
+
LIBHEIF_API
|
|
431
|
+
int heif_image_handle_get_ambient_viewing_environment(const heif_image_handle*, heif_ambient_viewing_environment* out);
|
|
432
|
+
|
|
433
|
+
LIBHEIF_API
|
|
434
|
+
void heif_image_set_ambient_viewing_environment(const heif_image*, const heif_ambient_viewing_environment* in);
|
|
435
|
+
|
|
436
|
+
LIBHEIF_API
|
|
437
|
+
void heif_image_handle_set_ambient_viewing_environment(const heif_image_handle*, const heif_ambient_viewing_environment* in);
|
|
438
|
+
|
|
439
|
+
|
|
440
|
+
// --- nominal diffuse white ---
|
|
441
|
+
|
|
442
|
+
// Nominal diffuse white luminance (ISO/IEC 23008-12 'ndwt' box). The luminance
|
|
443
|
+
// is given in units of 0.0001 candelas per square metre. A value of 0 is valid
|
|
444
|
+
// and selects the default definition of ISO/TS 22028-5.
|
|
445
|
+
|
|
446
|
+
// If the image has no 'nominal diffuse white' information, the getter returns 0,
|
|
447
|
+
// which is indistinguishable from a stored luminance of 0. Use the has_ function
|
|
448
|
+
// to disambiguate.
|
|
449
|
+
LIBHEIF_API
|
|
450
|
+
int heif_image_has_nominal_diffuse_white_luminance(const heif_image*);
|
|
451
|
+
|
|
452
|
+
LIBHEIF_API
|
|
453
|
+
uint32_t heif_image_get_nominal_diffuse_white_luminance(const heif_image*);
|
|
454
|
+
|
|
455
|
+
LIBHEIF_API
|
|
456
|
+
void heif_image_set_nominal_diffuse_white_luminance(const heif_image*, uint32_t luminance);
|
|
457
|
+
|
|
458
|
+
LIBHEIF_API
|
|
459
|
+
int heif_image_handle_has_nominal_diffuse_white_luminance(const heif_image_handle*);
|
|
460
|
+
|
|
461
|
+
LIBHEIF_API
|
|
462
|
+
uint32_t heif_image_handle_get_nominal_diffuse_white_luminance(const heif_image_handle*);
|
|
463
|
+
|
|
464
|
+
LIBHEIF_API
|
|
465
|
+
void heif_image_handle_set_nominal_diffuse_white_luminance(const heif_image_handle*, uint32_t luminance);
|
|
466
|
+
|
|
467
|
+
|
|
352
468
|
// Converts the internal numeric representation of heif_mastering_display_colour_volume to the
|
|
353
469
|
// normalized values, collected in heif_decoded_mastering_display_colour_volume.
|
|
354
470
|
// Values that are out-of-range are decoded to 0, indicating an undefined value (as specified in ISO/IEC 23008-2).
|
|
@@ -89,36 +89,36 @@ typedef enum heif_cmpd_component_type
|
|
|
89
89
|
} heif_cmpd_component_type;
|
|
90
90
|
|
|
91
91
|
|
|
92
|
-
// ---
|
|
92
|
+
// --- ID-based component access (operates on a decoded heif_image)
|
|
93
93
|
|
|
94
94
|
// Returns the number of components that have pixel data (planes) in this image.
|
|
95
95
|
LIBHEIF_API
|
|
96
96
|
uint32_t heif_image_get_number_of_used_components(const heif_image*);
|
|
97
97
|
|
|
98
|
-
// Fills `
|
|
98
|
+
// Fills `out_component_ids` with the valid component IDs.
|
|
99
99
|
// The caller must allocate an array of at least heif_image_get_number_of_used_components() elements.
|
|
100
100
|
LIBHEIF_API
|
|
101
101
|
void heif_image_get_used_component_ids(const heif_image*, uint32_t* out_component_ids);
|
|
102
102
|
|
|
103
103
|
LIBHEIF_API
|
|
104
|
-
heif_channel heif_image_get_component_channel(const heif_image*, uint32_t
|
|
104
|
+
heif_channel heif_image_get_component_channel(const heif_image*, uint32_t component_id);
|
|
105
105
|
|
|
106
106
|
LIBHEIF_API
|
|
107
|
-
uint32_t heif_image_get_component_width(const heif_image*, uint32_t
|
|
107
|
+
uint32_t heif_image_get_component_width(const heif_image*, uint32_t component_id);
|
|
108
108
|
|
|
109
109
|
LIBHEIF_API
|
|
110
|
-
uint32_t heif_image_get_component_height(const heif_image*, uint32_t
|
|
110
|
+
uint32_t heif_image_get_component_height(const heif_image*, uint32_t component_id);
|
|
111
111
|
|
|
112
112
|
LIBHEIF_API
|
|
113
|
-
int heif_image_get_component_bits_per_pixel(const heif_image*, uint32_t
|
|
113
|
+
int heif_image_get_component_bits_per_pixel(const heif_image*, uint32_t component_id);
|
|
114
114
|
|
|
115
115
|
LIBHEIF_API
|
|
116
|
-
uint16_t heif_image_get_component_type(const heif_image*, uint32_t
|
|
116
|
+
uint16_t heif_image_get_component_type(const heif_image*, uint32_t component_id);
|
|
117
117
|
|
|
118
118
|
// Returns the datatype (unsigned/signed integer, floating point, or complex
|
|
119
119
|
// number) of the given component.
|
|
120
120
|
LIBHEIF_API
|
|
121
|
-
heif_component_datatype heif_image_get_component_datatype(const heif_image*, uint32_t
|
|
121
|
+
heif_component_datatype heif_image_get_component_datatype(const heif_image*, uint32_t component_id);
|
|
122
122
|
|
|
123
123
|
|
|
124
124
|
// --- ID-based component access via heif_image_handle (before decoding)
|
|
@@ -159,16 +159,16 @@ heif_error heif_image_add_component(heif_image* image,
|
|
|
159
159
|
uint16_t component_type,
|
|
160
160
|
heif_component_datatype datatype,
|
|
161
161
|
int bit_depth,
|
|
162
|
-
uint32_t*
|
|
162
|
+
uint32_t* out_component_id);
|
|
163
163
|
|
|
164
164
|
|
|
165
165
|
// --- untyped uint8 component data getters: stride is in BYTES per row.
|
|
166
166
|
|
|
167
167
|
LIBHEIF_API
|
|
168
|
-
const uint8_t* heif_image_get_component_readonly(const heif_image*, uint32_t
|
|
168
|
+
const uint8_t* heif_image_get_component_readonly(const heif_image*, uint32_t component_id, size_t* out_stride);
|
|
169
169
|
|
|
170
170
|
LIBHEIF_API
|
|
171
|
-
uint8_t* heif_image_get_component(heif_image*, uint32_t
|
|
171
|
+
uint8_t* heif_image_get_component(heif_image*, uint32_t component_id, size_t* out_stride);
|
|
172
172
|
|
|
173
173
|
|
|
174
174
|
// --- typed component data getters: `out_row_elements` is the number of T
|
|
@@ -177,70 +177,70 @@ uint8_t* heif_image_get_component(heif_image*, uint32_t component_idx, size_t* o
|
|
|
177
177
|
// this count is always exact for the named type T.
|
|
178
178
|
|
|
179
179
|
LIBHEIF_API
|
|
180
|
-
const uint16_t* heif_image_get_component_uint16_readonly(const heif_image*, uint32_t
|
|
180
|
+
const uint16_t* heif_image_get_component_uint16_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
181
181
|
|
|
182
182
|
LIBHEIF_API
|
|
183
|
-
uint16_t* heif_image_get_component_uint16(heif_image*, uint32_t
|
|
183
|
+
uint16_t* heif_image_get_component_uint16(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
184
184
|
|
|
185
185
|
LIBHEIF_API
|
|
186
|
-
const uint32_t* heif_image_get_component_uint32_readonly(const heif_image*, uint32_t
|
|
186
|
+
const uint32_t* heif_image_get_component_uint32_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
187
187
|
|
|
188
188
|
LIBHEIF_API
|
|
189
|
-
uint32_t* heif_image_get_component_uint32(heif_image*, uint32_t
|
|
189
|
+
uint32_t* heif_image_get_component_uint32(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
190
190
|
|
|
191
191
|
LIBHEIF_API
|
|
192
|
-
const uint64_t* heif_image_get_component_uint64_readonly(const heif_image*, uint32_t
|
|
192
|
+
const uint64_t* heif_image_get_component_uint64_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
193
193
|
|
|
194
194
|
LIBHEIF_API
|
|
195
|
-
uint64_t* heif_image_get_component_uint64(heif_image*, uint32_t
|
|
195
|
+
uint64_t* heif_image_get_component_uint64(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
196
196
|
|
|
197
197
|
LIBHEIF_API
|
|
198
|
-
const int8_t* heif_image_get_component_int8_readonly(const heif_image*, uint32_t
|
|
198
|
+
const int8_t* heif_image_get_component_int8_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
199
199
|
|
|
200
200
|
LIBHEIF_API
|
|
201
|
-
int8_t* heif_image_get_component_int8(heif_image*, uint32_t
|
|
201
|
+
int8_t* heif_image_get_component_int8(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
202
202
|
|
|
203
203
|
LIBHEIF_API
|
|
204
|
-
const int16_t* heif_image_get_component_int16_readonly(const heif_image*, uint32_t
|
|
204
|
+
const int16_t* heif_image_get_component_int16_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
205
205
|
|
|
206
206
|
LIBHEIF_API
|
|
207
|
-
int16_t* heif_image_get_component_int16(heif_image*, uint32_t
|
|
207
|
+
int16_t* heif_image_get_component_int16(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
208
208
|
|
|
209
209
|
LIBHEIF_API
|
|
210
|
-
const int32_t* heif_image_get_component_int32_readonly(const heif_image*, uint32_t
|
|
210
|
+
const int32_t* heif_image_get_component_int32_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
211
211
|
|
|
212
212
|
LIBHEIF_API
|
|
213
|
-
int32_t* heif_image_get_component_int32(heif_image*, uint32_t
|
|
213
|
+
int32_t* heif_image_get_component_int32(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
214
214
|
|
|
215
215
|
LIBHEIF_API
|
|
216
|
-
const int64_t* heif_image_get_component_int64_readonly(const heif_image*, uint32_t
|
|
216
|
+
const int64_t* heif_image_get_component_int64_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
217
217
|
|
|
218
218
|
LIBHEIF_API
|
|
219
|
-
int64_t* heif_image_get_component_int64(heif_image*, uint32_t
|
|
219
|
+
int64_t* heif_image_get_component_int64(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
220
220
|
|
|
221
221
|
LIBHEIF_API
|
|
222
|
-
const float* heif_image_get_component_float32_readonly(const heif_image*, uint32_t
|
|
222
|
+
const float* heif_image_get_component_float32_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
223
223
|
|
|
224
224
|
LIBHEIF_API
|
|
225
|
-
float* heif_image_get_component_float32(heif_image*, uint32_t
|
|
225
|
+
float* heif_image_get_component_float32(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
226
226
|
|
|
227
227
|
LIBHEIF_API
|
|
228
|
-
const double* heif_image_get_component_float64_readonly(const heif_image*, uint32_t
|
|
228
|
+
const double* heif_image_get_component_float64_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
229
229
|
|
|
230
230
|
LIBHEIF_API
|
|
231
|
-
double* heif_image_get_component_float64(heif_image*, uint32_t
|
|
231
|
+
double* heif_image_get_component_float64(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
232
232
|
|
|
233
233
|
LIBHEIF_API
|
|
234
|
-
const heif_complex32* heif_image_get_component_complex32_readonly(const heif_image*, uint32_t
|
|
234
|
+
const heif_complex32* heif_image_get_component_complex32_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
235
235
|
|
|
236
236
|
LIBHEIF_API
|
|
237
|
-
heif_complex32* heif_image_get_component_complex32(heif_image*, uint32_t
|
|
237
|
+
heif_complex32* heif_image_get_component_complex32(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
238
238
|
|
|
239
239
|
LIBHEIF_API
|
|
240
|
-
const heif_complex64* heif_image_get_component_complex64_readonly(const heif_image*, uint32_t
|
|
240
|
+
const heif_complex64* heif_image_get_component_complex64_readonly(const heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
241
241
|
|
|
242
242
|
LIBHEIF_API
|
|
243
|
-
heif_complex64* heif_image_get_component_complex64(heif_image*, uint32_t
|
|
243
|
+
heif_complex64* heif_image_get_component_complex64(heif_image*, uint32_t component_id, size_t* out_row_elements);
|
|
244
244
|
|
|
245
245
|
|
|
246
246
|
// --- GIMI component content IDs (set before encoding)
|
|
@@ -114,6 +114,15 @@ typedef struct heif_decoding_options
|
|
|
114
114
|
// If enabled, it will decode the media timeline, ignoring the sequence tracks edit-list.
|
|
115
115
|
int ignore_sequence_editlist; // bool
|
|
116
116
|
|
|
117
|
+
// Requested NCLX color profile of the decoded output image. If the input
|
|
118
|
+
// image's NCLX differs, libheif will color-convert the pixels accordingly
|
|
119
|
+
// (e.g. YCbCr matrix, primaries, range) so the result matches what is
|
|
120
|
+
// requested here.
|
|
121
|
+
//
|
|
122
|
+
// When set to NULL, the behavior depends on the flag
|
|
123
|
+
// output_image_nclx_profile_passthrough below: by default NULL means
|
|
124
|
+
// "convert to sRGB"; with the passthrough flag enabled, NULL means
|
|
125
|
+
// "keep the input image's NCLX".
|
|
117
126
|
heif_color_profile_nclx* output_image_nclx_profile;
|
|
118
127
|
|
|
119
128
|
int num_library_threads; // 0 = let libheif decide (TODO, currently ignored)
|
|
@@ -125,6 +134,27 @@ typedef struct heif_decoding_options
|
|
|
125
134
|
// (e.g. Sony HIF files where the NCLX `colr` box disagrees with the HEVC VUI
|
|
126
135
|
// on the YCbCr range flag). Default: false (strict spec-conformant behavior).
|
|
127
136
|
uint8_t autocorrect_broken_input;
|
|
137
|
+
|
|
138
|
+
// version 10 options
|
|
139
|
+
|
|
140
|
+
// Controls the meaning of output_image_nclx_profile == NULL.
|
|
141
|
+
//
|
|
142
|
+
// When false (default), a NULL output_image_nclx_profile means "convert the
|
|
143
|
+
// decoded image to sRGB" (BT.709 primaries, sRGB transfer, BT.601 matrix,
|
|
144
|
+
// full-range). For HDR inputs (e.g. BT.2100 PQ) this silently discards the
|
|
145
|
+
// original color volume.
|
|
146
|
+
//
|
|
147
|
+
// When true, a NULL output_image_nclx_profile means "keep the input image's
|
|
148
|
+
// NCLX". The decoded image carries the input file's primaries / transfer /
|
|
149
|
+
// matrix / range, and no extra color-space conversion is performed solely
|
|
150
|
+
// because the output NCLX was unspecified. If a YCbCr<->RGB colorspace
|
|
151
|
+
// conversion fires for another reason, the input NCLX is used to drive that
|
|
152
|
+
// conversion (so the result is tagged consistently with the source).
|
|
153
|
+
//
|
|
154
|
+
// Although this flag is off by default to preserve historical behavior, new
|
|
155
|
+
// code that wants to preserve HDR through decode should generally enable it.
|
|
156
|
+
// Setting output_image_nclx_profile to a non-NULL value overrides this flag.
|
|
157
|
+
uint8_t output_image_nclx_profile_passthrough;
|
|
128
158
|
} heif_decoding_options;
|
|
129
159
|
|
|
130
160
|
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* HEIF codec.
|
|
3
|
+
* Copyright (c) 2017-2026 Dirk Farin <dirk.farin@gmail.com>
|
|
4
|
+
*
|
|
5
|
+
* This file is part of libheif.
|
|
6
|
+
*
|
|
7
|
+
* libheif is free software: you can redistribute it and/or modify
|
|
8
|
+
* it under the terms of the GNU Lesser General Public License as
|
|
9
|
+
* published by the Free Software Foundation, either version 3 of
|
|
10
|
+
* the License, or (at your option) any later version.
|
|
11
|
+
*
|
|
12
|
+
* libheif is distributed in the hope that it will be useful,
|
|
13
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15
|
+
* GNU Lesser General Public License for more details.
|
|
16
|
+
*
|
|
17
|
+
* You should have received a copy of the GNU Lesser General Public License
|
|
18
|
+
* along with libheif. If not, see <http://www.gnu.org/licenses/>.
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
#ifndef LIBHEIF_HEIF_EXPORT_H
|
|
22
|
+
#define LIBHEIF_HEIF_EXPORT_H
|
|
23
|
+
|
|
24
|
+
// LIBHEIF_API marks the symbols that are exported from the shared library.
|
|
25
|
+
//
|
|
26
|
+
// This macro lives in its own tiny, dependency-free header so that every
|
|
27
|
+
// public header can pull it in without creating include cycles. In particular,
|
|
28
|
+
// heif_library.h and heif_error.h are mutually dependent (heif_library.h needs
|
|
29
|
+
// the heif_error type while heif_error.h needs LIBHEIF_API), so the macro
|
|
30
|
+
// cannot live in either of them if both are to compile standalone.
|
|
31
|
+
|
|
32
|
+
#if (defined(_WIN32) || defined __CYGWIN__) && !defined(LIBHEIF_STATIC_BUILD)
|
|
33
|
+
#ifdef LIBHEIF_EXPORTS
|
|
34
|
+
#define LIBHEIF_API __declspec(dllexport)
|
|
35
|
+
#else
|
|
36
|
+
#define LIBHEIF_API __declspec(dllimport)
|
|
37
|
+
#endif
|
|
38
|
+
#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
|
|
39
|
+
#ifdef LIBHEIF_EXPORTS
|
|
40
|
+
#define LIBHEIF_API __attribute__((__visibility__("default")))
|
|
41
|
+
#else
|
|
42
|
+
#define LIBHEIF_API
|
|
43
|
+
#endif
|
|
44
|
+
#else
|
|
45
|
+
#define LIBHEIF_API
|
|
46
|
+
#endif
|
|
47
|
+
|
|
48
|
+
#endif // LIBHEIF_HEIF_EXPORT_H
|
|
@@ -48,22 +48,14 @@ extern "C" {
|
|
|
48
48
|
// 1.18 5 7 1 1 1 1
|
|
49
49
|
// 1.19 6 7 2 1 1 1
|
|
50
50
|
// 1.20 7 7 2 1 1 1
|
|
51
|
+
// 1.21 8 7 2 1 1 1
|
|
52
|
+
// 1.22 9 8 2 1 1 1
|
|
53
|
+
// 1.23 10 8 2 1 1 1
|
|
51
54
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
#
|
|
56
|
-
#define LIBHEIF_API __declspec(dllimport)
|
|
57
|
-
#endif
|
|
58
|
-
#elif defined(HAVE_VISIBILITY) && HAVE_VISIBILITY
|
|
59
|
-
#ifdef LIBHEIF_EXPORTS
|
|
60
|
-
#define LIBHEIF_API __attribute__((__visibility__("default")))
|
|
61
|
-
#else
|
|
62
|
-
#define LIBHEIF_API
|
|
63
|
-
#endif
|
|
64
|
-
#else
|
|
65
|
-
#define LIBHEIF_API
|
|
66
|
-
#endif
|
|
55
|
+
// The LIBHEIF_API export macro is defined in its own dependency-free header so
|
|
56
|
+
// that heif_error.h (which is needed by this header) can use it without
|
|
57
|
+
// creating an include cycle.
|
|
58
|
+
#include <libheif/heif_export.h>
|
|
67
59
|
|
|
68
60
|
/**
|
|
69
61
|
* Build a 32 bit integer from a 4-character code.
|
|
@@ -169,7 +161,7 @@ typedef enum heif_plugin_type
|
|
|
169
161
|
typedef struct heif_plugin_info
|
|
170
162
|
{
|
|
171
163
|
int version; // version of this info struct
|
|
172
|
-
|
|
164
|
+
heif_plugin_type type;
|
|
173
165
|
const void* plugin;
|
|
174
166
|
void* internal_handle; // for internal use only
|
|
175
167
|
} heif_plugin_info;
|
|
@@ -319,7 +319,10 @@ int heif_image_get_polarization_pattern_index_for_component(const heif_image*,
|
|
|
319
319
|
|
|
320
320
|
// --- Sensor bad pixels map (ISO 23001-17, Section 6.1.7)
|
|
321
321
|
|
|
322
|
-
struct heif_bad_pixel
|
|
322
|
+
typedef struct heif_bad_pixel
|
|
323
|
+
{
|
|
324
|
+
uint32_t row; uint32_t column;
|
|
325
|
+
} heif_bad_pixel;
|
|
323
326
|
|
|
324
327
|
// Add a sensor bad pixels map to an image.
|
|
325
328
|
// component_indices: array of component indices this map applies to (may be NULL if num_component_indices == 0,
|
|
@@ -28,10 +28,10 @@
|
|
|
28
28
|
#define LIBHEIF_HEIF_VERSION_H
|
|
29
29
|
|
|
30
30
|
/* Numeric representation of the version */
|
|
31
|
-
#define LIBHEIF_NUMERIC_VERSION ((1<<24) | (
|
|
31
|
+
#define LIBHEIF_NUMERIC_VERSION ((1<<24) | (23<<16) | (0<<8) | 0)
|
|
32
32
|
|
|
33
33
|
/* Version string */
|
|
34
|
-
#define LIBHEIF_VERSION "1.
|
|
34
|
+
#define LIBHEIF_VERSION "1.23.0"
|
|
35
35
|
|
|
36
36
|
#define LIBHEIF_PLUGIN_DIRECTORY "/target/lib/libheif"
|
|
37
37
|
|