1 /* mpeg2dec.h, MPEG specific defines */
3 /* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */
6 * Disclaimer of Warranty
8 * These software programs are available to the user without any license fee or
9 * royalty on an "as is" basis. The MPEG Software Simulation Group disclaims
10 * any and all warranties, whether express, implied, or statuary, including any
11 * implied warranties or merchantability or of fitness for a particular
12 * purpose. In no event shall the copyright-holder be liable for any
13 * incidental, punitive, or consequential damages of any kind whatsoever
14 * arising from the use of these programs.
16 * This disclaimer of warranty extends to the user of these programs and user's
17 * customers, employees, agents, transferees, successors, and assigns.
19 * The MPEG Software Simulation Group does not represent or warrant that the
20 * programs furnished hereunder are free of infringement of any third-party
23 * Commercial implementations of MPEG-1 and MPEG-2 video, including shareware,
24 * are subject to royalty fees to patent holders. Many of these patents are
25 * general enough such that they are unavoidable regardless of implementation
32 #define PICTURE_START_CODE 0x100
33 #define SLICE_START_CODE_MIN 0x101
34 #define SLICE_START_CODE_MAX 0x1AF
35 #define USER_DATA_START_CODE 0x1B2
36 #define SEQUENCE_HEADER_CODE 0x1B3
37 #define SEQUENCE_ERROR_CODE 0x1B4
38 #define EXTENSION_START_CODE 0x1B5
39 #define SEQUENCE_END_CODE 0x1B7
40 #define GROUP_START_CODE 0x1B8
41 #define SYSTEM_START_CODE_MIN 0x1B9
42 #define SYSTEM_START_CODE_MAX 0x1FF
44 #define ISO_END_CODE 0x1B9
45 #define PACK_START_CODE 0x1BA
46 #define SYSTEM_START_CODE 0x1BB
48 #define VIDEO_ELEMENTARY_STREAM 0x1e0
57 /* picture coding type */
63 /* picture structure */
65 #define BOTTOM_FIELD 2
66 #define FRAME_PICTURE 3
69 #define MACROBLOCK_INTRA 1
70 #define MACROBLOCK_PATTERN 2
71 #define MACROBLOCK_MOTION_BACKWARD 4
72 #define MACROBLOCK_MOTION_FORWARD 8
73 #define MACROBLOCK_QUANT 16
74 #define SPATIAL_TEMPORAL_WEIGHT_CODE_FLAG 32
75 #define PERMITTED_SPATIAL_TEMPORAL_WEIGHT_CLASS 64
93 /* extension start code IDs */
95 #define SEQUENCE_EXTENSION_ID 1
96 #define SEQUENCE_DISPLAY_EXTENSION_ID 2
97 #define QUANT_MATRIX_EXTENSION_ID 3
98 #define COPYRIGHT_EXTENSION_ID 4
99 #define SEQUENCE_SCALABLE_EXTENSION_ID 5
100 #define PICTURE_DISPLAY_EXTENSION_ID 7
101 #define PICTURE_CODING_EXTENSION_ID 8
102 #define PICTURE_SPATIAL_SCALABLE_EXTENSION_ID 9
103 #define PICTURE_TEMPORAL_SCALABLE_EXTENSION_ID 10
107 #define PROFILE_422 (128+5)
110 /* Layers: used by Verbose_Flag, Verifier_Flag, Stats_Flag, and Trace_Flag */
112 #define SEQUENCE_LAYER 1
113 #define PICTURE_LAYER 2
114 #define SLICE_LAYER 3
115 #define MACROBLOCK_LAYER 4
116 #define BLOCK_LAYER 5
117 #define EVENT_LAYER 6
122 #define FILENAME_LENGTH 256
131 #include <sys/types.h>
132 #if defined(_MSC_VER) || defined(__BORLANDC__)
154 int my_printf(const char *format, ...);
155 int my_fprintf(const char *format, ...);
156 int my_sprintf(char *str, const char *format, ...);
157 void my_exit(int status);
158 int my_fopenr(const char *path, const char *mode, istream *os);
159 int my_fopen(const char *path, const char *mode, ostream *os);
160 int my_fseek(ostream *stream, long offset, int whence);
161 int my_fseekr(istream *stream, long offset, int whence);
162 size_t my_fread(void *ptr, size_t size, size_t nmemb, istream *stream);
163 size_t my_fwrite(const void *ptr, size_t size, size_t nmemb, ostream *stream);
164 int my_fclose(ostream *fp);
165 int my_fcloser(istream *fp);