@pproenca/ffmpeg-darwin-x64 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.
- package/include/aom/aom.h +127 -0
- package/include/aom/aom_codec.h +594 -0
- package/include/aom/aom_decoder.h +257 -0
- package/include/aom/aom_encoder.h +1154 -0
- package/include/aom/aom_external_partition.h +452 -0
- package/include/aom/aom_frame_buffer.h +84 -0
- package/include/aom/aom_image.h +462 -0
- package/include/aom/aom_integer.h +60 -0
- package/include/aom/aomcx.h +2288 -0
- package/include/aom/aomdx.h +607 -0
- package/include/dav1d/common.h +94 -0
- package/include/dav1d/data.h +117 -0
- package/include/dav1d/dav1d.h +329 -0
- package/include/dav1d/headers.h +444 -0
- package/include/dav1d/picture.h +157 -0
- package/include/dav1d/version.h +50 -0
- package/include/index.js +1 -0
- package/include/libavcodec/ac3_parser.h +36 -0
- package/include/libavcodec/adts_parser.h +37 -0
- package/include/libavcodec/avcodec.h +3128 -0
- package/include/libavcodec/avdct.h +88 -0
- package/include/libavcodec/avfft.h +149 -0
- package/include/libavcodec/bsf.h +332 -0
- package/include/libavcodec/codec.h +382 -0
- package/include/libavcodec/codec_desc.h +134 -0
- package/include/libavcodec/codec_id.h +669 -0
- package/include/libavcodec/codec_par.h +248 -0
- package/include/libavcodec/d3d11va.h +109 -0
- package/include/libavcodec/defs.h +337 -0
- package/include/libavcodec/dirac.h +135 -0
- package/include/libavcodec/dv_profile.h +82 -0
- package/include/libavcodec/dxva2.h +90 -0
- package/include/libavcodec/jni.h +67 -0
- package/include/libavcodec/mediacodec.h +103 -0
- package/include/libavcodec/packet.h +887 -0
- package/include/libavcodec/qsv.h +109 -0
- package/include/libavcodec/vdpau.h +171 -0
- package/include/libavcodec/version.h +45 -0
- package/include/libavcodec/version_major.h +52 -0
- package/include/libavcodec/videotoolbox.h +85 -0
- package/include/libavcodec/vorbis_parser.h +74 -0
- package/include/libavdevice/avdevice.h +397 -0
- package/include/libavdevice/version.h +45 -0
- package/include/libavdevice/version_major.h +43 -0
- package/include/libavfilter/avfilter.h +1379 -0
- package/include/libavfilter/buffersink.h +173 -0
- package/include/libavfilter/buffersrc.h +215 -0
- package/include/libavfilter/version.h +48 -0
- package/include/libavfilter/version_major.h +40 -0
- package/include/libavformat/avformat.h +3107 -0
- package/include/libavformat/avio.h +831 -0
- package/include/libavformat/version.h +47 -0
- package/include/libavformat/version_major.h +54 -0
- package/include/libavutil/adler32.h +63 -0
- package/include/libavutil/aes.h +69 -0
- package/include/libavutil/aes_ctr.h +99 -0
- package/include/libavutil/ambient_viewing_environment.h +72 -0
- package/include/libavutil/attributes.h +173 -0
- package/include/libavutil/audio_fifo.h +187 -0
- package/include/libavutil/avassert.h +78 -0
- package/include/libavutil/avconfig.h +6 -0
- package/include/libavutil/avstring.h +428 -0
- package/include/libavutil/avutil.h +362 -0
- package/include/libavutil/base64.h +72 -0
- package/include/libavutil/blowfish.h +82 -0
- package/include/libavutil/bprint.h +254 -0
- package/include/libavutil/bswap.h +105 -0
- package/include/libavutil/buffer.h +322 -0
- package/include/libavutil/camellia.h +70 -0
- package/include/libavutil/cast5.h +80 -0
- package/include/libavutil/channel_layout.h +751 -0
- package/include/libavutil/common.h +589 -0
- package/include/libavutil/cpu.h +145 -0
- package/include/libavutil/crc.h +102 -0
- package/include/libavutil/csp.h +150 -0
- package/include/libavutil/des.h +81 -0
- package/include/libavutil/detection_bbox.h +108 -0
- package/include/libavutil/dict.h +241 -0
- package/include/libavutil/display.h +109 -0
- package/include/libavutil/dovi_meta.h +396 -0
- package/include/libavutil/downmix_info.h +115 -0
- package/include/libavutil/encryption_info.h +205 -0
- package/include/libavutil/error.h +129 -0
- package/include/libavutil/eval.h +140 -0
- package/include/libavutil/executor.h +67 -0
- package/include/libavutil/ffversion.h +5 -0
- package/include/libavutil/fifo.h +242 -0
- package/include/libavutil/file.h +62 -0
- package/include/libavutil/film_grain_params.h +322 -0
- package/include/libavutil/frame.h +1175 -0
- package/include/libavutil/hash.h +264 -0
- package/include/libavutil/hdr_dynamic_metadata.h +376 -0
- package/include/libavutil/hdr_dynamic_vivid_metadata.h +346 -0
- package/include/libavutil/hmac.h +99 -0
- package/include/libavutil/hwcontext.h +598 -0
- package/include/libavutil/hwcontext_cuda.h +74 -0
- package/include/libavutil/hwcontext_d3d11va.h +178 -0
- package/include/libavutil/hwcontext_d3d12va.h +142 -0
- package/include/libavutil/hwcontext_drm.h +169 -0
- package/include/libavutil/hwcontext_dxva2.h +75 -0
- package/include/libavutil/hwcontext_mediacodec.h +61 -0
- package/include/libavutil/hwcontext_opencl.h +100 -0
- package/include/libavutil/hwcontext_qsv.h +87 -0
- package/include/libavutil/hwcontext_vaapi.h +117 -0
- package/include/libavutil/hwcontext_vdpau.h +44 -0
- package/include/libavutil/hwcontext_videotoolbox.h +106 -0
- package/include/libavutil/hwcontext_vulkan.h +382 -0
- package/include/libavutil/iamf.h +690 -0
- package/include/libavutil/imgutils.h +377 -0
- package/include/libavutil/intfloat.h +77 -0
- package/include/libavutil/intreadwrite.h +677 -0
- package/include/libavutil/lfg.h +81 -0
- package/include/libavutil/log.h +387 -0
- package/include/libavutil/lzo.h +66 -0
- package/include/libavutil/macros.h +80 -0
- package/include/libavutil/mastering_display_metadata.h +137 -0
- package/include/libavutil/mathematics.h +300 -0
- package/include/libavutil/md5.h +89 -0
- package/include/libavutil/mem.h +607 -0
- package/include/libavutil/motion_vector.h +57 -0
- package/include/libavutil/murmur3.h +115 -0
- package/include/libavutil/opt.h +1187 -0
- package/include/libavutil/parseutils.h +197 -0
- package/include/libavutil/pixdesc.h +440 -0
- package/include/libavutil/pixelutils.h +51 -0
- package/include/libavutil/pixfmt.h +716 -0
- package/include/libavutil/random_seed.h +57 -0
- package/include/libavutil/rational.h +225 -0
- package/include/libavutil/rc4.h +69 -0
- package/include/libavutil/replaygain.h +50 -0
- package/include/libavutil/ripemd.h +83 -0
- package/include/libavutil/samplefmt.h +269 -0
- package/include/libavutil/sha.h +90 -0
- package/include/libavutil/sha512.h +92 -0
- package/include/libavutil/spherical.h +243 -0
- package/include/libavutil/stereo3d.h +325 -0
- package/include/libavutil/tea.h +71 -0
- package/include/libavutil/threadmessage.h +115 -0
- package/include/libavutil/time.h +56 -0
- package/include/libavutil/timecode.h +199 -0
- package/include/libavutil/timestamp.h +85 -0
- package/include/libavutil/tree.h +137 -0
- package/include/libavutil/twofish.h +70 -0
- package/include/libavutil/tx.h +210 -0
- package/include/libavutil/uuid.h +146 -0
- package/include/libavutil/version.h +124 -0
- package/include/libavutil/video_enc_params.h +171 -0
- package/include/libavutil/video_hint.h +107 -0
- package/include/libavutil/xtea.h +94 -0
- package/include/libswresample/swresample.h +587 -0
- package/include/libswresample/version.h +46 -0
- package/include/libswresample/version_major.h +31 -0
- package/include/libswscale/swscale.h +460 -0
- package/include/libswscale/version.h +44 -0
- package/include/libswscale/version_major.h +35 -0
- package/include/ogg/config_types.h +26 -0
- package/include/ogg/ogg.h +209 -0
- package/include/ogg/os_types.h +158 -0
- package/include/opus/opus.h +1099 -0
- package/include/opus/opus_defines.h +830 -0
- package/include/opus/opus_multistream.h +660 -0
- package/include/opus/opus_projection.h +568 -0
- package/include/opus/opus_types.h +166 -0
- package/include/svt-av1/EbDebugMacros.h +88 -0
- package/include/svt-av1/EbSvtAv1.h +462 -0
- package/include/svt-av1/EbSvtAv1Enc.h +1112 -0
- package/include/svt-av1/EbSvtAv1ErrorCodes.h +67 -0
- package/include/svt-av1/EbSvtAv1ExtFrameBuf.h +64 -0
- package/include/svt-av1/EbSvtAv1Formats.h +126 -0
- package/include/svt-av1/EbSvtAv1Metadata.h +156 -0
- package/include/vorbis/codec.h +242 -0
- package/include/vorbis/vorbisenc.h +435 -0
- package/include/vorbis/vorbisfile.h +205 -0
- package/include/vpx/vp8.h +136 -0
- package/include/vpx/vp8cx.h +1118 -0
- package/include/vpx/vp8dx.h +228 -0
- package/include/vpx/vpx_codec.h +475 -0
- package/include/vpx/vpx_decoder.h +367 -0
- package/include/vpx/vpx_encoder.h +1150 -0
- package/include/vpx/vpx_ext_ratectrl.h +590 -0
- package/include/vpx/vpx_frame_buffer.h +83 -0
- package/include/vpx/vpx_image.h +221 -0
- package/include/vpx/vpx_integer.h +40 -0
- package/include/vpx/vpx_tpl.h +68 -0
- package/lib/index.js +1 -0
- package/lib/libSvtAv1Enc.a +0 -0
- package/lib/libaom.a +0 -0
- package/lib/libavcodec.a +0 -0
- package/lib/libavdevice.a +0 -0
- package/lib/libavfilter.a +0 -0
- package/lib/libavformat.a +0 -0
- package/lib/libavutil.a +0 -0
- package/lib/libdav1d.a +0 -0
- package/lib/libogg.a +0 -0
- package/lib/libopus.a +0 -0
- package/lib/libswresample.a +0 -0
- package/lib/libswscale.a +0 -0
- package/lib/libvorbis.a +0 -0
- package/lib/libvorbisenc.a +0 -0
- package/lib/libvorbisfile.a +0 -0
- package/lib/libvpx.a +0 -0
- package/package.json +35 -0
- package/versions.json +1 -0
|
@@ -0,0 +1,117 @@
|
|
|
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 */
|
|
@@ -0,0 +1,329 @@
|
|
|
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 */
|