--- trunk/xvidcore/src/xvid.h 2010/11/28 15:19:07 1909 +++ trunk/xvidcore/src/xvid.h 2011/11/04 15:24:39 2054 @@ -3,7 +3,7 @@ * XVID MPEG-4 VIDEO CODEC * - Xvid Main header file - * - * Copyright(C) 2001-2010 Peter Ross + * Copyright(C) 2001-2011 Peter Ross * * 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 @@ -19,19 +19,32 @@ * 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.71 2010-11-28 15:18:21 Isibaar Exp $ + * $Id$ * ****************************************************************************/ #ifndef _XVID_H_ #define _XVID_H_ - #ifdef __cplusplus extern "C" { #endif /***************************************************************************** + * function export defines + ****************************************************************************/ + +/* Attention! Work in progress. TODO: Review */ + +#ifndef XVID_IMPEXP +#define XVID_IMPEXP extern +#endif + +#ifndef XVID_CALL +#define XVID_CALL +#endif + +/***************************************************************************** * versioning ****************************************************************************/ @@ -57,8 +70,8 @@ #define XVID_API_MAJOR(a) (((a)>>16) & 0xff) #define XVID_API_MINOR(a) (((a)>> 0) & 0xff) -#define XVID_VERSION XVID_MAKE_VERSION(1,3,-127) -#define XVID_API XVID_MAKE_API(4, 3) +#define XVID_VERSION XVID_MAKE_VERSION(1,4,-127) +#define XVID_API XVID_MAKE_API(4, 4) #define XVID_UNSTABLE @@ -73,7 +86,7 @@ * doesnt hurt but not increasing it could cause difficulty for decoders in the * future */ -#define XVID_BS_VERSION 58 +#define XVID_BS_VERSION 73 /***************************************************************************** * error codes @@ -225,7 +238,7 @@ #define XVID_GBL_INFO 1 /* return some info about xvidcore, and the host computer */ #define XVID_GBL_CONVERT 2 /* colorspace conversion utility */ -extern int xvid_global(void *handle, int opt, void *param1, void *param2); +XVID_IMPEXP int XVID_CALL xvid_global(void *handle, int opt, void *param1, void *param2); /***************************************************************************** @@ -236,7 +249,7 @@ #define XVID_DEC_DESTROY 1 /* destroy decore instance: return 0 on success */ #define XVID_DEC_DECODE 2 /* decode a frame: returns number of bytes consumed >= 0 */ -extern int xvid_decore(void *handle, int opt, void *param1, void *param2); +XVID_IMPEXP int XVID_CALL xvid_decore(void *handle, int opt, void *param1, void *param2); /* XVID_DEC_CREATE param 1 image width & height as well as FourCC code may be specified @@ -246,7 +259,9 @@ int width; /* [in:opt] image width */ int height; /* [in:opt] image width */ void * handle; /* [out] decore context handle */ - int fourcc; /* [in:opt] fourcc of the video */ +/* ------- v1.3.x ------- */ + int fourcc; /* [in:opt] fourcc of the input video */ + int num_threads;/* [in:opt] number of threads to use in decoder */ } xvid_dec_create_t; @@ -473,7 +488,7 @@ ****************************************************************************/ -typedef int (xvid_plugin_func)(void * handle, int opt, void * param1, void * param2); +typedef int (XVID_CALL xvid_plugin_func)(void * handle, int opt, void * param1, void * param2); typedef struct { @@ -481,18 +496,17 @@ void * param; } xvid_enc_plugin_t; +XVID_IMPEXP xvid_plugin_func xvid_plugin_single; /* single-pass rate control */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: first pass */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: second pass */ -extern xvid_plugin_func xvid_plugin_single; /* single-pass rate control */ -extern xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: first pass */ -extern xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: second pass */ - -extern xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */ -extern xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdout */ -extern xvid_plugin_func xvid_plugin_dump; /* dump before and after yuvpgms */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdout */ +XVID_IMPEXP xvid_plugin_func xvid_plugin_dump; /* dump before and after yuvpgms */ -extern xvid_plugin_func xvid_plugin_ssim; /*write ssim values to stdout*/ -extern xvid_plugin_func xvid_plugin_psnrhvsm; /*write psnrhvsm values to stdout*/ +XVID_IMPEXP xvid_plugin_func xvid_plugin_ssim; /*write ssim values to stdout*/ +XVID_IMPEXP xvid_plugin_func xvid_plugin_psnrhvsm; /*write psnrhvsm values to stdout*/ /* single pass rate control @@ -589,7 +603,7 @@ * Encoder entry point *--------------------------------------------------------------------------*/ -extern int xvid_encore(void *handle, int opt, void *param1, void *param2); +XVID_IMPEXP int XVID_CALL xvid_encore(void *handle, int opt, void *param1, void *param2); /* Quick API reference * @@ -746,7 +760,7 @@ int num_plugins; /* [in:opt] number of plugins */ xvid_enc_plugin_t * plugins; /* ^^ plugin array */ - int num_threads; /* [in:opt] number of threads */ + int num_threads; /* [in:opt] number of threads to use in encoder */ int max_bframes; /* [in:opt] max sequential bframes (0=disable bframes) */ int global; /* [in:opt] global flags; controls encoding behavior */ @@ -772,6 +786,7 @@ /* ------- v1.3.x ------- */ int start_frame_num; /* [in:opt] frame number of start frame relative to zones definitions. allows to encode sub-sequences */ + int num_slices; /* [in:opt] number of slices to code for each frame */ } xvid_enc_create_t;