daaladec.h - Man Page

The libdaala C decoding API.

Synopsis

#include 'codec.h'

Data Structures

struct od_acct_symbol
struct od_accounting_dict
Dictionary for translating strings into id.
struct od_accounting

Macros

#define _daala_daaladec_H   (1)
#define OD_DECCTL_SET_BSIZE_BUFFER   (7001)
#define OD_DECCTL_SET_FLAGS_BUFFER   (7003)
#define OD_DECCTL_SET_MV_BUFFER   (7005)
#define OD_DECCTL_SET_MC_IMG   (7007)
Copy the motion compensated reference into a user supplied daala_image.
#define OD_DECCTL_GET_ACCOUNTING   (7009)
#define OD_DECCTL_SET_ACCOUNTING_ENABLED   (7011)
#define OD_DECCTL_SET_DERING_BUFFER   (7013)
#define OD_ACCT_FRAME   (10)
#define OD_ACCT_MV   (11)
#define MAX_SYMBOL_TYPES   (256)

Typedefs

Decoder state
The following data structures are opaque, and their contents are not publicly defined by this API.

Referring to their internals directly is unsupported, and may break without warning.

typedef struct daala_dec_ctx daala_dec_ctx
The decoder context.
typedef struct daala_setup_info daala_setup_info
Setup information.

Functions

Functions for decoding
You must link to libdaalaadec if you use any of the functions in this section.

int daala_decode_header_in (daala_info *info, daala_comment *dc, daala_setup_info **ds, const daala_packet *dp)
Parses the header packets from an Ogg Daala stream.
daala_dec_ctx * daala_decode_create (const daala_info *info, const daala_setup_info *setup)
Allocates a decoder instance.
void daala_setup_free (daala_setup_info *setup)
Releases all storage used for the decoder setup information.
int daala_decode_ctl (daala_dec_ctx *dec, int req, void *buf, size_t buf_sz)
Decoder control function.
void daala_decode_free (daala_dec_ctx *dec)
Frees an allocated decoder instance.
int daala_decode_packet_in (daala_dec_ctx *dec, const daala_packet *dp)
Retrieves decoded video data frames.
int daala_decode_img_out (daala_dec_ctx *dec, daala_image *img)
Outputs the next available decoded image frame.

Detailed Description

The libdaala C decoding API.

Macro Definition Documentation

#define OD_DECCTL_SET_MC_IMG   (7007)

Copy the motion compensated reference into a user supplied daala_image.

Parameters

<tt>daala_image*</tt> Pointer to the user supplied daala_image. Image must be allocated by the caller, and must be the same format as the decoder output images.

Typedef Documentation

typedef struct daala_setup_info daala_setup_info

Setup information. This contains auxiliary information decoded from the setup header by daala_decode_header_in() to be passed to daala_decode_create(). It can be re-used to initialize any number of decoders, and can be freed via daala_setup_free() at any time.

Function Documentation

int daala_decode_header_in (daala_info * info, daala_comment * dc, daala_setup_info ** ds, const daala_packet * dp)

Parses the header packets from an Ogg Daala stream. To use this function:

  • Initialize a daala_info structure using daala_info_init().
  • Initialize a daala_comment structure using daala_comment_init().
  • Initialize a daala_setup_info pointer to NULL.
  • Call this function three times, passing in pointers to the same daala_info, daala_comment, and daala_setup_info pointer each time, and the three successive header packets.
Parameters

info The daala_info structure to fill in. This must have been previously initialized with daala_info_init(). The application may begin using the contents of this structure after the first header is decoded, though it must continue to be passed in unmodified on all subsequent calls.
dc The daala_comment structure to fill in. This must have been previously initialized with daala_comment_init(). The application may immediately begin using the contents of this structure after the second header is decoded, though it must continue to be passed in on all subsequent calls. Users should free the returned data with daala_comment_clear().
ds A pointer to a daala_setup_info pointer to fill in. The contents of this pointer must be initialized to NULL on the first call, and the returned value must continue to be passed in on all subsequent calls.
dp The current header packet to process.

Returns

A positive value indicates that a Daala header was successfully processed and indicates the remaining number of headers to be read.

Return values

0 The last header was processed and the next packet will contain video.
OD_EFAULT One of info, dc, or ds was NULL, or there was a memory allocation failure.
OD_EBADHEADER op was NULL, the packet was not the next header packet in the expected sequence, or the format fo the header data was invalid.
OD_EVERSION The packet data was a Daala header, but for a bitstream version not decodable with this version of libdaaladec.
OD_ENOTFORMAT The packet was not a Daala header.

daala_dec_ctx* daala_decode_create (const daala_info * info, const daala_setup_info * setup)

Allocates a decoder instance.

Parameters

info A daala_info struct filled via daala_decode_header_in().
setup A daala_setup_info handle returned via daala_decode_header_in().

Returns

The initialized daala_dec_ctx handle.

Return values

NULL If the decoding parameters were invalid.

void daala_setup_free (daala_setup_info * setup)

Releases all storage used for the decoder setup information. This should be called after you no longer want to create any decoders for a stream whose headers you have parsed with daala_decode_header_in().

Parameters

setup The setup information to free. This can safely be NULL.

int daala_decode_ctl (daala_dec_ctx * dec, int req, void * buf, size_t buf_sz)

Decoder control function. This is used to provide advanced control of the decoding process.

Parameters

dec A daala_dec_ctx handle.
req The control code to process. See the list of available control codes for details.
buf The parameters for this control code.
buf_sz The size of the parameter buffer.

void daala_decode_free (daala_dec_ctx * dec)

Frees an allocated decoder instance.

Parameters

dec A daala_dec_ctx handle.

int daala_decode_packet_in (daala_dec_ctx * dec, const daala_packet * dp)

Retrieves decoded video data frames.

Parameters

dec A daala_dec_ctx handle.

int daala_decode_img_out (daala_dec_ctx * dec, daala_image * img)

Outputs the next available decoded image frame.

Parameters

img A buffer to receive the decoded image data.
dp An incoming Daala packet.

Returns

A positive value 1 means an output image was available and was placed in img.

Return values

1 An decoded image was available and was placed in img.
0 No image was available, so the contents of img were left unchanged.
OD_EFAULT One of dec or img was NULL.

Author

Generated automatically by Doxygen for daala from the source code.

Info

Tue Jan 26 2021 Version unknown daala