Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

mpegdata.h

00001 // mpegdata.h : Defination of constants and data types
00002 //
00003 // most global data types and constants used in MPEG system and layer
00004 // are defined in this file.
00005 //
00006 //*****************************************************************************
00007 // 
00008 //                  MPEG Developing Classes
00009 //
00010 // Copyright (C) 1998, Vision and Neural Networks Laboratory, Computer Science 
00011 // Department, Wayne State University, All Rights Reserved; 
00012 //
00013 //                  Disclaimer of Warranty
00014 //
00015 // MPEG Developing Classes, both binary and source (hereafter, Software)
00016 // is copyrighted by Vision and Neural Networks Laboratory, Computer Science 
00017 // Department, Wayne State University (WSU), and ownership remains with WSU.
00018 //
00019 // Permission is hereby granted, free of charge, to any person obtaining
00020 // a copy of this software and associated documentation files to use, copy,
00021 // and distribute the software, provided that no charge is associated with 
00022 // such copies and that the copyright notice and this statement appears on 
00023 // all copies.
00024 //
00025 // THE SOFTWARE IS AVAILABLE TO THE USER ON AN "AS IS" BASIS, WITHOUT WARRANTY
00026 // OF ANY KIND, EITHER EXPRESS OR IMPLIED, INCLUDING, WITHOUT LIMITATION, THE 
00027 // IMPLIED WARRANTIES OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE.
00028 // IN NO EVENT SHALL THE COPYRIGHT-HOLDER BE LIABLE FOR ANY CLAIMS, DAMAGES, OR
00029 // OTHER LIABILITIES OF ANY KIND WHATSOEVER ARISING FROM, OUT OF OR IN CONNECTION
00030 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. THIS 
00031 // DISCLAIMAER OF WARRANTY EXTENDS TO THE USER OF THIS SOFTWARE. ALSO THE WSU 
00032 // DOES NOT REPRESENT OR WARRANT THAT THE SOFTWARE FURNISHED HEREUNDER ARE FREE OF
00033 // INFRINGMENT OF ANY THIRD-PARTY PATENTS.
00034 //
00035 // Many patents of MPEG-1 and MPEG-2 are general enough such that commercial
00036 // implementations, including shareware, are unavoidable subject to royalty fees to
00037 // patent holders, regardless of implementation design.
00038 //
00039 //
00040 // Vision and Neural Networks Laboratory,
00041 // Computer Science Department,
00042 // Wayne State University,
00043 // Detroit, MI 48202.
00044 // Dongge Li(dil@cs.wayne.edu) and Ishwar K. Sethi(sethi@cs.wayne.edu).
00045 //
00047 
00048 #if !defined MPEGDATA_H
00049 #define MPEGDATA_H
00050 
00051 #include "datatype.h"
00052 
00053 
00054 // system layer data types and constants;
00055 const BYTE MAX_STREAM_NUM=51;  //not count reserved_id
00056 const BYTE MAX_VIDEOCH_NUM=16;
00057 const BYTE MAX_AUDIOCH_NUM=32;
00058 const BYTE MAX_PADCH_NUM=1;
00059 const BYTE MAX_PRIVATECH_NUM=2;
00060 const BYTE MAX_RESERVECH_NUM=17;
00061 
00062 const BYTE MAX_LAYER_NUM=2;
00063 enum LAYERTYPE {BASELAYER, ENHANLAYER};
00064 
00065 enum VIDEOCHNUM {VIDEOCH0,VIDEOCH1,VIDEOCH2,VIDEOCH3,VIDEOCH4,VIDEOCH5,VIDEOCH6,
00066                 VIDEOCH7,VIDEOCH8,VIDEOCH9,VIDEOCH10,VIDEOCH11,VIDEOCH12,
00067                 VIDEOCH13,VIDEOCH14,VIDEOCH15};
00068 const BYTE VIDEO_STREAM_ID[16]= {0xe0, 0xe1, 0xe2, 0xe3, 0xe4, 0xe5, 0xe6,
00069                             0xe7, 0xe8, 0xe9, 0xea, 0xeb, 0xec, 0xed,
00070                             0xee, 0xef};
00071 enum AUDIOCHNUM {AUDIOCH0,AUDIOCH1,AUDIOCH2,AUDIOCH3,AUDIOCH4,AUDIOCH5,AUDIOCH6,
00072                 AUDIOCH7,AUDIOCH8,AUDIOCH9,AUDIOCH10,AUDIOCH11,AUDIOCH12,AUDIOCH13,
00073                 AUDIOCH14,AUDIOCH15,AUDIOCH16,AUDIOCH17,AUDIOCH18,AUDIOCH19,AUDIOCH20,
00074                 AUDIOCH21,AUDIOCH22,AUDIOCH23,AUDIOCH24,AUDIOCH25,AUDIOCH26,AUDIOCH27,
00075                 AUDIOCH28,AUDIOCH29,AUDIOCH30,AUDIOCH31};
00076 const BYTE AUDIO_STREAM_ID[32]= {0xc0, 0xc1, 0xc2, 0xc3, 0xc4, 0xc5, 0xc6,
00077                                 0xc7, 0xc8, 0xc9, 0xca, 0xcb, 0xcc, 0xcd,
00078                                 0xce, 0xcf, 0xd0, 0xd1, 0xd2, 0xd3, 0xd4,
00079                                 0xd5, 0xd6, 0xd7, 0xd8, 0xd9, 0xda, 0xdb, 
00080                                 0xdc, 0xdd, 0xde, 0xdf};
00081 enum PRIVATECHNUM {PRIVATECH1,PRIVATECH2};
00082 enum PADCHNUM {PADCH0};
00083 enum RESERVECHNUM {RESERVESTR,RESERVECH0,RESERVECH1,RESERVECH2,RESERVECH3,RESERVECH4,
00084                 RESERVECH5,RESERVECH6,RESERVECH7,RESERVECH8,RESERVECH9,RESERVECH10,
00085                 RESERVECH11,RESERVECH12,RESERVECH13,RESERVECH14,RESERVECH15};
00086 
00087 typedef struct pack_header_tag
00088 {
00089     BYTE nHighSystemClockReference;
00090     DWORD dwLowSystemClockReference;
00091     DWORD dwMuxRate;
00092 } PACKHEADER;
00093 
00094 typedef struct packet_header_tag
00095 {
00096     BYTE nStreamID;
00097     WORD wPacketLength;
00098     DWORD dwSTDBufferSize;
00099     DWORD dwPresentationTimeStampH;
00100     DWORD dwPresentationTimeStampL;
00101     DWORD dwDecodingTimeStampH;
00102     DWORD dwDecodingTimeStampL;
00103     WORD wPacketHeaderLength;   // not in the ISO/IEC 13818
00104 } PACKETHEADER;
00105 
00106 typedef struct system_header_tag
00107 {
00108     WORD wHeaderLength;
00109     DWORD dwRateBound;
00110     BYTE nAudioBound;
00111     bool bFixedFlag;
00112     bool bCSPCFlag;
00113     bool bSystemAudioLockFlag;
00114     bool bSystemVideoLockFlag;
00115     BYTE nVideoBound;
00116     BYTE nStreamID[MAX_STREAM_NUM];
00117     bool bSTDBufferBoundScale[MAX_STREAM_NUM+2];//two extra space for 0xB8, 0xB9, to apply to all audio ,video
00118     WORD wSTDBufferSizeBound[MAX_STREAM_NUM+2];
00119     BYTE nUsedIDNum; // not in standard;
00120 } SYSTEMHEADER;
00121 
00122 
00123 // data types and constants defined in ISO 13818;
00124 const DWORD PICTURE_START_CODE=0x100;
00125 const DWORD SLICE_START_CODE_MIN=0x101;
00126 const DWORD SLICE_START_CODE_MAX=0x1AF;
00127 const DWORD USER_DATA_START_CODE=0x1B2;
00128 const DWORD SEQUENCE_HEADER_CODE=0x1B3;
00129 const DWORD SEQUENCE_ERROR_CODE=0x1B4;
00130 const DWORD EXTENSION_START_CODE=0x1B5;
00131 const DWORD SEQUENCE_END_CODE=0x1B7;
00132 const DWORD GROUP_START_CODE=0x1B8;
00133 // system code IDs;
00134 const DWORD SYSTEM_START_CODE_MIN=0x1B9;
00135 const DWORD SYSTEM_START_CODE_MAX=0x1FF;
00136 const DWORD ISO_END_CODE=0x1B9;
00137 const DWORD PACK_START_CODE=0x1BA;
00138 const DWORD SYSTEM_START_CODE=0x1BB;
00139 // extension start code IDs;
00140 const BYTE SEQUENCE_EXTENSION_ID=1;
00141 const BYTE SEQUENCE_DISPLAY_EXTENSION_ID=2;
00142 const BYTE QUANT_MATRIX_EXTENSION_ID=3;
00143 const BYTE COPYRIGHT_EXTENSION_ID=4;
00144 const BYTE SEQUENCE_SCALABLE_EXTENSION_ID=5;
00145 const BYTE PICTURE_DISPLAY_EXTENSION_ID=7;
00146 const BYTE PICTURE_CODING_EXTENSION_ID=8;
00147 const BYTE PICTURE_SPATIAL_SCALABLE_EXTENSION_ID=9;
00148 const BYTE PICTURE_TEMPORAL_SCALABLE_EXTENSION_ID=10;
00149 // other IDs;
00150 const DWORD VIDEO_ELEMENTARY_STREAMID=0x1e0; // ID of video channel 0;
00151 
00152 #endif  //MPEGDATA_H

Generated on Tue Feb 3 14:18:44 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001