@pproenca/ffmpeg-darwin-arm64-lgpl 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 (205) 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/libswresample/swresample.h +587 -0
  152. package/include/libswresample/version.h +46 -0
  153. package/include/libswresample/version_major.h +31 -0
  154. package/include/libswscale/swscale.h +460 -0
  155. package/include/libswscale/version.h +44 -0
  156. package/include/libswscale/version_major.h +35 -0
  157. package/include/ogg/config_types.h +26 -0
  158. package/include/ogg/ogg.h +209 -0
  159. package/include/ogg/os_types.h +158 -0
  160. package/include/opus/opus.h +1099 -0
  161. package/include/opus/opus_defines.h +830 -0
  162. package/include/opus/opus_multistream.h +660 -0
  163. package/include/opus/opus_projection.h +568 -0
  164. package/include/opus/opus_types.h +166 -0
  165. package/include/svt-av1/EbDebugMacros.h +88 -0
  166. package/include/svt-av1/EbSvtAv1.h +462 -0
  167. package/include/svt-av1/EbSvtAv1Enc.h +1112 -0
  168. package/include/svt-av1/EbSvtAv1ErrorCodes.h +67 -0
  169. package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +64 -0
  170. package/include/svt-av1/EbSvtAv1Formats.h +126 -0
  171. package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
  172. package/include/vorbis/codec.h +242 -0
  173. package/include/vorbis/vorbisenc.h +435 -0
  174. package/include/vorbis/vorbisfile.h +205 -0
  175. package/include/vpx/vp8.h +136 -0
  176. package/include/vpx/vp8cx.h +1118 -0
  177. package/include/vpx/vp8dx.h +228 -0
  178. package/include/vpx/vpx_codec.h +475 -0
  179. package/include/vpx/vpx_decoder.h +367 -0
  180. package/include/vpx/vpx_encoder.h +1150 -0
  181. package/include/vpx/vpx_ext_ratectrl.h +590 -0
  182. package/include/vpx/vpx_frame_buffer.h +83 -0
  183. package/include/vpx/vpx_image.h +221 -0
  184. package/include/vpx/vpx_integer.h +40 -0
  185. package/include/vpx/vpx_tpl.h +68 -0
  186. package/lib/index.js +1 -0
  187. package/lib/libSvtAv1Enc.a +0 -0
  188. package/lib/libaom.a +0 -0
  189. package/lib/libavcodec.a +0 -0
  190. package/lib/libavdevice.a +0 -0
  191. package/lib/libavfilter.a +0 -0
  192. package/lib/libavformat.a +0 -0
  193. package/lib/libavutil.a +0 -0
  194. package/lib/libdav1d.a +0 -0
  195. package/lib/libmp3lame.a +0 -0
  196. package/lib/libogg.a +0 -0
  197. package/lib/libopus.a +0 -0
  198. package/lib/libswresample.a +0 -0
  199. package/lib/libswscale.a +0 -0
  200. package/lib/libvorbis.a +0 -0
  201. package/lib/libvorbisenc.a +0 -0
  202. package/lib/libvorbisfile.a +0 -0
  203. package/lib/libvpx.a +0 -0
  204. package/package.json +35 -0
  205. package/versions.json +1 -0
@@ -0,0 +1,228 @@
1
+ /*
2
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ /*!\defgroup vp8_decoder WebM VP8/VP9 Decoder
12
+ * \ingroup vp8
13
+ *
14
+ * @{
15
+ */
16
+ /*!\file
17
+ * \brief Provides definitions for using VP8 or VP9 within the vpx Decoder
18
+ * interface.
19
+ */
20
+ #ifndef VPX_VPX_VP8DX_H_
21
+ #define VPX_VPX_VP8DX_H_
22
+
23
+ #ifdef __cplusplus
24
+ extern "C" {
25
+ #endif
26
+
27
+ /* Include controls common to both the encoder and decoder */
28
+ #include "./vp8.h"
29
+
30
+ /*!\name Algorithm interface for VP8
31
+ *
32
+ * This interface provides the capability to decode VP8 streams.
33
+ * @{
34
+ */
35
+
36
+ /*!\brief A single instance of the VP8 decoder.
37
+ *\deprecated This access mechanism is provided for backwards compatibility;
38
+ * prefer vpx_codec_vp8_dx().
39
+ */
40
+ extern vpx_codec_iface_t vpx_codec_vp8_dx_algo;
41
+
42
+ /*!\brief The interface to the VP8 decoder.
43
+ */
44
+ extern vpx_codec_iface_t *vpx_codec_vp8_dx(void);
45
+ /*!@} - end algorithm interface member group*/
46
+
47
+ /*!\name Algorithm interface for VP9
48
+ *
49
+ * This interface provides the capability to decode VP9 streams.
50
+ * @{
51
+ */
52
+
53
+ /*!\brief A single instance of the VP9 decoder.
54
+ *\deprecated This access mechanism is provided for backwards compatibility;
55
+ * prefer vpx_codec_vp9_dx().
56
+ */
57
+ extern vpx_codec_iface_t vpx_codec_vp9_dx_algo;
58
+
59
+ /*!\brief The interface to the VP9 decoder.
60
+ */
61
+ extern vpx_codec_iface_t *vpx_codec_vp9_dx(void);
62
+ /*!@} - end algorithm interface member group*/
63
+
64
+ /*!\enum vp8_dec_control_id
65
+ * \brief VP8 decoder control functions
66
+ *
67
+ * This set of macros define the control functions available for the VP8
68
+ * decoder interface.
69
+ *
70
+ * \sa #vpx_codec_control
71
+ */
72
+ enum vp8_dec_control_id {
73
+ /** control function to get info on which reference frames were updated
74
+ * by the last decode
75
+ */
76
+ VP8D_GET_LAST_REF_UPDATES = VP8_DECODER_CTRL_ID_START,
77
+
78
+ /** check if the indicated frame is corrupted */
79
+ VP8D_GET_FRAME_CORRUPTED,
80
+
81
+ /** control function to get info on which reference frames were used
82
+ * by the last decode
83
+ */
84
+ VP8D_GET_LAST_REF_USED,
85
+
86
+ /** decryption function to decrypt encoded buffer data immediately
87
+ * before decoding. Takes a vpx_decrypt_init, which contains
88
+ * a callback function and opaque context pointer.
89
+ */
90
+ VPXD_SET_DECRYPTOR,
91
+ VP8D_SET_DECRYPTOR = VPXD_SET_DECRYPTOR,
92
+
93
+ /** control function to get the dimensions that the current frame is decoded
94
+ * at. This may be different to the intended display size for the frame as
95
+ * specified in the wrapper or frame header (see VP9D_GET_DISPLAY_SIZE). */
96
+ VP9D_GET_FRAME_SIZE,
97
+
98
+ /** control function to get the current frame's intended display dimensions
99
+ * (as specified in the wrapper or frame header). This may be different to
100
+ * the decoded dimensions of this frame (see VP9D_GET_FRAME_SIZE). */
101
+ VP9D_GET_DISPLAY_SIZE,
102
+
103
+ /** control function to get the bit depth of the stream. */
104
+ VP9D_GET_BIT_DEPTH,
105
+
106
+ /** control function to set the byte alignment of the planes in the reference
107
+ * buffers. Valid values are power of 2, from 32 to 1024. A value of 0 sets
108
+ * legacy alignment. I.e. Y plane is aligned to 32 bytes, U plane directly
109
+ * follows Y plane, and V plane directly follows U plane. Default value is 0.
110
+ */
111
+ VP9_SET_BYTE_ALIGNMENT,
112
+
113
+ /** control function to invert the decoding order to from right to left. The
114
+ * function is used in a test to confirm the decoding independence of tile
115
+ * columns. The function may be used in application where this order
116
+ * of decoding is desired.
117
+ *
118
+ * TODO(yaowu): Rework the unit test that uses this control, and in a future
119
+ * release, this test-only control shall be removed.
120
+ */
121
+ VP9_INVERT_TILE_DECODE_ORDER,
122
+
123
+ /** control function to set the skip loop filter flag. Valid values are
124
+ * integers. The decoder will skip the loop filter when its value is set to
125
+ * nonzero. If the loop filter is skipped the decoder may accumulate decode
126
+ * artifacts. The default value is 0.
127
+ */
128
+ VP9_SET_SKIP_LOOP_FILTER,
129
+
130
+ /** control function to decode SVC stream up to the x spatial layers,
131
+ * where x is passed in through the control, and is 0 for base layer.
132
+ */
133
+ VP9_DECODE_SVC_SPATIAL_LAYER,
134
+
135
+ /*!\brief Codec control function to get last decoded frame quantizer.
136
+ *
137
+ * Return value uses internal quantizer scale defined by the codec.
138
+ *
139
+ * Supported in codecs: VP8, VP9
140
+ */
141
+ VPXD_GET_LAST_QUANTIZER,
142
+
143
+ /*!\brief Codec control function to set row level multi-threading.
144
+ *
145
+ * 0 : off, 1 : on
146
+ *
147
+ * Supported in codecs: VP9
148
+ */
149
+ VP9D_SET_ROW_MT,
150
+
151
+ /*!\brief Codec control function to set loopfilter optimization.
152
+ *
153
+ * 0 : off, Loop filter is done after all tiles have been decoded
154
+ * 1 : on, Loop filter is done immediately after decode without
155
+ * waiting for all threads to sync.
156
+ *
157
+ * Supported in codecs: VP9
158
+ */
159
+ VP9D_SET_LOOP_FILTER_OPT,
160
+
161
+ VP8_DECODER_CTRL_ID_MAX
162
+ };
163
+
164
+ /** Decrypt n bytes of data from input -> output, using the decrypt_state
165
+ * passed in VPXD_SET_DECRYPTOR.
166
+ */
167
+ typedef void (*vpx_decrypt_cb)(void *decrypt_state, const unsigned char *input,
168
+ unsigned char *output, int count);
169
+
170
+ /*!\brief Structure to hold decryption state
171
+ *
172
+ * Defines a structure to hold the decryption state and access function.
173
+ */
174
+ typedef struct vpx_decrypt_init {
175
+ /*! Decrypt callback. */
176
+ vpx_decrypt_cb decrypt_cb;
177
+
178
+ /*! Decryption state. */
179
+ void *decrypt_state;
180
+ } vpx_decrypt_init;
181
+
182
+ /*!\cond */
183
+ /*!\brief VP8 decoder control function parameter type
184
+ *
185
+ * Defines the data types that VP8D control functions take. Note that
186
+ * additional common controls are defined in vp8.h
187
+ *
188
+ */
189
+
190
+ VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_UPDATES, int *)
191
+ #define VPX_CTRL_VP8D_GET_LAST_REF_UPDATES
192
+ VPX_CTRL_USE_TYPE(VP8D_GET_FRAME_CORRUPTED, int *)
193
+ #define VPX_CTRL_VP8D_GET_FRAME_CORRUPTED
194
+ VPX_CTRL_USE_TYPE(VP8D_GET_LAST_REF_USED, int *)
195
+ #define VPX_CTRL_VP8D_GET_LAST_REF_USED
196
+ VPX_CTRL_USE_TYPE(VPXD_SET_DECRYPTOR, vpx_decrypt_init *)
197
+ #define VPX_CTRL_VPXD_SET_DECRYPTOR
198
+ VPX_CTRL_USE_TYPE(VP8D_SET_DECRYPTOR, vpx_decrypt_init *)
199
+ #define VPX_CTRL_VP8D_SET_DECRYPTOR
200
+ VPX_CTRL_USE_TYPE(VP9D_GET_FRAME_SIZE, int *)
201
+ #define VPX_CTRL_VP9D_GET_FRAME_SIZE
202
+ VPX_CTRL_USE_TYPE(VP9D_GET_DISPLAY_SIZE, int *)
203
+ #define VPX_CTRL_VP9D_GET_DISPLAY_SIZE
204
+ VPX_CTRL_USE_TYPE(VP9D_GET_BIT_DEPTH, unsigned int *)
205
+ #define VPX_CTRL_VP9D_GET_BIT_DEPTH
206
+ VPX_CTRL_USE_TYPE(VP9_SET_BYTE_ALIGNMENT, int)
207
+ #define VPX_CTRL_VP9_SET_BYTE_ALIGNMENT
208
+ VPX_CTRL_USE_TYPE(VP9_INVERT_TILE_DECODE_ORDER, int)
209
+ #define VPX_CTRL_VP9_INVERT_TILE_DECODE_ORDER
210
+ VPX_CTRL_USE_TYPE(VP9_SET_SKIP_LOOP_FILTER, int)
211
+ #define VPX_CTRL_VP9_SET_SKIP_LOOP_FILTER
212
+ VPX_CTRL_USE_TYPE(VP9_DECODE_SVC_SPATIAL_LAYER, int)
213
+ #define VPX_CTRL_VP9_DECODE_SVC_SPATIAL_LAYER
214
+ VPX_CTRL_USE_TYPE(VPXD_GET_LAST_QUANTIZER, int *)
215
+ #define VPX_CTRL_VPXD_GET_LAST_QUANTIZER
216
+ VPX_CTRL_USE_TYPE(VP9D_SET_ROW_MT, int)
217
+ #define VPX_CTRL_VP9_DECODE_SET_ROW_MT
218
+ VPX_CTRL_USE_TYPE(VP9D_SET_LOOP_FILTER_OPT, int)
219
+ #define VPX_CTRL_VP9_SET_LOOP_FILTER_OPT
220
+
221
+ /*!\endcond */
222
+ /*! @} - end defgroup vp8_decoder */
223
+
224
+ #ifdef __cplusplus
225
+ } // extern "C"
226
+ #endif
227
+
228
+ #endif // VPX_VPX_VP8DX_H_
@@ -0,0 +1,475 @@
1
+ /*
2
+ * Copyright (c) 2010 The WebM project authors. All Rights Reserved.
3
+ *
4
+ * Use of this source code is governed by a BSD-style license
5
+ * that can be found in the LICENSE file in the root of the source
6
+ * tree. An additional intellectual property rights grant can be found
7
+ * in the file PATENTS. All contributing project authors may
8
+ * be found in the AUTHORS file in the root of the source tree.
9
+ */
10
+
11
+ /*!\defgroup codec Common Algorithm Interface
12
+ * This abstraction allows applications to easily support multiple video
13
+ * formats with minimal code duplication. This section describes the interface
14
+ * common to all codecs (both encoders and decoders).
15
+ * @{
16
+ */
17
+
18
+ /*!\file
19
+ * \brief Describes the codec algorithm interface to applications.
20
+ *
21
+ * This file describes the interface between an application and a
22
+ * video codec algorithm.
23
+ *
24
+ * An application instantiates a specific codec instance by using
25
+ * vpx_codec_dec_init() or vpx_codec_enc_init() and a pointer to the
26
+ * algorithm's interface structure:
27
+ * <pre>
28
+ * my_app.c:
29
+ * extern vpx_codec_iface_t my_codec;
30
+ * {
31
+ * vpx_codec_ctx_t algo;
32
+ * int threads = 4;
33
+ * vpx_codec_dec_cfg_t cfg = { threads, 0, 0 };
34
+ * res = vpx_codec_dec_init(&algo, &my_codec, &cfg, 0);
35
+ * }
36
+ * </pre>
37
+ *
38
+ * Once initialized, the instance is manged using other functions from
39
+ * the vpx_codec_* family.
40
+ */
41
+ #ifndef VPX_VPX_VPX_CODEC_H_
42
+ #define VPX_VPX_VPX_CODEC_H_
43
+
44
+ #ifdef __cplusplus
45
+ extern "C" {
46
+ #endif
47
+
48
+ #include "./vpx_image.h"
49
+ #include "./vpx_integer.h"
50
+
51
+ /*!\brief Decorator indicating a function is deprecated */
52
+ #ifndef VPX_DEPRECATED
53
+ #if defined(__GNUC__)
54
+ #define VPX_DEPRECATED __attribute__((deprecated))
55
+ #elif defined(_MSC_VER)
56
+ #define VPX_DEPRECATED
57
+ #else
58
+ #define VPX_DEPRECATED
59
+ #endif
60
+ #endif /* VPX_DEPRECATED */
61
+
62
+ #ifndef VPX_DECLSPEC_DEPRECATED
63
+ #if defined(__GNUC__)
64
+ #define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
65
+ #elif defined(_MSC_VER)
66
+ /*!\brief \copydoc #VPX_DEPRECATED */
67
+ #define VPX_DECLSPEC_DEPRECATED __declspec(deprecated)
68
+ #else
69
+ #define VPX_DECLSPEC_DEPRECATED /**< \copydoc #VPX_DEPRECATED */
70
+ #endif
71
+ #endif /* VPX_DECLSPEC_DEPRECATED */
72
+
73
+ /*!\brief Decorator indicating a function is potentially unused */
74
+ #ifndef VPX_UNUSED
75
+ #if defined(__GNUC__) || defined(__clang__)
76
+ #define VPX_UNUSED __attribute__((unused))
77
+ #else
78
+ #define VPX_UNUSED
79
+ #endif
80
+ #endif /* VPX_UNUSED */
81
+
82
+ /*!\brief Current ABI version number
83
+ *
84
+ * \internal
85
+ * If this file is altered in any way that changes the ABI, this value
86
+ * must be bumped. Examples include, but are not limited to, changing
87
+ * types, removing or reassigning enums, adding/removing/rearranging
88
+ * fields to structures
89
+ */
90
+ #define VPX_CODEC_ABI_VERSION (4 + VPX_IMAGE_ABI_VERSION) /**<\hideinitializer*/
91
+
92
+ /*!\brief Algorithm return codes */
93
+ typedef enum {
94
+ /*!\brief Operation completed without error */
95
+ VPX_CODEC_OK,
96
+
97
+ /*!\brief Unspecified error */
98
+ VPX_CODEC_ERROR,
99
+
100
+ /*!\brief Memory operation failed */
101
+ VPX_CODEC_MEM_ERROR,
102
+
103
+ /*!\brief ABI version mismatch */
104
+ VPX_CODEC_ABI_MISMATCH,
105
+
106
+ /*!\brief Algorithm does not have required capability */
107
+ VPX_CODEC_INCAPABLE,
108
+
109
+ /*!\brief The given bitstream is not supported.
110
+ *
111
+ * The bitstream was unable to be parsed at the highest level. The decoder
112
+ * is unable to proceed. This error \ref SHOULD be treated as fatal to the
113
+ * stream. */
114
+ VPX_CODEC_UNSUP_BITSTREAM,
115
+
116
+ /*!\brief Encoded bitstream uses an unsupported feature
117
+ *
118
+ * The decoder does not implement a feature required by the encoder. This
119
+ * return code should only be used for features that prevent future
120
+ * pictures from being properly decoded. This error \ref MAY be treated as
121
+ * fatal to the stream or \ref MAY be treated as fatal to the current GOP.
122
+ */
123
+ VPX_CODEC_UNSUP_FEATURE,
124
+
125
+ /*!\brief The coded data for this stream is corrupt or incomplete
126
+ *
127
+ * There was a problem decoding the current frame. This return code
128
+ * should only be used for failures that prevent future pictures from
129
+ * being properly decoded. This error \ref MAY be treated as fatal to the
130
+ * stream or \ref MAY be treated as fatal to the current GOP. If decoding
131
+ * is continued for the current GOP, artifacts may be present.
132
+ */
133
+ VPX_CODEC_CORRUPT_FRAME,
134
+
135
+ /*!\brief An application-supplied parameter is not valid.
136
+ *
137
+ */
138
+ VPX_CODEC_INVALID_PARAM,
139
+
140
+ /*!\brief An iterator reached the end of list.
141
+ *
142
+ */
143
+ VPX_CODEC_LIST_END
144
+
145
+ } vpx_codec_err_t;
146
+
147
+ /*! \brief Codec capabilities bitfield
148
+ *
149
+ * Each codec advertises the capabilities it supports as part of its
150
+ * ::vpx_codec_iface_t interface structure. Capabilities are extra interfaces
151
+ * or functionality, and are not required to be supported.
152
+ *
153
+ * The available flags are specified by VPX_CODEC_CAP_* defines.
154
+ */
155
+ typedef long vpx_codec_caps_t;
156
+ #define VPX_CODEC_CAP_DECODER 0x1 /**< Is a decoder */
157
+ #define VPX_CODEC_CAP_ENCODER 0x2 /**< Is an encoder */
158
+
159
+ /*! Can support images at greater than 8 bitdepth.
160
+ */
161
+ #define VPX_CODEC_CAP_HIGHBITDEPTH 0x4
162
+
163
+ /*! \brief Initialization-time Feature Enabling
164
+ *
165
+ * Certain codec features must be known at initialization time, to allow for
166
+ * proper memory allocation.
167
+ *
168
+ * The available flags are specified by VPX_CODEC_USE_* defines.
169
+ */
170
+ typedef long vpx_codec_flags_t;
171
+
172
+ /*!\brief Codec interface structure.
173
+ *
174
+ * Contains function pointers and other data private to the codec
175
+ * implementation. This structure is opaque to the application.
176
+ */
177
+ typedef const struct vpx_codec_iface vpx_codec_iface_t;
178
+
179
+ /*!\brief Codec private data structure.
180
+ *
181
+ * Contains data private to the codec implementation. This structure is opaque
182
+ * to the application.
183
+ */
184
+ typedef struct vpx_codec_priv vpx_codec_priv_t;
185
+
186
+ /*!\brief Iterator
187
+ *
188
+ * Opaque storage used for iterating over lists.
189
+ */
190
+ typedef const void *vpx_codec_iter_t;
191
+
192
+ /*!\brief Codec context structure
193
+ *
194
+ * All codecs \ref MUST support this context structure fully. In general,
195
+ * this data should be considered private to the codec algorithm, and
196
+ * not be manipulated or examined by the calling application. Applications
197
+ * may reference the 'name' member to get a printable description of the
198
+ * algorithm.
199
+ */
200
+ typedef struct vpx_codec_ctx {
201
+ const char *name; /**< Printable interface name */
202
+ vpx_codec_iface_t *iface; /**< Interface pointers */
203
+ vpx_codec_err_t err; /**< Last returned error */
204
+ const char *err_detail; /**< Detailed info, if available */
205
+ vpx_codec_flags_t init_flags; /**< Flags passed at init time */
206
+ union {
207
+ /**< Decoder Configuration Pointer */
208
+ const struct vpx_codec_dec_cfg *dec;
209
+ /**< Encoder Configuration Pointer */
210
+ const struct vpx_codec_enc_cfg *enc;
211
+ const void *raw;
212
+ } config; /**< Configuration pointer aliasing union */
213
+ vpx_codec_priv_t *priv; /**< Algorithm private storage */
214
+ } vpx_codec_ctx_t;
215
+
216
+ /*!\brief Bit depth for codec
217
+ * *
218
+ * This enumeration determines the bit depth of the codec.
219
+ */
220
+ typedef enum vpx_bit_depth {
221
+ VPX_BITS_8 = 8, /**< 8 bits */
222
+ VPX_BITS_10 = 10, /**< 10 bits */
223
+ VPX_BITS_12 = 12, /**< 12 bits */
224
+ } vpx_bit_depth_t;
225
+
226
+ /*
227
+ * Library Version Number Interface
228
+ *
229
+ * For example, see the following sample return values:
230
+ * vpx_codec_version() (1<<16 | 2<<8 | 3)
231
+ * vpx_codec_version_str() "v1.2.3-rc1-16-gec6a1ba"
232
+ * vpx_codec_version_extra_str() "rc1-16-gec6a1ba"
233
+ */
234
+
235
+ /*!\brief Return the version information (as an integer)
236
+ *
237
+ * Returns a packed encoding of the library version number. This will only
238
+ * include
239
+ * the major.minor.patch component of the version number. Note that this encoded
240
+ * value should be accessed through the macros provided, as the encoding may
241
+ * change
242
+ * in the future.
243
+ *
244
+ */
245
+ int vpx_codec_version(void);
246
+ #define VPX_VERSION_MAJOR(v) \
247
+ (((v) >> 16) & 0xff) /**< extract major from packed version */
248
+ #define VPX_VERSION_MINOR(v) \
249
+ (((v) >> 8) & 0xff) /**< extract minor from packed version */
250
+ #define VPX_VERSION_PATCH(v) \
251
+ (((v) >> 0) & 0xff) /**< extract patch from packed version */
252
+
253
+ /*!\brief Return the version major number */
254
+ #define vpx_codec_version_major() ((vpx_codec_version() >> 16) & 0xff)
255
+
256
+ /*!\brief Return the version minor number */
257
+ #define vpx_codec_version_minor() ((vpx_codec_version() >> 8) & 0xff)
258
+
259
+ /*!\brief Return the version patch number */
260
+ #define vpx_codec_version_patch() ((vpx_codec_version() >> 0) & 0xff)
261
+
262
+ /*!\brief Return the version information (as a string)
263
+ *
264
+ * Returns a printable string containing the full library version number. This
265
+ * may
266
+ * contain additional text following the three digit version number, as to
267
+ * indicate
268
+ * release candidates, prerelease versions, etc.
269
+ *
270
+ */
271
+ const char *vpx_codec_version_str(void);
272
+
273
+ /*!\brief Return the version information (as a string)
274
+ *
275
+ * Returns a printable "extra string". This is the component of the string
276
+ * returned
277
+ * by vpx_codec_version_str() following the three digit version number.
278
+ *
279
+ */
280
+ const char *vpx_codec_version_extra_str(void);
281
+
282
+ /*!\brief Return the build configuration
283
+ *
284
+ * Returns a printable string containing an encoded version of the build
285
+ * configuration. This may be useful to vpx support.
286
+ *
287
+ */
288
+ const char *vpx_codec_build_config(void);
289
+
290
+ /*!\brief Return the name for a given interface
291
+ *
292
+ * Returns a human readable string for name of the given codec interface.
293
+ *
294
+ * \param[in] iface Interface pointer
295
+ *
296
+ */
297
+ const char *vpx_codec_iface_name(vpx_codec_iface_t *iface);
298
+
299
+ /*!\brief Convert error number to printable string
300
+ *
301
+ * Returns a human readable string for the last error returned by the
302
+ * algorithm. The returned error will be one line and will not contain
303
+ * any newline characters.
304
+ *
305
+ *
306
+ * \param[in] err Error number.
307
+ *
308
+ */
309
+ const char *vpx_codec_err_to_string(vpx_codec_err_t err);
310
+
311
+ /*!\brief Retrieve error synopsis for codec context
312
+ *
313
+ * Returns a human readable string for the last error returned by the
314
+ * algorithm. The returned error will be one line and will not contain
315
+ * any newline characters.
316
+ *
317
+ *
318
+ * \param[in] ctx Pointer to this instance's context.
319
+ *
320
+ */
321
+ const char *vpx_codec_error(const vpx_codec_ctx_t *ctx);
322
+
323
+ /*!\brief Retrieve detailed error information for codec context
324
+ *
325
+ * Returns a human readable string providing detailed information about
326
+ * the last error. The returned string is only valid until the next
327
+ * vpx_codec_* function call (except vpx_codec_error and
328
+ * vpx_codec_error_detail) on the codec context.
329
+ *
330
+ * \param[in] ctx Pointer to this instance's context.
331
+ *
332
+ * \retval NULL
333
+ * No detailed information is available.
334
+ */
335
+ const char *vpx_codec_error_detail(const vpx_codec_ctx_t *ctx);
336
+
337
+ /* REQUIRED FUNCTIONS
338
+ *
339
+ * The following functions are required to be implemented for all codecs.
340
+ * They represent the base case functionality expected of all codecs.
341
+ */
342
+
343
+ /*!\brief Destroy a codec instance
344
+ *
345
+ * Destroys a codec context, freeing any associated memory buffers.
346
+ *
347
+ * \param[in] ctx Pointer to this instance's context
348
+ *
349
+ * \retval #VPX_CODEC_OK
350
+ * The codec instance has been destroyed.
351
+ * \retval #VPX_CODEC_INVALID_PARAM
352
+ * ctx is a null pointer.
353
+ * \retval #VPX_CODEC_ERROR
354
+ * Codec context not initialized.
355
+ */
356
+ vpx_codec_err_t vpx_codec_destroy(vpx_codec_ctx_t *ctx);
357
+
358
+ /*!\brief Get the capabilities of an algorithm.
359
+ *
360
+ * Retrieves the capabilities bitfield from the algorithm's interface.
361
+ *
362
+ * \param[in] iface Pointer to the algorithm interface
363
+ *
364
+ */
365
+ vpx_codec_caps_t vpx_codec_get_caps(vpx_codec_iface_t *iface);
366
+
367
+ /*!\brief Control algorithm
368
+ *
369
+ * This function is used to exchange algorithm specific data with the codec
370
+ * instance. This can be used to implement features specific to a particular
371
+ * algorithm.
372
+ *
373
+ * This wrapper function dispatches the request to the helper function
374
+ * associated with the given ctrl_id. It tries to call this function
375
+ * transparently, but will return #VPX_CODEC_ERROR if the request could not
376
+ * be dispatched.
377
+ *
378
+ * Note that this function should not be used directly. Call the
379
+ * #vpx_codec_control wrapper macro instead.
380
+ *
381
+ * \param[in] ctx Pointer to this instance's context
382
+ * \param[in] ctrl_id Algorithm specific control identifier
383
+ *
384
+ * \retval #VPX_CODEC_OK
385
+ * The control request was processed.
386
+ * \retval #VPX_CODEC_ERROR
387
+ * The control request was not processed.
388
+ * \retval #VPX_CODEC_INVALID_PARAM
389
+ * The data was not valid.
390
+ */
391
+ vpx_codec_err_t vpx_codec_control_(vpx_codec_ctx_t *ctx, int ctrl_id, ...);
392
+ #if defined(VPX_DISABLE_CTRL_TYPECHECKS) && VPX_DISABLE_CTRL_TYPECHECKS
393
+ #define vpx_codec_control(ctx, id, data) vpx_codec_control_(ctx, id, data)
394
+ #define VPX_CTRL_USE_TYPE(id, typ)
395
+ #define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ)
396
+ #define VPX_CTRL_VOID(id, typ)
397
+
398
+ #else
399
+ /*!\brief vpx_codec_control wrapper macro
400
+ *
401
+ * This macro allows for type safe conversions across the variadic parameter
402
+ * to vpx_codec_control_().
403
+ *
404
+ * \internal
405
+ * It works by dispatching the call to the control function through a wrapper
406
+ * function named with the id parameter.
407
+ */
408
+ #define vpx_codec_control(ctx, id, data) \
409
+ vpx_codec_control_##id(ctx, id, data) /**<\hideinitializer*/
410
+
411
+ /*!\brief vpx_codec_control type definition macro
412
+ *
413
+ * This macro allows for type safe conversions across the variadic parameter
414
+ * to vpx_codec_control_(). It defines the type of the argument for a given
415
+ * control identifier.
416
+ *
417
+ * \internal
418
+ * It defines a static function with
419
+ * the correctly typed arguments as a wrapper to the type-unsafe internal
420
+ * function.
421
+ */
422
+ #define VPX_CTRL_USE_TYPE(id, typ) \
423
+ static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int, typ) \
424
+ VPX_UNUSED; \
425
+ \
426
+ static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \
427
+ int ctrl_id, typ data) { \
428
+ return vpx_codec_control_(ctx, ctrl_id, data); \
429
+ } /**<\hideinitializer*/
430
+
431
+ /*!\brief vpx_codec_control deprecated type definition macro
432
+ *
433
+ * Like #VPX_CTRL_USE_TYPE, but indicates that the specified control is
434
+ * deprecated and should not be used. Consult the documentation for your
435
+ * codec for more information.
436
+ *
437
+ * \internal
438
+ * It defines a static function with the correctly typed arguments as a
439
+ * wrapper to the type-unsafe internal function.
440
+ */
441
+ #define VPX_CTRL_USE_TYPE_DEPRECATED(id, typ) \
442
+ VPX_DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
443
+ vpx_codec_ctx_t *, int, typ) VPX_DEPRECATED VPX_UNUSED; \
444
+ \
445
+ VPX_DECLSPEC_DEPRECATED static vpx_codec_err_t vpx_codec_control_##id( \
446
+ vpx_codec_ctx_t *ctx, int ctrl_id, typ data) { \
447
+ return vpx_codec_control_(ctx, ctrl_id, data); \
448
+ } /**<\hideinitializer*/
449
+
450
+ /*!\brief vpx_codec_control void type definition macro
451
+ *
452
+ * This macro allows for type safe conversions across the variadic parameter
453
+ * to vpx_codec_control_(). It indicates that a given control identifier takes
454
+ * no argument.
455
+ *
456
+ * \internal
457
+ * It defines a static function without a data argument as a wrapper to the
458
+ * type-unsafe internal function.
459
+ */
460
+ #define VPX_CTRL_VOID(id) \
461
+ static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *, int) \
462
+ VPX_UNUSED; \
463
+ \
464
+ static vpx_codec_err_t vpx_codec_control_##id(vpx_codec_ctx_t *ctx, \
465
+ int ctrl_id) { \
466
+ return vpx_codec_control_(ctx, ctrl_id); \
467
+ } /**<\hideinitializer*/
468
+
469
+ #endif
470
+
471
+ /*!@} - end defgroup codec*/
472
+ #ifdef __cplusplus
473
+ }
474
+ #endif
475
+ #endif // VPX_VPX_VPX_CODEC_H_