@pproenca/ffmpeg-darwin-arm64-gpl 0.1.7

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 (215) hide show
  1. package/include/aom/aom.h +127 -0
  2. package/include/aom/aom_codec.h +594 -0
  3. package/include/aom/aom_decoder.h +257 -0
  4. package/include/aom/aom_encoder.h +1154 -0
  5. package/include/aom/aom_external_partition.h +452 -0
  6. package/include/aom/aom_frame_buffer.h +84 -0
  7. package/include/aom/aom_image.h +462 -0
  8. package/include/aom/aom_integer.h +60 -0
  9. package/include/aom/aomcx.h +2288 -0
  10. package/include/aom/aomdx.h +607 -0
  11. package/include/dav1d/common.h +94 -0
  12. package/include/dav1d/data.h +117 -0
  13. package/include/dav1d/dav1d.h +329 -0
  14. package/include/dav1d/headers.h +444 -0
  15. package/include/dav1d/picture.h +157 -0
  16. package/include/dav1d/version.h +50 -0
  17. package/include/index.js +1 -0
  18. package/include/lame/lame.h +1342 -0
  19. package/include/libavcodec/ac3_parser.h +36 -0
  20. package/include/libavcodec/adts_parser.h +37 -0
  21. package/include/libavcodec/avcodec.h +3128 -0
  22. package/include/libavcodec/avdct.h +88 -0
  23. package/include/libavcodec/avfft.h +149 -0
  24. package/include/libavcodec/bsf.h +332 -0
  25. package/include/libavcodec/codec.h +382 -0
  26. package/include/libavcodec/codec_desc.h +134 -0
  27. package/include/libavcodec/codec_id.h +669 -0
  28. package/include/libavcodec/codec_par.h +248 -0
  29. package/include/libavcodec/d3d11va.h +109 -0
  30. package/include/libavcodec/defs.h +337 -0
  31. package/include/libavcodec/dirac.h +135 -0
  32. package/include/libavcodec/dv_profile.h +82 -0
  33. package/include/libavcodec/dxva2.h +90 -0
  34. package/include/libavcodec/jni.h +67 -0
  35. package/include/libavcodec/mediacodec.h +103 -0
  36. package/include/libavcodec/packet.h +887 -0
  37. package/include/libavcodec/qsv.h +109 -0
  38. package/include/libavcodec/vdpau.h +171 -0
  39. package/include/libavcodec/version.h +45 -0
  40. package/include/libavcodec/version_major.h +52 -0
  41. package/include/libavcodec/videotoolbox.h +85 -0
  42. package/include/libavcodec/vorbis_parser.h +74 -0
  43. package/include/libavdevice/avdevice.h +397 -0
  44. package/include/libavdevice/version.h +45 -0
  45. package/include/libavdevice/version_major.h +43 -0
  46. package/include/libavfilter/avfilter.h +1379 -0
  47. package/include/libavfilter/buffersink.h +173 -0
  48. package/include/libavfilter/buffersrc.h +215 -0
  49. package/include/libavfilter/version.h +48 -0
  50. package/include/libavfilter/version_major.h +40 -0
  51. package/include/libavformat/avformat.h +3107 -0
  52. package/include/libavformat/avio.h +831 -0
  53. package/include/libavformat/version.h +47 -0
  54. package/include/libavformat/version_major.h +54 -0
  55. package/include/libavutil/adler32.h +63 -0
  56. package/include/libavutil/aes.h +69 -0
  57. package/include/libavutil/aes_ctr.h +99 -0
  58. package/include/libavutil/ambient_viewing_environment.h +72 -0
  59. package/include/libavutil/attributes.h +173 -0
  60. package/include/libavutil/audio_fifo.h +187 -0
  61. package/include/libavutil/avassert.h +78 -0
  62. package/include/libavutil/avconfig.h +6 -0
  63. package/include/libavutil/avstring.h +428 -0
  64. package/include/libavutil/avutil.h +362 -0
  65. package/include/libavutil/base64.h +72 -0
  66. package/include/libavutil/blowfish.h +82 -0
  67. package/include/libavutil/bprint.h +254 -0
  68. package/include/libavutil/bswap.h +105 -0
  69. package/include/libavutil/buffer.h +322 -0
  70. package/include/libavutil/camellia.h +70 -0
  71. package/include/libavutil/cast5.h +80 -0
  72. package/include/libavutil/channel_layout.h +751 -0
  73. package/include/libavutil/common.h +589 -0
  74. package/include/libavutil/cpu.h +145 -0
  75. package/include/libavutil/crc.h +102 -0
  76. package/include/libavutil/csp.h +150 -0
  77. package/include/libavutil/des.h +81 -0
  78. package/include/libavutil/detection_bbox.h +108 -0
  79. package/include/libavutil/dict.h +241 -0
  80. package/include/libavutil/display.h +109 -0
  81. package/include/libavutil/dovi_meta.h +396 -0
  82. package/include/libavutil/downmix_info.h +115 -0
  83. package/include/libavutil/encryption_info.h +205 -0
  84. package/include/libavutil/error.h +129 -0
  85. package/include/libavutil/eval.h +140 -0
  86. package/include/libavutil/executor.h +67 -0
  87. package/include/libavutil/ffversion.h +5 -0
  88. package/include/libavutil/fifo.h +242 -0
  89. package/include/libavutil/file.h +62 -0
  90. package/include/libavutil/film_grain_params.h +322 -0
  91. package/include/libavutil/frame.h +1175 -0
  92. package/include/libavutil/hash.h +264 -0
  93. package/include/libavutil/hdr_dynamic_metadata.h +376 -0
  94. package/include/libavutil/hdr_dynamic_vivid_metadata.h +346 -0
  95. package/include/libavutil/hmac.h +99 -0
  96. package/include/libavutil/hwcontext.h +598 -0
  97. package/include/libavutil/hwcontext_cuda.h +74 -0
  98. package/include/libavutil/hwcontext_d3d11va.h +178 -0
  99. package/include/libavutil/hwcontext_d3d12va.h +142 -0
  100. package/include/libavutil/hwcontext_drm.h +169 -0
  101. package/include/libavutil/hwcontext_dxva2.h +75 -0
  102. package/include/libavutil/hwcontext_mediacodec.h +61 -0
  103. package/include/libavutil/hwcontext_opencl.h +100 -0
  104. package/include/libavutil/hwcontext_qsv.h +87 -0
  105. package/include/libavutil/hwcontext_vaapi.h +117 -0
  106. package/include/libavutil/hwcontext_vdpau.h +44 -0
  107. package/include/libavutil/hwcontext_videotoolbox.h +106 -0
  108. package/include/libavutil/hwcontext_vulkan.h +382 -0
  109. package/include/libavutil/iamf.h +690 -0
  110. package/include/libavutil/imgutils.h +377 -0
  111. package/include/libavutil/intfloat.h +77 -0
  112. package/include/libavutil/intreadwrite.h +677 -0
  113. package/include/libavutil/lfg.h +81 -0
  114. package/include/libavutil/log.h +387 -0
  115. package/include/libavutil/lzo.h +66 -0
  116. package/include/libavutil/macros.h +80 -0
  117. package/include/libavutil/mastering_display_metadata.h +137 -0
  118. package/include/libavutil/mathematics.h +300 -0
  119. package/include/libavutil/md5.h +89 -0
  120. package/include/libavutil/mem.h +607 -0
  121. package/include/libavutil/motion_vector.h +57 -0
  122. package/include/libavutil/murmur3.h +115 -0
  123. package/include/libavutil/opt.h +1187 -0
  124. package/include/libavutil/parseutils.h +197 -0
  125. package/include/libavutil/pixdesc.h +440 -0
  126. package/include/libavutil/pixelutils.h +51 -0
  127. package/include/libavutil/pixfmt.h +716 -0
  128. package/include/libavutil/random_seed.h +57 -0
  129. package/include/libavutil/rational.h +225 -0
  130. package/include/libavutil/rc4.h +69 -0
  131. package/include/libavutil/replaygain.h +50 -0
  132. package/include/libavutil/ripemd.h +83 -0
  133. package/include/libavutil/samplefmt.h +269 -0
  134. package/include/libavutil/sha.h +90 -0
  135. package/include/libavutil/sha512.h +92 -0
  136. package/include/libavutil/spherical.h +243 -0
  137. package/include/libavutil/stereo3d.h +325 -0
  138. package/include/libavutil/tea.h +71 -0
  139. package/include/libavutil/threadmessage.h +115 -0
  140. package/include/libavutil/time.h +56 -0
  141. package/include/libavutil/timecode.h +199 -0
  142. package/include/libavutil/timestamp.h +85 -0
  143. package/include/libavutil/tree.h +137 -0
  144. package/include/libavutil/twofish.h +70 -0
  145. package/include/libavutil/tx.h +210 -0
  146. package/include/libavutil/uuid.h +146 -0
  147. package/include/libavutil/version.h +124 -0
  148. package/include/libavutil/video_enc_params.h +171 -0
  149. package/include/libavutil/video_hint.h +107 -0
  150. package/include/libavutil/xtea.h +94 -0
  151. package/include/libpostproc/postprocess.h +107 -0
  152. package/include/libpostproc/version.h +46 -0
  153. package/include/libpostproc/version_major.h +31 -0
  154. package/include/libswresample/swresample.h +587 -0
  155. package/include/libswresample/version.h +46 -0
  156. package/include/libswresample/version_major.h +31 -0
  157. package/include/libswscale/swscale.h +460 -0
  158. package/include/libswscale/version.h +44 -0
  159. package/include/libswscale/version_major.h +35 -0
  160. package/include/ogg/config_types.h +26 -0
  161. package/include/ogg/ogg.h +209 -0
  162. package/include/ogg/os_types.h +158 -0
  163. package/include/opus/opus.h +1099 -0
  164. package/include/opus/opus_defines.h +830 -0
  165. package/include/opus/opus_multistream.h +660 -0
  166. package/include/opus/opus_projection.h +568 -0
  167. package/include/opus/opus_types.h +166 -0
  168. package/include/svt-av1/EbDebugMacros.h +88 -0
  169. package/include/svt-av1/EbSvtAv1.h +462 -0
  170. package/include/svt-av1/EbSvtAv1Enc.h +1112 -0
  171. package/include/svt-av1/EbSvtAv1ErrorCodes.h +67 -0
  172. package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +64 -0
  173. package/include/svt-av1/EbSvtAv1Formats.h +126 -0
  174. package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
  175. package/include/vorbis/codec.h +242 -0
  176. package/include/vorbis/vorbisenc.h +435 -0
  177. package/include/vorbis/vorbisfile.h +205 -0
  178. package/include/vpx/vp8.h +136 -0
  179. package/include/vpx/vp8cx.h +1118 -0
  180. package/include/vpx/vp8dx.h +228 -0
  181. package/include/vpx/vpx_codec.h +475 -0
  182. package/include/vpx/vpx_decoder.h +367 -0
  183. package/include/vpx/vpx_encoder.h +1150 -0
  184. package/include/vpx/vpx_ext_ratectrl.h +590 -0
  185. package/include/vpx/vpx_frame_buffer.h +83 -0
  186. package/include/vpx/vpx_image.h +221 -0
  187. package/include/vpx/vpx_integer.h +40 -0
  188. package/include/vpx/vpx_tpl.h +68 -0
  189. package/include/x264.h +1027 -0
  190. package/include/x264_config.h +6 -0
  191. package/include/x265.h +2737 -0
  192. package/include/x265_config.h +34 -0
  193. package/lib/index.js +1 -0
  194. package/lib/libSvtAv1Enc.a +0 -0
  195. package/lib/libaom.a +0 -0
  196. package/lib/libavcodec.a +0 -0
  197. package/lib/libavdevice.a +0 -0
  198. package/lib/libavfilter.a +0 -0
  199. package/lib/libavformat.a +0 -0
  200. package/lib/libavutil.a +0 -0
  201. package/lib/libdav1d.a +0 -0
  202. package/lib/libmp3lame.a +0 -0
  203. package/lib/libogg.a +0 -0
  204. package/lib/libopus.a +0 -0
  205. package/lib/libpostproc.a +0 -0
  206. package/lib/libswresample.a +0 -0
  207. package/lib/libswscale.a +0 -0
  208. package/lib/libvorbis.a +0 -0
  209. package/lib/libvorbisenc.a +0 -0
  210. package/lib/libvorbisfile.a +0 -0
  211. package/lib/libvpx.a +0 -0
  212. package/lib/libx264.a +0 -0
  213. package/lib/libx265.a +0 -0
  214. package/package.json +35 -0
  215. package/versions.json +1 -0
@@ -0,0 +1,462 @@
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 <stdint.h>
20
+ #include "EbSvtAv1Formats.h"
21
+ #include "EbDebugMacros.h"
22
+
23
+ struct SvtMetadataArray;
24
+
25
+ // API Version
26
+ #define SVT_AV1_VERSION_MAJOR 2
27
+ #define SVT_AV1_VERSION_MINOR 3
28
+ #define SVT_AV1_VERSION_PATCHLEVEL 0
29
+
30
+ #define SVT_AV1_CHECK_VERSION(major, minor, patch) \
31
+ (SVT_AV1_VERSION_MAJOR > (major) || (SVT_AV1_VERSION_MAJOR == (major) && SVT_AV1_VERSION_MINOR > (minor)) || \
32
+ (SVT_AV1_VERSION_MAJOR == (major) && SVT_AV1_VERSION_MINOR == (minor) && SVT_AV1_VERSION_PATCHLEVEL >= (patch)))
33
+
34
+ #if defined(_WIN32)
35
+ #define EB_HELPER_EXPORT __declspec(dllexport)
36
+ #define EB_HELPER_IMPORT __declspec(dllimport)
37
+ #elif defined(__GNUC__) && __GNUC__ >= 4
38
+ #define EB_HELPER_EXPORT __attribute__((visibility("default")))
39
+ #define EB_HELPER_IMPORT
40
+ #else
41
+ #define EB_HELPER_EXPORT
42
+ #define EB_HELPER_IMPORT
43
+ #endif
44
+
45
+ #if defined(EB_DLL)
46
+ #if defined(EB_BUILDING_SHARED_LIBS)
47
+ #define EB_API EB_HELPER_EXPORT
48
+ #else
49
+ #define EB_API EB_HELPER_IMPORT
50
+ #endif // if defined(EB_BUILDING_SHARED_LIBS)
51
+ #else
52
+ #define EB_API
53
+ #endif //if defined(EB_DLL)
54
+
55
+ #define EB_MAX_NUM_OPERATING_POINTS 32
56
+
57
+ #define MAX_TEMPORAL_LAYERS 6
58
+
59
+ #define EB_MAX_TEMPORAL_LAYERS MAX_TEMPORAL_LAYERS
60
+
61
+ /********************************
62
+ * Defines
63
+ ********************************/
64
+ #define EB_PICTURE uint32_t
65
+
66
+ typedef enum EbAv1PictureType {
67
+ EB_AV1_INTER_PICTURE = 0,
68
+ EB_AV1_ALT_REF_PICTURE = 1,
69
+ EB_AV1_INTRA_ONLY_PICTURE = 2,
70
+ EB_AV1_KEY_PICTURE = 3,
71
+ EB_AV1_NON_REF_PICTURE = 4,
72
+ EB_AV1_SHOW_EXISTING_PICTURE = 6,
73
+ EB_AV1_FW_KEY_PICTURE = 5,
74
+ EB_AV1_SWITCH_PICTURE = 7,
75
+ EB_AV1_INVALID_PICTURE = 0xFF
76
+ } EbAv1PictureType;
77
+
78
+ /** The Bool type is intended to be used to represent a true or a false
79
+ value when passing parameters to and from the eBrisk API. The
80
+ Bool is an 8 bit quantity.
81
+ */
82
+ typedef uint8_t Bool;
83
+ #define FALSE 0
84
+ #define TRUE 1
85
+
86
+ typedef struct EbBufferHeaderType {
87
+ // EbBufferHeaderType size
88
+ uint32_t size;
89
+
90
+ // picture (input or output) buffer
91
+ uint8_t *p_buffer;
92
+ uint32_t n_filled_len;
93
+ uint32_t n_alloc_len;
94
+
95
+ // pic private data
96
+ void *p_app_private;
97
+ void *wrapper_ptr;
98
+
99
+ // pic timing param
100
+ uint32_t n_tick_count;
101
+ int64_t dts;
102
+ int64_t pts;
103
+
104
+ // pic info
105
+ uint32_t qp;
106
+ EbAv1PictureType pic_type;
107
+ uint64_t luma_sse;
108
+ uint64_t cr_sse;
109
+ uint64_t cb_sse;
110
+ // pic flags
111
+ uint32_t flags;
112
+
113
+ double luma_ssim;
114
+ double cr_ssim;
115
+ double cb_ssim;
116
+
117
+ struct SvtMetadataArray *metadata;
118
+ } EbBufferHeaderType;
119
+
120
+ typedef struct EbComponentType {
121
+ uint32_t size;
122
+ void *p_component_private;
123
+ void *p_application_private;
124
+ } EbComponentType;
125
+
126
+ typedef enum EbErrorType {
127
+ EB_ErrorNone = 0,
128
+ EB_DecUnsupportedBitstream = (int32_t)0x40001000,
129
+ EB_DecNoOutputPicture = (int32_t)0x40001004,
130
+ EB_DecDecodingError = (int32_t)0x40001008,
131
+ EB_Corrupt_Frame = (int32_t)0x4000100C,
132
+ EB_ErrorInsufficientResources = (int32_t)0x80001000,
133
+ EB_ErrorUndefined = (int32_t)0x80001001,
134
+ EB_ErrorInvalidComponent = (int32_t)0x80001004,
135
+ EB_ErrorBadParameter = (int32_t)0x80001005,
136
+ EB_ErrorDestroyThreadFailed = (int32_t)0x80002012,
137
+ EB_ErrorSemaphoreUnresponsive = (int32_t)0x80002021,
138
+ EB_ErrorDestroySemaphoreFailed = (int32_t)0x80002022,
139
+ EB_ErrorCreateMutexFailed = (int32_t)0x80002030,
140
+ EB_ErrorMutexUnresponsive = (int32_t)0x80002031,
141
+ EB_ErrorDestroyMutexFailed = (int32_t)0x80002032,
142
+ EB_NoErrorEmptyQueue = (int32_t)0x80002033,
143
+ EB_NoErrorFifoShutdown = (int32_t)0x80002034,
144
+ EB_ErrorMax = 0x7FFFFFFF
145
+ } EbErrorType;
146
+
147
+ /* AV1 bistream profile (seq_profile syntax element) */
148
+ typedef enum EbAv1SeqProfile { MAIN_PROFILE = 0, HIGH_PROFILE = 1, PROFESSIONAL_PROFILE = 2 } EbAv1SeqProfile;
149
+
150
+ // For 8-bit and 10-bit packed inputs and outputs, the luma, cb, and cr fields should be used
151
+ // for the three input picture planes. However, for 10-bit unpacked planes the
152
+ // lumaExt, cbExt, and crExt fields should be used hold the extra 2-bits of
153
+ // precision while the luma, cb, and cr fields hold the 8-bit data.
154
+ typedef struct EbSvtIOFormat //former EbSvtEncInput
155
+ {
156
+ // Hosts 8 bit or 16 bit input YUV420p / YUV420p10le
157
+ uint8_t *luma;
158
+ uint8_t *cb;
159
+ uint8_t *cr;
160
+
161
+ // Hosts LSB 2 bits of 10bit input/output when the compressed 10bit format is used
162
+ #if !SVT_AV1_CHECK_VERSION(1, 5, 0)
163
+ /* DEPRECATED: to be removed in 1.5.0. */
164
+ void *luma_ext;
165
+ void *cb_ext;
166
+ void *cr_ext;
167
+ #endif
168
+
169
+ uint32_t y_stride;
170
+ uint32_t cr_stride;
171
+ uint32_t cb_stride;
172
+
173
+ uint32_t width;
174
+ uint32_t height;
175
+
176
+ uint32_t org_x;
177
+ uint32_t org_y;
178
+
179
+ EbColorFormat color_fmt;
180
+ EbBitDepth bit_depth;
181
+ } EbSvtIOFormat;
182
+
183
+ typedef struct EbOperatingParametersInfo {
184
+ /*!<Specifies the time interval between the arrival of the first bit in the
185
+ * smoothing buffer and the subsequent removal of the data that belongs to
186
+ * the first coded frame for operating point*/
187
+ uint32_t decoder_buffer_delay;
188
+
189
+ /*!<Specifies, in combination with decoder_buffer_delay[op] syntax element,
190
+ * the first bit arrival time of frames to be decoded to the smoothing
191
+ * buffer */
192
+ uint32_t encoder_buffer_delay;
193
+
194
+ /*!< Equal to 1 indicates that the smoothing buffer operates in low-delay
195
+ * mode for operating point*/
196
+ uint8_t low_delay_mode_flag;
197
+
198
+ } EbOperatingParametersInfo;
199
+
200
+ typedef struct EbAV1OperatingPoint {
201
+ uint32_t op_idc;
202
+ uint32_t seq_level_idx;
203
+ uint32_t seq_tier;
204
+
205
+ /*!< 1 -> Indicates that there is a decoder model associated with operating
206
+ point,
207
+ * 0 -> Indicates that there is not a decoder model associated with
208
+ operating point*/
209
+ uint8_t decoder_model_present_for_this_op;
210
+
211
+ /*!< Operating Parameters Information structure*/
212
+ EbOperatingParametersInfo operating_parameters_info;
213
+
214
+ uint32_t initial_display_delay_present_for_this_op;
215
+ uint32_t initial_display_delay;
216
+
217
+ } EbAv1OperatingPoint;
218
+
219
+ typedef struct EbColorConfig {
220
+ /*!< bit depth */
221
+ EbBitDepth bit_depth;
222
+
223
+ /*!< 1: Indicates that the video does not contain U and V color planes.
224
+ * 0: Indicates that the video contains Y, U, and V color planes. */
225
+ Bool mono_chrome;
226
+
227
+ /*!< Specify the chroma subsampling format */
228
+ uint8_t subsampling_x;
229
+
230
+ /*!< Specify the chroma subsampling format */
231
+ uint8_t subsampling_y;
232
+
233
+ /*!< 1: Specifies that color_primaries, transfer_characteristics, and
234
+ matrix_coefficients are present. color_description_present_flag
235
+ * 0: Specifies that color_primaries, transfer_characteristics and
236
+ matrix_coefficients are not present */
237
+ Bool color_description_present_flag;
238
+
239
+ /*!< An integer that is defined by the "Color primaries" section of
240
+ * ISO/IEC 23091-4/ITU-T H.273 */
241
+ EbColorPrimaries color_primaries;
242
+
243
+ /*!< An integer that is defined by the "Transfer characteristics" section
244
+ * of ISO/IEC 23091-4/ITU-T H.273 */
245
+ EbTransferCharacteristics transfer_characteristics;
246
+
247
+ /*!< An integer that is defined by the "Matrix coefficients" section of
248
+ * ISO/IEC 23091-4/ITU-T H.273 */
249
+ EbMatrixCoefficients matrix_coefficients;
250
+
251
+ /*!< 0: shall be referred to as the studio swing representation
252
+ * 1: shall be referred to as the full swing representation */
253
+ EbColorRange color_range;
254
+
255
+ /*!< Specifies the sample position for subsampled streams */
256
+ EbChromaSamplePosition chroma_sample_position;
257
+
258
+ /*!< 1: Indicates that the U and V planes may have separate delta quantizer
259
+ * 0: Indicates that the U and V planes will share the same delta
260
+ quantizer value */
261
+ Bool separate_uv_delta_q;
262
+
263
+ } EbColorConfig;
264
+
265
+ typedef struct EbTimingInfo {
266
+ /*!< Timing info present flag */
267
+ Bool timing_info_present;
268
+
269
+ /*!< Number of time units of a clock operating at the frequency time_scale
270
+ * Hz that corresponds to one increment of a clock tick counter*/
271
+ uint32_t num_units_in_display_tick;
272
+
273
+ /*!< Number of time units that pass in one second*/
274
+ uint32_t time_scale;
275
+
276
+ /*!< Equal to 1 indicates that pictures should be displayed according to
277
+ * their output order with the number of ticks between two consecutive
278
+ * pictures specified by num_ticks_per_picture.*/
279
+ uint8_t equal_picture_interval;
280
+
281
+ /*!< Specifies the number of clock ticks corresponding to output time
282
+ * between two consecutive pictures in the output order.
283
+ * Range - [0 to (1 << 32) - 2]*/
284
+ uint32_t num_ticks_per_picture;
285
+
286
+ } EbTimingInfo;
287
+
288
+ // structure to be allocated at the sample application and passed to the library
289
+ // on a per picture basis through the p_app_private field in the EbBufferHeaderType structure
290
+ // this structure and the data inside would be casted, validated, then copied at the
291
+ // svt_av1_enc_send_picture API call
292
+ typedef enum {
293
+ PRIVATE_DATA, // data to be passed through and written to the bitstream
294
+ //FILM_GRAIN_PARAM, // passing film grain parameters per picture
295
+ REF_FRAME_SCALING_EVENT, // reference frame scaling data per picture
296
+ ROI_MAP_EVENT, // ROI map data per picture
297
+ RES_CHANGE_EVENT, // resolution change data per picture (KF only)
298
+ RATE_CHANGE_EVENT, // Rate change data per picture (KF only)
299
+ PRIVATE_DATA_TYPES // end of private data types
300
+ } PrivDataType;
301
+ typedef struct EbPrivDataNode {
302
+ PrivDataType node_type;
303
+ void *data; // pointer to data structure e.g. EbRefFrameScale or AomFilmGrain
304
+ uint32_t size; // size of data being sent for the library to know how much to copy
305
+ struct EbPrivDataNode *next; // pointer to the next node, NULL if done.
306
+ } EbPrivDataNode;
307
+ typedef struct EbRefFrameScale {
308
+ uint8_t scale_mode; // scaling mode, support for RESIZE_NONE, RESIZE_FIXED and RESIZE_RANDOM
309
+ uint32_t scale_denom; // scaling denominator for non-key frame, from 8~16
310
+ uint32_t scale_kf_denom; // scaling denominator for key frame, from 8~16
311
+ } EbRefFrameScale;
312
+ typedef struct SvtAv1RoiMapEvt {
313
+ uint64_t start_picture_number;
314
+ uint8_t *b64_seg_map;
315
+ int16_t seg_qp[8]; // 8: MAX_SEGMENTS
316
+ int8_t max_seg_id;
317
+ struct SvtAv1RoiMapEvt *next;
318
+ } SvtAv1RoiMapEvt;
319
+ typedef struct SvtAv1RoiMap {
320
+ uint32_t evt_num;
321
+ SvtAv1RoiMapEvt *evt_list;
322
+ SvtAv1RoiMapEvt *cur_evt;
323
+ int16_t *qp_map;
324
+ char *buf;
325
+ } SvtAv1RoiMap;
326
+
327
+ typedef struct SvtAv1InputPicDef {
328
+ uint16_t input_luma_width; // input luma width aligned to 8, this is used during encoding
329
+ uint16_t input_luma_height; // input luma height aligned to 8, this is used during encoding
330
+ uint16_t input_pad_bottom;
331
+ uint16_t input_pad_right;
332
+ } SvtAv1InputPicDef;
333
+ typedef struct SvtAv1RateInfo {
334
+ // Sequence QP used in CRF/CQP algorithm. Over writes the sequence QP.
335
+ uint32_t seq_qp;
336
+ uint32_t target_bit_rate;
337
+ } SvtAv1RateInfo;
338
+
339
+ /*!\brief Structure containing film grain synthesis parameters for a frame
340
+ *
341
+ * This structure contains input parameters for film grain synthesis
342
+ */
343
+ typedef struct {
344
+ // Whether the decoder should apply film grain
345
+ int32_t apply_grain;
346
+
347
+ // Whether the decoder should update the film grain parameters from previous frame
348
+ int32_t update_parameters;
349
+
350
+ // 8 bit values indicating grain scaling points for the luma plane
351
+ int32_t scaling_points_y[14][2];
352
+ int32_t num_y_points; // value: 0..14
353
+
354
+ // 8 bit values indicating grain scaling points for the blue chroma plane
355
+ int32_t scaling_points_cb[10][2];
356
+ int32_t num_cb_points; // value: 0..10
357
+
358
+ // 8 bit values indicating grain scaling points for the red chroma plane
359
+ int32_t scaling_points_cr[10][2];
360
+ int32_t num_cr_points; // value: 0..10
361
+
362
+ // A value by which to shift scaling points, typically 8
363
+ int32_t scaling_shift; // values : 8..11
364
+
365
+ // Number of auto-regressive coefficients
366
+ int32_t ar_coeff_lag; // values: 0..3
367
+
368
+ // 8 bit values representing auto-regressive coefficients for each plane
369
+ int32_t ar_coeffs_y[24];
370
+ int32_t ar_coeffs_cb[25];
371
+ int32_t ar_coeffs_cr[25];
372
+
373
+ // Shift value: AR coeffs range
374
+ // 6: [-2, 2)
375
+ // 7: [-1, 1)
376
+ // 8: [-0.5, 0.5)
377
+ // 9: [-0.25, 0.25)
378
+ int32_t ar_coeff_shift; // values : 6..9
379
+
380
+ // A multiplier for the cb component used in derivation of the
381
+ // input index to the cb component scaling function.
382
+ int32_t cb_mult; // 8 bits
383
+ // A multiplier for the average luma component used in derivation of the input index to the cb
384
+ // component scaling function.
385
+ int32_t cb_luma_mult; // 8 bits
386
+ // An offset used in derivation of the input index to the cb component scaling function.
387
+ int32_t cb_offset; // 9 bits
388
+
389
+ // A multiplier for the cr component used in derivation of the
390
+ // input index to the cr component scaling function.
391
+ int32_t cr_mult; // 8 bits
392
+ // A multiplier for the average luma component used in derivation of the input index to the cr
393
+ // component scaling function.
394
+ int32_t cr_luma_mult; // 8 bits
395
+ // An offset used in derivation of the input index to the cr component scaling function.
396
+ int32_t cr_offset; // 9 bits
397
+
398
+ // Whether overlap between film grain blocks should be applied
399
+ int32_t overlap_flag;
400
+
401
+ // Whether to clip to studio range after film grain is generated
402
+ int32_t clip_to_restricted_range;
403
+
404
+ int32_t bit_depth; // video bit depth
405
+
406
+ // Whether to apply film grain to chroma planes based on the luma plane
407
+ int32_t chroma_scaling_from_luma;
408
+
409
+ // Specifies how much the random numbers should be scaled down during grain synthesis
410
+ int32_t grain_scale_shift;
411
+
412
+ // A random seed for the decoder to use for grain generation
413
+ uint16_t random_seed;
414
+
415
+ // Whether the encoder should ignore the ref frame map when coding film grain
416
+ int32_t ignore_ref;
417
+ } AomFilmGrain;
418
+
419
+ /**
420
+ CPU FLAGS
421
+ */
422
+ typedef uint64_t EbCpuFlags;
423
+ #ifdef ARCH_X86_64
424
+ #define EB_CPU_FLAGS_MMX (1 << 0)
425
+ #define EB_CPU_FLAGS_SSE (1 << 1)
426
+ #define EB_CPU_FLAGS_SSE2 (1 << 2)
427
+ #define EB_CPU_FLAGS_SSE3 (1 << 3)
428
+ #define EB_CPU_FLAGS_SSSE3 (1 << 4)
429
+ #define EB_CPU_FLAGS_SSE4_1 (1 << 5)
430
+ #define EB_CPU_FLAGS_SSE4_2 (1 << 6)
431
+ #define EB_CPU_FLAGS_AVX (1 << 7)
432
+ #define EB_CPU_FLAGS_AVX2 (1 << 8)
433
+ #define EB_CPU_FLAGS_AVX512F (1 << 9)
434
+ #define EB_CPU_FLAGS_AVX512CD (1 << 10)
435
+ #define EB_CPU_FLAGS_AVX512DQ (1 << 11)
436
+ #define EB_CPU_FLAGS_AVX512ER (1 << 12)
437
+ #define EB_CPU_FLAGS_AVX512PF (1 << 13)
438
+ #define EB_CPU_FLAGS_AVX512BW (1 << 14)
439
+ #define EB_CPU_FLAGS_AVX512VL (1 << 15)
440
+ #elif defined(ARCH_AARCH64)
441
+ // Armv8.0-A mandatory Neon instructions.
442
+ #define EB_CPU_FLAGS_NEON (1 << 0)
443
+ // Armv8.0-A optional CRC32 instructions, mandatory from Armv8.1-A.
444
+ #define EB_CPU_FLAGS_ARM_CRC32 (1 << 1)
445
+ // Armv8.2-A optional Neon dot-product instructions, mandatory from Armv8.4-A.
446
+ #define EB_CPU_FLAGS_NEON_DOTPROD (1 << 2)
447
+ // Armv8.2-A optional Neon i8mm instructions, mandatory from Armv8.6-A.
448
+ #define EB_CPU_FLAGS_NEON_I8MM (1 << 3)
449
+ // Armv8.2-A optional SVE instructions, mandatory from Armv9.0-A.
450
+ #define EB_CPU_FLAGS_SVE (1 << 4)
451
+ // Armv9.0-A SVE2 instructions.
452
+ #define EB_CPU_FLAGS_SVE2 (1 << 5)
453
+
454
+ #endif
455
+ #define EB_CPU_FLAGS_INVALID (1ULL << (sizeof(EbCpuFlags) * 8ULL - 1ULL))
456
+ #define EB_CPU_FLAGS_ALL ((EB_CPU_FLAGS_INVALID >> 1) - 1)
457
+
458
+ #ifdef __cplusplus
459
+ }
460
+ #endif // __cplusplus
461
+
462
+ #endif // EbSvtAv1_h