@revizly/sharp-libvips-dev 1.0.30 → 1.0.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/include/archive.h +2 -2
- package/include/archive_entry.h +1 -1
- package/include/expat.h +14 -2
- package/include/expat_config.h +6 -3
- package/include/expat_external.h +3 -2
- package/include/glib-2.0/glib/gvarianttype.h +16 -16
- package/include/glib-2.0/glib/gversionmacros.h +13 -0
- package/include/harfbuzz/hb-cplusplus.hh +9 -1
- package/include/harfbuzz/hb-draw.h +52 -0
- package/include/harfbuzz/hb-paint.h +209 -2
- package/include/harfbuzz/hb-version.h +2 -2
- package/include/hwy/aligned_allocator.h +44 -2
- package/include/hwy/auto_tune.h +22 -6
- package/include/hwy/base.h +60 -90
- package/include/hwy/bit_set.h +410 -0
- package/include/hwy/cache_control.h +3 -2
- package/include/hwy/detect_compiler_arch.h +134 -14
- package/include/hwy/detect_targets.h +82 -36
- package/include/hwy/highway.h +15 -0
- package/include/hwy/nanobenchmark.h +12 -3
- package/include/hwy/ops/arm_neon-inl.h +96 -25
- package/include/hwy/ops/arm_sve-inl.h +250 -95
- package/include/hwy/ops/emu128-inl.h +12 -7
- package/include/hwy/ops/generic_ops-inl.h +271 -131
- package/include/hwy/ops/loongarch_lasx-inl.h +31 -9
- package/include/hwy/ops/loongarch_lsx-inl.h +33 -12
- package/include/hwy/ops/ppc_vsx-inl.h +99 -19
- package/include/hwy/ops/rvv-inl.h +239 -130
- package/include/hwy/ops/scalar-inl.h +22 -7
- package/include/hwy/ops/set_macros-inl.h +158 -107
- package/include/hwy/ops/wasm_128-inl.h +13 -22
- package/include/hwy/ops/x86_128-inl.h +223 -120
- package/include/hwy/ops/x86_256-inl.h +70 -134
- package/include/hwy/ops/x86_512-inl.h +130 -134
- package/include/hwy/print-inl.h +2 -0
- package/include/hwy/profiler.h +355 -264
- package/include/hwy/robust_statistics.h +3 -1
- package/include/hwy/timer.h +44 -0
- package/include/lcms2.h +34 -4
- package/include/libexif/exif-utils.h +1 -1
- package/include/libheif/heif_aux_images.h +2 -2
- package/include/libheif/heif_brands.h +13 -4
- package/include/libheif/heif_color.h +14 -14
- package/include/libheif/heif_context.h +17 -4
- package/include/libheif/heif_decoding.h +2 -2
- package/include/libheif/heif_encoding.h +29 -5
- package/include/libheif/heif_error.h +4 -4
- package/include/libheif/heif_image.h +52 -8
- package/include/libheif/heif_image_handle.h +42 -0
- package/include/libheif/heif_library.h +2 -2
- package/include/libheif/heif_metadata.h +2 -2
- package/include/libheif/heif_plugin.h +4 -4
- package/include/libheif/heif_properties.h +16 -4
- package/include/libheif/heif_regions.h +2 -2
- package/include/libheif/heif_security.h +5 -0
- package/include/libheif/heif_sequences.h +22 -12
- package/include/libheif/heif_uncompressed.h +327 -23
- package/include/libheif/heif_uncompressed_types.h +143 -0
- package/include/libpng16/png.h +7 -7
- package/include/libpng16/pngconf.h +1 -1
- package/include/libpng16/pnglibconf.h +1 -1
- package/include/libxml2/libxml/xmlversion.h +4 -4
- package/include/png.h +7 -7
- package/include/pngconf.h +1 -1
- package/include/pnglibconf.h +1 -1
- package/include/tiffconf.h +9 -10
- package/include/tiffio.h +9 -9
- package/include/tiffvers.h +1 -1
- package/package.json +1 -1
- package/versions.json +11 -11
|
@@ -160,11 +160,11 @@ void heif_deinit(void);
|
|
|
160
160
|
|
|
161
161
|
// --- Plugins are currently only supported on Unix platforms.
|
|
162
162
|
|
|
163
|
-
enum heif_plugin_type
|
|
163
|
+
typedef enum heif_plugin_type
|
|
164
164
|
{
|
|
165
165
|
heif_plugin_type_encoder,
|
|
166
166
|
heif_plugin_type_decoder
|
|
167
|
-
};
|
|
167
|
+
} heif_plugin_type;
|
|
168
168
|
|
|
169
169
|
typedef struct heif_plugin_info
|
|
170
170
|
{
|
|
@@ -28,7 +28,7 @@ extern "C" {
|
|
|
28
28
|
#include <libheif/heif_library.h>
|
|
29
29
|
|
|
30
30
|
|
|
31
|
-
enum heif_metadata_compression
|
|
31
|
+
typedef enum heif_metadata_compression
|
|
32
32
|
{
|
|
33
33
|
heif_metadata_compression_off = 0,
|
|
34
34
|
heif_metadata_compression_auto = 1,
|
|
@@ -36,7 +36,7 @@ enum heif_metadata_compression
|
|
|
36
36
|
heif_metadata_compression_deflate = 3,
|
|
37
37
|
heif_metadata_compression_zlib = 4, // do not use for header data
|
|
38
38
|
heif_metadata_compression_brotli = 5
|
|
39
|
-
};
|
|
39
|
+
} heif_metadata_compression;
|
|
40
40
|
|
|
41
41
|
LIBHEIF_API
|
|
42
42
|
int heif_metadata_compression_method_supported(enum heif_metadata_compression method);
|
|
@@ -162,24 +162,24 @@ typedef struct heif_decoder_plugin
|
|
|
162
162
|
} heif_decoder_plugin;
|
|
163
163
|
|
|
164
164
|
|
|
165
|
-
enum heif_encoded_data_type
|
|
165
|
+
typedef enum heif_encoded_data_type
|
|
166
166
|
{
|
|
167
167
|
heif_encoded_data_type_HEVC_header = 1,
|
|
168
168
|
heif_encoded_data_type_HEVC_image = 2,
|
|
169
169
|
heif_encoded_data_type_HEVC_depth_SEI = 3
|
|
170
|
-
};
|
|
170
|
+
} heif_encoded_data_type;
|
|
171
171
|
|
|
172
172
|
|
|
173
173
|
// Specifies the class of the input image content.
|
|
174
174
|
// The encoder may want to encode different classes with different parameters
|
|
175
175
|
// (e.g. always encode alpha lossless)
|
|
176
|
-
enum heif_image_input_class
|
|
176
|
+
typedef enum heif_image_input_class
|
|
177
177
|
{
|
|
178
178
|
heif_image_input_class_normal = 1,
|
|
179
179
|
heif_image_input_class_alpha = 2,
|
|
180
180
|
heif_image_input_class_depth = 3,
|
|
181
181
|
heif_image_input_class_thumbnail = 4
|
|
182
|
-
};
|
|
182
|
+
} heif_image_input_class;
|
|
183
183
|
|
|
184
184
|
|
|
185
185
|
typedef struct heif_encoder_plugin
|
|
@@ -29,7 +29,7 @@ extern "C" {
|
|
|
29
29
|
|
|
30
30
|
// ------------------------- item properties -------------------------
|
|
31
31
|
|
|
32
|
-
enum heif_item_property_type
|
|
32
|
+
typedef enum heif_item_property_type
|
|
33
33
|
{
|
|
34
34
|
// heif_item_property_unknown = -1,
|
|
35
35
|
heif_item_property_type_invalid = 0,
|
|
@@ -42,7 +42,7 @@ enum heif_item_property_type
|
|
|
42
42
|
heif_item_property_type_tai_clock_info = heif_fourcc('t', 'a', 'i', 'c'),
|
|
43
43
|
heif_item_property_type_tai_timestamp = heif_fourcc('i', 't', 'a', 'i'),
|
|
44
44
|
heif_item_property_type_extended_language = heif_fourcc('e', 'l', 'n', 'g')
|
|
45
|
-
};
|
|
45
|
+
} heif_item_property_type;
|
|
46
46
|
|
|
47
47
|
// Get the heif_property_id for a heif_item_id.
|
|
48
48
|
// You may specify which property 'type' you want to receive.
|
|
@@ -105,12 +105,12 @@ heif_error heif_item_add_property_user_description(const heif_context* context,
|
|
|
105
105
|
LIBHEIF_API
|
|
106
106
|
void heif_property_user_description_release(heif_property_user_description*);
|
|
107
107
|
|
|
108
|
-
enum heif_transform_mirror_direction
|
|
108
|
+
typedef enum heif_transform_mirror_direction
|
|
109
109
|
{
|
|
110
110
|
heif_transform_mirror_direction_invalid = -1,
|
|
111
111
|
heif_transform_mirror_direction_vertical = 0, // flip image vertically
|
|
112
112
|
heif_transform_mirror_direction_horizontal = 1 // flip image horizontally
|
|
113
|
-
};
|
|
113
|
+
} heif_transform_mirror_direction;
|
|
114
114
|
|
|
115
115
|
// Will return 'heif_transform_mirror_direction_invalid' in case of error.
|
|
116
116
|
// If 'propertyId==0', it returns the first imir property found.
|
|
@@ -228,6 +228,18 @@ LIBHEIF_API
|
|
|
228
228
|
heif_error heif_camera_extrinsic_matrix_get_rotation_matrix(const heif_camera_extrinsic_matrix*,
|
|
229
229
|
double* out_matrix_row_major);
|
|
230
230
|
|
|
231
|
+
#if HEIF_WITH_OMAF
|
|
232
|
+
// ------------------------- OMAF projection information -------------------------
|
|
233
|
+
LIBHEIF_API
|
|
234
|
+
int heif_image_handle_has_omaf_image_projection(const heif_image_handle* handle);
|
|
235
|
+
|
|
236
|
+
LIBHEIF_API
|
|
237
|
+
heif_omaf_image_projection heif_image_handle_get_omaf_image_projection(const heif_image_handle* handle);
|
|
238
|
+
|
|
239
|
+
LIBHEIF_API
|
|
240
|
+
void heif_image_handle_set_omaf_image_projection(const heif_image_handle* handle, heif_omaf_image_projection image_projection);
|
|
241
|
+
#endif
|
|
242
|
+
|
|
231
243
|
#ifdef __cplusplus
|
|
232
244
|
}
|
|
233
245
|
#endif
|
|
@@ -42,7 +42,7 @@ typedef struct heif_region_item heif_region_item;
|
|
|
42
42
|
* Each region item will contain zero or more regions, which may have different geometry or
|
|
43
43
|
* mask representations.
|
|
44
44
|
*/
|
|
45
|
-
enum heif_region_type
|
|
45
|
+
typedef enum heif_region_type
|
|
46
46
|
{
|
|
47
47
|
/**
|
|
48
48
|
* Point geometry.
|
|
@@ -121,7 +121,7 @@ enum heif_region_type
|
|
|
121
121
|
* considered to form a closed surface. Only the edge is part of the region.
|
|
122
122
|
*/
|
|
123
123
|
heif_region_type_polyline = 6
|
|
124
|
-
};
|
|
124
|
+
} heif_region_type;
|
|
125
125
|
|
|
126
126
|
typedef struct heif_region heif_region;
|
|
127
127
|
|
|
@@ -45,6 +45,7 @@ typedef struct heif_security_limits
|
|
|
45
45
|
// in 1.5 GB memory need for YUV-4:2:0 or 4 GB for RGB32.
|
|
46
46
|
uint64_t max_image_size_pixels;
|
|
47
47
|
uint64_t max_number_of_tiles;
|
|
48
|
+
// Also used for polarization pattern (splz) size limit.
|
|
48
49
|
uint32_t max_bayer_pattern_pixels;
|
|
49
50
|
uint32_t max_items;
|
|
50
51
|
|
|
@@ -68,6 +69,10 @@ typedef struct heif_security_limits
|
|
|
68
69
|
|
|
69
70
|
uint32_t max_sequence_frames;
|
|
70
71
|
uint32_t max_number_of_file_brands;
|
|
72
|
+
|
|
73
|
+
// --- version 4
|
|
74
|
+
|
|
75
|
+
uint32_t max_bad_pixels;
|
|
71
76
|
} heif_security_limits;
|
|
72
77
|
|
|
73
78
|
|
|
@@ -82,7 +82,12 @@ int heif_context_number_of_sequence_tracks(const heif_context*);
|
|
|
82
82
|
|
|
83
83
|
/**
|
|
84
84
|
* Returns the IDs for each of the tracks stored in the HEIF file.
|
|
85
|
-
*
|
|
85
|
+
*
|
|
86
|
+
* The caller MUST allocate `out_track_id_array` with exactly
|
|
87
|
+
* heif_context_number_of_sequence_tracks() entries. The function writes
|
|
88
|
+
* that many IDs unconditionally. Passing a smaller array results in a
|
|
89
|
+
* buffer overflow (undefined behavior); there is no capacity parameter
|
|
90
|
+
* and no truncation.
|
|
86
91
|
*/
|
|
87
92
|
LIBHEIF_API
|
|
88
93
|
void heif_context_get_track_ids(const heif_context* ctx, uint32_t out_track_id_array[]);
|
|
@@ -111,13 +116,13 @@ heif_track* heif_context_get_track(const heif_context*, uint32_t id);
|
|
|
111
116
|
|
|
112
117
|
typedef uint32_t heif_track_type;
|
|
113
118
|
|
|
114
|
-
enum heif_track_type_4cc
|
|
119
|
+
typedef enum heif_track_type_4cc
|
|
115
120
|
{
|
|
116
121
|
heif_track_type_video = heif_fourcc('v', 'i', 'd', 'e'),
|
|
117
122
|
heif_track_type_image_sequence = heif_fourcc('p', 'i', 'c', 't'),
|
|
118
123
|
heif_track_type_auxiliary = heif_fourcc('a', 'u', 'x', 'v'),
|
|
119
124
|
heif_track_type_metadata = heif_fourcc('m', 'e', 't', 'a')
|
|
120
|
-
};
|
|
125
|
+
} heif_track_type_4cc;
|
|
121
126
|
|
|
122
127
|
/**
|
|
123
128
|
* Get the four-cc track handler type.
|
|
@@ -130,11 +135,11 @@ LIBHEIF_API
|
|
|
130
135
|
heif_track_type heif_track_get_track_handler_type(const heif_track*);
|
|
131
136
|
|
|
132
137
|
|
|
133
|
-
enum heif_auxiliary_track_info_type
|
|
138
|
+
typedef enum heif_auxiliary_track_info_type
|
|
134
139
|
{
|
|
135
140
|
heif_auxiliary_track_info_type_unknown = 0,
|
|
136
141
|
heif_auxiliary_track_info_type_alpha = 1
|
|
137
|
-
};
|
|
142
|
+
} heif_auxiliary_track_info_type;
|
|
138
143
|
|
|
139
144
|
LIBHEIF_API
|
|
140
145
|
enum heif_auxiliary_track_info_type heif_track_get_auxiliary_info_type(const heif_track*);
|
|
@@ -275,12 +280,12 @@ void heif_context_set_number_of_sequence_repetitions(heif_context*, uint32_t num
|
|
|
275
280
|
* The difference between `heif_sample_aux_info_presence_optional` and `heif_sample_aux_info_presence_mandatory`
|
|
276
281
|
* is that `heif_sample_aux_info_presence_mandatory` will throw an error if the data is missing when writing a sample.
|
|
277
282
|
*/
|
|
278
|
-
enum heif_sample_aux_info_presence
|
|
283
|
+
typedef enum heif_sample_aux_info_presence
|
|
279
284
|
{
|
|
280
285
|
heif_sample_aux_info_presence_none = 0,
|
|
281
286
|
heif_sample_aux_info_presence_optional = 1,
|
|
282
287
|
heif_sample_aux_info_presence_mandatory = 2
|
|
283
|
-
};
|
|
288
|
+
} heif_sample_aux_info_presence;
|
|
284
289
|
|
|
285
290
|
|
|
286
291
|
typedef struct heif_track_options heif_track_options;
|
|
@@ -338,7 +343,7 @@ void heif_track_options_set_gimi_track_id(heif_track_options*,
|
|
|
338
343
|
|
|
339
344
|
// --- writing visual tracks
|
|
340
345
|
|
|
341
|
-
enum heif_sequence_gop_structure
|
|
346
|
+
typedef enum heif_sequence_gop_structure
|
|
342
347
|
{
|
|
343
348
|
// Only independently decodable keyframes.
|
|
344
349
|
heif_sequence_gop_structure_intra_only,
|
|
@@ -349,7 +354,7 @@ enum heif_sequence_gop_structure
|
|
|
349
354
|
// All frame types are allowed, including frame reordering, to achieve
|
|
350
355
|
// the best compression ratio.
|
|
351
356
|
heif_sequence_gop_structure_unrestricted
|
|
352
|
-
};
|
|
357
|
+
} heif_sequence_gop_structure;
|
|
353
358
|
|
|
354
359
|
|
|
355
360
|
typedef struct heif_sequence_encoding_options
|
|
@@ -588,12 +593,12 @@ const heif_tai_clock_info* heif_track_get_tai_clock_info_of_first_cluster(heif_t
|
|
|
588
593
|
|
|
589
594
|
// --- track references
|
|
590
595
|
|
|
591
|
-
enum heif_track_reference_type
|
|
596
|
+
typedef enum heif_track_reference_type
|
|
592
597
|
{
|
|
593
598
|
heif_track_reference_type_description = heif_fourcc('c', 'd', 's', 'c'), // track_description
|
|
594
599
|
heif_track_reference_type_thumbnails = heif_fourcc('t', 'h', 'm', 'b'), // thumbnails
|
|
595
600
|
heif_track_reference_type_auxiliary = heif_fourcc('a', 'u', 'x', 'l') // auxiliary data (e.g. depth maps or alpha channel)
|
|
596
|
-
};
|
|
601
|
+
} heif_track_reference_type;
|
|
597
602
|
|
|
598
603
|
/**
|
|
599
604
|
* Add a reference between tracks.
|
|
@@ -610,7 +615,12 @@ size_t heif_track_get_number_of_track_reference_types(const heif_track*);
|
|
|
610
615
|
|
|
611
616
|
/**
|
|
612
617
|
* List the reference types used in this track.
|
|
613
|
-
*
|
|
618
|
+
*
|
|
619
|
+
* The caller MUST allocate `out_reference_types` with exactly
|
|
620
|
+
* heif_track_get_number_of_track_reference_types() entries. The function
|
|
621
|
+
* writes that many values unconditionally. Passing a smaller array
|
|
622
|
+
* results in a buffer overflow (undefined behavior); there is no
|
|
623
|
+
* capacity parameter and no truncation.
|
|
614
624
|
*/
|
|
615
625
|
LIBHEIF_API
|
|
616
626
|
void heif_track_get_track_reference_types(const heif_track*, uint32_t out_reference_types[]);
|
|
@@ -21,6 +21,7 @@
|
|
|
21
21
|
#ifndef LIBHEIF_HEIF_UNCOMPRESSED_H
|
|
22
22
|
#define LIBHEIF_HEIF_UNCOMPRESSED_H
|
|
23
23
|
|
|
24
|
+
#include "libheif/heif_uncompressed_types.h"
|
|
24
25
|
#include "libheif/heif.h"
|
|
25
26
|
|
|
26
27
|
#ifdef __cplusplus
|
|
@@ -34,37 +35,217 @@ extern "C" {
|
|
|
34
35
|
* See heif_metadata_compression for more information.
|
|
35
36
|
*/
|
|
36
37
|
|
|
37
|
-
//
|
|
38
|
+
// heif_uncompressed_component_type and heif_bayer_pattern_pixel are defined in heif_uncompressed_types.h.
|
|
39
|
+
|
|
40
|
+
// Set a Bayer / filter array pattern on an image.
|
|
41
|
+
// The pattern is a 2D array of component indices with dimensions pattern_width x pattern_height.
|
|
42
|
+
// The number of entries in patternPixels must be pattern_width * pattern_height.
|
|
43
|
+
// The component_index values are indices into the cmpd component definition table.
|
|
44
|
+
// On the encoder path, these indices are generated by heif_image_add_component() and the
|
|
45
|
+
// encoder adds reference components to cmpd for pattern entries that don't have image planes.
|
|
46
|
+
// On the decoder path, they come directly from the cpat box.
|
|
47
|
+
LIBHEIF_API
|
|
48
|
+
heif_error heif_image_set_bayer_pattern(heif_image*,
|
|
49
|
+
uint32_t bayer_component_id,
|
|
50
|
+
uint16_t pattern_width,
|
|
51
|
+
uint16_t pattern_height,
|
|
52
|
+
const heif_bayer_pattern_pixel* patternPixels);
|
|
53
|
+
|
|
54
|
+
LIBHEIF_API
|
|
55
|
+
heif_error heif_image_add_bayer_component(heif_image*,
|
|
56
|
+
uint16_t component_type,
|
|
57
|
+
uint32_t* out_component_id);
|
|
58
|
+
|
|
59
|
+
// Returns whether the image has a Bayer / filter array pattern.
|
|
60
|
+
// If the image has a pattern, out_pattern_width and out_pattern_height are set.
|
|
61
|
+
// Either output pointer may be NULL if the caller does not need that value.
|
|
62
|
+
LIBHEIF_API
|
|
63
|
+
int heif_image_get_bayer_pattern_size(const heif_image*,
|
|
64
|
+
uint32_t bayer_component_id,
|
|
65
|
+
uint16_t* out_pattern_width,
|
|
66
|
+
uint16_t* out_pattern_height);
|
|
67
|
+
|
|
68
|
+
// Get the Bayer / filter array pattern pixels.
|
|
69
|
+
// The caller must provide an array large enough for pattern_width * pattern_height entries
|
|
70
|
+
// (use heif_image_get_bayer_pattern_size() to query the dimensions first).
|
|
71
|
+
// Returns heif_error_Ok on success, or an error if no pattern is set.
|
|
72
|
+
LIBHEIF_API
|
|
73
|
+
heif_error heif_image_get_bayer_pattern(const heif_image*,
|
|
74
|
+
uint32_t bayer_component_id,
|
|
75
|
+
heif_bayer_pattern_pixel* out_patternPixels);
|
|
38
76
|
|
|
39
|
-
//
|
|
40
|
-
// contain the allowed values.
|
|
41
|
-
enum heif_unci_compression
|
|
42
|
-
{
|
|
43
|
-
heif_unci_compression_off = 0,
|
|
44
|
-
//heif_unci_compression_auto = 1,
|
|
45
|
-
//heif_unci_compression_unknown = 2, // only used when reading unknown method from input file
|
|
46
|
-
heif_unci_compression_deflate = 3,
|
|
47
|
-
heif_unci_compression_zlib = 4,
|
|
48
|
-
heif_unci_compression_brotli = 5
|
|
49
|
-
};
|
|
77
|
+
// --- Polarization pattern (ISO 23001-17, Section 6.1.5)
|
|
50
78
|
|
|
79
|
+
// Special float value indicating "no polarization filter" at a pattern position.
|
|
80
|
+
// On the wire this is the IEEE 754 bit pattern 0xFFFFFFFF (a signaling NaN).
|
|
81
|
+
// Test with heif_polarization_angle_is_no_filter() below, or with isnan()/std::isnan().
|
|
51
82
|
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
83
|
+
// Returns a float with the 0xFFFFFFFF bit pattern (NaN) representing "no polarization filter".
|
|
84
|
+
LIBHEIF_API
|
|
85
|
+
float heif_polarization_angle_no_filter(void);
|
|
55
86
|
|
|
56
|
-
|
|
87
|
+
// Returns non-zero if the given angle has the "no filter" bit pattern (0xFFFFFFFF).
|
|
88
|
+
LIBHEIF_API
|
|
89
|
+
int heif_polarization_angle_is_no_filter(float angle);
|
|
57
90
|
|
|
58
|
-
|
|
59
|
-
|
|
91
|
+
// Add a polarization pattern to an image.
|
|
92
|
+
// component_indices: array of component indices this pattern applies to (may be NULL if num_component_indices == 0,
|
|
93
|
+
// meaning the pattern applies to all components).
|
|
94
|
+
// polarization_angles: array of pattern_width * pattern_height float values.
|
|
95
|
+
// Each is an angle in degrees [0.0, 360.0), or heif_polarization_angle_no_filter() for "no filter".
|
|
96
|
+
// Multiple patterns can be added (one per distinct component group).
|
|
97
|
+
LIBHEIF_API
|
|
98
|
+
heif_error heif_image_add_polarization_pattern(heif_image*,
|
|
99
|
+
uint32_t num_component_indices,
|
|
100
|
+
const uint32_t* component_indices,
|
|
101
|
+
uint16_t pattern_width,
|
|
102
|
+
uint16_t pattern_height,
|
|
103
|
+
const float* polarization_angles);
|
|
60
104
|
|
|
61
|
-
|
|
62
|
-
|
|
105
|
+
// Returns the number of polarization patterns on this image (0 if none).
|
|
106
|
+
LIBHEIF_API
|
|
107
|
+
int heif_image_get_number_of_polarization_patterns(const heif_image*);
|
|
63
108
|
|
|
64
|
-
|
|
109
|
+
// Get the sizes/dimensions of a polarization pattern (to allocate arrays for the data query).
|
|
110
|
+
LIBHEIF_API
|
|
111
|
+
heif_error heif_image_get_polarization_pattern_info(const heif_image*,
|
|
112
|
+
int pattern_index,
|
|
113
|
+
uint32_t* out_num_component_indices,
|
|
114
|
+
uint16_t* out_pattern_width,
|
|
115
|
+
uint16_t* out_pattern_height);
|
|
65
116
|
|
|
66
|
-
|
|
67
|
-
|
|
117
|
+
// Get the actual data of a polarization pattern.
|
|
118
|
+
// Caller must provide pre-allocated arrays:
|
|
119
|
+
// out_component_indices: num_component_indices entries (may be NULL if num_component_indices == 0)
|
|
120
|
+
// out_polarization_angles: pattern_width * pattern_height entries
|
|
121
|
+
LIBHEIF_API
|
|
122
|
+
heif_error heif_image_get_polarization_pattern_data(const heif_image*,
|
|
123
|
+
int pattern_index,
|
|
124
|
+
uint32_t* out_component_indices,
|
|
125
|
+
float* out_polarization_angles);
|
|
126
|
+
|
|
127
|
+
// Find the polarization pattern index that applies to a given component index.
|
|
128
|
+
// Returns the pattern index (>= 0), or -1 if no pattern matches.
|
|
129
|
+
// A pattern with an empty component list (component_count == 0) matches all components.
|
|
130
|
+
LIBHEIF_API
|
|
131
|
+
int heif_image_get_polarization_pattern_index_for_component(const heif_image*,
|
|
132
|
+
uint32_t component_index);
|
|
133
|
+
|
|
134
|
+
|
|
135
|
+
// --- Sensor bad pixels map (ISO 23001-17, Section 6.1.7)
|
|
136
|
+
|
|
137
|
+
// struct heif_bad_pixel is defined in heif_uncompressed_types.h.
|
|
138
|
+
|
|
139
|
+
// Add a sensor bad pixels map to an image.
|
|
140
|
+
// component_indices: array of component indices this map applies to (may be NULL if num_component_indices == 0,
|
|
141
|
+
// meaning the map applies to all components).
|
|
142
|
+
// Multiple maps can be added (one per distinct component group with different defects).
|
|
143
|
+
LIBHEIF_API
|
|
144
|
+
heif_error heif_image_add_sensor_bad_pixels_map(heif_image*,
|
|
145
|
+
uint32_t num_component_indices,
|
|
146
|
+
const uint32_t* component_indices,
|
|
147
|
+
int correction_applied,
|
|
148
|
+
uint32_t num_bad_rows,
|
|
149
|
+
const uint32_t* bad_rows,
|
|
150
|
+
uint32_t num_bad_columns,
|
|
151
|
+
const uint32_t* bad_columns,
|
|
152
|
+
uint32_t num_bad_pixels,
|
|
153
|
+
const heif_bad_pixel* bad_pixels);
|
|
154
|
+
|
|
155
|
+
// Returns the number of sensor bad pixels maps on this image (0 if none).
|
|
156
|
+
LIBHEIF_API
|
|
157
|
+
int heif_image_get_number_of_sensor_bad_pixels_maps(const heif_image*);
|
|
158
|
+
|
|
159
|
+
// Get the sizes of a sensor bad pixels map (to allocate arrays for the data query).
|
|
160
|
+
LIBHEIF_API
|
|
161
|
+
heif_error heif_image_get_sensor_bad_pixels_map_info(const heif_image*,
|
|
162
|
+
int map_index,
|
|
163
|
+
uint32_t* out_num_component_indices,
|
|
164
|
+
int* out_correction_applied,
|
|
165
|
+
uint32_t* out_num_bad_rows,
|
|
166
|
+
uint32_t* out_num_bad_columns,
|
|
167
|
+
uint32_t* out_num_bad_pixels);
|
|
168
|
+
|
|
169
|
+
// Get the actual data of a sensor bad pixels map.
|
|
170
|
+
// Caller must provide pre-allocated arrays:
|
|
171
|
+
// out_component_indices: num_component_indices entries (may be NULL if num_component_indices == 0)
|
|
172
|
+
// out_bad_rows: num_bad_rows entries (may be NULL if num_bad_rows == 0)
|
|
173
|
+
// out_bad_columns: num_bad_columns entries (may be NULL if num_bad_columns == 0)
|
|
174
|
+
// out_bad_pixels: num_bad_pixels entries (may be NULL if num_bad_pixels == 0)
|
|
175
|
+
LIBHEIF_API
|
|
176
|
+
heif_error heif_image_get_sensor_bad_pixels_map_data(const heif_image*,
|
|
177
|
+
int map_index,
|
|
178
|
+
uint32_t* out_component_indices,
|
|
179
|
+
uint32_t* out_bad_rows,
|
|
180
|
+
uint32_t* out_bad_columns,
|
|
181
|
+
struct heif_bad_pixel* out_bad_pixels);
|
|
182
|
+
|
|
183
|
+
|
|
184
|
+
// --- Sensor non-uniformity correction (ISO 23001-17, Section 6.1.6)
|
|
185
|
+
|
|
186
|
+
// Add a sensor non-uniformity correction table to an image.
|
|
187
|
+
// component_indices: array of component indices this NUC applies to (may be NULL if num_component_indices == 0,
|
|
188
|
+
// meaning it applies to all components).
|
|
189
|
+
// nuc_gains and nuc_offsets: arrays of image_width * image_height float values.
|
|
190
|
+
// Correction equation: y = nuc_gain * x + nuc_offset.
|
|
191
|
+
// Multiple NUC tables can be added (one per distinct component group).
|
|
192
|
+
LIBHEIF_API
|
|
193
|
+
heif_error heif_image_add_sensor_nuc(heif_image*,
|
|
194
|
+
uint32_t num_component_indices,
|
|
195
|
+
const uint32_t* component_indices,
|
|
196
|
+
int nuc_is_applied,
|
|
197
|
+
uint32_t image_width,
|
|
198
|
+
uint32_t image_height,
|
|
199
|
+
const float* nuc_gains,
|
|
200
|
+
const float* nuc_offsets);
|
|
201
|
+
|
|
202
|
+
// Returns the number of sensor NUC tables on this image (0 if none).
|
|
203
|
+
LIBHEIF_API
|
|
204
|
+
int heif_image_get_number_of_sensor_nucs(const heif_image*);
|
|
205
|
+
|
|
206
|
+
// Get the sizes of a sensor NUC table (to allocate arrays for the data query).
|
|
207
|
+
LIBHEIF_API
|
|
208
|
+
heif_error heif_image_get_sensor_nuc_info(const heif_image*,
|
|
209
|
+
int nuc_index,
|
|
210
|
+
uint32_t* out_num_component_indices,
|
|
211
|
+
int* out_nuc_is_applied,
|
|
212
|
+
uint32_t* out_image_width,
|
|
213
|
+
uint32_t* out_image_height);
|
|
214
|
+
|
|
215
|
+
// Get the actual data of a sensor NUC table.
|
|
216
|
+
// Caller must provide pre-allocated arrays:
|
|
217
|
+
// out_component_indices: num_component_indices entries (may be NULL if num_component_indices == 0)
|
|
218
|
+
// out_nuc_gains: image_width * image_height entries
|
|
219
|
+
// out_nuc_offsets: image_width * image_height entries
|
|
220
|
+
LIBHEIF_API
|
|
221
|
+
heif_error heif_image_get_sensor_nuc_data(const heif_image*,
|
|
222
|
+
int nuc_index,
|
|
223
|
+
uint32_t* out_component_indices,
|
|
224
|
+
float* out_nuc_gains,
|
|
225
|
+
float* out_nuc_offsets);
|
|
226
|
+
|
|
227
|
+
|
|
228
|
+
// heif_chroma420_sample_location is defined in heif_uncompressed_types.h.
|
|
229
|
+
|
|
230
|
+
// --- Chroma sample location (ISO 23001-17, Section 6.1.4)
|
|
231
|
+
|
|
232
|
+
// Set the chroma sample location on an image.
|
|
233
|
+
// chroma_location must be in the range 0-6 (see heif_chroma420_sample_location).
|
|
234
|
+
LIBHEIF_API
|
|
235
|
+
heif_error heif_image_set_chroma_location(heif_image*, uint8_t chroma_location);
|
|
236
|
+
|
|
237
|
+
// Returns non-zero if the image has a chroma sample location set.
|
|
238
|
+
LIBHEIF_API
|
|
239
|
+
int heif_image_has_chroma_location(const heif_image*);
|
|
240
|
+
|
|
241
|
+
// Returns the chroma sample location (0-6), or 0 if none is set.
|
|
242
|
+
LIBHEIF_API
|
|
243
|
+
uint8_t heif_image_get_chroma_location(const heif_image*);
|
|
244
|
+
|
|
245
|
+
|
|
246
|
+
// --- 'unci' images
|
|
247
|
+
|
|
248
|
+
// heif_unci_compression and heif_unci_image_parameters are defined in heif_uncompressed_types.h.
|
|
68
249
|
|
|
69
250
|
LIBHEIF_API
|
|
70
251
|
heif_unci_image_parameters* heif_unci_image_parameters_alloc(void);
|
|
@@ -102,6 +283,129 @@ heif_error heif_context_add_empty_unci_image(heif_context* ctx,
|
|
|
102
283
|
const heif_image* prototype,
|
|
103
284
|
heif_image_handle** out_unci_image_handle);
|
|
104
285
|
|
|
286
|
+
// heif_channel_datatype, heif_complex32, heif_complex64 are defined in heif_uncompressed_types.h.
|
|
287
|
+
|
|
288
|
+
// --- index-based component access (for ISO 23001-17 multi-component images)
|
|
289
|
+
|
|
290
|
+
// Returns the number of components that have pixel data (planes) in this image.
|
|
291
|
+
LIBHEIF_API
|
|
292
|
+
uint32_t heif_image_get_number_of_used_components(const heif_image*);
|
|
293
|
+
|
|
294
|
+
// Fills `out_component_indices` with the valid component indices.
|
|
295
|
+
// The caller must allocate an array of at least heif_image_get_number_of_used_components() elements.
|
|
296
|
+
LIBHEIF_API
|
|
297
|
+
void heif_image_get_used_component_ids(const heif_image*, uint32_t* out_component_ids);
|
|
298
|
+
|
|
299
|
+
LIBHEIF_API
|
|
300
|
+
enum heif_channel heif_image_get_component_channel(const heif_image*, uint32_t component_idx);
|
|
301
|
+
|
|
302
|
+
LIBHEIF_API
|
|
303
|
+
uint32_t heif_image_get_component_width(const heif_image*, uint32_t component_idx);
|
|
304
|
+
|
|
305
|
+
LIBHEIF_API
|
|
306
|
+
uint32_t heif_image_get_component_height(const heif_image*, uint32_t component_idx);
|
|
307
|
+
|
|
308
|
+
LIBHEIF_API
|
|
309
|
+
int heif_image_get_component_bits_per_pixel(const heif_image*, uint32_t component_idx);
|
|
310
|
+
|
|
311
|
+
LIBHEIF_API
|
|
312
|
+
uint16_t heif_image_get_component_type(const heif_image*, uint32_t component_idx);
|
|
313
|
+
|
|
314
|
+
// TODO
|
|
315
|
+
//LIBHEIF_API
|
|
316
|
+
//heif_error heif_image_get_component_indices_of_interleaved_channel(const heif_image* image, uint32_t* component_indices, uint8_t* nComponents_in_out);
|
|
317
|
+
|
|
318
|
+
LIBHEIF_API
|
|
319
|
+
heif_error heif_image_add_component(heif_image* image,
|
|
320
|
+
int width, int height,
|
|
321
|
+
uint16_t component_type,
|
|
322
|
+
heif_component_datatype datatype,
|
|
323
|
+
int bit_depth,
|
|
324
|
+
uint32_t* out_component_idx);
|
|
325
|
+
|
|
326
|
+
LIBHEIF_API
|
|
327
|
+
const uint8_t* heif_image_get_component_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
328
|
+
|
|
329
|
+
LIBHEIF_API
|
|
330
|
+
uint8_t* heif_image_get_component(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
331
|
+
|
|
332
|
+
LIBHEIF_API
|
|
333
|
+
const uint16_t* heif_image_get_component_uint16_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
334
|
+
|
|
335
|
+
LIBHEIF_API
|
|
336
|
+
uint16_t* heif_image_get_component_uint16(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
337
|
+
|
|
338
|
+
LIBHEIF_API
|
|
339
|
+
const uint32_t* heif_image_get_component_uint32_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
340
|
+
|
|
341
|
+
LIBHEIF_API
|
|
342
|
+
uint32_t* heif_image_get_component_uint32(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
343
|
+
|
|
344
|
+
LIBHEIF_API
|
|
345
|
+
const uint64_t* heif_image_get_component_uint64_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
346
|
+
|
|
347
|
+
LIBHEIF_API
|
|
348
|
+
uint64_t* heif_image_get_component_uint64(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
349
|
+
|
|
350
|
+
LIBHEIF_API
|
|
351
|
+
const int8_t* heif_image_get_component_int8_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
352
|
+
|
|
353
|
+
LIBHEIF_API
|
|
354
|
+
int8_t* heif_image_get_component_int8(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
355
|
+
|
|
356
|
+
LIBHEIF_API
|
|
357
|
+
const int16_t* heif_image_get_component_int16_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
358
|
+
|
|
359
|
+
LIBHEIF_API
|
|
360
|
+
int16_t* heif_image_get_component_int16(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
361
|
+
|
|
362
|
+
LIBHEIF_API
|
|
363
|
+
const int32_t* heif_image_get_component_int32_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
364
|
+
|
|
365
|
+
LIBHEIF_API
|
|
366
|
+
int32_t* heif_image_get_component_int32(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
367
|
+
|
|
368
|
+
LIBHEIF_API
|
|
369
|
+
const int64_t* heif_image_get_component_int64_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
370
|
+
|
|
371
|
+
LIBHEIF_API
|
|
372
|
+
int64_t* heif_image_get_component_int64(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
373
|
+
|
|
374
|
+
LIBHEIF_API
|
|
375
|
+
const float* heif_image_get_component_float32_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
376
|
+
|
|
377
|
+
LIBHEIF_API
|
|
378
|
+
float* heif_image_get_component_float32(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
379
|
+
|
|
380
|
+
LIBHEIF_API
|
|
381
|
+
const double* heif_image_get_component_float64_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
382
|
+
|
|
383
|
+
LIBHEIF_API
|
|
384
|
+
double* heif_image_get_component_float64(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
385
|
+
|
|
386
|
+
LIBHEIF_API
|
|
387
|
+
const heif_complex32* heif_image_get_component_complex32_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
388
|
+
|
|
389
|
+
LIBHEIF_API
|
|
390
|
+
heif_complex32* heif_image_get_component_complex32(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
391
|
+
|
|
392
|
+
LIBHEIF_API
|
|
393
|
+
const heif_complex64* heif_image_get_component_complex64_readonly(const heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
394
|
+
|
|
395
|
+
LIBHEIF_API
|
|
396
|
+
heif_complex64* heif_image_get_component_complex64(heif_image*, uint32_t component_idx, size_t* out_stride);
|
|
397
|
+
|
|
398
|
+
|
|
399
|
+
// --- GIMI component content IDs (set before encoding)
|
|
400
|
+
|
|
401
|
+
// Set a GIMI component content ID for a single cmpd component.
|
|
402
|
+
// If the internal array is too small, it will be resized (new entries default to empty strings).
|
|
403
|
+
// These are written into an ItemComponentContentIDProperty box during encoding.
|
|
404
|
+
LIBHEIF_API
|
|
405
|
+
void heif_image_set_gimi_component_content_id(heif_image*,
|
|
406
|
+
uint32_t component_idx,
|
|
407
|
+
const char* content_id);
|
|
408
|
+
|
|
105
409
|
#ifdef __cplusplus
|
|
106
410
|
}
|
|
107
411
|
#endif
|