@revizly/sharp-libvips-dev 1.0.19 → 1.0.21

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.
Files changed (150) hide show
  1. package/cplusplus/vips-operators.cpp +39 -0
  2. package/include/archive.h +53 -2
  3. package/include/archive_entry.h +56 -25
  4. package/include/ffi.h +20 -2
  5. package/include/fontconfig/fontconfig.h +12 -2
  6. package/include/glib-2.0/gio/gio-visibility.h +34 -0
  7. package/include/glib-2.0/gio/gzlibcompressor.h +6 -0
  8. package/include/glib-2.0/girepository/gi-visibility.h +34 -0
  9. package/include/glib-2.0/girepository/girepository.h +3 -0
  10. package/include/glib-2.0/girepository/gitypes.h +6 -0
  11. package/include/glib-2.0/glib/gbitlock.h +11 -0
  12. package/include/glib-2.0/glib/gdate.h +6 -0
  13. package/include/glib-2.0/glib/glib-visibility.h +34 -0
  14. package/include/glib-2.0/glib/gmain.h +13 -10
  15. package/include/glib-2.0/glib/gmarkup.h +4 -0
  16. package/include/glib-2.0/glib/gmessages.h +4 -1
  17. package/include/glib-2.0/glib/gstring.h +2 -0
  18. package/include/glib-2.0/glib/gversionmacros.h +9 -0
  19. package/include/glib-2.0/gmodule/gmodule-visibility.h +34 -0
  20. package/include/glib-2.0/gobject/gobject-visibility.h +34 -0
  21. package/include/harfbuzz/hb-deprecated.h +4 -4
  22. package/include/harfbuzz/hb-font.h +120 -9
  23. package/include/harfbuzz/hb-version.h +3 -3
  24. package/include/hwy/abort.h +2 -19
  25. package/include/hwy/aligned_allocator.h +11 -7
  26. package/include/hwy/auto_tune.h +504 -0
  27. package/include/hwy/base.h +425 -104
  28. package/include/hwy/cache_control.h +16 -0
  29. package/include/hwy/detect_compiler_arch.h +32 -1
  30. package/include/hwy/detect_targets.h +251 -67
  31. package/include/hwy/foreach_target.h +35 -0
  32. package/include/hwy/highway.h +185 -76
  33. package/include/hwy/nanobenchmark.h +1 -19
  34. package/include/hwy/ops/arm_neon-inl.h +969 -458
  35. package/include/hwy/ops/arm_sve-inl.h +1137 -359
  36. package/include/hwy/ops/emu128-inl.h +97 -11
  37. package/include/hwy/ops/generic_ops-inl.h +1222 -34
  38. package/include/hwy/ops/loongarch_lasx-inl.h +4664 -0
  39. package/include/hwy/ops/loongarch_lsx-inl.h +5933 -0
  40. package/include/hwy/ops/ppc_vsx-inl.h +306 -126
  41. package/include/hwy/ops/rvv-inl.h +546 -51
  42. package/include/hwy/ops/scalar-inl.h +77 -22
  43. package/include/hwy/ops/set_macros-inl.h +133 -17
  44. package/include/hwy/ops/shared-inl.h +50 -10
  45. package/include/hwy/ops/wasm_128-inl.h +137 -92
  46. package/include/hwy/ops/x86_128-inl.h +773 -214
  47. package/include/hwy/ops/x86_256-inl.h +712 -255
  48. package/include/hwy/ops/x86_512-inl.h +429 -753
  49. package/include/hwy/ops/x86_avx3-inl.h +501 -0
  50. package/include/hwy/per_target.h +2 -1
  51. package/include/hwy/profiler.h +622 -486
  52. package/include/hwy/targets.h +62 -20
  53. package/include/hwy/timer-inl.h +8 -160
  54. package/include/hwy/timer.h +170 -3
  55. package/include/hwy/x86_cpuid.h +81 -0
  56. package/include/libheif/heif.h +16 -2603
  57. package/include/libheif/heif_aux_images.h +182 -0
  58. package/include/libheif/heif_brands.h +373 -0
  59. package/include/libheif/heif_color.h +357 -0
  60. package/include/libheif/heif_context.h +329 -0
  61. package/include/libheif/heif_cxx.h +21 -1
  62. package/include/libheif/heif_decoding.h +162 -0
  63. package/include/libheif/heif_encoding.h +391 -0
  64. package/include/libheif/heif_entity_groups.h +60 -0
  65. package/include/libheif/heif_error.h +302 -0
  66. package/include/libheif/heif_image.h +352 -0
  67. package/include/libheif/heif_image_handle.h +120 -0
  68. package/include/libheif/heif_items.h +45 -45
  69. package/include/libheif/heif_library.h +216 -0
  70. package/include/libheif/heif_metadata.h +133 -0
  71. package/include/libheif/heif_plugin.h +53 -41
  72. package/include/libheif/heif_properties.h +73 -36
  73. package/include/libheif/heif_regions.h +100 -100
  74. package/include/libheif/heif_security.h +102 -0
  75. package/include/libheif/heif_sequences.h +577 -0
  76. package/include/libheif/heif_tai_timestamps.h +202 -0
  77. package/include/libheif/heif_tiling.h +137 -0
  78. package/include/libheif/heif_uncompressed.h +109 -0
  79. package/include/libheif/heif_version.h +2 -2
  80. package/include/libpng16/png.h +35 -16
  81. package/include/libpng16/pngconf.h +1 -1
  82. package/include/libpng16/pnglibconf.h +1 -1
  83. package/include/librsvg-2.0/librsvg/rsvg-version.h +2 -2
  84. package/include/libxml2/libxml/HTMLparser.h +2 -2
  85. package/include/libxml2/libxml/parser.h +4 -2
  86. package/include/libxml2/libxml/xmlIO.h +2 -2
  87. package/include/libxml2/libxml/xmlerror.h +2 -1
  88. package/include/libxml2/libxml/xmlversion.h +4 -4
  89. package/include/pango-1.0/pango/pango-attributes.h +1 -1
  90. package/include/pango-1.0/pango/pango-features.h +2 -2
  91. package/include/pixman-1/pixman-version.h +2 -2
  92. package/include/pixman-1/pixman.h +11 -0
  93. package/include/png.h +35 -16
  94. package/include/pngconf.h +1 -1
  95. package/include/pnglibconf.h +1 -1
  96. package/include/vips/VImage8.h +59 -14
  97. package/include/vips/arithmetic.h +34 -34
  98. package/include/vips/basic.h +4 -0
  99. package/include/vips/buf.h +0 -5
  100. package/include/vips/colour.h +0 -6
  101. package/include/vips/connection.h +25 -37
  102. package/include/vips/enumtypes.h +11 -2
  103. package/include/vips/foreign.h +71 -43
  104. package/include/vips/format.h +5 -5
  105. package/include/vips/gate.h +0 -11
  106. package/include/vips/header.h +11 -11
  107. package/include/vips/image.h +7 -2
  108. package/include/vips/interpolate.h +0 -2
  109. package/include/vips/memory.h +4 -0
  110. package/include/vips/object.h +14 -18
  111. package/include/vips/operation.h +0 -2
  112. package/include/vips/private.h +50 -0
  113. package/include/vips/region.h +0 -2
  114. package/include/vips/thread.h +1 -9
  115. package/include/vips/threadpool.h +0 -6
  116. package/include/vips/type.h +12 -8
  117. package/include/vips/util.h +5 -73
  118. package/include/vips/vector.h +0 -4
  119. package/include/vips/version.h +5 -5
  120. package/include/webp/decode.h +11 -2
  121. package/include/webp/demux.h +2 -0
  122. package/include/webp/encode.h +2 -0
  123. package/include/webp/mux_types.h +1 -0
  124. package/include/webp/sharpyuv/sharpyuv.h +1 -1
  125. package/include/webp/types.h +2 -2
  126. package/include/zlib.h +3 -3
  127. package/package.json +1 -1
  128. package/versions.json +15 -15
  129. package/include/cpuinfo.h +0 -2319
  130. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-animation.h +0 -221
  131. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-autocleanups.h +0 -37
  132. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-core.h +0 -525
  133. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-enum-types.h +0 -40
  134. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-features.h +0 -115
  135. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-io.h +0 -481
  136. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-loader.h +0 -113
  137. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-macros.h +0 -718
  138. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-marshal.h +0 -33
  139. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-simple-anim.h +0 -70
  140. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf-transform.h +0 -168
  141. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixbuf.h +0 -46
  142. package/include/gdk-pixbuf-2.0/gdk-pixbuf/gdk-pixdata.h +0 -165
  143. package/include/harfbuzz/hb-subset-repacker.h +0 -81
  144. package/include/hwy/ops/tuple-inl.h +0 -125
  145. package/include/svt-av1/EbDebugMacros.h +0 -83
  146. package/include/svt-av1/EbSvtAv1.h +0 -432
  147. package/include/svt-av1/EbSvtAv1Enc.h +0 -1067
  148. package/include/svt-av1/EbSvtAv1ErrorCodes.h +0 -67
  149. package/include/svt-av1/EbSvtAv1Formats.h +0 -126
  150. package/include/svt-av1/EbSvtAv1Metadata.h +0 -156
@@ -1,83 +0,0 @@
1
- /*
2
- * Copyright(c) 2020 Intel Corporation
3
- *
4
- * This source code is subject to the terms of the BSD 2 Clause License and
5
- * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6
- * was not distributed with this source code in the LICENSE file, you can
7
- * obtain it at https://www.aomedia.org/license/software-license. If the Alliance for Open
8
- * Media Patent License 1.0 was not distributed with this source code in the
9
- * PATENTS file, you can obtain it at https://www.aomedia.org/license/patent-license.
10
- */
11
-
12
- /*
13
- * This file contains only debug macros that are used during the development
14
- * and are supposed to be cleaned up every tag cycle
15
- * all macros must have the following format:
16
- * - adding a new feature should be prefixed by FTR_
17
- * - tuning a feature should be prefixed by TUNE_
18
- * - enabling a feature should be prefixed by EN_
19
- * - disabling a feature should be prefixed by DIS_
20
- * - bug fixes should be prefixed by FIX_
21
- * - code refactors should be prefixed by RFCTR_
22
- * - code cleanups should be prefixed by CLN_
23
- * - optimizations should be prefixed by OPT_
24
- * - all macros must have a coherent comment explaining what the MACRO is doing
25
- * - #if 0 / #if 1 are not to be used
26
- */
27
-
28
- #ifndef EbDebugMacros_h
29
- #define EbDebugMacros_h
30
-
31
- // clang-format off
32
-
33
- #ifdef __cplusplus
34
- extern "C" {
35
- #endif // __cplusplus
36
-
37
- //FOR DEBUGGING - Do not remove
38
- #define FIX_AVX512_ICL_RTCD 1 // Correct avx512icl support detection
39
- #define OPT_LD_LATENCY2 1 // Latency optimization for low delay - to keep the Macro for backwards testing until 3.0
40
- #define LOG_ENC_DONE 0 // log encoder job one
41
- #define DEBUG_TPL 0 // Prints to debug TPL
42
- #define DETAILED_FRAME_OUTPUT 0 // Prints detailed frame output from the library for debugging
43
- #define TUNE_CHROMA_SSIM 0 // Allows for Chroma and SSIM BDR-based Tuning
44
- #define TUNE_CQP_CHROMA_SSIM 0 // Tune CQP qp scaling towards improved chroma and SSIM BDR
45
-
46
- #define MIN_PIC_PARALLELIZATION 0 // Use the minimum amount of picture parallelization
47
- #define SRM_REPORT 0 // Report SRM status
48
- #define LAD_MG_PRINT 0 // Report LAD
49
- #define RC_NO_R2R 0 // This is a debugging flag for RC and makes encoder to run with no R2R in RC mode
50
- // Note that the speed might impacted significantly
51
- #if !RC_NO_R2R
52
- #define FTR_KF_ON_FLY_SAMPLE 0 // Sample code to signal KF
53
- #define FTR_RES_ON_FLY_SAMPLE 0 // Sample functions to change the resolution on the fly
54
- #define FTR_RATE_ON_FLY_SAMPLE 0 // Sample functions to change bit rate
55
- #endif
56
- // Super-resolution debugging code
57
- #define DEBUG_SCALING 0
58
- #define DEBUG_TF 0
59
- #define DEBUG_UPSCALING 0
60
- #define DEBUG_SUPERRES_RECODE 0
61
- #define DEBUG_SUPERRES_ENERGY 0
62
- #define DEBUG_RC_CAP_LOG 0 // Prints for RC cap
63
-
64
- // Switch frame debugging code
65
- #define DEBUG_SFRAME 0
66
-
67
- // Variance boost debugging code
68
- #define DEBUG_VAR_BOOST 0
69
- #define DEBUG_VAR_BOOST_QP 0
70
- #define DEBUG_VAR_BOOST_STATS 0
71
-
72
- // Quantization matrices
73
- #define DEBUG_QM_LEVEL 0
74
- #define DEBUG_STARTUP_MG_SIZE 0
75
- #define DEBUG_SEGMENT_QP 0
76
- #define DEBUG_ROI 0
77
- #ifdef __cplusplus
78
- }
79
- #endif // __cplusplus
80
-
81
- // clang-format on
82
-
83
- #endif // EbDebugMacros_h
@@ -1,432 +0,0 @@
1
- /*
2
- * Copyright(c) 2019 Intel Corporation
3
- *
4
- * This source code is subject to the terms of the BSD 2 Clause License and
5
- * the Alliance for Open Media Patent License 1.0. If the BSD 2 Clause License
6
- * was not distributed with this source code in the LICENSE file, you can
7
- * obtain it at https://www.aomedia.org/license/software-license. If the Alliance for Open
8
- * Media Patent License 1.0 was not distributed with this source code in the
9
- * PATENTS file, you can obtain it at https://www.aomedia.org/license/patent-license.
10
- */
11
-
12
- #ifndef EbSvtAv1_h
13
- #define EbSvtAv1_h
14
-
15
- #ifdef __cplusplus
16
- extern "C" {
17
- #endif // __cplusplus
18
-
19
- #include <stdbool.h>
20
- #include <stdint.h>
21
- #include "EbSvtAv1Formats.h"
22
- #include "EbDebugMacros.h"
23
-
24
- struct SvtMetadataArray;
25
-
26
- // API Version
27
- #define SVT_AV1_VERSION_MAJOR 3
28
- #define SVT_AV1_VERSION_MINOR 0
29
- #define SVT_AV1_VERSION_PATCHLEVEL 2
30
-
31
- #define SVT_AV1_CHECK_VERSION(major, minor, patch) \
32
- (SVT_AV1_VERSION_MAJOR > (major) || (SVT_AV1_VERSION_MAJOR == (major) && SVT_AV1_VERSION_MINOR > (minor)) || \
33
- (SVT_AV1_VERSION_MAJOR == (major) && SVT_AV1_VERSION_MINOR == (minor) && SVT_AV1_VERSION_PATCHLEVEL >= (patch)))
34
-
35
- #if defined(_WIN32)
36
- #define EB_HELPER_EXPORT __declspec(dllexport)
37
- #define EB_HELPER_IMPORT __declspec(dllimport)
38
- #elif defined(__GNUC__) && __GNUC__ >= 4
39
- #define EB_HELPER_EXPORT __attribute__((visibility("default")))
40
- #define EB_HELPER_IMPORT
41
- #else
42
- #define EB_HELPER_EXPORT
43
- #define EB_HELPER_IMPORT
44
- #endif
45
-
46
- #if defined(EB_DLL)
47
- #if defined(EB_BUILDING_SHARED_LIBS)
48
- #define EB_API EB_HELPER_EXPORT
49
- #else
50
- #define EB_API EB_HELPER_IMPORT
51
- #endif // if defined(EB_BUILDING_SHARED_LIBS)
52
- #else
53
- #define EB_API
54
- #endif //if defined(EB_DLL)
55
-
56
- #define EB_MAX_NUM_OPERATING_POINTS 32
57
-
58
- #define MAX_TEMPORAL_LAYERS 6
59
-
60
- #define EB_MAX_TEMPORAL_LAYERS MAX_TEMPORAL_LAYERS
61
-
62
- /********************************
63
- * Defines
64
- ********************************/
65
- #define EB_PICTURE uint32_t
66
-
67
- typedef enum EbAv1PictureType {
68
- EB_AV1_INTER_PICTURE = 0,
69
- EB_AV1_ALT_REF_PICTURE = 1,
70
- EB_AV1_INTRA_ONLY_PICTURE = 2,
71
- EB_AV1_KEY_PICTURE = 3,
72
- EB_AV1_NON_REF_PICTURE = 4,
73
- EB_AV1_SHOW_EXISTING_PICTURE = 6,
74
- EB_AV1_FW_KEY_PICTURE = 5,
75
- EB_AV1_SWITCH_PICTURE = 7,
76
- EB_AV1_INVALID_PICTURE = 0xFF
77
- } EbAv1PictureType;
78
-
79
- typedef struct EbBufferHeaderType {
80
- // EbBufferHeaderType size
81
- uint32_t size;
82
-
83
- // picture (input or output) buffer
84
- uint8_t *p_buffer;
85
- uint32_t n_filled_len;
86
- uint32_t n_alloc_len;
87
-
88
- // pic private data
89
- void *p_app_private;
90
- void *wrapper_ptr;
91
-
92
- // pic timing param
93
- uint32_t n_tick_count;
94
- int64_t dts;
95
- int64_t pts;
96
-
97
- // pic info
98
- uint8_t temporal_layer_index;
99
- uint32_t qp;
100
- uint32_t avg_qp;
101
- EbAv1PictureType pic_type;
102
- uint64_t luma_sse;
103
- uint64_t cr_sse;
104
- uint64_t cb_sse;
105
- // pic flags
106
- uint32_t flags;
107
-
108
- double luma_ssim;
109
- double cr_ssim;
110
- double cb_ssim;
111
-
112
- struct SvtMetadataArray *metadata;
113
- } EbBufferHeaderType;
114
-
115
- typedef struct EbComponentType {
116
- uint32_t size;
117
- void *p_component_private;
118
- void *p_application_private;
119
- } EbComponentType;
120
-
121
- typedef enum EbErrorType {
122
- EB_ErrorNone = 0,
123
- EB_DecUnsupportedBitstream = (int32_t)0x40001000,
124
- EB_DecNoOutputPicture = (int32_t)0x40001004,
125
- EB_DecDecodingError = (int32_t)0x40001008,
126
- EB_Corrupt_Frame = (int32_t)0x4000100C,
127
- EB_ErrorInsufficientResources = (int32_t)0x80001000,
128
- EB_ErrorUndefined = (int32_t)0x80001001,
129
- EB_ErrorInvalidComponent = (int32_t)0x80001004,
130
- EB_ErrorBadParameter = (int32_t)0x80001005,
131
- EB_ErrorDestroyThreadFailed = (int32_t)0x80002012,
132
- EB_ErrorSemaphoreUnresponsive = (int32_t)0x80002021,
133
- EB_ErrorDestroySemaphoreFailed = (int32_t)0x80002022,
134
- EB_ErrorCreateMutexFailed = (int32_t)0x80002030,
135
- EB_ErrorMutexUnresponsive = (int32_t)0x80002031,
136
- EB_ErrorDestroyMutexFailed = (int32_t)0x80002032,
137
- EB_NoErrorEmptyQueue = (int32_t)0x80002033,
138
- EB_NoErrorFifoShutdown = (int32_t)0x80002034,
139
- EB_ErrorMax = 0x7FFFFFFF
140
- } EbErrorType;
141
-
142
- /* AV1 bistream profile (seq_profile syntax element) */
143
- typedef enum EbAv1SeqProfile { MAIN_PROFILE = 0, HIGH_PROFILE = 1, PROFESSIONAL_PROFILE = 2 } EbAv1SeqProfile;
144
-
145
- // For 8-bit and 10-bit packed inputs and outputs, the luma, cb, and cr fields should be used
146
- // for the three input picture planes. However, for 10-bit unpacked planes the
147
- // lumaExt, cbExt, and crExt fields should be used hold the extra 2-bits of
148
- // precision while the luma, cb, and cr fields hold the 8-bit data.
149
- typedef struct EbSvtIOFormat //former EbSvtEncInput
150
- {
151
- // Hosts 8 bit or 16 bit input YUV420p / YUV420p10le
152
- uint8_t *luma;
153
- uint8_t *cb;
154
- uint8_t *cr;
155
- uint32_t y_stride;
156
- uint32_t cr_stride;
157
- uint32_t cb_stride;
158
- } EbSvtIOFormat;
159
-
160
- typedef struct EbOperatingParametersInfo {
161
- /*!<Specifies the time interval between the arrival of the first bit in the
162
- * smoothing buffer and the subsequent removal of the data that belongs to
163
- * the first coded frame for operating point*/
164
- uint32_t decoder_buffer_delay;
165
-
166
- /*!<Specifies, in combination with decoder_buffer_delay[op] syntax element,
167
- * the first bit arrival time of frames to be decoded to the smoothing
168
- * buffer */
169
- uint32_t encoder_buffer_delay;
170
-
171
- /*!< Equal to 1 indicates that the smoothing buffer operates in low-delay
172
- * mode for operating point*/
173
- uint8_t low_delay_mode_flag;
174
-
175
- } EbOperatingParametersInfo;
176
-
177
- typedef struct EbAV1OperatingPoint {
178
- uint32_t op_idc;
179
- uint32_t seq_level_idx;
180
- uint32_t seq_tier;
181
-
182
- /*!< 1 -> Indicates that there is a decoder model associated with operating
183
- point,
184
- * 0 -> Indicates that there is not a decoder model associated with
185
- operating point*/
186
- uint8_t decoder_model_present_for_this_op;
187
-
188
- /*!< Operating Parameters Information structure*/
189
- EbOperatingParametersInfo operating_parameters_info;
190
-
191
- uint32_t initial_display_delay_present_for_this_op;
192
- uint32_t initial_display_delay;
193
-
194
- } EbAv1OperatingPoint;
195
-
196
- typedef struct EbColorConfig {
197
- /*!< bit depth */
198
- EbBitDepth bit_depth;
199
-
200
- /*!< 1: Indicates that the video does not contain U and V color planes.
201
- * 0: Indicates that the video contains Y, U, and V color planes. */
202
- bool mono_chrome;
203
- /*!< Specify the chroma subsampling format */
204
- uint8_t subsampling_x;
205
-
206
- /*!< Specify the chroma subsampling format */
207
- uint8_t subsampling_y;
208
- /*!< An integer that is defined by the "Color primaries" section of
209
- * ISO/IEC 23091-4/ITU-T H.273 */
210
- EbColorPrimaries color_primaries;
211
-
212
- /*!< An integer that is defined by the "Transfer characteristics" section
213
- * of ISO/IEC 23091-4/ITU-T H.273 */
214
- EbTransferCharacteristics transfer_characteristics;
215
-
216
- /*!< An integer that is defined by the "Matrix coefficients" section of
217
- * ISO/IEC 23091-4/ITU-T H.273 */
218
- EbMatrixCoefficients matrix_coefficients;
219
-
220
- /*!< 0: shall be referred to as the studio swing representation
221
- * 1: shall be referred to as the full swing representation */
222
- EbColorRange color_range;
223
-
224
- /*!< Specifies the sample position for subsampled streams */
225
- EbChromaSamplePosition chroma_sample_position;
226
-
227
- /*!< 1: Indicates that the U and V planes may have separate delta quantizer
228
- * 0: Indicates that the U and V planes will share the same delta
229
- quantizer value */
230
- bool separate_uv_delta_q;
231
- } EbColorConfig;
232
-
233
- typedef struct EbTimingInfo {
234
- /*!< Timing info present flag */
235
- bool timing_info_present;
236
-
237
- /*!< Number of time units of a clock operating at the frequency time_scale
238
- * Hz that corresponds to one increment of a clock tick counter*/
239
- uint32_t num_units_in_display_tick;
240
-
241
- /*!< Number of time units that pass in one second*/
242
- uint32_t time_scale;
243
-
244
- /*!< Equal to 1 indicates that pictures should be displayed according to
245
- * their output order with the number of ticks between two consecutive
246
- * pictures specified by num_ticks_per_picture.*/
247
- uint8_t equal_picture_interval;
248
-
249
- /*!< Specifies the number of clock ticks corresponding to output time
250
- * between two consecutive pictures in the output order.
251
- * Range - [0 to (1 << 32) - 2]*/
252
- uint32_t num_ticks_per_picture;
253
-
254
- } EbTimingInfo;
255
-
256
- // structure to be allocated at the sample application and passed to the library
257
- // on a per picture basis through the p_app_private field in the EbBufferHeaderType structure
258
- // this structure and the data inside would be casted, validated, then copied at the
259
- // svt_av1_enc_send_picture API call
260
- typedef enum {
261
- PRIVATE_DATA, // data to be passed through and written to the bitstream
262
- //FILM_GRAIN_PARAM, // passing film grain parameters per picture
263
- REF_FRAME_SCALING_EVENT, // reference frame scaling data per picture
264
- ROI_MAP_EVENT, // ROI map data per picture
265
- RES_CHANGE_EVENT, // resolution change data per picture (KF only)
266
- RATE_CHANGE_EVENT, // Rate change data per picture (KF only)
267
- PRIVATE_DATA_TYPES // end of private data types
268
- } PrivDataType;
269
- typedef struct EbPrivDataNode {
270
- PrivDataType node_type;
271
- void *data; // pointer to data structure e.g. EbRefFrameScale or AomFilmGrain
272
- uint32_t size; // size of data being sent for the library to know how much to copy
273
- struct EbPrivDataNode *next; // pointer to the next node, NULL if done.
274
- } EbPrivDataNode;
275
- typedef struct EbRefFrameScale {
276
- uint8_t scale_mode; // scaling mode, support for RESIZE_NONE, RESIZE_FIXED and RESIZE_RANDOM
277
- uint32_t scale_denom; // scaling denominator for non-key frame, from 8~16
278
- uint32_t scale_kf_denom; // scaling denominator for key frame, from 8~16
279
- } EbRefFrameScale;
280
- typedef struct SvtAv1RoiMapEvt {
281
- uint64_t start_picture_number;
282
- uint8_t *b64_seg_map;
283
- int16_t seg_qp[8]; // 8: MAX_SEGMENTS
284
- int8_t max_seg_id;
285
- struct SvtAv1RoiMapEvt *next;
286
- } SvtAv1RoiMapEvt;
287
- typedef struct SvtAv1RoiMap {
288
- uint32_t evt_num;
289
- SvtAv1RoiMapEvt *evt_list;
290
- SvtAv1RoiMapEvt *cur_evt;
291
- int16_t *qp_map;
292
- char *buf;
293
- } SvtAv1RoiMap;
294
-
295
- typedef struct SvtAv1InputPicDef {
296
- uint16_t input_luma_width; // input luma width aligned to 8, this is used during encoding
297
- uint16_t input_luma_height; // input luma height aligned to 8, this is used during encoding
298
- uint16_t input_pad_bottom;
299
- uint16_t input_pad_right;
300
- } SvtAv1InputPicDef;
301
- typedef struct SvtAv1RateInfo {
302
- // Sequence QP used in CRF/CQP algorithm. Over writes the sequence QP.
303
- uint32_t seq_qp;
304
- uint32_t target_bit_rate;
305
- } SvtAv1RateInfo;
306
-
307
- /*!\brief Structure containing film grain synthesis parameters for a frame
308
- *
309
- * This structure contains input parameters for film grain synthesis
310
- */
311
- typedef struct {
312
- // Whether the decoder should apply film grain
313
- int32_t apply_grain;
314
-
315
- // Whether the decoder should update the film grain parameters from previous frame
316
- int32_t update_parameters;
317
-
318
- // 8 bit values indicating grain scaling points for the luma plane
319
- int32_t scaling_points_y[14][2];
320
- int32_t num_y_points; // value: 0..14
321
-
322
- // 8 bit values indicating grain scaling points for the blue chroma plane
323
- int32_t scaling_points_cb[10][2];
324
- int32_t num_cb_points; // value: 0..10
325
-
326
- // 8 bit values indicating grain scaling points for the red chroma plane
327
- int32_t scaling_points_cr[10][2];
328
- int32_t num_cr_points; // value: 0..10
329
-
330
- // A value by which to shift scaling points, typically 8
331
- int32_t scaling_shift; // values : 8..11
332
-
333
- // Number of auto-regressive coefficients
334
- int32_t ar_coeff_lag; // values: 0..3
335
-
336
- // 8 bit values representing auto-regressive coefficients for each plane
337
- int32_t ar_coeffs_y[24];
338
- int32_t ar_coeffs_cb[25];
339
- int32_t ar_coeffs_cr[25];
340
-
341
- // Shift value: AR coeffs range
342
- // 6: [-2, 2)
343
- // 7: [-1, 1)
344
- // 8: [-0.5, 0.5)
345
- // 9: [-0.25, 0.25)
346
- int32_t ar_coeff_shift; // values : 6..9
347
-
348
- // A multiplier for the cb component used in derivation of the
349
- // input index to the cb component scaling function.
350
- int32_t cb_mult; // 8 bits
351
- // A multiplier for the average luma component used in derivation of the input index to the cb
352
- // component scaling function.
353
- int32_t cb_luma_mult; // 8 bits
354
- // An offset used in derivation of the input index to the cb component scaling function.
355
- int32_t cb_offset; // 9 bits
356
-
357
- // A multiplier for the cr component used in derivation of the
358
- // input index to the cr component scaling function.
359
- int32_t cr_mult; // 8 bits
360
- // A multiplier for the average luma component used in derivation of the input index to the cr
361
- // component scaling function.
362
- int32_t cr_luma_mult; // 8 bits
363
- // An offset used in derivation of the input index to the cr component scaling function.
364
- int32_t cr_offset; // 9 bits
365
-
366
- // Whether overlap between film grain blocks should be applied
367
- int32_t overlap_flag;
368
-
369
- // Whether to clip to studio range after film grain is generated
370
- int32_t clip_to_restricted_range;
371
-
372
- int32_t bit_depth; // video bit depth
373
-
374
- // Whether to apply film grain to chroma planes based on the luma plane
375
- int32_t chroma_scaling_from_luma;
376
-
377
- // Specifies how much the random numbers should be scaled down during grain synthesis
378
- int32_t grain_scale_shift;
379
-
380
- // A random seed for the decoder to use for grain generation
381
- uint16_t random_seed;
382
-
383
- // Whether the encoder should ignore the ref frame map when coding film grain
384
- int32_t ignore_ref;
385
- } AomFilmGrain;
386
-
387
- /**
388
- CPU FLAGS
389
- */
390
- typedef uint64_t EbCpuFlags;
391
- #ifdef ARCH_X86_64
392
- #define EB_CPU_FLAGS_MMX (1 << 0)
393
- #define EB_CPU_FLAGS_SSE (1 << 1)
394
- #define EB_CPU_FLAGS_SSE2 (1 << 2)
395
- #define EB_CPU_FLAGS_SSE3 (1 << 3)
396
- #define EB_CPU_FLAGS_SSSE3 (1 << 4)
397
- #define EB_CPU_FLAGS_SSE4_1 (1 << 5)
398
- #define EB_CPU_FLAGS_SSE4_2 (1 << 6)
399
- #define EB_CPU_FLAGS_AVX (1 << 7)
400
- #define EB_CPU_FLAGS_AVX2 (1 << 8)
401
- #define EB_CPU_FLAGS_AVX512F (1 << 9)
402
- #define EB_CPU_FLAGS_AVX512CD (1 << 10)
403
- #define EB_CPU_FLAGS_AVX512DQ (1 << 11)
404
- #define EB_CPU_FLAGS_AVX512ER (1 << 12)
405
- #define EB_CPU_FLAGS_AVX512PF (1 << 13)
406
- #define EB_CPU_FLAGS_AVX512BW (1 << 14)
407
- #define EB_CPU_FLAGS_AVX512VL (1 << 15)
408
- // AVX512 extensions supported on Icelake and later (Zen 4 and later on AMD)
409
- #define EB_CPU_FLAGS_AVX512ICL (1 << 16)
410
- #elif defined(ARCH_AARCH64)
411
- // Armv8.0-A mandatory Neon instructions.
412
- #define EB_CPU_FLAGS_NEON (1 << 0)
413
- // Armv8.0-A optional CRC32 instructions, mandatory from Armv8.1-A.
414
- #define EB_CPU_FLAGS_ARM_CRC32 (1 << 1)
415
- // Armv8.2-A optional Neon dot-product instructions, mandatory from Armv8.4-A.
416
- #define EB_CPU_FLAGS_NEON_DOTPROD (1 << 2)
417
- // Armv8.2-A optional Neon i8mm instructions, mandatory from Armv8.6-A.
418
- #define EB_CPU_FLAGS_NEON_I8MM (1 << 3)
419
- // Armv8.2-A optional SVE instructions, mandatory from Armv9.0-A.
420
- #define EB_CPU_FLAGS_SVE (1 << 4)
421
- // Armv9.0-A SVE2 instructions.
422
- #define EB_CPU_FLAGS_SVE2 (1 << 5)
423
-
424
- #endif
425
- #define EB_CPU_FLAGS_INVALID (1ULL << (sizeof(EbCpuFlags) * 8ULL - 1ULL))
426
- #define EB_CPU_FLAGS_ALL ((EB_CPU_FLAGS_INVALID >> 1) - 1)
427
-
428
- #ifdef __cplusplus
429
- }
430
- #endif // __cplusplus
431
-
432
- #endif // EbSvtAv1_h