49 |
*/ |
*/ |
50 |
|
|
51 |
#define XVID_MAKE_VERSION(a,b,c) ((((a)&0xff)<<16) | (((b)&0xff)<<8) | ((c)&0xff)) |
#define XVID_MAKE_VERSION(a,b,c) ((((a)&0xff)<<16) | (((b)&0xff)<<8) | ((c)&0xff)) |
52 |
#define XVID_VERSION_MAJOR(a) (((a)>>16) & 0xff) |
#define XVID_VERSION_MAJOR(a) ((char)(((a)>>16) & 0xff)) |
53 |
#define XVID_VERSION_MINOR(a) (((a)>> 8) & 0xff) |
#define XVID_VERSION_MINOR(a) ((char)(((a)>> 8) & 0xff)) |
54 |
#define XVID_VERSION_PATCH(a) (((a)>> 0) & 0xff) |
#define XVID_VERSION_PATCH(a) ((char)(((a)>> 0) & 0xff)) |
55 |
|
|
56 |
#define XVID_MAKE_API(a,b) ((((a)&0xff)<<16) | (((b)&0xff)<<0)) |
#define XVID_MAKE_API(a,b) ((((a)&0xff)<<16) | (((b)&0xff)<<0)) |
57 |
#define XVID_API_MAJOR(a) (((a)>>16) & 0xff) |
#define XVID_API_MAJOR(a) (((a)>>16) & 0xff) |
73 |
* doesnt hurt but not increasing it could cause difficulty for decoders in the |
* doesnt hurt but not increasing it could cause difficulty for decoders in the |
74 |
* future |
* future |
75 |
*/ |
*/ |
76 |
#define XVID_BS_VERSION "0016" |
#define XVID_BS_VERSION "0020" |
77 |
|
|
78 |
|
|
79 |
/***************************************************************************** |
/***************************************************************************** |
138 |
#define XVID_PROFILE_AS_L4 0xf4 |
#define XVID_PROFILE_AS_L4 0xf4 |
139 |
|
|
140 |
/* aspect ratios */ |
/* aspect ratios */ |
141 |
#define XVID_PAR_11_VGA 1 /* 1:1 vga (square) */ |
#define XVID_PAR_11_VGA 1 /* 1:1 vga (square), default if AR is not precised (ie: ==0) */ |
142 |
#define XVID_PAR_43_PAL 2 /* 4:3 pal (12:11 625-line) */ |
#define XVID_PAR_43_PAL 2 /* 4:3 pal (12:11 625-line) */ |
143 |
#define XVID_PAR_43_NTSC 3 /* 4:3 ntsc (10:11 525-line) */ |
#define XVID_PAR_43_NTSC 3 /* 4:3 ntsc (10:11 525-line) */ |
144 |
#define XVID_PAR_169_PAL 4 /* 16:9 pal (16:11 625-line) */ |
#define XVID_PAR_169_PAL 4 /* 16:9 pal (16:11 625-line) */ |
159 |
* xvid_global() |
* xvid_global() |
160 |
****************************************************************************/ |
****************************************************************************/ |
161 |
|
|
162 |
/* cpu_flags definitions */ |
/* cpu_flags definitions (make sure to sync this with cpuid.asm for ia32) */ |
163 |
|
|
164 |
#define XVID_CPU_FORCE (1<<31) /* force passed cpu flags */ |
#define XVID_CPU_FORCE (1<<31) /* force passed cpu flags */ |
165 |
#define XVID_CPU_ASM (1<< 7) /* native assembly */ |
#define XVID_CPU_ASM (1<< 7) /* native assembly */ |
188 |
/* XVID_GBL_INIT param1 */ |
/* XVID_GBL_INIT param1 */ |
189 |
typedef struct { |
typedef struct { |
190 |
int version; |
int version; |
191 |
int cpu_flags; /* [in:opt] zero = autodetect cpu; XVID_CPU_FORCE|{cpu features} = force cpu features */ |
unsigned int cpu_flags; /* [in:opt] zero = autodetect cpu; XVID_CPU_FORCE|{cpu features} = force cpu features */ |
192 |
int debug; /* [in:opt] debug level */ |
int debug; /* [in:opt] debug level */ |
193 |
} xvid_gbl_init_t; |
} xvid_gbl_init_t; |
194 |
|
|
198 |
int version; |
int version; |
199 |
int actual_version; /* [out] returns the actual xvidcore version */ |
int actual_version; /* [out] returns the actual xvidcore version */ |
200 |
const char * build; /* [out] if !null, points to description of this xvid core build */ |
const char * build; /* [out] if !null, points to description of this xvid core build */ |
201 |
int cpu_flags; /* [out] detected cpu features */ |
unsigned int cpu_flags; /* [out] detected cpu features */ |
202 |
int num_threads; /* [out] detected number of cpus/threads */ |
int num_threads; /* [out] detected number of cpus/threads */ |
203 |
} xvid_gbl_info_t; |
} xvid_gbl_info_t; |
204 |
|
|
217 |
#define XVID_GBL_INIT 0 /* initialize xvidcore; must be called before using xvid_decore, or xvid_encore) */ |
#define XVID_GBL_INIT 0 /* initialize xvidcore; must be called before using xvid_decore, or xvid_encore) */ |
218 |
#define XVID_GBL_INFO 1 /* return some info about xvidcore, and the host computer */ |
#define XVID_GBL_INFO 1 /* return some info about xvidcore, and the host computer */ |
219 |
#define XVID_GBL_CONVERT 2 /* colorspace conversion utility */ |
#define XVID_GBL_CONVERT 2 /* colorspace conversion utility */ |
|
#define XVID_GBL_TEST 3 /* testing.. */ |
|
220 |
|
|
221 |
int xvid_global(void *handle, int opt, void *param1, void *param2); |
int xvid_global(void *handle, int opt, void *param1, void *param2); |
222 |
|
|
530 |
/* only valid for vol_flags|=XVID_VOL_REDUCED_ENABLED */ |
/* only valid for vol_flags|=XVID_VOL_REDUCED_ENABLED */ |
531 |
#define XVID_VOP_REDUCED (1<<11) /* reduced resolution vop */ |
#define XVID_VOP_REDUCED (1<<11) /* reduced resolution vop */ |
532 |
|
|
533 |
|
#define XVID_VOP_FAST_MODEDECISION_RD (1<< 12) /* use simplified R-D mode decision */ |
534 |
|
|
535 |
|
|
536 |
|
|
550 |
#define XVID_ME_CHROMA_BVOP (1<<13) /* also use chroma for B_VOP ME */ |
#define XVID_ME_CHROMA_BVOP (1<<13) /* also use chroma for B_VOP ME */ |
551 |
|
|
552 |
/* Motion search using DCT. use XVID_VOP_MODEDECISION_BITS to enable */ |
/* Motion search using DCT. use XVID_VOP_MODEDECISION_BITS to enable */ |
553 |
#define XVID_ME_HALFPELREFINE16_RD (1<<14) /* perform DCT-based halfpel refinement */ |
#define XVID_ME_HALFPELREFINE16_RD (1<<14) /* perform RD-based halfpel refinement */ |
554 |
#define XVID_ME_HALFPELREFINE8_RD (1<<15) /* perform DCT-based halfpel refinement for 8x8 mode */ |
#define XVID_ME_HALFPELREFINE8_RD (1<<15) /* perform RD-based halfpel refinement for 8x8 mode */ |
555 |
#define XVID_ME_QUARTERPELREFINE16_RD (1<<16) /* perform DCT-based qpel refinement */ |
#define XVID_ME_QUARTERPELREFINE16_RD (1<<16) /* perform RD-based qpel refinement */ |
556 |
#define XVID_ME_QUARTERPELREFINE8_RD (1<<17) /* perform DCT-based qpel refinement for 8x8 mode */ |
#define XVID_ME_QUARTERPELREFINE8_RD (1<<17) /* perform RD-based qpel refinement for 8x8 mode */ |
557 |
#define XVID_ME_EXTSEARCH_RD (1<<18) /* perform DCT-based search using square pattern enable XVID_ME_EXTSEARCH8 to do this in 8x8 search as well */ |
#define XVID_ME_EXTSEARCH_RD (1<<18) /* perform RD-based search using square pattern enable XVID_ME_EXTSEARCH8 to do this in 8x8 search as well */ |
558 |
#define XVID_ME_CHECKPREDICTION_RD (1<<19) /* always check vector equal to prediction */ |
#define XVID_ME_CHECKPREDICTION_RD (1<<19) /* always check vector equal to prediction */ |
559 |
|
|
560 |
#define XVID_ME_UNRESTRICTED16 (1<<20) /* unrestricted ME, not implemented */ |
#define XVID_ME_UNRESTRICTED16 (1<<20) /* unrestricted ME, not implemented */ |
562 |
#define XVID_ME_UNRESTRICTED8 (1<<22) /* unrestricted ME, not implemented */ |
#define XVID_ME_UNRESTRICTED8 (1<<22) /* unrestricted ME, not implemented */ |
563 |
#define XVID_ME_OVERLAPPING8 (1<<23) /* overlapping ME, not implemented */ |
#define XVID_ME_OVERLAPPING8 (1<<23) /* overlapping ME, not implemented */ |
564 |
|
|
565 |
|
#define XVID_ME_DETECT_STATIC_MOTION (1<<24) /* speed-up ME by detecting stationary scenes */ |
566 |
|
#define XVID_ME_FASTREFINE16 (1<<25) /* use low-complexity refinement functions */ |
567 |
|
|
568 |
/* XVID_ENC_CREATE param1 */ |
/* XVID_ENC_CREATE param1 */ |
569 |
typedef struct { |
typedef struct { |