@pproenca/ffmpeg-darwin-arm64-gpl 0.1.7 → 0.1.9

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 (234) hide show
  1. package/LICENSE +117 -0
  2. package/lib/libSvtAv1Enc.a +0 -0
  3. package/lib/libaom.a +0 -0
  4. package/lib/libavcodec.a +0 -0
  5. package/lib/libavdevice.a +0 -0
  6. package/lib/libavfilter.a +0 -0
  7. package/lib/libavformat.a +0 -0
  8. package/lib/libavutil.a +0 -0
  9. package/lib/libdav1d.a +0 -0
  10. package/lib/libmp3lame.a +0 -0
  11. package/lib/libogg.a +0 -0
  12. package/lib/libopus.a +0 -0
  13. package/lib/libpostproc.a +0 -0
  14. package/lib/libswresample.a +0 -0
  15. package/lib/libswscale.a +0 -0
  16. package/lib/libvorbis.a +0 -0
  17. package/lib/libvorbisenc.a +0 -0
  18. package/lib/libvorbisfile.a +0 -0
  19. package/lib/libvpx.a +0 -0
  20. package/lib/libx264.a +0 -0
  21. package/lib/libx265.a +0 -0
  22. package/lib/pkgconfig/SvtAv1Enc.pc +12 -0
  23. package/lib/pkgconfig/aom.pc +14 -0
  24. package/lib/pkgconfig/dav1d.pc +9 -0
  25. package/lib/pkgconfig/libavcodec.pc +14 -0
  26. package/lib/pkgconfig/libavdevice.pc +14 -0
  27. package/lib/pkgconfig/libavfilter.pc +14 -0
  28. package/lib/pkgconfig/libavformat.pc +14 -0
  29. package/lib/pkgconfig/libavutil.pc +14 -0
  30. package/lib/pkgconfig/libpostproc.pc +14 -0
  31. package/lib/pkgconfig/libswresample.pc +14 -0
  32. package/lib/pkgconfig/libswscale.pc +14 -0
  33. package/lib/pkgconfig/mp3lame.pc +11 -0
  34. package/lib/pkgconfig/ogg.pc +14 -0
  35. package/lib/pkgconfig/opus.pc +16 -0
  36. package/lib/pkgconfig/vorbis.pc +15 -0
  37. package/lib/pkgconfig/vorbisenc.pc +14 -0
  38. package/lib/pkgconfig/vorbisfile.pc +14 -0
  39. package/lib/pkgconfig/vpx.pc +14 -0
  40. package/lib/pkgconfig/x264.pc +11 -0
  41. package/lib/pkgconfig/x265.pc +11 -0
  42. package/package.json +2 -3
  43. package/include/aom/aom.h +0 -127
  44. package/include/aom/aom_codec.h +0 -594
  45. package/include/aom/aom_decoder.h +0 -257
  46. package/include/aom/aom_encoder.h +0 -1154
  47. package/include/aom/aom_external_partition.h +0 -452
  48. package/include/aom/aom_frame_buffer.h +0 -84
  49. package/include/aom/aom_image.h +0 -462
  50. package/include/aom/aom_integer.h +0 -60
  51. package/include/aom/aomcx.h +0 -2288
  52. package/include/aom/aomdx.h +0 -607
  53. package/include/dav1d/common.h +0 -94
  54. package/include/dav1d/data.h +0 -117
  55. package/include/dav1d/dav1d.h +0 -329
  56. package/include/dav1d/headers.h +0 -444
  57. package/include/dav1d/picture.h +0 -157
  58. package/include/dav1d/version.h +0 -50
  59. package/include/lame/lame.h +0 -1342
  60. package/include/libavcodec/ac3_parser.h +0 -36
  61. package/include/libavcodec/adts_parser.h +0 -37
  62. package/include/libavcodec/avcodec.h +0 -3128
  63. package/include/libavcodec/avdct.h +0 -88
  64. package/include/libavcodec/avfft.h +0 -149
  65. package/include/libavcodec/bsf.h +0 -332
  66. package/include/libavcodec/codec.h +0 -382
  67. package/include/libavcodec/codec_desc.h +0 -134
  68. package/include/libavcodec/codec_id.h +0 -669
  69. package/include/libavcodec/codec_par.h +0 -248
  70. package/include/libavcodec/d3d11va.h +0 -109
  71. package/include/libavcodec/defs.h +0 -337
  72. package/include/libavcodec/dirac.h +0 -135
  73. package/include/libavcodec/dv_profile.h +0 -82
  74. package/include/libavcodec/dxva2.h +0 -90
  75. package/include/libavcodec/jni.h +0 -67
  76. package/include/libavcodec/mediacodec.h +0 -103
  77. package/include/libavcodec/packet.h +0 -887
  78. package/include/libavcodec/qsv.h +0 -109
  79. package/include/libavcodec/vdpau.h +0 -171
  80. package/include/libavcodec/version.h +0 -45
  81. package/include/libavcodec/version_major.h +0 -52
  82. package/include/libavcodec/videotoolbox.h +0 -85
  83. package/include/libavcodec/vorbis_parser.h +0 -74
  84. package/include/libavdevice/avdevice.h +0 -397
  85. package/include/libavdevice/version.h +0 -45
  86. package/include/libavdevice/version_major.h +0 -43
  87. package/include/libavfilter/avfilter.h +0 -1379
  88. package/include/libavfilter/buffersink.h +0 -173
  89. package/include/libavfilter/buffersrc.h +0 -215
  90. package/include/libavfilter/version.h +0 -48
  91. package/include/libavfilter/version_major.h +0 -40
  92. package/include/libavformat/avformat.h +0 -3107
  93. package/include/libavformat/avio.h +0 -831
  94. package/include/libavformat/version.h +0 -47
  95. package/include/libavformat/version_major.h +0 -54
  96. package/include/libavutil/adler32.h +0 -63
  97. package/include/libavutil/aes.h +0 -69
  98. package/include/libavutil/aes_ctr.h +0 -99
  99. package/include/libavutil/ambient_viewing_environment.h +0 -72
  100. package/include/libavutil/attributes.h +0 -173
  101. package/include/libavutil/audio_fifo.h +0 -187
  102. package/include/libavutil/avassert.h +0 -78
  103. package/include/libavutil/avconfig.h +0 -6
  104. package/include/libavutil/avstring.h +0 -428
  105. package/include/libavutil/avutil.h +0 -362
  106. package/include/libavutil/base64.h +0 -72
  107. package/include/libavutil/blowfish.h +0 -82
  108. package/include/libavutil/bprint.h +0 -254
  109. package/include/libavutil/bswap.h +0 -105
  110. package/include/libavutil/buffer.h +0 -322
  111. package/include/libavutil/camellia.h +0 -70
  112. package/include/libavutil/cast5.h +0 -80
  113. package/include/libavutil/channel_layout.h +0 -751
  114. package/include/libavutil/common.h +0 -589
  115. package/include/libavutil/cpu.h +0 -145
  116. package/include/libavutil/crc.h +0 -102
  117. package/include/libavutil/csp.h +0 -150
  118. package/include/libavutil/des.h +0 -81
  119. package/include/libavutil/detection_bbox.h +0 -108
  120. package/include/libavutil/dict.h +0 -241
  121. package/include/libavutil/display.h +0 -109
  122. package/include/libavutil/dovi_meta.h +0 -396
  123. package/include/libavutil/downmix_info.h +0 -115
  124. package/include/libavutil/encryption_info.h +0 -205
  125. package/include/libavutil/error.h +0 -129
  126. package/include/libavutil/eval.h +0 -140
  127. package/include/libavutil/executor.h +0 -67
  128. package/include/libavutil/ffversion.h +0 -5
  129. package/include/libavutil/fifo.h +0 -242
  130. package/include/libavutil/file.h +0 -62
  131. package/include/libavutil/film_grain_params.h +0 -322
  132. package/include/libavutil/frame.h +0 -1175
  133. package/include/libavutil/hash.h +0 -264
  134. package/include/libavutil/hdr_dynamic_metadata.h +0 -376
  135. package/include/libavutil/hdr_dynamic_vivid_metadata.h +0 -346
  136. package/include/libavutil/hmac.h +0 -99
  137. package/include/libavutil/hwcontext.h +0 -598
  138. package/include/libavutil/hwcontext_cuda.h +0 -74
  139. package/include/libavutil/hwcontext_d3d11va.h +0 -178
  140. package/include/libavutil/hwcontext_d3d12va.h +0 -142
  141. package/include/libavutil/hwcontext_drm.h +0 -169
  142. package/include/libavutil/hwcontext_dxva2.h +0 -75
  143. package/include/libavutil/hwcontext_mediacodec.h +0 -61
  144. package/include/libavutil/hwcontext_opencl.h +0 -100
  145. package/include/libavutil/hwcontext_qsv.h +0 -87
  146. package/include/libavutil/hwcontext_vaapi.h +0 -117
  147. package/include/libavutil/hwcontext_vdpau.h +0 -44
  148. package/include/libavutil/hwcontext_videotoolbox.h +0 -106
  149. package/include/libavutil/hwcontext_vulkan.h +0 -382
  150. package/include/libavutil/iamf.h +0 -690
  151. package/include/libavutil/imgutils.h +0 -377
  152. package/include/libavutil/intfloat.h +0 -77
  153. package/include/libavutil/intreadwrite.h +0 -677
  154. package/include/libavutil/lfg.h +0 -81
  155. package/include/libavutil/log.h +0 -387
  156. package/include/libavutil/lzo.h +0 -66
  157. package/include/libavutil/macros.h +0 -80
  158. package/include/libavutil/mastering_display_metadata.h +0 -137
  159. package/include/libavutil/mathematics.h +0 -300
  160. package/include/libavutil/md5.h +0 -89
  161. package/include/libavutil/mem.h +0 -607
  162. package/include/libavutil/motion_vector.h +0 -57
  163. package/include/libavutil/murmur3.h +0 -115
  164. package/include/libavutil/opt.h +0 -1187
  165. package/include/libavutil/parseutils.h +0 -197
  166. package/include/libavutil/pixdesc.h +0 -440
  167. package/include/libavutil/pixelutils.h +0 -51
  168. package/include/libavutil/pixfmt.h +0 -716
  169. package/include/libavutil/random_seed.h +0 -57
  170. package/include/libavutil/rational.h +0 -225
  171. package/include/libavutil/rc4.h +0 -69
  172. package/include/libavutil/replaygain.h +0 -50
  173. package/include/libavutil/ripemd.h +0 -83
  174. package/include/libavutil/samplefmt.h +0 -269
  175. package/include/libavutil/sha.h +0 -90
  176. package/include/libavutil/sha512.h +0 -92
  177. package/include/libavutil/spherical.h +0 -243
  178. package/include/libavutil/stereo3d.h +0 -325
  179. package/include/libavutil/tea.h +0 -71
  180. package/include/libavutil/threadmessage.h +0 -115
  181. package/include/libavutil/time.h +0 -56
  182. package/include/libavutil/timecode.h +0 -199
  183. package/include/libavutil/timestamp.h +0 -85
  184. package/include/libavutil/tree.h +0 -137
  185. package/include/libavutil/twofish.h +0 -70
  186. package/include/libavutil/tx.h +0 -210
  187. package/include/libavutil/uuid.h +0 -146
  188. package/include/libavutil/version.h +0 -124
  189. package/include/libavutil/video_enc_params.h +0 -171
  190. package/include/libavutil/video_hint.h +0 -107
  191. package/include/libavutil/xtea.h +0 -94
  192. package/include/libpostproc/postprocess.h +0 -107
  193. package/include/libpostproc/version.h +0 -46
  194. package/include/libpostproc/version_major.h +0 -31
  195. package/include/libswresample/swresample.h +0 -587
  196. package/include/libswresample/version.h +0 -46
  197. package/include/libswresample/version_major.h +0 -31
  198. package/include/libswscale/swscale.h +0 -460
  199. package/include/libswscale/version.h +0 -44
  200. package/include/libswscale/version_major.h +0 -35
  201. package/include/ogg/config_types.h +0 -26
  202. package/include/ogg/ogg.h +0 -209
  203. package/include/ogg/os_types.h +0 -158
  204. package/include/opus/opus.h +0 -1099
  205. package/include/opus/opus_defines.h +0 -830
  206. package/include/opus/opus_multistream.h +0 -660
  207. package/include/opus/opus_projection.h +0 -568
  208. package/include/opus/opus_types.h +0 -166
  209. package/include/svt-av1/EbDebugMacros.h +0 -88
  210. package/include/svt-av1/EbSvtAv1.h +0 -462
  211. package/include/svt-av1/EbSvtAv1Enc.h +0 -1112
  212. package/include/svt-av1/EbSvtAv1ErrorCodes.h +0 -67
  213. package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +0 -64
  214. package/include/svt-av1/EbSvtAv1Formats.h +0 -126
  215. package/include/svt-av1/EbSvtAv1Metadata.h +0 -156
  216. package/include/vorbis/codec.h +0 -242
  217. package/include/vorbis/vorbisenc.h +0 -435
  218. package/include/vorbis/vorbisfile.h +0 -205
  219. package/include/vpx/vp8.h +0 -136
  220. package/include/vpx/vp8cx.h +0 -1118
  221. package/include/vpx/vp8dx.h +0 -228
  222. package/include/vpx/vpx_codec.h +0 -475
  223. package/include/vpx/vpx_decoder.h +0 -367
  224. package/include/vpx/vpx_encoder.h +0 -1150
  225. package/include/vpx/vpx_ext_ratectrl.h +0 -590
  226. package/include/vpx/vpx_frame_buffer.h +0 -83
  227. package/include/vpx/vpx_image.h +0 -221
  228. package/include/vpx/vpx_integer.h +0 -40
  229. package/include/vpx/vpx_tpl.h +0 -68
  230. package/include/x264.h +0 -1027
  231. package/include/x264_config.h +0 -6
  232. package/include/x265.h +0 -2737
  233. package/include/x265_config.h +0 -34
  234. /package/{include → lib/pkgconfig}/index.js +0 -0
@@ -1,117 +0,0 @@
1
- /*
2
- * Copyright © 2018, VideoLAN and dav1d authors
3
- * Copyright © 2018, Two Orioles, LLC
4
- * All rights reserved.
5
- *
6
- * Redistribution and use in source and binary forms, with or without
7
- * modification, are permitted provided that the following conditions are met:
8
- *
9
- * 1. Redistributions of source code must retain the above copyright notice, this
10
- * list of conditions and the following disclaimer.
11
- *
12
- * 2. Redistributions in binary form must reproduce the above copyright notice,
13
- * this list of conditions and the following disclaimer in the documentation
14
- * and/or other materials provided with the distribution.
15
- *
16
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
- */
27
-
28
- #ifndef DAV1D_DATA_H
29
- #define DAV1D_DATA_H
30
-
31
- #include <stddef.h>
32
- #include <stdint.h>
33
-
34
- #include "common.h"
35
-
36
- #ifdef __cplusplus
37
- extern "C" {
38
- #endif
39
-
40
- typedef struct Dav1dData {
41
- const uint8_t *data; ///< data pointer
42
- size_t sz; ///< data size
43
- struct Dav1dRef *ref; ///< allocation origin
44
- Dav1dDataProps m; ///< user provided metadata passed to the output picture
45
- } Dav1dData;
46
-
47
- /**
48
- * Allocate data.
49
- *
50
- * @param data Input context.
51
- * @param sz Size of the data that should be allocated.
52
- *
53
- * @return Pointer to the allocated buffer on success. NULL on error.
54
- */
55
- DAV1D_API uint8_t * dav1d_data_create(Dav1dData *data, size_t sz);
56
-
57
- /**
58
- * Wrap an existing data array.
59
- *
60
- * @param data Input context.
61
- * @param buf The data to be wrapped.
62
- * @param sz Size of the data.
63
- * @param free_callback Function to be called when we release our last
64
- * reference to this data. In this callback, $buf will be
65
- * the $buf argument to this function, and $cookie will
66
- * be the $cookie input argument to this function.
67
- * @param cookie Opaque parameter passed to free_callback().
68
- *
69
- * @return 0 on success. A negative DAV1D_ERR value on error.
70
- */
71
- DAV1D_API int dav1d_data_wrap(Dav1dData *data, const uint8_t *buf, size_t sz,
72
- void (*free_callback)(const uint8_t *buf, void *cookie),
73
- void *cookie);
74
-
75
- /**
76
- * Wrap a user-provided data pointer into a reference counted object.
77
- *
78
- * data->m.user_data field will initialized to wrap the provided $user_data
79
- * pointer.
80
- *
81
- * $free_callback will be called on the same thread that released the last
82
- * reference. If frame threading is used, make sure $free_callback is
83
- * thread-safe.
84
- *
85
- * @param data Input context.
86
- * @param user_data The user data to be wrapped.
87
- * @param free_callback Function to be called when we release our last
88
- * reference to this data. In this callback, $user_data
89
- * will be the $user_data argument to this function, and
90
- * $cookie will be the $cookie input argument to this
91
- * function.
92
- * @param cookie Opaque parameter passed to $free_callback.
93
- *
94
- * @return 0 on success. A negative DAV1D_ERR value on error.
95
- */
96
- DAV1D_API int dav1d_data_wrap_user_data(Dav1dData *data,
97
- const uint8_t *user_data,
98
- void (*free_callback)(const uint8_t *user_data,
99
- void *cookie),
100
- void *cookie);
101
-
102
- /**
103
- * Free the data reference.
104
- *
105
- * The reference count for data->m.user_data will be decremented (if it has been
106
- * initialized with dav1d_data_wrap_user_data). The $data object will be memset
107
- * to 0.
108
- *
109
- * @param data Input context.
110
- */
111
- DAV1D_API void dav1d_data_unref(Dav1dData *data);
112
-
113
- #ifdef __cplusplus
114
- } /* extern "C" */
115
- #endif
116
-
117
- #endif /* DAV1D_DATA_H */
@@ -1,329 +0,0 @@
1
- /*
2
- * Copyright © 2018-2021, VideoLAN and dav1d authors
3
- * Copyright © 2018, Two Orioles, LLC
4
- * All rights reserved.
5
- *
6
- * Redistribution and use in source and binary forms, with or without
7
- * modification, are permitted provided that the following conditions are met:
8
- *
9
- * 1. Redistributions of source code must retain the above copyright notice, this
10
- * list of conditions and the following disclaimer.
11
- *
12
- * 2. Redistributions in binary form must reproduce the above copyright notice,
13
- * this list of conditions and the following disclaimer in the documentation
14
- * and/or other materials provided with the distribution.
15
- *
16
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
17
- * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
18
- * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
19
- * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
20
- * ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
21
- * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
22
- * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
23
- * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
25
- * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26
- */
27
-
28
- #ifndef DAV1D_H
29
- #define DAV1D_H
30
-
31
- #include <errno.h>
32
- #include <stdarg.h>
33
-
34
- #include "common.h"
35
- #include "picture.h"
36
- #include "data.h"
37
- #include "version.h"
38
-
39
- #ifdef __cplusplus
40
- extern "C" {
41
- #endif
42
-
43
- typedef struct Dav1dContext Dav1dContext;
44
- typedef struct Dav1dRef Dav1dRef;
45
-
46
- #define DAV1D_MAX_THREADS 256
47
- #define DAV1D_MAX_FRAME_DELAY 256
48
-
49
- typedef struct Dav1dLogger {
50
- void *cookie; ///< Custom data to pass to the callback.
51
- /**
52
- * Logger callback. May be NULL to disable logging.
53
- *
54
- * @param cookie Custom pointer passed to all calls.
55
- * @param format The vprintf compatible format string.
56
- * @param ap List of arguments referenced by the format string.
57
- */
58
- void (*callback)(void *cookie, const char *format, va_list ap);
59
- } Dav1dLogger;
60
-
61
- enum Dav1dInloopFilterType {
62
- DAV1D_INLOOPFILTER_NONE = 0,
63
- DAV1D_INLOOPFILTER_DEBLOCK = 1 << 0,
64
- DAV1D_INLOOPFILTER_CDEF = 1 << 1,
65
- DAV1D_INLOOPFILTER_RESTORATION = 1 << 2,
66
- DAV1D_INLOOPFILTER_ALL = DAV1D_INLOOPFILTER_DEBLOCK |
67
- DAV1D_INLOOPFILTER_CDEF |
68
- DAV1D_INLOOPFILTER_RESTORATION,
69
- };
70
-
71
- enum Dav1dDecodeFrameType {
72
- DAV1D_DECODEFRAMETYPE_ALL = 0, ///< decode and return all frames
73
- DAV1D_DECODEFRAMETYPE_REFERENCE = 1,///< decode and return frames referenced by other frames only
74
- DAV1D_DECODEFRAMETYPE_INTRA = 2, ///< decode and return intra frames only (includes keyframes)
75
- DAV1D_DECODEFRAMETYPE_KEY = 3, ///< decode and return keyframes only
76
- };
77
-
78
- typedef struct Dav1dSettings {
79
- int n_threads; ///< number of threads (0 = number of logical cores in host system, default 0)
80
- int max_frame_delay; ///< Set to 1 for low-latency decoding (0 = ceil(sqrt(n_threads)), default 0)
81
- int apply_grain; ///< whether to apply film grain on output frames (default 1)
82
- int operating_point; ///< select an operating point for scalable AV1 bitstreams (0 - 31, default 0)
83
- int all_layers; ///< output all spatial layers of a scalable AV1 biststream (default 1)
84
- unsigned frame_size_limit; ///< maximum frame size, in pixels (0 = unlimited, default 0)
85
- Dav1dPicAllocator allocator; ///< Picture allocator callback.
86
- Dav1dLogger logger; ///< Logger callback.
87
- int strict_std_compliance; ///< whether to abort decoding on standard compliance violations
88
- ///< that don't affect actual bitstream decoding (e.g. inconsistent
89
- ///< or invalid metadata, default 0)
90
- int output_invisible_frames; ///< output invisibly coded frames (in coding order) in addition
91
- ///< to all visible frames. Because of show-existing-frame, this
92
- ///< means some frames may appear twice (once when coded,
93
- ///< once when shown, default 0)
94
- enum Dav1dInloopFilterType inloop_filters; ///< postfilters to enable during decoding (default
95
- ///< DAV1D_INLOOPFILTER_ALL)
96
- enum Dav1dDecodeFrameType decode_frame_type; ///< frame types to decode (default
97
- ///< DAV1D_DECODEFRAMETYPE_ALL)
98
- uint8_t reserved[16]; ///< reserved for future use
99
- } Dav1dSettings;
100
-
101
- /**
102
- * Get library version.
103
- */
104
- DAV1D_API const char *dav1d_version(void);
105
-
106
- /**
107
- * Get library API version.
108
- *
109
- * @return A value in the format 0x00XXYYZZ, where XX is the major version,
110
- * YY the minor version, and ZZ the patch version.
111
- * @see DAV1D_API_MAJOR, DAV1D_API_MINOR, DAV1D_API_PATCH
112
- */
113
- DAV1D_API unsigned dav1d_version_api(void);
114
-
115
- /**
116
- * Initialize settings to default values.
117
- *
118
- * @param s Input settings context.
119
- */
120
- DAV1D_API void dav1d_default_settings(Dav1dSettings *s);
121
-
122
- /**
123
- * Allocate and open a decoder instance.
124
- *
125
- * @param c_out The decoder instance to open. *c_out will be set to the
126
- * allocated context.
127
- * @param s Input settings context.
128
- *
129
- * @note The context must be freed using dav1d_close() when decoding is
130
- * finished.
131
- *
132
- * @return 0 on success, or < 0 (a negative DAV1D_ERR code) on error.
133
- */
134
- DAV1D_API int dav1d_open(Dav1dContext **c_out, const Dav1dSettings *s);
135
-
136
- /**
137
- * Parse a Sequence Header OBU from bitstream data.
138
- *
139
- * @param out Output Sequence Header.
140
- * @param buf The data to be parser.
141
- * @param sz Size of the data.
142
- *
143
- * @return
144
- * 0: Success, and out is filled with the parsed Sequence Header
145
- * OBU parameters.
146
- * DAV1D_ERR(ENOENT): No Sequence Header OBUs were found in the buffer.
147
- * Other negative DAV1D_ERR codes: Invalid data in the buffer, invalid passed-in
148
- * arguments, and other errors during parsing.
149
- *
150
- * @note It is safe to feed this function data containing other OBUs than a
151
- * Sequence Header, as they will simply be ignored. If there is more than
152
- * one Sequence Header OBU present, only the last will be returned.
153
- */
154
- DAV1D_API int dav1d_parse_sequence_header(Dav1dSequenceHeader *out,
155
- const uint8_t *buf, const size_t sz);
156
-
157
- /**
158
- * Feed bitstream data to the decoder, in the form of one or multiple AV1
159
- * Open Bitstream Units (OBUs).
160
- *
161
- * @param c Input decoder instance.
162
- * @param in Input bitstream data. On success, ownership of the reference is
163
- * passed to the library.
164
- *
165
- * @return
166
- * 0: Success, and the data was consumed.
167
- * DAV1D_ERR(EAGAIN): The data can't be consumed. dav1d_get_picture() should
168
- * be called to get one or more frames before the function
169
- * can consume new data.
170
- * Other negative DAV1D_ERR codes: Error during decoding or because of invalid
171
- * passed-in arguments. The reference remains
172
- * owned by the caller.
173
- */
174
- DAV1D_API int dav1d_send_data(Dav1dContext *c, Dav1dData *in);
175
-
176
- /**
177
- * Return a decoded picture.
178
- *
179
- * @param c Input decoder instance.
180
- * @param out Output frame. The caller assumes ownership of the returned
181
- * reference.
182
- *
183
- * @return
184
- * 0: Success, and a frame is returned.
185
- * DAV1D_ERR(EAGAIN): Not enough data to output a frame. dav1d_send_data()
186
- * should be called with new input.
187
- * Other negative DAV1D_ERR codes: Error during decoding or because of invalid
188
- * passed-in arguments.
189
- *
190
- * @note To drain buffered frames from the decoder (i.e. on end of stream),
191
- * call this function until it returns DAV1D_ERR(EAGAIN).
192
- *
193
- * @code{.c}
194
- * Dav1dData data = { 0 };
195
- * Dav1dPicture p = { 0 };
196
- * int res;
197
- *
198
- * read_data(&data);
199
- * do {
200
- * res = dav1d_send_data(c, &data);
201
- * // Keep going even if the function can't consume the current data
202
- * packet. It eventually will after one or more frames have been
203
- * returned in this loop.
204
- * if (res < 0 && res != DAV1D_ERR(EAGAIN))
205
- * free_and_abort();
206
- * res = dav1d_get_picture(c, &p);
207
- * if (res < 0) {
208
- * if (res != DAV1D_ERR(EAGAIN))
209
- * free_and_abort();
210
- * } else
211
- * output_and_unref_picture(&p);
212
- * // Stay in the loop as long as there's data to consume.
213
- * } while (data.sz || read_data(&data) == SUCCESS);
214
- *
215
- * // Handle EOS by draining all buffered frames.
216
- * do {
217
- * res = dav1d_get_picture(c, &p);
218
- * if (res < 0) {
219
- * if (res != DAV1D_ERR(EAGAIN))
220
- * free_and_abort();
221
- * } else
222
- * output_and_unref_picture(&p);
223
- * } while (res == 0);
224
- * @endcode
225
- */
226
- DAV1D_API int dav1d_get_picture(Dav1dContext *c, Dav1dPicture *out);
227
-
228
- /**
229
- * Apply film grain to a previously decoded picture. If the picture contains no
230
- * film grain metadata, then this function merely returns a new reference.
231
- *
232
- * @param c Input decoder instance.
233
- * @param out Output frame. The caller assumes ownership of the returned
234
- * reference.
235
- * @param in Input frame. No ownership is transferred.
236
- *
237
- * @return
238
- * 0: Success, and a frame is returned.
239
- * Other negative DAV1D_ERR codes: Error due to lack of memory or because of
240
- * invalid passed-in arguments.
241
- *
242
- * @note If `Dav1dSettings.apply_grain` is true, film grain was already applied
243
- * by `dav1d_get_picture`, and so calling this function leads to double
244
- * application of film grain. Users should only call this when needed.
245
- */
246
- DAV1D_API int dav1d_apply_grain(Dav1dContext *c, Dav1dPicture *out,
247
- const Dav1dPicture *in);
248
-
249
- /**
250
- * Close a decoder instance and free all associated memory.
251
- *
252
- * @param c_out The decoder instance to close. *c_out will be set to NULL.
253
- */
254
- DAV1D_API void dav1d_close(Dav1dContext **c_out);
255
-
256
- /**
257
- * Flush all delayed frames in decoder and clear internal decoder state,
258
- * to be used when seeking.
259
- *
260
- * @param c Input decoder instance.
261
- *
262
- * @note Decoding will start only after a valid sequence header OBU is
263
- * delivered to dav1d_send_data().
264
- *
265
- */
266
- DAV1D_API void dav1d_flush(Dav1dContext *c);
267
-
268
- enum Dav1dEventFlags {
269
- /**
270
- * The last returned picture contains a reference to a new Sequence Header,
271
- * either because it's the start of a new coded sequence, or the decoder was
272
- * flushed before it was generated.
273
- */
274
- DAV1D_EVENT_FLAG_NEW_SEQUENCE = 1 << 0,
275
- /**
276
- * The last returned picture contains a reference to a Sequence Header with
277
- * new operating parameters information for the current coded sequence.
278
- */
279
- DAV1D_EVENT_FLAG_NEW_OP_PARAMS_INFO = 1 << 1,
280
- };
281
-
282
- /**
283
- * Fetch a combination of DAV1D_EVENT_FLAG_* event flags generated by the decoding
284
- * process.
285
- *
286
- * @param c Input decoder instance.
287
- * @param flags Where to write the flags.
288
- *
289
- * @return 0 on success, or < 0 (a negative DAV1D_ERR code) on error.
290
- *
291
- * @note Calling this function will clear all the event flags currently stored in
292
- * the decoder.
293
- *
294
- */
295
- DAV1D_API int dav1d_get_event_flags(Dav1dContext *c, enum Dav1dEventFlags *flags);
296
-
297
- /**
298
- * Retrieve the user-provided metadata associated with the input data packet
299
- * for the last decoding error reported to the user, i.e. a negative return
300
- * value (not EAGAIN) from dav1d_send_data() or dav1d_get_picture().
301
- *
302
- * @param c Input decoder instance.
303
- * @param out Output Dav1dDataProps. On success, the caller assumes ownership of
304
- * the returned reference.
305
- *
306
- * @return 0 on success, or < 0 (a negative DAV1D_ERR code) on error.
307
- */
308
- DAV1D_API int dav1d_get_decode_error_data_props(Dav1dContext *c, Dav1dDataProps *out);
309
-
310
- /**
311
- * Get the decoder delay, which is the number of internally buffered frames, not
312
- * including reference frames.
313
- * This value is guaranteed to be >= 1 and <= max_frame_delay.
314
- *
315
- * @param s Input settings context.
316
- *
317
- * @return Decoder frame delay on success, or < 0 (a negative DAV1D_ERR code) on
318
- * error.
319
- *
320
- * @note The returned delay is valid only for a Dav1dContext initialized with the
321
- * provided Dav1dSettings.
322
- */
323
- DAV1D_API int dav1d_get_frame_delay(const Dav1dSettings *s);
324
-
325
- #ifdef __cplusplus
326
- } /* extern "C" */
327
- #endif
328
-
329
- #endif /* DAV1D_H */