daala
unknown
Experimental Daala video codec API reference.
|
The shared libdaala
C API.
More...
#include "daala_integer.h"
Go to the source code of this file.
Data Structures | |
struct | daala_image_plane |
Representation of a single component within an image or frame. More... | |
struct | daala_image |
Representation of an image or video frame. More... | |
struct | daala_plane_info |
Subsampling factors for a plane as a power of 2. More... | |
struct | daala_info |
Configuration parameters for a codec instance. More... | |
struct | daala_packet |
struct | daala_comment |
The comment information. More... | |
Macros | |
#define | _daala_codec_H (1) |
#define | OD_GNUC_PREREQ(maj, min, pat) (0) |
#define | OD_WARN_UNUSED_RESULT |
#define | OD_ARG_NONNULL(x) |
#define | OD_NPLANES_MAX (4) |
The maximum number of color planes allowed in a single frame. More... | |
Error codes | |
#define | OD_SUCCESS (0) |
No error occurred. More... | |
#define | OD_EFAULT (-1) |
An invalid pointer was provided. More... | |
#define | OD_EINVAL (-10) |
An invalid argument was provided. More... | |
#define | OD_EBADHEADER (-20) |
The contents of the header were incomplete, invalid, or unexpected. More... | |
#define | OD_ENOTFORMAT (-21) |
The header does not belong to a Daala stream. More... | |
#define | OD_EVERSION (-22) |
The bitstream version is too high. More... | |
#define | OD_EIMPL (-23) |
The specified function is not implemented. More... | |
#define | OD_EBADPACKET (-24) |
There were errors in the video data packet. More... | |
Colorspaces | |
The currently defined color space tags. | |
#define | OD_CS_UNSPECIFIED (0) |
The color space was not specified at the encoder. More... | |
#define | OD_CS_ITU_REC_470M (1) |
A Y'CbCr color space designed for NTSC content. | |
#define | OD_CS_ITU_REC_470BG (2) |
A Y'CbCr color space designed for PAL/SECAM content. More... | |
#define | OD_CS_ITU_REC_790 (3) |
A Y'CbCr color space designed for HD content. More... | |
#define | OD_CS_YCgCo (4) |
A Y'CgCo color space designed for sRGB content. More... | |
#define | OD_CS_NSPACES (5) |
The total number of currently defined color spaces. More... | |
Bit Depths | |
The three video bit depths currently supported by Daala. | |
#define | OD_BITDEPTH_MODE_8 (1) |
8-bit mode. More... | |
#define | OD_BITDEPTH_MODE_10 (2) |
10-bit mode. More... | |
#define | OD_BITDEPTH_MODE_12 (3) |
12-bit mode. More... | |
Typedefs | |
typedef struct daala_image_plane | daala_image_plane |
typedef struct daala_image | daala_image |
typedef struct daala_plane_info | daala_plane_info |
typedef struct daala_info | daala_info |
typedef struct daala_comment | daala_comment |
Functions | |
const char * | daala_version_string (void) |
int | daala_log_init (void) |
Initialize the logging module. More... | |
void | daala_info_init (daala_info *info) |
void | daala_info_clear (daala_info *info) |
void | daala_comment_init (daala_comment *dc) |
Initializes a daala_comment section. More... | |
void | daala_comment_clear (daala_comment *dc) |
Free resources allocated for metadata. More... | |
int64_t | daala_granule_basetime (void *encdec, int64_t granpos) |
double | daala_granule_time (void *encdec, int64_t granpos) |
Converts a granule position to an absolute time in seconds. More... | |
int | daala_packet_isheader (daala_packet *dpkt) |
Determines whether a Daala packet is a header or not. More... | |
int | daala_packet_iskeyframe (daala_packet *dpkt) |
Determines whether a Daala packet is a key frame or not. More... | |
The shared libdaala
C API.
#define OD_SUCCESS (0) |
No error occurred.
#define OD_EFAULT (-1) |
An invalid pointer was provided.
#define OD_EINVAL (-10) |
An invalid argument was provided.
#define OD_EBADHEADER (-20) |
The contents of the header were incomplete, invalid, or unexpected.
#define OD_ENOTFORMAT (-21) |
The header does not belong to a Daala stream.
#define OD_EVERSION (-22) |
The bitstream version is too high.
#define OD_EIMPL (-23) |
The specified function is not implemented.
#define OD_EBADPACKET (-24) |
There were errors in the video data packet.
#define OD_CS_UNSPECIFIED (0) |
The color space was not specified at the encoder.
It may be conveyed by an external means.
#define OD_CS_ITU_REC_470BG (2) |
A Y'CbCr color space designed for PAL/SECAM content.
#define OD_CS_ITU_REC_790 (3) |
A Y'CbCr color space designed for HD content.
#define OD_CS_YCgCo (4) |
A Y'CgCo color space designed for sRGB content.
#define OD_CS_NSPACES (5) |
The total number of currently defined color spaces.
#define OD_NPLANES_MAX (4) |
The maximum number of color planes allowed in a single frame.
#define OD_BITDEPTH_MODE_8 (1) |
8-bit mode.
#define OD_BITDEPTH_MODE_10 (2) |
10-bit mode.
#define OD_BITDEPTH_MODE_12 (3) |
12-bit mode.
int daala_log_init | ( | void | ) |
Initialize the logging module.
This should be called once before invoking any other Daala functions if logging support is enabled and you want to use it. Otherwise no logging messages will be printed.
0 | Success. This function always succeeds. It only returns a value for convenience (e.g., for use in a static initializer). |
void daala_comment_init | ( | daala_comment * | dc | ) |
Initializes a daala_comment section.
Users should free the returned data with daala_comment_clear().
dc | A daala_comment structure. |
void daala_comment_clear | ( | daala_comment * | dc | ) |
Free resources allocated for metadata.
dc | A daala_comment structure. |
double daala_granule_time | ( | void * | encdec, |
int64_t | granpos | ||
) |
Converts a granule position to an absolute time in seconds.
The granule position is interpreted in the context of a given daala_enc_ctx or daala_dec_ctx handle (either will suffice).
encdec | A previously allocated daala_enc_ctx or daala_dec_ctx handle. |
granpos | The granule position to convert. |
-1 | The given granule position was invalid (i.e. negative). |
int daala_packet_isheader | ( | daala_packet * | dpkt | ) |
Determines whether a Daala packet is a header or not.
This function does no verification beyond checking the packet type bit, so it should not be used for bitstream identification. Use daala_decode_headerin() for that.
dpkt | A daala_packet structure. |
1 | The packet is a header packet. |
0 | The packet is a video data packet. |
int daala_packet_iskeyframe | ( | daala_packet * | dpkt | ) |
Determines whether a Daala packet is a key frame or not.
This function does no verfication beyond checking the packet type and key frame bits, so it should not be used for bitstream identification. Feed the packet to an actual decoder for that.
dpkt | A daala_packet structure. |
1 | The packet contains a key frame. |
0 | The packet contains a delta frame. |