--- trunk/xvidcore/src/xvid.h 2002/06/23 03:58:32 234 +++ 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.13 2002-06-23 03:58:32 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.13 2002-06-23 03:58:32 suxen_drol Exp $ +extern "C" { #endif /***************************************************************************** @@ -73,6 +70,7 @@ /***************************************************************************** + * Initialization constants ****************************************************************************/ /* CPU flags for XVID_INIT_PARAM.cpu_flags */ @@ -154,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, @@ -205,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 */ @@ -245,6 +255,9 @@ 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 void *handle; /* [out] encoder instance handle */ } @@ -253,6 +266,7 @@ typedef struct { int x; + int y; } VECTOR;