@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,594 @@
1
+ /*
2
+ * Copyright (c) 2016, Alliance for Open Media. All rights reserved.
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 www.aomedia.org/license/software. 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 www.aomedia.org/license/patent.
10
+ */
11
+
12
+ ///////////////////////////////////////////////////////////////////////////////
13
+ // Internal implementation details
14
+ ///////////////////////////////////////////////////////////////////////////////
15
+ //
16
+ // There are two levels of interfaces used to access the AOM codec: the
17
+ // aom_codec_iface and the aom_codec_ctx.
18
+ //
19
+ // 1. aom_codec_iface_t
20
+ // (Related files: aom/aom_codec.h, aom/src/aom_codec.c,
21
+ // aom/internal/aom_codec_internal.h, av1/av1_cx_iface.c,
22
+ // av1/av1_dx_iface.c)
23
+ //
24
+ // Used to initialize the codec context, which contains the configuration for
25
+ // for modifying the encoder/decoder during run-time. See the other
26
+ // documentation in this header file for more details. For the most part,
27
+ // users will call helper functions, such as aom_codec_iface_name,
28
+ // aom_codec_get_caps, etc., to interact with it.
29
+ //
30
+ // The main purpose of the aom_codec_iface_t is to provide a way to generate
31
+ // a default codec config, find out what capabilities the implementation has,
32
+ // and create an aom_codec_ctx_t (which is actually used to interact with the
33
+ // codec).
34
+ //
35
+ // Note that the implementations for the AV1 algorithm are located in
36
+ // av1/av1_cx_iface.c and av1/av1_dx_iface.c
37
+ //
38
+ //
39
+ // 2. aom_codec_ctx_t
40
+ // (Related files: aom/aom_codec.h, av1/av1_cx_iface.c, av1/av1_dx_iface.c,
41
+ // aom/aomcx.h, aom/aomdx.h, aom/src/aom_encoder.c, aom/src/aom_decoder.c)
42
+ //
43
+ // The actual interface between user code and the codec. It stores the name
44
+ // of the codec, a pointer back to the aom_codec_iface_t that initialized it,
45
+ // initialization flags, a config for either encoder or the decoder, and a
46
+ // pointer to internal data.
47
+ //
48
+ // The codec is configured / queried through calls to aom_codec_control,
49
+ // which takes a control ID (listed in aomcx.h and aomdx.h) and a parameter.
50
+ // In the case of "getter" control IDs, the parameter is modified to have
51
+ // the requested value; in the case of "setter" control IDs, the codec's
52
+ // configuration is changed based on the parameter. Note that a aom_codec_err_t
53
+ // is returned, which indicates if the operation was successful or not.
54
+ //
55
+ // Note that for the encoder, the aom_codec_alg_priv_t points to the
56
+ // the aom_codec_alg_priv structure in av1/av1_cx_iface.c, and for the decoder,
57
+ // the struct in av1/av1_dx_iface.c. Variables such as AV1_COMP cpi are stored
58
+ // here and also used in the core algorithm.
59
+ //
60
+ // At the end, aom_codec_destroy should be called for each initialized
61
+ // aom_codec_ctx_t.
62
+
63
+ /*!\defgroup codec Common Algorithm Interface
64
+ * This abstraction allows applications to easily support multiple video
65
+ * formats with minimal code duplication. This section describes the interface
66
+ * common to all codecs (both encoders and decoders).
67
+ * @{
68
+ */
69
+
70
+ /*!\file
71
+ * \brief Describes the codec algorithm interface to applications.
72
+ *
73
+ * This file describes the interface between an application and a
74
+ * video codec algorithm.
75
+ *
76
+ * An application instantiates a specific codec instance by using
77
+ * aom_codec_dec_init() or aom_codec_enc_init() and a pointer to the
78
+ * algorithm's interface structure:
79
+ * <pre>
80
+ * my_app.c:
81
+ * extern aom_codec_iface_t my_codec;
82
+ * {
83
+ * aom_codec_ctx_t algo;
84
+ * int threads = 4;
85
+ * aom_codec_dec_cfg_t cfg = { threads, 0, 0, 1 };
86
+ * res = aom_codec_dec_init(&algo, &my_codec, &cfg, 0);
87
+ * }
88
+ * </pre>
89
+ *
90
+ * Once initialized, the instance is managed using other functions from
91
+ * the aom_codec_* family.
92
+ */
93
+ #ifndef AOM_AOM_AOM_CODEC_H_
94
+ #define AOM_AOM_AOM_CODEC_H_
95
+
96
+ #ifdef __cplusplus
97
+ extern "C" {
98
+ #endif
99
+
100
+ #include "aom/aom_image.h"
101
+ #include "aom/aom_integer.h"
102
+
103
+ /*!\brief Decorator indicating a function is deprecated */
104
+ #ifndef AOM_DEPRECATED
105
+ #if defined(__GNUC__)
106
+ #define AOM_DEPRECATED __attribute__((deprecated))
107
+ #elif defined(_MSC_VER)
108
+ #define AOM_DEPRECATED
109
+ #else
110
+ #define AOM_DEPRECATED
111
+ #endif
112
+ #endif /* AOM_DEPRECATED */
113
+
114
+ #ifndef AOM_DECLSPEC_DEPRECATED
115
+ #if defined(__GNUC__)
116
+ #define AOM_DECLSPEC_DEPRECATED /**< \copydoc #AOM_DEPRECATED */
117
+ #elif defined(_MSC_VER)
118
+ /*!\brief \copydoc #AOM_DEPRECATED */
119
+ #define AOM_DECLSPEC_DEPRECATED __declspec(deprecated)
120
+ #else
121
+ #define AOM_DECLSPEC_DEPRECATED /**< \copydoc #AOM_DEPRECATED */
122
+ #endif
123
+ #endif /* AOM_DECLSPEC_DEPRECATED */
124
+
125
+ /*!\brief Decorator indicating a function is potentially unused */
126
+ #ifdef AOM_UNUSED
127
+ #elif defined(__GNUC__) || defined(__clang__)
128
+ #define AOM_UNUSED __attribute__((unused))
129
+ #else
130
+ #define AOM_UNUSED
131
+ #endif
132
+
133
+ /*!\brief Decorator indicating that given struct/union/enum is packed */
134
+ #ifndef ATTRIBUTE_PACKED
135
+ #if defined(__GNUC__)
136
+ #define ATTRIBUTE_PACKED __attribute__((packed))
137
+ #elif defined(_MSC_VER)
138
+ #define ATTRIBUTE_PACKED
139
+ #else
140
+ #define ATTRIBUTE_PACKED
141
+ #endif
142
+ #endif /* ATTRIBUTE_PACKED */
143
+
144
+ /*!\brief Current ABI version number
145
+ *
146
+ * \internal
147
+ * If this file is altered in any way that changes the ABI, this value
148
+ * must be bumped. Examples include, but are not limited to, changing
149
+ * types, removing or reassigning enums, adding/removing/rearranging
150
+ * fields to structures
151
+ */
152
+ #define AOM_CODEC_ABI_VERSION (7 + AOM_IMAGE_ABI_VERSION) /**<\hideinitializer*/
153
+
154
+ /*!\brief Algorithm return codes */
155
+ typedef enum {
156
+ /*!\brief Operation completed without error */
157
+ AOM_CODEC_OK,
158
+
159
+ /*!\brief Unspecified error */
160
+ AOM_CODEC_ERROR,
161
+
162
+ /*!\brief Memory operation failed */
163
+ AOM_CODEC_MEM_ERROR,
164
+
165
+ /*!\brief ABI version mismatch */
166
+ AOM_CODEC_ABI_MISMATCH,
167
+
168
+ /*!\brief Algorithm does not have required capability */
169
+ AOM_CODEC_INCAPABLE,
170
+
171
+ /*!\brief The given bitstream is not supported.
172
+ *
173
+ * The bitstream was unable to be parsed at the highest level. The decoder
174
+ * is unable to proceed. This error \ref SHOULD be treated as fatal to the
175
+ * stream. */
176
+ AOM_CODEC_UNSUP_BITSTREAM,
177
+
178
+ /*!\brief Encoded bitstream uses an unsupported feature
179
+ *
180
+ * The decoder does not implement a feature required by the encoder. This
181
+ * return code should only be used for features that prevent future
182
+ * pictures from being properly decoded. This error \ref MAY be treated as
183
+ * fatal to the stream or \ref MAY be treated as fatal to the current GOP.
184
+ */
185
+ AOM_CODEC_UNSUP_FEATURE,
186
+
187
+ /*!\brief The coded data for this stream is corrupt or incomplete
188
+ *
189
+ * There was a problem decoding the current frame. This return code
190
+ * should only be used for failures that prevent future pictures from
191
+ * being properly decoded. This error \ref MAY be treated as fatal to the
192
+ * stream or \ref MAY be treated as fatal to the current GOP. If decoding
193
+ * is continued for the current GOP, artifacts may be present.
194
+ */
195
+ AOM_CODEC_CORRUPT_FRAME,
196
+
197
+ /*!\brief An application-supplied parameter is not valid.
198
+ *
199
+ */
200
+ AOM_CODEC_INVALID_PARAM,
201
+
202
+ /*!\brief An iterator reached the end of list.
203
+ *
204
+ */
205
+ AOM_CODEC_LIST_END
206
+
207
+ } aom_codec_err_t;
208
+
209
+ /*! \brief Codec capabilities bitfield
210
+ *
211
+ * Each codec advertises the capabilities it supports as part of its
212
+ * ::aom_codec_iface_t interface structure. Capabilities are extra interfaces
213
+ * or functionality, and are not required to be supported.
214
+ *
215
+ * The available flags are specified by AOM_CODEC_CAP_* defines.
216
+ */
217
+ typedef long aom_codec_caps_t;
218
+ #define AOM_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
219
+ #define AOM_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
220
+
221
+ /*! \brief Initialization-time Feature Enabling
222
+ *
223
+ * Certain codec features must be known at initialization time, to allow for
224
+ * proper memory allocation.
225
+ *
226
+ * The available flags are specified by AOM_CODEC_USE_* defines. The bits are
227
+ * allocated as follows:
228
+ * 0x1 - 0x80: codec (common to decoder and encoder)
229
+ * 0x100 - 0x8000: decoder
230
+ * 0x10000 - 0x800000: encoder
231
+ */
232
+ typedef long aom_codec_flags_t;
233
+
234
+ // Experimental feature policy
235
+ //
236
+ // New features may be marked as experimental. Experimental features are not
237
+ // part of the stable API and may be modified or removed in a future release.
238
+ // Experimental features are made available only if you pass the
239
+ // AOM_CODEC_USE_EXPERIMENTAL flag to the codec init function.
240
+ //
241
+ // If you use experimental features, you must rebuild your code whenever you
242
+ // update to a new libaom release, and you must be prepared to modify your code
243
+ // when an experimental feature you use is modified or removed. If you are not
244
+ // sure, DO NOT use experimental features.
245
+ #define AOM_CODEC_USE_EXPERIMENTAL 0x1 /**< Enables experimental features */
246
+
247
+ /*!\brief Time Stamp Type
248
+ *
249
+ * An integer, which when multiplied by the stream's time base, provides
250
+ * the absolute time of a sample.
251
+ */
252
+ typedef int64_t aom_codec_pts_t;
253
+
254
+ /*!\brief Codec interface structure.
255
+ *
256
+ * Contains function pointers and other data private to the codec
257
+ * implementation. This structure is opaque to the application. Common
258
+ * functions used with this structure:
259
+ * - aom_codec_iface_name(aom_codec_iface_t *iface): get the
260
+ * name of the codec
261
+ * - aom_codec_get_caps(aom_codec_iface_t *iface): returns
262
+ * the capabilities of the codec
263
+ * - aom_codec_enc_config_default: generate the default config for
264
+ * initializing the encoder (see documentation in aom_encoder.h)
265
+ * - aom_codec_dec_init, aom_codec_enc_init: initialize the codec context
266
+ * structure (see documentation on aom_codec_ctx).
267
+ *
268
+ * To get access to the AV1 encoder and decoder, use aom_codec_av1_cx() and
269
+ * aom_codec_av1_dx().
270
+ */
271
+ typedef const struct aom_codec_iface aom_codec_iface_t;
272
+
273
+ /*!\brief Codec private data structure.
274
+ *
275
+ * Contains data private to the codec implementation. This structure is opaque
276
+ * to the application.
277
+ */
278
+ typedef struct aom_codec_priv aom_codec_priv_t;
279
+
280
+ /*!\brief Compressed Frame Flags
281
+ *
282
+ * This type represents a bitfield containing information about a compressed
283
+ * frame that may be useful to an application. The most significant 16 bits
284
+ * can be used by an algorithm to provide additional detail, for example to
285
+ * support frame types that are codec specific (MPEG-1 D-frames for example)
286
+ */
287
+ typedef uint32_t aom_codec_frame_flags_t;
288
+ #define AOM_FRAME_IS_KEY 0x1u /**< frame is the start of a GOP */
289
+ /*!\brief frame can be dropped without affecting the stream (no future frame
290
+ * depends on this one) */
291
+ #define AOM_FRAME_IS_DROPPABLE 0x2u
292
+ /*!\brief this is an INTRA_ONLY frame */
293
+ #define AOM_FRAME_IS_INTRAONLY 0x10u
294
+ /*!\brief this is an S-frame */
295
+ #define AOM_FRAME_IS_SWITCH 0x20u
296
+ /*!\brief this is an error-resilient frame */
297
+ #define AOM_FRAME_IS_ERROR_RESILIENT 0x40u
298
+ /*!\brief this is a key-frame dependent recovery-point frame */
299
+ #define AOM_FRAME_IS_DELAYED_RANDOM_ACCESS_POINT 0x80u
300
+
301
+ /*!\brief Iterator
302
+ *
303
+ * Opaque storage used for iterating over lists.
304
+ */
305
+ typedef const void *aom_codec_iter_t;
306
+
307
+ /*!\brief Codec context structure
308
+ *
309
+ * All codecs \ref MUST support this context structure fully. In general,
310
+ * this data should be considered private to the codec algorithm, and
311
+ * not be manipulated or examined by the calling application. Applications
312
+ * may reference the 'name' member to get a printable description of the
313
+ * algorithm.
314
+ */
315
+ typedef struct aom_codec_ctx {
316
+ const char *name; /**< Printable interface name */
317
+ aom_codec_iface_t *iface; /**< Interface pointers */
318
+ aom_codec_err_t err; /**< Last returned error */
319
+ const char *err_detail; /**< Detailed info, if available */
320
+ aom_codec_flags_t init_flags; /**< Flags passed at init time */
321
+ union {
322
+ /**< Decoder Configuration Pointer */
323
+ const struct aom_codec_dec_cfg *dec;
324
+ /**< Encoder Configuration Pointer */
325
+ const struct aom_codec_enc_cfg *enc;
326
+ const void *raw;
327
+ } config; /**< Configuration pointer aliasing union */
328
+ aom_codec_priv_t *priv; /**< Algorithm private storage */
329
+ } aom_codec_ctx_t;
330
+
331
+ /*!\brief Bit depth for codec
332
+ * *
333
+ * This enumeration determines the bit depth of the codec.
334
+ */
335
+ typedef enum aom_bit_depth {
336
+ AOM_BITS_8 = 8, /**< 8 bits */
337
+ AOM_BITS_10 = 10, /**< 10 bits */
338
+ AOM_BITS_12 = 12, /**< 12 bits */
339
+ } aom_bit_depth_t;
340
+
341
+ /*!\brief Superblock size selection.
342
+ *
343
+ * Defines the superblock size used for encoding. The superblock size can
344
+ * either be fixed at 64x64 or 128x128 pixels, or it can be dynamically
345
+ * selected by the encoder for each frame.
346
+ */
347
+ typedef enum aom_superblock_size {
348
+ AOM_SUPERBLOCK_SIZE_64X64, /**< Always use 64x64 superblocks. */
349
+ AOM_SUPERBLOCK_SIZE_128X128, /**< Always use 128x128 superblocks. */
350
+ AOM_SUPERBLOCK_SIZE_DYNAMIC /**< Select superblock size dynamically. */
351
+ } aom_superblock_size_t;
352
+
353
+ /*
354
+ * Library Version Number Interface
355
+ *
356
+ * For example, see the following sample return values:
357
+ * aom_codec_version() (1<<16 | 2<<8 | 3)
358
+ * aom_codec_version_str() "v1.2.3-rc1-16-gec6a1ba"
359
+ * aom_codec_version_extra_str() "rc1-16-gec6a1ba"
360
+ */
361
+
362
+ /*!\brief Return the version information (as an integer)
363
+ *
364
+ * Returns a packed encoding of the library version number. This will only
365
+ * include the major.minor.patch component of the version number. Note that this
366
+ * encoded value should be accessed through the macros provided, as the encoding
367
+ * may change in the future.
368
+ *
369
+ */
370
+ int aom_codec_version(void);
371
+
372
+ /*!\brief Return the major version number */
373
+ #define aom_codec_version_major() ((aom_codec_version() >> 16) & 0xff)
374
+
375
+ /*!\brief Return the minor version number */
376
+ #define aom_codec_version_minor() ((aom_codec_version() >> 8) & 0xff)
377
+
378
+ /*!\brief Return the patch version number */
379
+ #define aom_codec_version_patch() ((aom_codec_version() >> 0) & 0xff)
380
+
381
+ /*!\brief Return the version information (as a string)
382
+ *
383
+ * Returns a printable string containing the full library version number. This
384
+ * may contain additional text following the three digit version number, as to
385
+ * indicate release candidates, pre-release versions, etc.
386
+ *
387
+ */
388
+ const char *aom_codec_version_str(void);
389
+
390
+ /*!\brief Return the version information (as a string)
391
+ *
392
+ * Returns a printable "extra string". This is the component of the string
393
+ * returned by aom_codec_version_str() following the three digit version number.
394
+ *
395
+ */
396
+ const char *aom_codec_version_extra_str(void);
397
+
398
+ /*!\brief Return the build configuration
399
+ *
400
+ * Returns a printable string containing an encoded version of the build
401
+ * configuration. This may be useful to aom support.
402
+ *
403
+ */
404
+ const char *aom_codec_build_config(void);
405
+
406
+ /*!\brief Return the name for a given interface
407
+ *
408
+ * Returns a human readable string for name of the given codec interface.
409
+ *
410
+ * \param[in] iface Interface pointer
411
+ *
412
+ */
413
+ const char *aom_codec_iface_name(aom_codec_iface_t *iface);
414
+
415
+ /*!\brief Convert error number to printable string
416
+ *
417
+ * Returns a human readable string for the last error returned by the
418
+ * algorithm. The returned error will be one line and will not contain
419
+ * any newline characters.
420
+ *
421
+ *
422
+ * \param[in] err Error number.
423
+ *
424
+ */
425
+ const char *aom_codec_err_to_string(aom_codec_err_t err);
426
+
427
+ /*!\brief Retrieve error synopsis for codec context
428
+ *
429
+ * Returns a human readable string for the last error returned by the
430
+ * algorithm. The returned error will be one line and will not contain
431
+ * any newline characters.
432
+ *
433
+ *
434
+ * \param[in] ctx Pointer to this instance's context.
435
+ *
436
+ */
437
+ const char *aom_codec_error(const aom_codec_ctx_t *ctx);
438
+
439
+ /*!\brief Retrieve detailed error information for codec context
440
+ *
441
+ * Returns a human readable string providing detailed information about
442
+ * the last error. The returned string is only valid until the next
443
+ * aom_codec_* function call (except aom_codec_error and
444
+ * aom_codec_error_detail) on the codec context.
445
+ *
446
+ * \param[in] ctx Pointer to this instance's context.
447
+ *
448
+ * \retval NULL
449
+ * No detailed information is available.
450
+ */
451
+ const char *aom_codec_error_detail(const aom_codec_ctx_t *ctx);
452
+
453
+ /* REQUIRED FUNCTIONS
454
+ *
455
+ * The following functions are required to be implemented for all codecs.
456
+ * They represent the base case functionality expected of all codecs.
457
+ */
458
+
459
+ /*!\brief Destroy a codec instance
460
+ *
461
+ * Destroys a codec context, freeing any associated memory buffers.
462
+ *
463
+ * \param[in] ctx Pointer to this instance's context
464
+ *
465
+ * \retval #AOM_CODEC_OK
466
+ * The codec instance has been destroyed.
467
+ * \retval #AOM_CODEC_INVALID_PARAM
468
+ * ctx is a null pointer.
469
+ * \retval #AOM_CODEC_ERROR
470
+ * Codec context not initialized.
471
+ */
472
+ aom_codec_err_t aom_codec_destroy(aom_codec_ctx_t *ctx);
473
+
474
+ /*!\brief Get the capabilities of an algorithm.
475
+ *
476
+ * Retrieves the capabilities bitfield from the algorithm's interface.
477
+ *
478
+ * \param[in] iface Pointer to the algorithm interface
479
+ *
480
+ */
481
+ aom_codec_caps_t aom_codec_get_caps(aom_codec_iface_t *iface);
482
+
483
+ /*!\name Codec Control
484
+ *
485
+ * The aom_codec_control function exchanges algorithm specific data with the
486
+ * codec instance. Additionally, the macro AOM_CODEC_CONTROL_TYPECHECKED is
487
+ * provided, which will type-check the parameter against the control ID before
488
+ * calling aom_codec_control - note that this macro requires the control ID
489
+ * to be directly encoded in it, e.g.,
490
+ * AOM_CODEC_CONTROL_TYPECHECKED(&ctx, AOME_SET_CPUUSED, 8).
491
+ *
492
+ * The codec control IDs can be found in aom.h, aomcx.h, and aomdx.h
493
+ * (defined as aom_com_control_id, aome_enc_control_id, and aom_dec_control_id).
494
+ * @{
495
+ */
496
+ /*!\brief Algorithm Control
497
+ *
498
+ * aom_codec_control takes a context, a control ID, and a third parameter
499
+ * (with varying type). If the context is non-null and an error occurs,
500
+ * ctx->err will be set to the same value as the return value.
501
+ *
502
+ * \param[in] ctx Pointer to this instance's context
503
+ * \param[in] ctrl_id Algorithm specific control identifier.
504
+ * Must be nonzero.
505
+ *
506
+ * \retval #AOM_CODEC_OK
507
+ * The control request was processed.
508
+ * \retval #AOM_CODEC_ERROR
509
+ * The control request was not processed.
510
+ * \retval #AOM_CODEC_INVALID_PARAM
511
+ * The control ID was zero, or the data was not valid.
512
+ */
513
+ aom_codec_err_t aom_codec_control(aom_codec_ctx_t *ctx, int ctrl_id, ...);
514
+
515
+ /*!\brief Key & Value API
516
+ *
517
+ * aom_codec_set_option() takes a context, a key (option name) and a value. If
518
+ * the context is non-null and an error occurs, ctx->err will be set to the same
519
+ * value as the return value.
520
+ *
521
+ * \param[in] ctx Pointer to this instance's context
522
+ * \param[in] name The name of the option (key)
523
+ * \param[in] value The value of the option
524
+ *
525
+ * \retval #AOM_CODEC_OK
526
+ * The value of the option was set.
527
+ * \retval #AOM_CODEC_INVALID_PARAM
528
+ * The data was not valid.
529
+ * \retval #AOM_CODEC_ERROR
530
+ * The option was not successfully set.
531
+ */
532
+ aom_codec_err_t aom_codec_set_option(aom_codec_ctx_t *ctx, const char *name,
533
+ const char *value);
534
+
535
+ /*!\brief aom_codec_control wrapper macro (adds type-checking, less flexible)
536
+ *
537
+ * This macro allows for type safe conversions across the variadic parameter
538
+ * to aom_codec_control(). However, it requires the explicit control ID
539
+ * be passed in (it cannot be passed in via a variable) -- otherwise a compiler
540
+ * error will occur. After the type checking, it calls aom_codec_control.
541
+ */
542
+ #define AOM_CODEC_CONTROL_TYPECHECKED(ctx, id, data) \
543
+ aom_codec_control_typechecked_##id(ctx, id, data) /**<\hideinitializer*/
544
+
545
+ /*!\brief Creates type checking mechanisms for aom_codec_control
546
+ *
547
+ * It defines a static function with the correctly typed arguments as a wrapper
548
+ * to the type-unsafe aom_codec_control function. It also creates a typedef
549
+ * for each type.
550
+ */
551
+ #define AOM_CTRL_USE_TYPE(id, typ) \
552
+ static aom_codec_err_t aom_codec_control_typechecked_##id( \
553
+ aom_codec_ctx_t *, int, typ) AOM_UNUSED; \
554
+ static aom_codec_err_t aom_codec_control_typechecked_##id( \
555
+ aom_codec_ctx_t *ctx, int ctrl, typ data) { \
556
+ return aom_codec_control(ctx, ctrl, data); \
557
+ } /**<\hideinitializer*/ \
558
+ typedef typ aom_codec_control_type_##id;
559
+ /*!@} end Codec Control group */
560
+
561
+ /*!\brief OBU types. */
562
+ typedef enum ATTRIBUTE_PACKED {
563
+ OBU_SEQUENCE_HEADER = 1,
564
+ OBU_TEMPORAL_DELIMITER = 2,
565
+ OBU_FRAME_HEADER = 3,
566
+ OBU_TILE_GROUP = 4,
567
+ OBU_METADATA = 5,
568
+ OBU_FRAME = 6,
569
+ OBU_REDUNDANT_FRAME_HEADER = 7,
570
+ OBU_TILE_LIST = 8,
571
+ OBU_PADDING = 15,
572
+ } OBU_TYPE;
573
+
574
+ /*!\brief OBU metadata types. */
575
+ typedef enum {
576
+ OBU_METADATA_TYPE_AOM_RESERVED_0 = 0,
577
+ OBU_METADATA_TYPE_HDR_CLL = 1,
578
+ OBU_METADATA_TYPE_HDR_MDCV = 2,
579
+ OBU_METADATA_TYPE_SCALABILITY = 3,
580
+ OBU_METADATA_TYPE_ITUT_T35 = 4,
581
+ OBU_METADATA_TYPE_TIMECODE = 5,
582
+ } OBU_METADATA_TYPE;
583
+
584
+ /*!\brief Returns string representation of OBU_TYPE.
585
+ *
586
+ * \param[in] type The OBU_TYPE to convert to string.
587
+ */
588
+ const char *aom_obu_type_to_string(OBU_TYPE type);
589
+
590
+ /*!@} - end defgroup codec*/
591
+ #ifdef __cplusplus
592
+ }
593
+ #endif
594
+ #endif // AOM_AOM_AOM_CODEC_H_