daala unknown
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
54typedef 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;
72
73/* Max number of entries for symbol types in the dictionary (increase as
74 necessary). */
75#define MAX_SYMBOL_TYPES (256)
76
78typedef struct {
79 char *(str[MAX_SYMBOL_TYPES]);
80 int nb_str;
82
91
92
116
157 daala_comment *dc, daala_setup_info **ds, const daala_packet *dp);
158
166 const daala_setup_info *setup);
182 int req, void *buf, size_t buf_sz);
199
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
The shared libdaala C API.
int daala_decode_ctl(daala_dec_ctx *dec, int req, void *buf, size_t buf_sz)
Decoder control function.
daala_dec_ctx * daala_decode_create(const daala_info *info, const daala_setup_info *setup)
Allocates a decoder instance.
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.
void daala_decode_free(daala_dec_ctx *dec)
Frees an allocated decoder instance.
struct daala_setup_info daala_setup_info
Setup information.
Definition daaladec.h:106
void daala_setup_free(daala_setup_info *setup)
Releases all storage used for the decoder setup information.
int daala_decode_img_out(daala_dec_ctx *dec, daala_image *img)
Outputs the next available decoded image frame.
struct daala_dec_ctx daala_dec_ctx
The decoder context.
Definition daaladec.h:100
int daala_decode_packet_in(daala_dec_ctx *dec, const daala_packet *dp)
Retrieves decoded video data frames.
The comment information.
Definition codec.h:272
Representation of an image or video frame.
Definition codec.h:175
Configuration parameters for a codec instance.
Definition codec.h:204
Definition codec.h:237
Dictionary for translating strings into id.
Definition daaladec.h:78
Definition daaladec.h:83
od_acct_symbol * syms
All recorded symbols decoded.
Definition daaladec.h:85
int nb_syms
Number of symbols actually recorded.
Definition daaladec.h:87
od_accounting_dict dict
Dictionary for translating strings into id.
Definition daaladec.h:89
Definition daaladec.h:54
unsigned char bits_q3
Number of bits in units of 1/8 bit.
Definition daaladec.h:70
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
unsigned char level
For layers 0-3, 0 means 4x4, 1, means 8x8, and so on.
Definition daaladec.h:66
unsigned char id
Integer id in the dictionary.
Definition daaladec.h:68
unsigned char layer
layers (0..NPLANES) for color plane coefficients, or one of OD_ACCT_FRAME and OD_ACCT_MV.
Definition daaladec.h:63
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