daalaenc.h man page

daala/daalaenc.h — The libdaala C encoding API.  

Synopsis

#include 'codec.h'

Macros

#define _daala_daalaenc_H   (1)
#define OD_SET_QUANT   4000
Set the quantizer scale.
#define OD_SET_COMPLEXITY   4002
Configure the encoder's computational complexity level.
#define OD_GET_COMPLEXITY   4004
Get the encoder's computational complexity level.
#define OD_SET_ACTIVITY_MASKING   4006
Whether activity masking should be used or not.
#define OD_SET_QM   4008
Which quantization matrix to use.
#define OD_SET_DERING   4010
Whether the bilinear postprocessing filter should be used or not.
#define OD_SET_MC_CHROMA   4100
Whether the motion compensation search should use the chroma planes in addition to the luma plane.
#define OD_SET_MV_RES_MIN   4102
Minimum motion vectors resolution for the motion compensation search.
#define OD_SET_MV_LEVEL_MIN   4104
Minimum motion vectors level for the motion compensation search.
#define OD_SET_MV_LEVEL_MAX   4106
Maximum motion vectors level for the motion compensation search.
#define OD_SET_MC_SATD   4108
Whether the SATD metric should be used in motion compensation or not.
#define OD_SET_B_FRAMES   4110
Number of B frames used by encoder.
#define OD_SET_BITRATE   4112
Sets the current encoding bitrate.
#define OD_SET_RATE_FLAGS   4114
Modifies the default bitrate management behavior.
#define OD_SET_RATE_BUFFER   4116
Sets the size of the bitrate management bit reservoir as a function of number of frames.
#define OD_2PASS_OUT   4118
Enable pass 1 of two-pass encoding mode and retrieve the first pass metrics.
#define OD_2PASS_IN   4120
Submits two-pass encoding metric data collected the first encoding pass to the second pass.

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.
#define OD_RATECTL_CAP_OVERFLOW   (0x2)
Ignore bitrate buffer overflows.
#define OD_RATECTL_CAP_UNDERFLOW   (0x4)
Ignore bitrate buffer underflows.

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.

Functions

Functions for encoding
You must link to libdaalabase and libdaalaenc if you use any of the functions in this section.

The functions are listed in the order they are used in a typical encode. The basic steps are:

·

Fill in a daala_info structure with details on the format of the video you wish to encode.

·

Allocate a daala_enc_ctx handle with daala_encode_alloc().

·

Perform any additional encoder configuration required with daala_encode_ctl().

·

Repeatedly call daala_encode_flusheader() to retrieve all the header packets.

·

For each uncompressed frame:

 ·

Submit the compressed frame via daala_encode_img_in().

 ·

Repeatedly call daala_encode_packet_out() to retrieve any video data packets that are ready.

·

Call daala_comment_clear() to release all comments allocated.

·

Call daala_encode_free() to release all encoder memory.

daala_enc_ctx * daala_encode_create (const daala_info *info)
Allocates and initializes an encoder instance.
int daala_encode_ctl (daala_enc_ctx *enc, int req, void *buf, size_t buf_sz)
Encoder control function.
int daala_encode_flush_header (daala_enc_ctx *enc, daala_comment *comments, daala_packet *dp)
Outputs the next header packet.
int daala_encode_img_in (daala_enc_ctx *enc, daala_image *img, int duration)
Submits an uncompressed frame to the encoder.
int daala_encode_packet_out (daala_enc_ctx *enc, int last, daala_packet *dp)
Retrieves encoded video data packets.
void daala_encode_free (daala_enc_ctx *enc)
Frees an allocated encoder instance.

Detailed Description

The libdaala C encoding API.

Macro Definition Documentation

#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 Documentation

typedef struct daala_enc_ctx daala_enc_ctx

The encoder context.

Author

Generated automatically by Doxygen for daala from the source code.

Info

Mon Sep 11 2017 Version unknown daala