Dirac - A Video Codec

Created by the British Broadcasting Corporation.


dirac_types.h
Go to the documentation of this file.
1 /* ***** BEGIN LICENSE BLOCK *****
2 *
3 * $Id: dirac_types.h,v 1.12 2008/11/18 23:25:54 asuraparaju Exp $ $Name: Dirac_1_0_2 $
4 *
5 * Version: MPL 1.1/GPL 2.0/LGPL 2.1
6 *
7 * The contents of this file are subject to the Mozilla Public License
8 * Version 1.1 (the "License"); you may not use this file except in compliance
9 * with the License. You may obtain a copy of the License at
10 * http://www.mozilla.org/MPL/
11 *
12 * Software distributed under the License is distributed on an "AS IS" basis,
13 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for
14 * the specific language governing rights and limitations under the License.
15 *
16 * The Original Code is BBC Research and Development code.
17 *
18 * The Initial Developer of the Original Code is the British Broadcasting
19 * Corporation.
20 * Portions created by the Initial Developer are Copyright (C) 2004.
21 * All Rights Reserved.
22 *
23 * Contributor(s): Anuradha Suraparaju (Original Author)
24 * Andrew Kennedy
25 *
26 * Alternatively, the contents of this file may be used under the terms of
27 * the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser
28 * Public License Version 2.1 (the "LGPL"), in which case the provisions of
29 * the GPL or the LGPL are applicable instead of those above. If you wish to
30 * allow use of your version of this file only under the terms of the either
31 * the GPL or LGPL and not to allow others to use your version of this file
32 * under the MPL, indicate your decision by deleting the provisions above
33 * and replace them with the notice and other provisions required by the GPL
34 * or LGPL. If you do not delete the provisions above, a recipient may use
35 * your version of this file under the terms of any one of the MPL, the GPL
36 * or the LGPL.
37 * ***** END LICENSE BLOCK ***** */
38 
39 #ifndef _DIRAC_TYPES_H
40 #define _DIRAC_TYPES_H
41 
43 
48 #ifdef __cplusplus
49 extern "C" {
50 #endif
51 
52 #if defined(WIN32) && defined(_WINDLL)
53 #define DllExport __declspec( dllexport )
54 #else
55 #define DllExport
56 #endif
57 
58 /*
59 * Major version corresponds to major version of the software.
60 * Minor version corresponds to minor version of the software. Bump
61 * this up by one whenever there are major feature changes to the software.
62 * Patch version corresponds to changes in the API. It should be
63 * bumped up by 1 for every committed change to the API
64 */
65 #define DIRAC_RESEARCH_MAJOR_VERSION 1 /* 0..255 */
66 #define DIRAC_RESEARCH_MINOR_VERSION 0 /* 0..255 */
67 #define DIRAC_RESEARCH_PATCH_VERSION 2 /* 0..255 */
68 
69 #define DIRAC_RESEARCH_VERSION(X, Y, Z) \
70  (((X)<<16) + ((Y)<<8) + (Z))
71 
72 #define DIRAC_RESEARCH_CURVERSION \
73  DIRAC_RESEARCH_VERSION(DIRAC_RESEARCH_MAJOR_VERSION, \
74  DIRAC_RESEARCH_MINOR_VERSION, \
75  DIRAC_RESEARCH_PATCH_VERSION)
76 
77 #define DIRAC_RESEARCH_VERSION_ATLEAST(X, Y, Z) \
78  (DIRAC_RESEARCH_CURVERSION >= DIRAC_RESEARCH_VERSION(X, Y, Z))
79 
80 /*
81 * Some basic enumeration types used by end user encoder and decoder ...//
82 */
87 
88 typedef struct
89 {
90  int numerator;
93 
96 
98 typedef struct
99 {
101  unsigned int major_ver;
103  unsigned int minor_ver;
105  unsigned int profile;
107  unsigned int level;
109 
110 typedef struct
111 {
112  unsigned int width;
113  unsigned int height;
114  unsigned int left_offset;
115  unsigned int top_offset;
117 
118 typedef struct
119 {
120  unsigned int luma_offset;
121  unsigned int luma_excursion;
122  unsigned int chroma_offset;
123  unsigned int chroma_excursion;
125 
126 typedef struct
127 {
128  float kr;
129  float kb;
131 
134 
135 typedef struct
136 {
137  dirac_col_primaries_t col_primary;
139  dirac_transfer_func_t trans_func;
141 
143 typedef struct
144 {
146  unsigned int width;
148  unsigned int height;
150  dirac_chroma_t chroma;
152  unsigned int chroma_width;
154  unsigned int chroma_height;
156  unsigned int source_sampling;
160  dirac_frame_rate_t frame_rate;
162  dirac_pix_asr_t pix_asr;
163  /* clean area*/
165  /* signal range*/
167  /* colour specification*/
169 
171 
173 typedef struct
174 {
176  dirac_picture_type_t ptype;
178  dirac_reference_type_t rtype;
180  int pnum;
182 
183 
186 typedef struct
187 {
189  unsigned char *buf[3];
191  void *id;
193 
194 #ifdef __cplusplus
195 }
196 #endif
197 
198 #endif
TransferFunction
Definition: common_types.h:141
dirac_rational_t dirac_frame_rate_t
Definition: dirac_types.h:94
dirac_col_primaries_t col_primary
Definition: dirac_types.h:137
Definition: dirac_types.h:98
unsigned int left_offset
Definition: dirac_types.h:114
Definition: dirac_types.h:110
ReferenceType dirac_reference_type_t
Definition: dirac_types.h:85
unsigned int profile
Profile.
Definition: dirac_types.h:105
int denominator
Definition: dirac_types.h:91
Definition: dirac_types.h:118
ColourPrimaries
Definition: common_types.h:124
unsigned int width
Definition: dirac_types.h:112
dirac_colour_spec_t colour_spec
Definition: dirac_types.h:168
unsigned int chroma_excursion
Definition: dirac_types.h:123
ReferenceType
Definition: common_types.h:92
unsigned int height
Definition: dirac_types.h:113
PictureType dirac_picture_type_t
Definition: dirac_types.h:84
unsigned int chroma_height
Definition: dirac_types.h:154
ColourPrimaries dirac_col_primaries_t
Definition: dirac_types.h:132
dirac_pix_asr_t pix_asr
Definition: dirac_types.h:162
unsigned int chroma_width
Definition: dirac_types.h:152
float kb
Definition: dirac_types.h:129
ChromaFormat
Definition: common_types.h:58
dirac_transfer_func_t trans_func
Definition: dirac_types.h:139
unsigned int luma_excursion
Definition: dirac_types.h:121
dirac_frame_rate_t frame_rate
Definition: dirac_types.h:160
Definition: dirac_types.h:88
TransferFunction dirac_transfer_func_t
Definition: dirac_types.h:133
int pnum
Definition: dirac_types.h:180
unsigned int chroma_offset
Definition: dirac_types.h:122
Definition: dirac_types.h:135
unsigned int source_sampling
Definition: dirac_types.h:156
dirac_chroma_t chroma
Definition: dirac_types.h:150
unsigned int width
Definition: dirac_types.h:146
dirac_signal_range_t signal_range
Definition: dirac_types.h:166
dirac_picture_type_t ptype
Definition: dirac_types.h:176
WltFilter dirac_wlt_filter_t
Definition: dirac_types.h:86
dirac_col_matrix_t col_matrix
Definition: dirac_types.h:138
unsigned int top_offset
Definition: dirac_types.h:115
int numerator
Definition: dirac_types.h:90
Definition: dirac_types.h:186
float kr
Definition: dirac_types.h:128
unsigned int major_ver
Major version.
Definition: dirac_types.h:101
unsigned int height
Definition: dirac_types.h:148
Definition: dirac_types.h:173
ChromaFormat dirac_chroma_t
Definition: dirac_types.h:83
Definition: dirac_types.h:126
int topfieldfirst
Definition: dirac_types.h:158
void * id
Definition: dirac_types.h:191
dirac_rational_t dirac_pix_asr_t
Definition: dirac_types.h:95
unsigned int minor_ver
Minor version.
Definition: dirac_types.h:103
dirac_reference_type_t rtype
Definition: dirac_types.h:178
WltFilter
Definition: common_types.h:61
PictureType
Definition: common_types.h:86
dirac_clean_area_t clean_area
Definition: dirac_types.h:164
unsigned int luma_offset
Definition: dirac_types.h:120
Definition: dirac_types.h:143
unsigned int level
level
Definition: dirac_types.h:107

© 2004 British Broadcasting Corporation. Dirac code licensed under the Mozilla Public License (MPL) Version 1.1.
HTML documentation generated by Dimitri van Heesch's excellent Doxygen tool.