daala
unknown
Experimental Daala video codec API reference.
|
The libdaala
C encoding API.
More...
#include "codec.h"
Go to the source code of this file.
Macros | |
#define | _daala_daalaenc_H (1) |
#define | OD_SET_QUANT 4000 |
Set the quantizer scale. More... | |
#define | OD_SET_COMPLEXITY 4002 |
Configure the encoder's computational complexity level. More... | |
#define | OD_GET_COMPLEXITY 4004 |
Get the encoder's computational complexity level. More... | |
#define | OD_SET_ACTIVITY_MASKING 4006 |
Whether activity masking should be used or not. More... | |
#define | OD_SET_QM 4008 |
Which quantization matrix to use. More... | |
#define | OD_SET_DERING 4010 |
Whether the bilinear postprocessing filter should be used or not. More... | |
#define | OD_SET_MC_CHROMA 4100 |
Whether the motion compensation search should use the chroma planes in addition to the luma plane. More... | |
#define | OD_SET_MV_RES_MIN 4102 |
Minimum motion vectors resolution for the motion compensation search. More... | |
#define | OD_SET_MV_LEVEL_MIN 4104 |
Minimum motion vectors level for the motion compensation search. More... | |
#define | OD_SET_MV_LEVEL_MAX 4106 |
Maximum motion vectors level for the motion compensation search. More... | |
#define | OD_SET_MC_SATD 4108 |
Whether the SATD metric should be used in motion compensation or not. More... | |
#define | OD_SET_B_FRAMES 4110 |
Number of B frames used by encoder. More... | |
#define | OD_SET_BITRATE 4112 |
Sets the current encoding bitrate. More... | |
#define | OD_SET_RATE_FLAGS 4114 |
Modifies the default bitrate management behavior. More... | |
#define | OD_SET_RATE_BUFFER 4116 |
Sets the size of the bitrate management bit reservoir as a function of number of frames. More... | |
#define | OD_2PASS_OUT 4118 |
Enable pass 1 of two-pass encoding mode and retrieve the first pass metrics. More... | |
#define | OD_2PASS_IN 4120 |
Submits two-pass encoding metric data collected the first encoding pass to the second pass. More... | |
OD_SET_RATE_FLAGS flags | |
These are the flags available for use with OD_SET_RATE_FLAGS. | |
#define | OD_RATECTL_DROP_FRAMES (0x1) |
Drop frames to keep within bitrate buffer constraints. More... | |
#define | OD_RATECTL_CAP_OVERFLOW (0x2) |
Ignore bitrate buffer overflows. More... | |
#define | OD_RATECTL_CAP_UNDERFLOW (0x4) |
Ignore bitrate buffer underflows. More... | |
Typedefs | |
Encoder state | |
The following data structure is opaque, and its contents are not publicly defined by this API. Referring to its internals directly is unsupported, and may break without warning. | |
typedef struct daala_enc_ctx | daala_enc_ctx |
The encoder context. More... | |
Functions | |
Functions for encoding | |
You must link to The functions are listed in the order they are used in a typical encode. The basic steps are:
| |
daala_enc_ctx * | daala_encode_create (const daala_info *info) |
Allocates and initializes an encoder instance. More... | |
int | daala_encode_ctl (daala_enc_ctx *enc, int req, void *buf, size_t buf_sz) |
Encoder control function. More... | |
int | daala_encode_flush_header (daala_enc_ctx *enc, daala_comment *comments, daala_packet *dp) |
Outputs the next header packet. More... | |
int | daala_encode_img_in (daala_enc_ctx *enc, daala_image *img, int duration) |
Submits an uncompressed frame to the encoder. More... | |
int | daala_encode_packet_out (daala_enc_ctx *enc, int last, daala_packet *dp) |
Retrieves encoded video data packets. More... | |
void | daala_encode_free (daala_enc_ctx *enc) |
Frees an allocated encoder instance. More... | |
The libdaala
C encoding API.
#define OD_RATECTL_DROP_FRAMES (0x1) |
Drop frames to keep within bitrate buffer constraints.
This can have a severe impact on quality, but is the only way to ensure that bitrate targets are met at low rates during sudden bursts of activity. It is enabled by default.
#define OD_RATECTL_CAP_OVERFLOW (0x2) |
Ignore bitrate buffer overflows.
If the encoder uses so few bits that the reservoir of available bits overflows, ignore the excess. The encoder will not try to use these extra bits in future frames. At high rates this may cause the result to be undersized, but allows a client to play the stream using a finite buffer; it should normally be enabled, which is the default.
#define OD_RATECTL_CAP_UNDERFLOW (0x4) |
Ignore bitrate buffer underflows.
If the encoder uses so many bits that the reservoir of available bits underflows, ignore the deficit. The encoder will not try to make up these extra bits in future frames. At low rates this may cause the result to be oversized; it should normally be disabled, which is the default.
typedef struct daala_enc_ctx daala_enc_ctx |
The encoder context.