r1009: Move the dependencies to newer package names
[cinelerra_cv/mob.git] / mpeg2enc / mpeg2enc.h
blobfb6624e9f7cafed3b226318f8f4a53e13e5384f5
1 /* mpg2enc.h, defines and types */
3 /* Copyright (C) 1996, MPEG Software Simulation Group. All Rights Reserved. */
5 /*
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
21 * patents.
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
26 * design.
30 #ifndef MPEG2ENC_H
31 #define MPEG2ENC_H
33 #define PICTURE_START_CODE 0x100L
34 #define SLICE_MIN_START 0x101L
35 #define SLICE_MAX_START 0x1AFL
36 #define USER_START_CODE 0x1B2L
37 #define SEQ_START_CODE 0x1B3L
38 #define EXT_START_CODE 0x1B5L
39 #define SEQ_END_CODE 0x1B7L
40 #define GOP_START_CODE 0x1B8L
41 #define ISO_END_CODE 0x1B9L
42 #define PACK_START_CODE 0x1BAL
43 #define SYSTEM_START_CODE 0x1BBL
45 /* picture coding type */
46 #define I_TYPE 1
47 #define P_TYPE 2
48 #define B_TYPE 3
49 #define D_TYPE 4
51 /* picture structure */
52 #define TOP_FIELD 1
53 #define BOTTOM_FIELD 2
54 #define FRAME_PICTURE 3
56 /* macroblock type */
57 #define MB_INTRA 1
58 #define MB_PATTERN 2
59 #define MB_BACKWARD 4
60 #define MB_FORWARD 8
61 #define MB_QUANT 16
63 /* motion_type */
64 #define MC_FIELD 1
65 #define MC_FRAME 2
66 #define MC_16X8 2
67 #define MC_DMV 3
69 /* mv_format */
70 #define MV_FIELD 0
71 #define MV_FRAME 1
73 /* chroma_format */
74 #define CHROMA420 1
75 #define CHROMA422 2
76 #define CHROMA444 3
78 /* extension start code IDs */
80 #define SEQ_ID 1
81 #define DISP_ID 2
82 #define QUANT_ID 3
83 #define SEQSCAL_ID 5
84 #define PANSCAN_ID 7
85 #define CODING_ID 8
86 #define SPATSCAL_ID 9
87 #define TEMPSCAL_ID 10
89 /* inputtype */
90 #define T_Y_U_V 0
91 #define T_YUV 1
92 #define T_PPM 2
93 #define T_QUICKTIME 3
94 #define T_MPEG 4
95 #define T_STDIN 5
96 #define T_BUFFERS 6
98 #define BUFFER_ALIGN 16
100 /* macroblock information */
101 struct mbinfo {
102 int mb_type; /* intra/forward/backward/interpolated */
103 int motion_type; /* frame/field/16x8/dual_prime */
104 int dct_type; /* field/frame DCT */
105 int mquant; /* quantization parameter */
106 int cbp; /* coded block pattern */
107 int skipped; /* skipped macroblock */
108 int MV[2][2][2]; /* motion vectors */
109 int mv_field_sel[2][2]; /* motion vertical field select */
110 int dmvector[2]; /* dual prime vectors */
111 double act; /* activity measure */
112 int i_act; /* Activity measure if intra coded (I/P-frame) */
113 int p_act; /* Activity measure for *forward* prediction (P-frame) */
114 int b_act; /* Activity measure if bi-directionally coded (B-frame) */
115 int var; /* Macroblock luminance variance (measure of activity) */
116 short (*dctblocks)[64];
119 /* motion data */
120 struct motion_data {
121 int forw_hor_f_code,forw_vert_f_code; /* vector range */
122 int sxf,syf; /* search range */
123 int back_hor_f_code,back_vert_f_code;
124 int sxb,syb;
130 #endif