104 |
#define XVID_HALFPEL 0x00000040 /* use halfpel interpolation */ |
#define XVID_HALFPEL 0x00000040 /* use halfpel interpolation */ |
105 |
#define XVID_ADAPTIVEQUANT 0x00000080 |
#define XVID_ADAPTIVEQUANT 0x00000080 |
106 |
#define XVID_LUMIMASKING 0x00000100 |
#define XVID_LUMIMASKING 0x00000100 |
107 |
|
#define XVID_LATEINTRA 0x00000200 |
108 |
|
|
109 |
#define XVID_INTER4V 0x00000800 |
#define XVID_INTERLACING 0x00000400 /* enable interlaced encoding */ |
110 |
|
#define XVID_TOPFIELDFIRST 0x00000800 /* set top-field-first flag (cosmetic only) */ |
111 |
#define XVID_ME_ZERO 0x00001000 |
#define XVID_ALTERNATESCAN 0x00001000 /* ?? sets alternate vertical scan flag */ |
112 |
#define XVID_ME_LOGARITHMIC 0x00002000 |
|
113 |
#define XVID_ME_FULLSEARCH 0x00004000 |
#define XVID_HINTEDME_GET 0x00002000 /* receive mv hint data from core (1st pass) */ |
114 |
#define XVID_ME_PMVFAST 0x00008000 |
#define XVID_HINTEDME_SET 0x00004000 /* send mv hint data to core (2nd pass) */ |
115 |
|
|
116 |
|
#define XVID_INTER4V 0x00008000 |
117 |
|
|
118 |
|
#define XVID_ME_ZERO 0x00010000 |
119 |
|
#define XVID_ME_LOGARITHMIC 0x00020000 |
120 |
|
#define XVID_ME_FULLSEARCH 0x00040000 |
121 |
|
#define XVID_ME_PMVFAST 0x00080000 |
122 |
|
#define XVID_ME_EPZS 0x00100000 |
123 |
|
|
124 |
#define PMV_HALFPELDIAMOND16 0x00010000 |
#define PMV_HALFPELDIAMOND16 0x00010000 |
125 |
#define PMV_HALFPELREFINE16 0x00020000 |
#define PMV_HALFPELREFINE16 0x00020000 |
128 |
#define PMV_QUICKSTOP16 0x00100000 /* like early, but without any more refinement */ |
#define PMV_QUICKSTOP16 0x00100000 /* like early, but without any more refinement */ |
129 |
#define PMV_UNRESTRICTED16 0x00200000 /* unrestricted ME, not implemented */ |
#define PMV_UNRESTRICTED16 0x00200000 /* unrestricted ME, not implemented */ |
130 |
#define PMV_OVERLAPPING16 0x00400000 /* overlapping ME, not implemented */ |
#define PMV_OVERLAPPING16 0x00400000 /* overlapping ME, not implemented */ |
131 |
|
#define PMV_USESQUARES16 0x00800000 |
132 |
|
|
133 |
#define PMV_HALFPELDIAMOND8 0x01000000 |
#define PMV_HALFPELDIAMOND8 0x01000000 |
134 |
#define PMV_HALFPELREFINE8 0x02000000 |
#define PMV_HALFPELREFINE8 0x02000000 |
137 |
#define PMV_QUICKSTOP8 0x10000000 /* like early, but without any more refinement */ |
#define PMV_QUICKSTOP8 0x10000000 /* like early, but without any more refinement */ |
138 |
#define PMV_UNRESTRICTED8 0x20000000 /* unrestricted ME, not implemented */ |
#define PMV_UNRESTRICTED8 0x20000000 /* unrestricted ME, not implemented */ |
139 |
#define PMV_OVERLAPPING8 0x40000000 /* overlapping ME, not implemented */ |
#define PMV_OVERLAPPING8 0x40000000 /* overlapping ME, not implemented */ |
140 |
|
#define PMV_USESQUARES8 0x80000000 |
141 |
|
|
142 |
|
|
143 |
typedef struct |
typedef struct |
144 |
{ |
{ |
145 |
int width, height; |
int width, height; |
146 |
int fincr, fbase; // frame increment, fbase. each frame = "fincr/fbase" seconds |
int fincr, fbase; // frame increment, fbase. each frame = "fincr/fbase" seconds |
147 |
int bitrate; // the bitrate of the target encoded stream, in bits/second |
int rc_bitrate; // the bitrate of the target encoded stream, in bits/second |
148 |
int rc_buffersize; // the rate control buffersize / max. allowed deviation |
int rc_reaction_delay_factor; // how fast the rate control reacts - lower values are faster |
149 |
|
int rc_averaging_period; // as above |
150 |
|
int rc_buffer; // as above |
151 |
int max_quantizer; // the upper limit of the quantizer |
int max_quantizer; // the upper limit of the quantizer |
152 |
int min_quantizer; // the lower limit of the quantizer |
int min_quantizer; // the lower limit of the quantizer |
153 |
int max_key_interval; // the maximum interval between key frames |
int max_key_interval; // the maximum interval between key frames |
159 |
|
|
160 |
typedef struct |
typedef struct |
161 |
{ |
{ |
162 |
|
int x; |
163 |
|
int y; |
164 |
|
} VECTOR; |
165 |
|
|
166 |
|
typedef struct |
167 |
|
{ |
168 |
|
int mode; // macroblock mode |
169 |
|
VECTOR mvs[4]; |
170 |
|
} MVBLOCKHINT; |
171 |
|
|
172 |
|
typedef struct |
173 |
|
{ |
174 |
|
int intra; // frame intra choice |
175 |
|
int fcode; // frame fcode |
176 |
|
MVBLOCKHINT * block; // caller-allocated array of block hints (mb_width * mb_height) |
177 |
|
} MVFRAMEHINT; |
178 |
|
|
179 |
|
typedef struct |
180 |
|
{ |
181 |
|
int rawhints; // if set, use MVFRAMEHINT, else use compressed buffer |
182 |
|
|
183 |
|
MVFRAMEHINT mvhint; |
184 |
|
void * hintstream; // compressed hint buffer |
185 |
|
int hintlength; // length of buffer (bytes) |
186 |
|
} HINTINFO; |
187 |
|
|
188 |
|
typedef struct |
189 |
|
{ |
190 |
int general; // [in] general options |
int general; // [in] general options |
191 |
int motion; // [in] ME options |
int motion; // [in] ME options |
192 |
void * bitstream; // [in] bitstream ptr |
void * bitstream; // [in] bitstream ptr |
200 |
int quant; // [in] frame quantizer (vbr) |
int quant; // [in] frame quantizer (vbr) |
201 |
int intra; // [in] force intra frame (vbr only) |
int intra; // [in] force intra frame (vbr only) |
202 |
// [out] intra state |
// [out] intra state |
203 |
|
HINTINFO hint; // [in/out] mv hint information |
204 |
} XVID_ENC_FRAME; |
} XVID_ENC_FRAME; |
205 |
|
|
206 |
|
|