xvid.h   xvid.h 
skipping to change at line 22 skipping to change at line 22
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY ; without even the implied warranty of * but WITHOUT ANY WARRANTY ; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program ; if not, write to the Free Software * along with this program ; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 US A
* *
* $Id: xvid.h,v 1.51.2.5 2007/06/27 18:57:42 Isibaar Exp $ * $Id: xvid.h,v 1.63.2.1 2008/11/28 18:28:08 Isibaar Exp $
* *
************************************************************************** **/ ************************************************************************** **/
#ifndef _XVID_H_ #ifndef _XVID_H_
#define _XVID_H_ #define _XVID_H_
#ifdef __cplusplus #ifdef __cplusplus
extern "C" { extern "C" {
#endif #endif
skipping to change at line 59 skipping to change at line 59
#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))
#define XVID_VERSION_MAJOR(a) ((char)(((a)>>16) & 0xff)) #define XVID_VERSION_MAJOR(a) ((char)(((a)>>16) & 0xff))
#define XVID_VERSION_MINOR(a) ((char)(((a)>> 8) & 0xff)) #define XVID_VERSION_MINOR(a) ((char)(((a)>> 8) & 0xff))
#define XVID_VERSION_PATCH(a) ((char)(((a)>> 0) & 0xff)) #define XVID_VERSION_PATCH(a) ((char)(((a)>> 0) & 0xff))
#define XVID_MAKE_API(a,b) ((((a)&0xff)<<16) | (((b)&0xff)<<0)) #define XVID_MAKE_API(a,b) ((((a)&0xff)<<16) | (((b)&0xff)<<0))
#define XVID_API_MAJOR(a) (((a)>>16) & 0xff) #define XVID_API_MAJOR(a) (((a)>>16) & 0xff)
#define XVID_API_MINOR(a) (((a)>> 0) & 0xff) #define XVID_API_MINOR(a) (((a)>> 0) & 0xff)
#define XVID_VERSION XVID_MAKE_VERSION(1,1,3) #define XVID_VERSION XVID_MAKE_VERSION(1,2,0)
#define XVID_API XVID_MAKE_API(4, 1) #define XVID_API XVID_MAKE_API(4, 2)
/* Bitstream Version /* Bitstream Version
* this will be writen into the bitstream to allow easy detection of xvid * this will be writen into the bitstream to allow easy detection of xvid
* encoder bugs in the decoder, without this it might not possible to * encoder bugs in the decoder, without this it might not possible to
* automatically distinquish between a file which has been encoded with an * automatically distinquish between a file which has been encoded with an
* old & buggy XVID from a file which has been encoded with a bugfree versi on * old & buggy XVID from a file which has been encoded with a bugfree versi on
* see the infamous interlacing bug ... * see the infamous interlacing bug ...
* *
* this MUST be increased if an encoder bug is fixed, increasing it too oft en * this MUST be increased if an encoder bug is fixed, increasing it too oft en
* 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
* future * future
*/ */
#define XVID_BS_VERSION 46 #define XVID_BS_VERSION 49
/************************************************************************** *** /************************************************************************** ***
* error codes * error codes
************************************************************************** **/ ************************************************************************** **/
/* all functions return values <0 indicate error */ /* all functions return values <0 indicate error */
#define XVID_ERR_FAIL -1 /* general fault */ #define XVID_ERR_FAIL -1 /* general fault */
#define XVID_ERR_MEMORY -2 /* memory allocation error */ #define XVID_ERR_MEMORY -2 /* memory allocation error */
#define XVID_ERR_FORMAT -3 /* file format error */ #define XVID_ERR_FORMAT -3 /* file format error */
skipping to change at line 100 skipping to change at line 100
/* colorspace values */ /* colorspace values */
#define XVID_CSP_PLANAR (1<< 0) /* 4:2:0 planar (==I420, except for point ers/strides) */ #define XVID_CSP_PLANAR (1<< 0) /* 4:2:0 planar (==I420, except for point ers/strides) */
#define XVID_CSP_USER XVID_CSP_PLANAR #define XVID_CSP_USER XVID_CSP_PLANAR
#define XVID_CSP_I420 (1<< 1) /* 4:2:0 planar */ #define XVID_CSP_I420 (1<< 1) /* 4:2:0 planar */
#define XVID_CSP_YV12 (1<< 2) /* 4:2:0 planar */ #define XVID_CSP_YV12 (1<< 2) /* 4:2:0 planar */
#define XVID_CSP_YUY2 (1<< 3) /* 4:2:2 packed */ #define XVID_CSP_YUY2 (1<< 3) /* 4:2:2 packed */
#define XVID_CSP_UYVY (1<< 4) /* 4:2:2 packed */ #define XVID_CSP_UYVY (1<< 4) /* 4:2:2 packed */
#define XVID_CSP_YVYU (1<< 5) /* 4:2:2 packed */ #define XVID_CSP_YVYU (1<< 5) /* 4:2:2 packed */
#define XVID_CSP_RGB (1<<16) /* 24-bit rgb packed */
#define XVID_CSP_BGRA (1<< 6) /* 32-bit bgra packed */ #define XVID_CSP_BGRA (1<< 6) /* 32-bit bgra packed */
#define XVID_CSP_ABGR (1<< 7) /* 32-bit abgr packed */ #define XVID_CSP_ABGR (1<< 7) /* 32-bit abgr packed */
#define XVID_CSP_RGBA (1<< 8) /* 32-bit rgba packed */ #define XVID_CSP_RGBA (1<< 8) /* 32-bit rgba packed */
#define XVID_CSP_ARGB (1<<15) /* 32-bit argb packed */ #define XVID_CSP_ARGB (1<<15) /* 32-bit argb packed */
#define XVID_CSP_BGR (1<< 9) /* 24-bit bgr packed */ #define XVID_CSP_BGR (1<< 9) /* 24-bit bgr packed */
#define XVID_CSP_RGB555 (1<<10) /* 16-bit rgb555 packed */ #define XVID_CSP_RGB555 (1<<10) /* 16-bit rgb555 packed */
#define XVID_CSP_RGB565 (1<<11) /* 16-bit rgb565 packed */ #define XVID_CSP_RGB565 (1<<11) /* 16-bit rgb565 packed */
#define XVID_CSP_SLICE (1<<12) /* decoder only: 4:2:0 planar, per slice rendering */ #define XVID_CSP_SLICE (1<<12) /* decoder only: 4:2:0 planar, per slice rendering */
#define XVID_CSP_INTERNAL (1<<13) /* decoder only: 4:2:0 planar, returns pt rs to internal buffers */ #define XVID_CSP_INTERNAL (1<<13) /* decoder only: 4:2:0 planar, returns pt rs to internal buffers */
#define XVID_CSP_NULL (1<<14) /* decoder only: dont output anything */ #define XVID_CSP_NULL (1<<14) /* decoder only: dont output anything */
skipping to change at line 166 skipping to change at line 167
/* cpu_flags definitions (make sure to sync this with cpuid.asm for ia32) * / /* cpu_flags definitions (make sure to sync this with cpuid.asm for ia32) * /
#define XVID_CPU_FORCE (1<<31) /* force passed cpu flags */ #define XVID_CPU_FORCE (1<<31) /* force passed cpu flags */
#define XVID_CPU_ASM (1<< 7) /* native assembly */ #define XVID_CPU_ASM (1<< 7) /* native assembly */
/* ARCH_IS_IA32 */ /* ARCH_IS_IA32 */
#define XVID_CPU_MMX (1<< 0) /* mmx : pentiumMMX,k6 */ #define XVID_CPU_MMX (1<< 0) /* mmx : pentiumMMX,k6 */
#define XVID_CPU_MMXEXT (1<< 1) /* mmx-ext : pentium2, athlon */ #define XVID_CPU_MMXEXT (1<< 1) /* mmx-ext : pentium2, athlon */
#define XVID_CPU_SSE (1<< 2) /* sse : pentium3, athlonXP */ #define XVID_CPU_SSE (1<< 2) /* sse : pentium3, athlonXP */
#define XVID_CPU_SSE2 (1<< 3) /* sse2 : pentium4, athlon64 */ #define XVID_CPU_SSE2 (1<< 3) /* sse2 : pentium4, athlon64 */
#define XVID_CPU_SSE3 (1<< 8) /* sse3 : pentium4, athlon64 */
#define XVID_CPU_SSE41 (1<< 9) /* sse41: penryn */
#define XVID_CPU_3DNOW (1<< 4) /* 3dnow : k6-2 */ #define XVID_CPU_3DNOW (1<< 4) /* 3dnow : k6-2 */
#define XVID_CPU_3DNOWEXT (1<< 5) /* 3dnow-ext : athlon */ #define XVID_CPU_3DNOWEXT (1<< 5) /* 3dnow-ext : athlon */
#define XVID_CPU_TSC (1<< 6) /* tsc : Pentium */ #define XVID_CPU_TSC (1<< 6) /* tsc : Pentium */
/* ARCH_IS_PPC */ /* ARCH_IS_PPC */
#define XVID_CPU_ALTIVEC (1<< 0) /* altivec */ #define XVID_CPU_ALTIVEC (1<< 0) /* altivec */
#define XVID_DEBUG_ERROR (1<< 0) #define XVID_DEBUG_ERROR (1<< 0)
#define XVID_DEBUG_STARTCODE (1<< 1) #define XVID_DEBUG_STARTCODE (1<< 1)
#define XVID_DEBUG_HEADER (1<< 2) #define XVID_DEBUG_HEADER (1<< 2)
#define XVID_DEBUG_TIMECODE (1<< 3) #define XVID_DEBUG_TIMECODE (1<< 3)
skipping to change at line 349 skipping to change at line 352
#define XVID_PLG_DESTROY (1<<1) #define XVID_PLG_DESTROY (1<<1)
#define XVID_PLG_INFO (1<<2) #define XVID_PLG_INFO (1<<2)
#define XVID_PLG_BEFORE (1<<3) #define XVID_PLG_BEFORE (1<<3)
#define XVID_PLG_FRAME (1<<4) #define XVID_PLG_FRAME (1<<4)
#define XVID_PLG_AFTER (1<<5) #define XVID_PLG_AFTER (1<<5)
/* xvid_plg_info_t.flags */ /* xvid_plg_info_t.flags */
#define XVID_REQORIGINAL (1<<0) /* plugin requires a copy of the original ( uncompressed) image */ #define XVID_REQORIGINAL (1<<0) /* plugin requires a copy of the original ( uncompressed) image */
#define XVID_REQPSNR (1<<1) /* plugin requires psnr between the uncompr essed and compressed image*/ #define XVID_REQPSNR (1<<1) /* plugin requires psnr between the uncompr essed and compressed image*/
#define XVID_REQDQUANTS (1<<2) /* plugin requires access to the dquant tab le */ #define XVID_REQDQUANTS (1<<2) /* plugin requires access to the dquant tab le */
#define XVID_REQLAMBDA (1<<3) /* plugin requires access to the lambda tab le */
typedef struct typedef struct
{ {
int version; int version;
int flags; /* [in:opt] plugin flags */ int flags; /* [in:opt] plugin flags */
} xvid_plg_info_t; } xvid_plg_info_t;
typedef struct typedef struct
{ {
int version; int version;
skipping to change at line 411 skipping to change at line 415
int type; /* [in,out] */ int type; /* [in,out] */
int quant; /* [in,out] */ int quant; /* [in,out] */
int * dquant; /* [in,out] pointer to diff quantizer ta ble */ int * dquant; /* [in,out] pointer to diff quantizer ta ble */
int dquant_stride; /* [in,out] diff quantizer stride */ int dquant_stride; /* [in,out] diff quantizer stride */
int vop_flags; /* [in,out] */ int vop_flags; /* [in,out] */
int vol_flags; /* [in,out] */ int vol_flags; /* [in,out] */
int motion_flags; /* [in,out] */ int motion_flags; /* [in,out] */
/* Lambda table for HVSPlugins */
float * lambda; /* [in,out] six floats for each macroblock.
read, multiply, write back */
/* Deprecated, use the stats field instead. /* Deprecated, use the stats field instead.
* Will disapear before 1.0 */ * Will disapear before 1.0 */
int length; /* [out] after: length of encoded frame */ int length; /* [out] after: length of encoded frame */
int kblks; /* [out] number of blocks compressed as Intr a */ int kblks; /* [out] number of blocks compressed as Intr a */
int mblks; /* [out] number of blocks compressed as Inte r */ int mblks; /* [out] number of blocks compressed as Inte r */
int ublks; /* [out] number of blocks marked not_coded * / int ublks; /* [out] number of blocks marked not_coded * /
int sse_y; /* [out] Y plane's sse */ int sse_y; /* [out] Y plane's sse */
int sse_u; /* [out] U plane's sse */ int sse_u; /* [out] U plane's sse */
int sse_v; /* [out] V plane's sse */ int sse_v; /* [out] V plane's sse */
/* End of duplicated data, kept only for binary compatibility */ /* End of duplicated data, kept only for binary compatibility */
skipping to change at line 465 skipping to change at line 472
extern xvid_plugin_func xvid_plugin_single; /* single-pass rate control * / extern xvid_plugin_func xvid_plugin_single; /* single-pass rate control * /
extern xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: fir st pass */ extern xvid_plugin_func xvid_plugin_2pass1; /* two-pass rate control: fir st pass */
extern xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: sec ond pass */ extern xvid_plugin_func xvid_plugin_2pass2; /* two-pass rate control: sec ond pass */
extern xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */ extern xvid_plugin_func xvid_plugin_lumimasking; /* lumimasking */
extern xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdo ut */ extern xvid_plugin_func xvid_plugin_psnr; /* write psnr values to stdo ut */
extern xvid_plugin_func xvid_plugin_dump; /* dump before and after yuv pgms */ extern xvid_plugin_func xvid_plugin_dump; /* dump before and after yuv pgms */
extern xvid_plugin_func xvid_plugin_ssim; /*write ssim values to stdou
t*/
/* single pass rate control /* single pass rate control
* CBR and Constant quantizer modes */ * CBR and Constant quantizer modes */
typedef struct typedef struct
{ {
int version; int version;
int bitrate; /* [in] bits per second */ int bitrate; /* [in] bits per second */
int reaction_delay_factor; /* [in] */ int reaction_delay_factor; /* [in] */
int averaging_period; /* [in] */ int averaging_period; /* [in] */
int buffer; /* [in] */ int buffer; /* [in] */
skipping to change at line 515 skipping to change at line 524
int container_frame_overhead; /* [in] How many bytes the controller has to compensate per frame due to container format overhead */ int container_frame_overhead; /* [in] How many bytes the controller has to compensate per frame due to container format overhead */
/* ------- v1.1.x ------- */ /* ------- v1.1.x ------- */
int vbv_size; /* [in] buffer size (bits) */ int vbv_size; /* [in] buffer size (bits) */
int vbv_initial; /* [in] initial buffer occupancy (bits ) */ int vbv_initial; /* [in] initial buffer occupancy (bits ) */
int vbv_maxrate; /* [in] max processing bitrate (bits p er second) */ int vbv_maxrate; /* [in] max processing bitrate (bits p er second) */
int vbv_peakrate; /* [in:opt] max average bitrate over 3 seconds (bits per second) */ int vbv_peakrate; /* [in:opt] max average bitrate over 3 seconds (bits per second) */
}xvid_plugin_2pass2_t; }xvid_plugin_2pass2_t;
typedef struct{
/*stat output*/
int b_printstat;
char* stat_path;
/*visualize*/
int b_visualize;
/*accuracy 0 very accurate 4 very fast*/
int acc;
int cpu_flags; /* XVID_CPU_XXX flags */
} xvid_plugin_ssim_t;
/************************************************************************** *** /************************************************************************** ***
* ENCODER API * ENCODER API
************************************************************************** **/ ************************************************************************** **/
/*------------------------------------------------------------------------- --- /*------------------------------------------------------------------------- ---
* Encoder operations * Encoder operations
*------------------------------------------------------------------------- -*/ *------------------------------------------------------------------------- -*/
#define XVID_ENC_CREATE 0 /* create encoder instance; returns 0 on success */ #define XVID_ENC_CREATE 0 /* create encoder instance; returns 0 on success */
#define XVID_ENC_DESTROY 1 /* destroy encoder instance; returns 0 on succes s */ #define XVID_ENC_DESTROY 1 /* destroy encoder instance; returns 0 on succes s */
 End of changes. 9 change blocks. 
4 lines changed or deleted 30 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/