daala  0.0-1185-g52bbd43-dirty
Experimental Daala video codec API reference.
Macros
daalaenc.h File Reference

The libdaala C encoding API. More...

#include "codec.h"
#include <ogg/ogg.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_USE_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_USE_DERING   4010
 Whether the bilinear postprocessing filter should be used or not. More...
 
#define OD_SET_MC_USE_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_USE_SATD   4108
 Whether the SATD metric should be used in motion compensation or not. 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 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:
  • Call daala_encode_free() to release all encoder memory.
daala_enc_ctxdaala_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, ogg_packet *op)
 Outputs the next header packet. More...
 
int daala_encode_img_in (daala_enc_ctx *enc, od_img *img, int duration)
 Submits an uncompressed frame to the encoder. More...
 
int daala_encode_packet_out (daala_enc_ctx *enc, int last, ogg_packet *op)
 Retrieves encoded video data packets. More...
 
void daala_encode_free (daala_enc_ctx *enc)
 Frees an allocated encoder instance. More...
 

Detailed Description

The libdaala C encoding API.

Typedef Documentation

◆ daala_enc_ctx

typedef struct daala_enc_ctx daala_enc_ctx

The encoder context.