daala: daala/daaladec.h Source File

daala 0.0-1733-g24f889a-dirty Experimental Daala video codec API reference.

Loading...
Searching...
No Matches
daaladec.h
Go to the documentation of this file.
1/*Daala video codec
2Copyright (c) 2006-2013 Daala project contributors. All rights reserved.
3
4Redistribution and use in source and binary forms, with or without
5modification, are permitted provided that the following conditions are met:
6
7- Redistributions of source code must retain the above copyright notice, this
8 list of conditions and the following disclaimer.
9
10- Redistributions in binary form must reproduce the above copyright notice,
11 this list of conditions and the following disclaimer in the documentation
12 and/or other materials provided with the distribution.
13
14THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
15AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
18FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.*/
24
27#if !defined(_daala_daaladec_H)
28# define _daala_daaladec_H (1)
29# include "codec.h"
30
31# if defined(__cplusplus)
32extern "C" {
33# endif
34# if OD_GNUC_PREREQ(4, 0, 0)
35# pragma GCC visibility push(default)
36# endif
37
38#define OD_DECCTL_SET_BSIZE_BUFFER (7001)
39#define OD_DECCTL_SET_FLAGS_BUFFER (7003)
40#define OD_DECCTL_SET_MV_BUFFER (7005)
45#define OD_DECCTL_SET_MC_IMG (7007)
46#define OD_DECCTL_GET_ACCOUNTING (7009)
47#define OD_DECCTL_SET_ACCOUNTING_ENABLED (7011)
48#define OD_DECCTL_SET_DERING_BUFFER (7013)
49
50
51#define OD_ACCT_FRAME (10)
52#define OD_ACCT_MV (11)
53
54 typedef struct {
57 int16_t x;
60 int16_t y;
63 unsigned char layer;
66 unsigned char level;
68 unsigned char id;
70 unsigned char bits_q3;
71} od_acct_symbol;
72
73/* Max number of entries for symbol types in the dictionary (increase as
74 necessary). */
75#define MAX_SYMBOL_TYPES (256)
76
78 typedef struct {
79 char *(str[MAX_SYMBOL_TYPES]);
80 int nb_str;
81} od_accounting_dict;
82
83 typedef struct {
85 od_acct_symbol *syms;
87 int nb_syms;
89 od_accounting_dict dict;
90} od_accounting;
91
92
100 typedef struct daala_dec_ctx daala_dec_ctx;
106 typedef struct daala_setup_info daala_setup_info;
108
116
156 int daala_decode_header_in(daala_info *info,
157 daala_comment *dc, daala_setup_info **ds, const daala_packet *dp);
158
165 daala_dec_ctx *daala_decode_create(const daala_info *info,
166 const daala_setup_info *setup);
172 void daala_setup_free(daala_setup_info *setup);
181 int daala_decode_ctl(daala_dec_ctx *dec,
182 int req, void *buf, size_t buf_sz);
185 void daala_decode_free(daala_dec_ctx *dec);
188 int daala_decode_packet_in(daala_dec_ctx *dec, const daala_packet *dp);
198 int daala_decode_img_out(daala_dec_ctx *dec, daala_image *img);
199
201
210
212
213# if OD_GNUC_PREREQ(4, 0, 0)
214# pragma GCC visibility pop
215# endif
216# if defined(__cplusplus)
217}
218# endif
219
220#endif
codec.h
The shared libdaala C API.
daala_decode_ctl
int daala_decode_ctl(daala_dec_ctx *dec, int req, void *buf, size_t buf_sz)
Decoder control function.
daala_decode_create
daala_dec_ctx * daala_decode_create(const daala_info *info, const daala_setup_info *setup)
Allocates a decoder instance.
daala_decode_header_in
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_decode_free
void daala_decode_free(daala_dec_ctx *dec)
Frees an allocated decoder instance.
daala_setup_info
struct daala_setup_info daala_setup_info
Setup information.
Definition daaladec.h:106
daala_setup_free
void daala_setup_free(daala_setup_info *setup)
Releases all storage used for the decoder setup information.
daala_decode_img_out
int daala_decode_img_out(daala_dec_ctx *dec, daala_image *img)
Outputs the next available decoded image frame.
daala_dec_ctx
struct daala_dec_ctx daala_dec_ctx
The decoder context.
Definition daaladec.h:100
daala_decode_packet_in
int daala_decode_packet_in(daala_dec_ctx *dec, const daala_packet *dp)
Retrieves decoded video data frames.
daala_comment
The comment information.
Definition codec.h:272
daala_image
Representation of an image or video frame.
Definition codec.h:175
daala_info
Configuration parameters for a codec instance.
Definition codec.h:204
daala_packet
Definition codec.h:237
od_accounting_dict
Dictionary for translating strings into id.
Definition daaladec.h:78
od_accounting
Definition daaladec.h:83
od_accounting::syms
od_acct_symbol * syms
All recorded symbols decoded.
Definition daaladec.h:85
od_accounting::nb_syms
int nb_syms
Number of symbols actually recorded.
Definition daaladec.h:87
od_accounting::dict
od_accounting_dict dict
Dictionary for translating strings into id.
Definition daaladec.h:89
od_acct_symbol
Definition daaladec.h:54
od_acct_symbol::bits_q3
unsigned char bits_q3
Number of bits in units of 1/8 bit.
Definition daaladec.h:70
od_acct_symbol::x
int16_t x
x position in units of 4x4 luma blocks for layers 0-3, or vx for OD_ACCT_MV.
Definition daaladec.h:57
od_acct_symbol::level
unsigned char level
For layers 0-3, 0 means 4x4, 1, means 8x8, and so on.
Definition daaladec.h:66
od_acct_symbol::id
unsigned char id
Integer id in the dictionary.
Definition daaladec.h:68
od_acct_symbol::layer
unsigned char layer
layers (0..NPLANES) for color plane coefficients, or one of OD_ACCT_FRAME and OD_ACCT_MV.
Definition daaladec.h:63
od_acct_symbol::y
int16_t y
y position in units of 4x4 luma blocks for layers 0-3, or vy for OD_ACCT_MV.
Definition daaladec.h:60