|
dav1d 1.5.4
dav1d is an AV1 decoder
|
#include <errno.h>#include <stdarg.h>#include "common.h"#include "picture.h"#include "data.h"#include "version.h"
Go to the source code of this file.
Data Structures | |
| struct | Dav1dLogger |
| struct | Dav1dSettings |
Macros | |
| #define | DAV1D_MAX_THREADS 256 |
| #define | DAV1D_MAX_FRAME_DELAY 256 |
Typedefs | |
| typedef struct Dav1dContext | Dav1dContext |
| typedef struct Dav1dRef | Dav1dRef |
Enumerations | |
| enum | Dav1dInloopFilterType { DAV1D_INLOOPFILTER_NONE = 0 , DAV1D_INLOOPFILTER_DEBLOCK = 1 << 0 , DAV1D_INLOOPFILTER_CDEF = 1 << 1 , DAV1D_INLOOPFILTER_RESTORATION = 1 << 2 , DAV1D_INLOOPFILTER_ALL } |
| enum | Dav1dDecodeFrameType { DAV1D_DECODEFRAMETYPE_ALL = 0 , DAV1D_DECODEFRAMETYPE_REFERENCE = 1 , DAV1D_DECODEFRAMETYPE_INTRA = 2 , DAV1D_DECODEFRAMETYPE_KEY = 3 } |
| enum | Dav1dEventFlags { DAV1D_EVENT_FLAG_NEW_SEQUENCE = 1 << 0 , DAV1D_EVENT_FLAG_NEW_OP_PARAMS_INFO = 1 << 1 } |
Functions | |
| DAV1D_API const char * | dav1d_version (void) |
| DAV1D_API unsigned | dav1d_version_api (void) |
| DAV1D_API void | dav1d_default_settings (Dav1dSettings *s) |
| DAV1D_API int | dav1d_open (Dav1dContext **c_out, const Dav1dSettings *s) |
| DAV1D_API int | dav1d_parse_sequence_header (Dav1dSequenceHeader *out, const uint8_t *buf, const size_t sz) |
| DAV1D_API int | dav1d_send_data (Dav1dContext *c, Dav1dData *in) |
| DAV1D_API int | dav1d_get_picture (Dav1dContext *c, Dav1dPicture *out) |
| DAV1D_API int | dav1d_apply_grain (Dav1dContext *c, Dav1dPicture *out, const Dav1dPicture *in) |
| DAV1D_API void | dav1d_close (Dav1dContext **c_out) |
| DAV1D_API void | dav1d_flush (Dav1dContext *c) |
| DAV1D_API int | dav1d_get_event_flags (Dav1dContext *c, enum Dav1dEventFlags *flags) |
| DAV1D_API int | dav1d_get_decode_error_data_props (Dav1dContext *c, Dav1dDataProps *out) |
| DAV1D_API int | dav1d_get_frame_delay (const Dav1dSettings *s) |
| #define DAV1D_MAX_FRAME_DELAY 256 |
| #define DAV1D_MAX_THREADS 256 |
| typedef struct Dav1dContext Dav1dContext |
| enum Dav1dDecodeFrameType |
| enum Dav1dEventFlags |
| DAV1D_API int dav1d_apply_grain | ( | Dav1dContext * | c, |
| Dav1dPicture * | out, | ||
| const Dav1dPicture * | in ) |
Apply film grain to a previously decoded picture. If the picture contains no film grain metadata, then this function merely returns a new reference.
| c | Input decoder instance. |
| out | Output frame. The caller assumes ownership of the returned reference. |
| in | Input frame. No ownership is transferred. |
| DAV1D_API void dav1d_close | ( | Dav1dContext ** | c_out | ) |
Close a decoder instance and free all associated memory.
| c_out | The decoder instance to close. *c_out will be set to NULL. |
| DAV1D_API void dav1d_default_settings | ( | Dav1dSettings * | s | ) |
Initialize settings to default values.
| s | Input settings context. |
| DAV1D_API void dav1d_flush | ( | Dav1dContext * | c | ) |
Flush all delayed frames in decoder and clear internal decoder state, to be used when seeking.
| c | Input decoder instance. |
| DAV1D_API int dav1d_get_decode_error_data_props | ( | Dav1dContext * | c, |
| Dav1dDataProps * | out ) |
Retrieve the user-provided metadata associated with the input data packet for the last decoding error reported to the user, i.e. a negative return value (not EAGAIN) from dav1d_send_data() or dav1d_get_picture().
| c | Input decoder instance. |
| out | Output Dav1dDataProps. On success, the caller assumes ownership of the returned reference. |
| DAV1D_API int dav1d_get_event_flags | ( | Dav1dContext * | c, |
| enum Dav1dEventFlags * | flags ) |
Fetch a combination of DAV1D_EVENT_FLAG_* event flags generated by the decoding process.
| c | Input decoder instance. |
| flags | Where to write the flags. |
| DAV1D_API int dav1d_get_frame_delay | ( | const Dav1dSettings * | s | ) |
Get the decoder delay, which is the number of internally buffered frames, not including reference frames. This value is guaranteed to be >= 1 and <= max_frame_delay.
| s | Input settings context. |
| DAV1D_API int dav1d_get_picture | ( | Dav1dContext * | c, |
| Dav1dPicture * | out ) |
Return a decoded picture.
| c | Input decoder instance. |
| out | Output frame. The caller assumes ownership of the returned reference. |
| DAV1D_API int dav1d_open | ( | Dav1dContext ** | c_out, |
| const Dav1dSettings * | s ) |
Allocate and open a decoder instance.
| c_out | The decoder instance to open. *c_out will be set to the allocated context. |
| s | Input settings context. |
| DAV1D_API int dav1d_parse_sequence_header | ( | Dav1dSequenceHeader * | out, |
| const uint8_t * | buf, | ||
| const size_t | sz ) |
Parse a Sequence Header OBU from bitstream data.
| out | Output Sequence Header. |
| buf | The data to be parser. |
| sz | Size of the data. |
| DAV1D_API int dav1d_send_data | ( | Dav1dContext * | c, |
| Dav1dData * | in ) |
Feed bitstream data to the decoder, in the form of one or multiple AV1 Open Bitstream Units (OBUs).
| c | Input decoder instance. |
| in | Input bitstream data. On success, ownership of the reference is passed to the library. |
| DAV1D_API const char * dav1d_version | ( | void | ) |
Get library version.
| DAV1D_API unsigned dav1d_version_api | ( | void | ) |
Get library API version.