daala  0.0-1185-g52bbd43-dirty
Experimental Daala video codec API reference.
daaladec.h
Go to the documentation of this file.
1 /*Daala video codec
2 Copyright (c) 2006-2013 Daala project contributors. All rights reserved.
3 
4 Redistribution and use in source and binary forms, with or without
5 modification, 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 
14 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS “AS IS”
15 AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16 IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
17 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
18 FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19 DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
20 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
21 CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
22 OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
23 OF 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 # include <ogg/ogg.h>
31 
32 # if defined(__cplusplus)
33 extern "C" {
34 # endif
35 # if OD_GNUC_PREREQ(4, 0, 0)
36 # pragma GCC visibility push(default)
37 # endif
38 
39 #define OD_DECCTL_SET_BSIZE_BUFFER (7001)
40 #define OD_DECCTL_SET_FLAGS_BUFFER (7003)
41 #define OD_DECCTL_SET_MV_BUFFER (7005)
42 
46 #define OD_DECCTL_SET_MC_IMG (7007)
47 #define OD_DECCTL_GET_ACCOUNTING (7009)
48 #define OD_DECCTL_SET_ACCOUNTING_ENABLED (7011)
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;
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;
82 
83 typedef struct {
87  int nb_syms;
91 
92 
116 
156  daala_comment *dc, daala_setup_info **ds, const ogg_packet *op);
157 
165  const daala_setup_info *setup);
181  int req, void *buf, size_t buf_sz);
190  const ogg_packet *op);
203 
204 # if OD_GNUC_PREREQ(4, 0, 0)
205 # pragma GCC visibility pop
206 # endif
207 # if defined(__cplusplus)
208 }
209 # endif
210 
211 #endif
The comment information.
Definition: codec.h:225
Representation of an image or video frame.
Definition: codec.h:162
unsigned char level
For layers 0-3, 0 means 4x4, 1, means 8x8, and so on.
Definition: daaladec.h:66
Definition: daaladec.h:83
void daala_setup_free(daala_setup_info *setup)
Releases all storage used for the decoder setup information.
The shared libdaala C API.
int daala_decode_packet_in(daala_dec_ctx *dec, od_img *img, const ogg_packet *op)
Retrieves decoded video data frames.
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
unsigned char id
Integer id in the dictionary.
Definition: daaladec.h:68
int daala_decode_header_in(daala_info *info, daala_comment *dc, daala_setup_info **ds, const ogg_packet *op)
Parses the header packets from an Ogg Daala stream.
od_acct_symbol * syms
All recorded symbols decoded.
Definition: daaladec.h:85
void daala_decode_free(daala_dec_ctx *dec)
Frees an allocated decoder instance.
struct daala_dec_ctx daala_dec_ctx
The decoder context.
Definition: daaladec.h:100
struct daala_setup_info daala_setup_info
Setup information.
Definition: daaladec.h:106
daala_dec_ctx * daala_decode_alloc(const daala_info *info, const daala_setup_info *setup)
Allocates a decoder instance.
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 bits_q3
Number of bits in units of 1/8 bit.
Definition: daaladec.h:70
Configuration parameters for a codec instance.
Definition: codec.h:180
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_accounting_dict dict
Dictionary for translating strings into id.
Definition: daaladec.h:89
int nb_syms
Number of symbols actually recorded.
Definition: daaladec.h:87
Definition: daaladec.h:54
int daala_decode_ctl(daala_dec_ctx *dec, int req, void *buf, size_t buf_sz)
Decoder control function.
Dictionary for translating strings into id.
Definition: daaladec.h:78