Created by the British Broadcasting Corporation.
00001 /* ***** BEGIN LICENSE BLOCK ***** 00002 * 00003 * $Id: dirac_types.h,v 1.12 2008/11/18 23:25:54 asuraparaju Exp $ $Name: Dirac_1_0_2 $ 00004 * 00005 * Version: MPL 1.1/GPL 2.0/LGPL 2.1 00006 * 00007 * The contents of this file are subject to the Mozilla Public License 00008 * Version 1.1 (the "License"); you may not use this file except in compliance 00009 * with the License. You may obtain a copy of the License at 00010 * http://www.mozilla.org/MPL/ 00011 * 00012 * Software distributed under the License is distributed on an "AS IS" basis, 00013 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for 00014 * the specific language governing rights and limitations under the License. 00015 * 00016 * The Original Code is BBC Research and Development code. 00017 * 00018 * The Initial Developer of the Original Code is the British Broadcasting 00019 * Corporation. 00020 * Portions created by the Initial Developer are Copyright (C) 2004. 00021 * All Rights Reserved. 00022 * 00023 * Contributor(s): Anuradha Suraparaju (Original Author) 00024 * Andrew Kennedy 00025 * 00026 * Alternatively, the contents of this file may be used under the terms of 00027 * the GNU General Public License Version 2 (the "GPL"), or the GNU Lesser 00028 * Public License Version 2.1 (the "LGPL"), in which case the provisions of 00029 * the GPL or the LGPL are applicable instead of those above. If you wish to 00030 * allow use of your version of this file only under the terms of the either 00031 * the GPL or LGPL and not to allow others to use your version of this file 00032 * under the MPL, indicate your decision by deleting the provisions above 00033 * and replace them with the notice and other provisions required by the GPL 00034 * or LGPL. If you do not delete the provisions above, a recipient may use 00035 * your version of this file under the terms of any one of the MPL, the GPL 00036 * or the LGPL. 00037 * ***** END LICENSE BLOCK ***** */ 00038 00039 #ifndef _DIRAC_TYPES_H 00040 #define _DIRAC_TYPES_H 00041 00042 #include <libdirac_common/common_types.h> 00043 00048 #ifdef __cplusplus 00049 extern "C" { 00050 #endif 00051 00052 #if defined(WIN32) && defined(_WINDLL) 00053 #define DllExport __declspec( dllexport ) 00054 #else 00055 #define DllExport 00056 #endif 00057 00058 /* 00059 * Major version corresponds to major version of the software. 00060 * Minor version corresponds to minor version of the software. Bump 00061 * this up by one whenever there are major feature changes to the software. 00062 * Patch version corresponds to changes in the API. It should be 00063 * bumped up by 1 for every committed change to the API 00064 */ 00065 #define DIRAC_RESEARCH_MAJOR_VERSION 1 /* 0..255 */ 00066 #define DIRAC_RESEARCH_MINOR_VERSION 0 /* 0..255 */ 00067 #define DIRAC_RESEARCH_PATCH_VERSION 2 /* 0..255 */ 00068 00069 #define DIRAC_RESEARCH_VERSION(X, Y, Z) \ 00070 (((X)<<16) + ((Y)<<8) + (Z)) 00071 00072 #define DIRAC_RESEARCH_CURVERSION \ 00073 DIRAC_RESEARCH_VERSION(DIRAC_RESEARCH_MAJOR_VERSION, \ 00074 DIRAC_RESEARCH_MINOR_VERSION, \ 00075 DIRAC_RESEARCH_PATCH_VERSION) 00076 00077 #define DIRAC_RESEARCH_VERSION_ATLEAST(X, Y, Z) \ 00078 (DIRAC_RESEARCH_CURVERSION >= DIRAC_RESEARCH_VERSION(X, Y, Z)) 00079 00080 /* 00081 * Some basic enumeration types used by end user encoder and decoder ...// 00082 */ 00083 typedef ChromaFormat dirac_chroma_t; 00084 typedef PictureType dirac_picture_type_t; 00085 typedef ReferenceType dirac_reference_type_t; 00086 typedef WltFilter dirac_wlt_filter_t; 00087 00088 typedef struct 00089 { 00090 int numerator; 00091 int denominator; 00092 } dirac_rational_t; 00093 00094 typedef dirac_rational_t dirac_frame_rate_t; 00095 typedef dirac_rational_t dirac_pix_asr_t; 00096 00098 typedef struct 00099 { 00101 unsigned int major_ver; 00103 unsigned int minor_ver; 00105 unsigned int profile; 00107 unsigned int level; 00108 } dirac_parseparams_t; 00109 00110 typedef struct 00111 { 00112 unsigned int width; 00113 unsigned int height; 00114 unsigned int left_offset; 00115 unsigned int top_offset; 00116 } dirac_clean_area_t; 00117 00118 typedef struct 00119 { 00120 unsigned int luma_offset; 00121 unsigned int luma_excursion; 00122 unsigned int chroma_offset; 00123 unsigned int chroma_excursion; 00124 } dirac_signal_range_t; 00125 00126 typedef struct 00127 { 00128 float kr; 00129 float kb; 00130 } dirac_col_matrix_t; 00131 00132 typedef ColourPrimaries dirac_col_primaries_t; 00133 typedef TransferFunction dirac_transfer_func_t; 00134 00135 typedef struct 00136 { 00137 dirac_col_primaries_t col_primary; 00138 dirac_col_matrix_t col_matrix; 00139 dirac_transfer_func_t trans_func; 00140 } dirac_colour_spec_t; 00141 00143 typedef struct 00144 { 00146 unsigned int width; 00148 unsigned int height; 00150 dirac_chroma_t chroma; 00152 unsigned int chroma_width; 00154 unsigned int chroma_height; 00156 unsigned int source_sampling; 00158 int topfieldfirst; 00160 dirac_frame_rate_t frame_rate; 00162 dirac_pix_asr_t pix_asr; 00163 /* clean area*/ 00164 dirac_clean_area_t clean_area; 00165 /* signal range*/ 00166 dirac_signal_range_t signal_range; 00167 /* colour specification*/ 00168 dirac_colour_spec_t colour_spec; 00169 00170 } dirac_sourceparams_t; 00171 00173 typedef struct 00174 { 00176 dirac_picture_type_t ptype; 00178 dirac_reference_type_t rtype; 00180 int pnum; 00181 } dirac_picparams_t; 00182 00183 00186 typedef struct 00187 { 00189 unsigned char *buf[3]; 00191 void *id; 00192 } dirac_framebuf_t; 00193 00194 #ifdef __cplusplus 00195 } 00196 #endif 00197 00198 #endif
© 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.