--- trunk/xvidcore/src/xvid.h 2002/06/20 14:05:58 229 +++ trunk/xvidcore/src/xvid.h 2002/09/04 22:12:21 411 @@ -1,43 +1,40 @@ /***************************************************************************** -* -* XVID MPEG-4 VIDEO CODEC -* - XviD Main header file - -* -* This program is free software ; you can redistribute it and/or modify -* it under the terms of the GNU General Public License as published by -* the Free Software Foundation ; either version 2 of the License, or -* (at your option) any later version. -* -* This program is distributed in the hope that it will be useful, -* but WITHOUT ANY WARRANTY ; without even the implied warranty of -* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -* GNU General Public License for more details. -* -* You should have received a copy of the GNU General Public License -* along with this program ; if not, write to the Free Software -* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -* -*****************************************************************************/ -/***************************************************************************** -* -* 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 ?) -* -* $Id: xvid.h,v 1.12 2002-06-20 14:05:57 suxen_drol Exp $ -* -*****************************************************************************/ - + * + * XVID MPEG-4 VIDEO CODEC + * - XviD Main header file - + * + * This program is an implementation of a part of one or more MPEG-4 + * Video tools as specified in ISO/IEC 14496-2 standard. Those intending + * to use this software module in hardware or software products are + * advised that its use may infringe existing patents or copyrights, and + * any such use would be at such party's own risk. The original + * developer of this software module and his/her company, and subsequent + * editors and their companies, will have no liability for use of this + * software or modifications or derivatives thereof. + * + * This program is free software ; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation ; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY ; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program ; if not, write to the Free Software + * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + * + * $Id: xvid.h,v 1.18 2002-09-04 22:12:21 edgomez Exp $ + * + *****************************************************************************/ #ifndef _XVID_H_ #define _XVID_H_ #ifdef __cplusplus -* $Id: xvid.h,v 1.12 2002-06-20 14:05:57 suxen_drol Exp $ +extern "C" { #endif /***************************************************************************** @@ -73,6 +70,7 @@ /***************************************************************************** + * Initialization constants ****************************************************************************/ /* CPU flags for XVID_INIT_PARAM.cpu_flags */ @@ -97,6 +95,7 @@ ****************************************************************************/ typedef struct + { int cpu_flags; int api_version; int core_build; @@ -153,6 +152,14 @@ int stride_y, stride_u,stride_v; } XVID_DEC_PICTURE; + +/***************************************************************************** + * Decoder entry point + ****************************************************************************/ + +/* decoder options */ +#define XVID_DEC_DECODE 0 +#define XVID_DEC_CREATE 1 #define XVID_DEC_DESTROY 2 int xvid_decore(void *handle, @@ -174,6 +181,11 @@ #define XVID_VALID_FLAGS 0x80000000 #define XVID_CUSTOM_QMATRIX 0x00000004 /* use custom quant matrix */ +#define XVID_H263QUANT 0x00000010 +#define XVID_MPEGQUANT 0x00000020 +#define XVID_HALFPEL 0x00000040 /* use halfpel interpolation */ +#define XVID_ADAPTIVEQUANT 0x00000080 +#define XVID_LUMIMASKING 0x00000100 #define XVID_LATEINTRA 0x00000200 #define XVID_INTERLACING 0x00000400 /* enable interlaced encoding */ @@ -199,6 +211,10 @@ /* Flags for XVID_ENC_FRAME.motion */ #define PMV_ADVANCEDDIAMOND8 0x00004000 #define PMV_ADVANCEDDIAMOND16 0x00008000 + +#define PMV_HALFPELDIAMOND16 0x00010000 +#define PMV_HALFPELREFINE16 0x00020000 +#define PMV_EXTSEARCH16 0x00040000 /* extend PMV by more searches */ #define PMV_EARLYSTOP16 0x00080000 #define PMV_QUICKSTOP16 0x00100000 /* like early, but without any more refinement */ #define PMV_UNRESTRICTED16 0x00200000 /* unrestricted ME, not implemented */ @@ -239,14 +255,18 @@ int bquant_ratio; /* bframe quantizer multipier (percentage). * used only when bquant < 1 * eg. 200 = x2 multiplier + * quant = ((past_quant + future_quant) * bquant_ratio)/200 + */ + int frame_drop_ratio; /* frame dropping: 0=drop none... 100=drop all */ #endif - int packed; /* enable packed mode */ + void *handle; /* [out] encoder instance handle */ } XVID_ENC_PARAM; typedef struct { int x; + int y; } VECTOR;