3 |
* XVID MPEG-4 VIDEO CODEC |
* XVID MPEG-4 VIDEO CODEC |
4 |
* - XviD Main header file - |
* - XviD Main header file - |
5 |
* |
* |
6 |
|
* This program is an implementation of a part of one or more MPEG-4 |
7 |
|
* Video tools as specified in ISO/IEC 14496-2 standard. Those intending |
8 |
|
* to use this software module in hardware or software products are |
9 |
|
* advised that its use may infringe existing patents or copyrights, and |
10 |
|
* any such use would be at such party's own risk. The original |
11 |
|
* developer of this software module and his/her company, and subsequent |
12 |
|
* editors and their companies, will have no liability for use of this |
13 |
|
* software or modifications or derivatives thereof. |
14 |
|
* |
15 |
* This program is free software ; you can redistribute it and/or modify |
* This program is free software ; you can redistribute it and/or modify |
16 |
* it under the terms of the GNU General Public License as published by |
* it under the terms of the GNU General Public License as published by |
17 |
* the Free Software Foundation ; either version 2 of the License, or |
* the Free Software Foundation ; either version 2 of the License, or |
26 |
* along with this program ; if not, write to the Free Software |
* along with this program ; if not, write to the Free Software |
27 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
28 |
* |
* |
|
*****************************************************************************/ |
|
|
/***************************************************************************** |
|
|
* |
|
|
* History |
|
|
* |
|
|
* - 2002/06/13 Added legal header, ANSI C comment style (only for this header |
|
|
* as it can be included in a ANSI C project). |
|
|
* |
|
|
* ToDo ? : when BFRAMES is defined, the API_VERSION should not |
|
|
* be the same (3.0 ?) |
|
|
* |
|
29 |
* $Id$ |
* $Id$ |
30 |
* |
* |
31 |
*****************************************************************************/ |
*****************************************************************************/ |
32 |
|
|
|
|
|
33 |
#ifndef _XVID_H_ |
#ifndef _XVID_H_ |
34 |
#define _XVID_H_ |
#define _XVID_H_ |
35 |
|
|
36 |
#ifdef __cplusplus |
#ifdef __cplusplus |
37 |
* $Id$ |
extern "C" { |
38 |
#endif |
#endif |
39 |
|
|
40 |
/***************************************************************************** |
/***************************************************************************** |
70 |
|
|
71 |
|
|
72 |
/***************************************************************************** |
/***************************************************************************** |
73 |
|
* Initialization constants |
74 |
****************************************************************************/ |
****************************************************************************/ |
75 |
|
|
76 |
/* CPU flags for XVID_INIT_PARAM.cpu_flags */ |
/* CPU flags for XVID_INIT_PARAM.cpu_flags */ |
95 |
****************************************************************************/ |
****************************************************************************/ |
96 |
|
|
97 |
typedef struct |
typedef struct |
98 |
|
{ |
99 |
int cpu_flags; |
int cpu_flags; |
100 |
int api_version; |
int api_version; |
101 |
int core_build; |
int core_build; |
152 |
int stride_y, stride_u,stride_v; |
int stride_y, stride_u,stride_v; |
153 |
} XVID_DEC_PICTURE; |
} XVID_DEC_PICTURE; |
154 |
|
|
155 |
|
|
156 |
|
/***************************************************************************** |
157 |
|
* Decoder entry point |
158 |
|
****************************************************************************/ |
159 |
|
|
160 |
|
/* decoder options */ |
161 |
|
#define XVID_DEC_DECODE 0 |
162 |
|
#define XVID_DEC_CREATE 1 |
163 |
#define XVID_DEC_DESTROY 2 |
#define XVID_DEC_DESTROY 2 |
164 |
|
|
165 |
int xvid_decore(void *handle, |
int xvid_decore(void *handle, |
181 |
#define XVID_VALID_FLAGS 0x80000000 |
#define XVID_VALID_FLAGS 0x80000000 |
182 |
|
|
183 |
#define XVID_CUSTOM_QMATRIX 0x00000004 /* use custom quant matrix */ |
#define XVID_CUSTOM_QMATRIX 0x00000004 /* use custom quant matrix */ |
184 |
|
#define XVID_H263QUANT 0x00000010 |
185 |
|
#define XVID_MPEGQUANT 0x00000020 |
186 |
|
#define XVID_HALFPEL 0x00000040 /* use halfpel interpolation */ |
187 |
|
#define XVID_ADAPTIVEQUANT 0x00000080 |
188 |
|
#define XVID_LUMIMASKING 0x00000100 |
189 |
#define XVID_LATEINTRA 0x00000200 |
#define XVID_LATEINTRA 0x00000200 |
190 |
|
|
191 |
#define XVID_INTERLACING 0x00000400 /* enable interlaced encoding */ |
#define XVID_INTERLACING 0x00000400 /* enable interlaced encoding */ |
211 |
/* Flags for XVID_ENC_FRAME.motion */ |
/* Flags for XVID_ENC_FRAME.motion */ |
212 |
#define PMV_ADVANCEDDIAMOND8 0x00004000 |
#define PMV_ADVANCEDDIAMOND8 0x00004000 |
213 |
#define PMV_ADVANCEDDIAMOND16 0x00008000 |
#define PMV_ADVANCEDDIAMOND16 0x00008000 |
214 |
|
|
215 |
|
#define PMV_HALFPELDIAMOND16 0x00010000 |
216 |
|
#define PMV_HALFPELREFINE16 0x00020000 |
217 |
|
#define PMV_EXTSEARCH16 0x00040000 /* extend PMV by more searches */ |
218 |
#define PMV_EARLYSTOP16 0x00080000 |
#define PMV_EARLYSTOP16 0x00080000 |
219 |
#define PMV_QUICKSTOP16 0x00100000 /* like early, but without any more refinement */ |
#define PMV_QUICKSTOP16 0x00100000 /* like early, but without any more refinement */ |
220 |
#define PMV_UNRESTRICTED16 0x00200000 /* unrestricted ME, not implemented */ |
#define PMV_UNRESTRICTED16 0x00200000 /* unrestricted ME, not implemented */ |
255 |
int bquant_ratio; /* bframe quantizer multipier (percentage). |
int bquant_ratio; /* bframe quantizer multipier (percentage). |
256 |
* used only when bquant < 1 |
* used only when bquant < 1 |
257 |
* eg. 200 = x2 multiplier |
* eg. 200 = x2 multiplier |
258 |
|
* quant = ((past_quant + future_quant) * bquant_ratio)/200 |
259 |
|
*/ |
260 |
|
int frame_drop_ratio; /* frame dropping: 0=drop none... 100=drop all */ |
261 |
#endif |
#endif |
262 |
int packed; /* enable packed mode */ |
void *handle; /* [out] encoder instance handle */ |
263 |
} |
} |
264 |
XVID_ENC_PARAM; |
XVID_ENC_PARAM; |
265 |
|
|
266 |
typedef struct |
typedef struct |
267 |
{ |
{ |
268 |
int x; |
int x; |
269 |
|
int y; |
270 |
} |
} |
271 |
VECTOR; |
VECTOR; |
272 |
|
|