daala  unknown
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 
31 # if defined(__cplusplus)
32 extern "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)
41 
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;
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 
100 typedef struct daala_dec_ctx daala_dec_ctx;
106 typedef struct daala_setup_info daala_setup_info;
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
daala_dec_ctx
struct daala_dec_ctx daala_dec_ctx
The decoder context.
Definition: daaladec.h:100
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_accounting
Definition: daaladec.h:83
daala_decode_create
daala_dec_ctx * daala_decode_create(const daala_info *info, const daala_setup_info *setup)
Allocates a decoder instance.
od_acct_symbol::level
unsigned char level
For layers 0-3, 0 means 4x4, 1, means 8x8, and so on.
Definition: daaladec.h:66
codec.h
od_acct_symbol
Definition: daaladec.h:54
od_acct_symbol::id
unsigned char id
Integer id in the dictionary.
Definition: daaladec.h:68
daala_decode_img_out
int daala_decode_img_out(daala_dec_ctx *dec, daala_image *img)
Outputs the next available decoded image frame.
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
daala_info
Configuration parameters for a codec instance.
Definition: codec.h:204
daala_setup_free
void daala_setup_free(daala_setup_info *setup)
Releases all storage used for the decoder setup information.
od_accounting::dict
od_accounting_dict dict
Dictionary for translating strings into id.
Definition: daaladec.h:89
daala_decode_packet_in
int daala_decode_packet_in(daala_dec_ctx *dec, const daala_packet *dp)
Retrieves decoded video data frames.
daala_decode_free
void daala_decode_free(daala_dec_ctx *dec)
Frees an allocated decoder instance.
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
daala_decode_ctl
int daala_decode_ctl(daala_dec_ctx *dec, int req, void *buf, size_t buf_sz)
Decoder control function.
od_accounting_dict
Dictionary for translating strings into id.
Definition: daaladec.h:78
daala_setup_info
struct daala_setup_info daala_setup_info
Setup information.
Definition: daaladec.h:106
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::bits_q3
unsigned char bits_q3
Number of bits in units of 1/8 bit.
Definition: daaladec.h:70
daala_image
Representation of an image or video frame.
Definition: codec.h:175
daala_comment
The comment information.
Definition: codec.h:272
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_packet
Definition: codec.h:237