1 /* mpeg2syntaxcodes.h - Identifying bit-patterns and codes for MPEG2 syntax */ 2 3 #ifndef _MPEG2SYNTAXCODES_H 4 #define _MPEG2SYNTAXCODES_H 5 /* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */ 6 7 /* 8 * Disclaimer of Warranty 9 * 10 * These software programs are available to the user without any license fee or 11 * royalty on an "as is" basis. The MPEG Software Simulation Group disclaims 12 * any and all warranties, whether express, implied, or statuary, including any 13 * implied warranties or merchantability or of fitness for a particular 14 * purpose. In no event shall the copyright-holder be liable for any 15 * incidental, punitive, or consequential damages of any kind whatsoever 16 * arising from the use of these programs. 17 * 18 * This disclaimer of warranty extends to the user of these programs and user's 19 * customers, employees, agents, transferees, successors, and assigns. 20 * 21 * The MPEG Software Simulation Group does not represent or warrant that the 22 * programs furnished hereunder are free of infringement of any third-party 23 * patents. 24 * 25 * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware, 26 * are subject to royalty fees to patent holders. Many of these patents are 27 * general enough such that they are unavoidable regardless of implementation 28 * design. 29 * 30 */ 31 32 #define PICTURE_START_CODE 0x100L 33 #define SLICE_MIN_START 0x101L 34 #define SLICE_MAX_START 0x1AFL 35 #define USER_START_CODE 0x1B2L 36 #define SEQ_START_CODE 0x1B3L 37 #define EXT_START_CODE 0x1B5L 38 #define SEQ_END_CODE 0x1B7L 39 #define GOP_START_CODE 0x1B8L 40 #define ISO_END_CODE 0x1B9L 41 #define PACK_START_CODE 0x1BAL 42 #define SYSTEM_START_CODE 0x1BBL 43 #define FFFF_VBV_DELAY 0xFFFF 44 45 /* picture coding type */ 46 enum PICTURE_CODING 47 { 48 I_TYPE=1, 49 P_TYPE=2, 50 B_TYPE=3, 51 NUM_PICT_TYPES 52 }; 53 54 #define FIRST_PICT_TYPE I_TYPE 55 #define LAST_PICT_TYPE B_TYPE 56 57 58 /* picture structure */ 59 enum PICTURE_STRUCT 60 { 61 TOP_FIELD=1, 62 BOTTOM_FIELD=2, 63 FRAME_PICTURE=3 64 }; 65 66 /* macroblock type */ 67 enum MACROBLOCK_CODING_BITS 68 { 69 MB_INTRA=1, 70 MB_PATTERN=2, 71 MB_BACKWARD=4, 72 MB_FORWARD=8, 73 MB_QUANT=16 74 }; 75 76 /* motion_type */ 77 78 #define MC_FIELD 1 79 #define MC_FRAME 2 80 #define MC_16X8 2 81 #define MC_DMV 3 82 83 /* mv_format */ 84 #define MV_FIELD 0 85 #define MV_FRAME 1 86 87 /* chroma_format */ 88 #define CHROMA420 1 89 //#define CHROMA422 2 90 //#define CHROMA444 3 91 92 /* extension start code IDs */ 93 94 #define SEQ_ID 1 95 #define DISP_ID 2 96 #define QUANT_ID 3 97 #define SEQSCAL_ID 5 98 #define PANSCAN_ID 7 99 #define CODING_ID 8 100 #define SPATSCAL_ID 9 101 #define TEMPSCAL_ID 10 102 103 104 105 #endif 106