[cvs] / xvidcore / src / xvid.h Repository:
ViewVC logotype

Diff of /xvidcore/src/xvid.h

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.27.2.30, Sat Aug 2 15:08:35 2003 UTC revision 1.27.2.52, Fri Dec 12 14:16:40 2003 UTC
# Line 49  Line 49 
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)
58  #define XVID_API_MINOR(a)        (((a)>> 0) & 0xff)  #define XVID_API_MINOR(a)        (((a)>> 0) & 0xff)
59    
60  #define XVID_VERSION             XVID_MAKE_VERSION(1,-127,0)  #define XVID_VERSION             XVID_MAKE_VERSION(1,0,-127)
61  #define XVID_API                 XVID_MAKE_API(4, 0)  #define XVID_API                 XVID_MAKE_API(4, 0)
62    
63  #define XVID_UNSTABLE  #define XVID_UNSTABLE
# Line 73  Line 73 
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 "0024"
77    
78    
79  /*****************************************************************************  /*****************************************************************************
# Line 96  Line 96 
96    
97  /* colorspace values */  /* colorspace values */
98    
99  #define XVID_CSP_USER     (1<< 0) /* 4:2:0 planar */  #define XVID_CSP_USER     (1<< 0) /* 4:2:0 planar (==I420, except for pointers/strides) */
100  #define XVID_CSP_I420     (1<< 1) /* 4:2:0 packed(planar win32) */  #define XVID_CSP_I420     (1<< 1) /* 4:2:0 planar */
101  #define XVID_CSP_YV12     (1<< 2) /* 4:2:0 packed(planar win32) */  #define XVID_CSP_YV12     (1<< 2) /* 4:2:0 planar */
102  #define XVID_CSP_YUY2     (1<< 3) /* 4:2:2 packed */  #define XVID_CSP_YUY2     (1<< 3) /* 4:2:2 packed */
103  #define XVID_CSP_UYVY     (1<< 4) /* 4:2:2 packed */  #define XVID_CSP_UYVY     (1<< 4) /* 4:2:2 packed */
104  #define XVID_CSP_YVYU     (1<< 5) /* 4:2:2 packed */  #define XVID_CSP_YVYU     (1<< 5) /* 4:2:2 packed */
# Line 138  Line 138 
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 supplied PAR is not a valid value */
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) */
# Line 159  Line 159 
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 */
# Line 188  Line 188 
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    
# Line 198  Line 198 
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    
# Line 217  Line 217 
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    
# Line 247  Line 246 
246  /* general flags */  /* general flags */
247  #define XVID_LOWDELAY      (1<<0) /* lowdelay mode  */  #define XVID_LOWDELAY      (1<<0) /* lowdelay mode  */
248  #define XVID_DISCONTINUITY (1<<1) /* indicates break in stream */  #define XVID_DISCONTINUITY (1<<1) /* indicates break in stream */
249    #define XVID_DEBLOCKY      (1<<2) /* perform luma deblocking */
250    #define XVID_DEBLOCKUV     (1<<3) /* perform chroma deblocking */
251    
252  typedef struct {  typedef struct {
253          int version;          int version;
# Line 278  Line 279 
279                          int general;        /* [out] flags */                          int general;        /* [out] flags */
280                          int width;          /* [out] width */                          int width;          /* [out] width */
281                          int height;         /* [out] height */                          int height;         /* [out] height */
282                          int par;            /* [out] picture aspect ratio (refer to XVID_PAR_xxx above) */                          int par;            /* [out] pixel aspect ratio (refer to XVID_PAR_xxx above) */
283                          int par_width;      /* [out] aspect ratio width */                          int par_width;      /* [out] aspect ratio width  [1..255] */
284                          int par_height;     /* [out] aspect ratio height */                          int par_height;     /* [out] aspect ratio height [1..255] */
285                  } vol;                  } vol;
286          } data;          } data;
287  } xvid_dec_stats_t;  } xvid_dec_stats_t;
# Line 314  Line 315 
315  #define XVID_PLG_DESTROY (1<<1)  #define XVID_PLG_DESTROY (1<<1)
316  #define XVID_PLG_INFO    (1<<2)  #define XVID_PLG_INFO    (1<<2)
317  #define XVID_PLG_BEFORE  (1<<3)  #define XVID_PLG_BEFORE  (1<<3)
318  #define XVID_PLG_AFTER   (1<<4)  #define XVID_PLG_FRAME   (1<<4)
319    #define XVID_PLG_AFTER   (1<<5)
320    
321  /* xvid_plg_info_t.flags */  /* xvid_plg_info_t.flags */
322  #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 */
# Line 393  Line 395 
395          int sse_y;              /* [out] Y plane's sse */          int sse_y;              /* [out] Y plane's sse */
396          int sse_u;              /* [out] U plane's sse */          int sse_u;              /* [out] U plane's sse */
397          int sse_v;              /* [out] V plane's sse */          int sse_v;              /* [out] V plane's sse */
398            int bquant_ratio;       /* [in] */
399            int bquant_offset;      /* [in] */
400  } xvid_plg_data_t;  } xvid_plg_data_t;
401    
402    
# Line 465  Line 469 
469          char * filename;              /* [in] first pass stats filename */          char * filename;              /* [in] first pass stats filename */
470    
471          int keyframe_boost;           /* [in] keyframe boost percentage: [0..100] */          int keyframe_boost;           /* [in] keyframe boost percentage: [0..100] */
         int payback_method;           /* [in] Payback method: see XVID_PAYBACK flags */  
         int bitrate_payback_delay;    /* [in] Payback delay expressed in number of frames */  
472          int curve_compression_high;   /* [in] percentage of compression performed on the high part of the curve (above average) */          int curve_compression_high;   /* [in] percentage of compression performed on the high part of the curve (above average) */
473          int curve_compression_low;    /* [in] percentage of compression performed on the low  part of the curve (below average) */          int curve_compression_low;    /* [in] percentage of compression performed on the low  part of the curve (below average) */
474          int max_overflow_improvement; /* [in] */          int overflow_control_strength;/* [in] Payback delay expressed in number of frames */
475          int max_overflow_degradation; /* [in] */          int max_overflow_improvement; /* [in] percentage of allowed range for a frame that gets bigger because of overflow bonus */
476            int max_overflow_degradation; /* [in] percentage of allowed range for a frame that gets smaller because of overflow penalty */
477          int kftreshold;               /* [in] */  
478          int kfreduction;              /* [in] */          int kfreduction;              /* [in] maximum bitrate reduction applied to an iframe under the kfthreshold distance limit */
479          int min_key_interval;         /* [in] Minimum interval of frames between two IFrames */          int kfthreshold;              /* [in] if an iframe is closer to the next iframe than this distance, a quantity of bits
480                                                                       *      is substracted from its bit allocation. The reduction is computed as multiples of
481                                                                       *      kfreduction/kthreshold. It reaches kfreduction when the distance == kfthreshold,
482                                                                       *      0 for 1<distance<kfthreshold */
483    
484          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 */
485  }xvid_plugin_2pass2_t;  }xvid_plugin_2pass2_t;
# Line 531  Line 536 
536  /* only valid for vol_flags|=XVID_VOL_REDUCED_ENABLED */  /* only valid for vol_flags|=XVID_VOL_REDUCED_ENABLED */
537  #define XVID_VOP_REDUCED         (1<<11) /* reduced resolution vop */  #define XVID_VOP_REDUCED         (1<<11) /* reduced resolution vop */
538    
539    #define XVID_VOP_FAST_MODEDECISION_RD (1<< 12) /* use simplified R-D mode decision */
540    
541    
542    
# Line 550  Line 556 
556  #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 */
557    
558  /* Motion search using DCT. use XVID_VOP_MODEDECISION_BITS to enable */  /* Motion search using DCT. use XVID_VOP_MODEDECISION_BITS to enable */
559  #define XVID_ME_HALFPELREFINE16_RD    (1<<14) /* perform DCT-based halfpel refinement */  #define XVID_ME_HALFPELREFINE16_RD    (1<<14) /* perform RD-based halfpel refinement */
560  #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 */
561  #define XVID_ME_QUARTERPELREFINE16_RD (1<<16) /* perform DCT-based qpel refinement */  #define XVID_ME_QUARTERPELREFINE16_RD (1<<16) /* perform RD-based qpel refinement */
562  #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 */
563  #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 */
564  #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 */
565    
566  #define XVID_ME_UNRESTRICTED16        (1<<20) /* unrestricted ME, not implemented */  #define XVID_ME_UNRESTRICTED16        (1<<20) /* unrestricted ME, not implemented */
# Line 562  Line 568 
568  #define XVID_ME_UNRESTRICTED8         (1<<22) /* unrestricted ME, not implemented */  #define XVID_ME_UNRESTRICTED8         (1<<22) /* unrestricted ME, not implemented */
569  #define XVID_ME_OVERLAPPING8          (1<<23) /* overlapping ME, not implemented */  #define XVID_ME_OVERLAPPING8          (1<<23) /* overlapping ME, not implemented */
570    
571    #define XVID_ME_DETECT_STATIC_MOTION  (1<<24) /* speed-up ME by detecting stationary scenes */
572    #define XVID_ME_FASTREFINE16              (1<<25) /* use low-complexity refinement functions */
573    
574  /* XVID_ENC_CREATE param1 */  /* XVID_ENC_CREATE param1 */
575  typedef struct {  typedef struct {
# Line 615  Line 622 
622          unsigned char *quant_intra_matrix; /* [in:opt] custom intra qmatrix */          unsigned char *quant_intra_matrix; /* [in:opt] custom intra qmatrix */
623          unsigned char *quant_inter_matrix; /* [in:opt] custom inter qmatrix */          unsigned char *quant_inter_matrix; /* [in:opt] custom inter qmatrix */
624    
625          int par;                           /* [in:opt] picture aspect ratio (refer to XVID_PAR_xxx above) */          int par;                           /* [in:opt] pixel aspect ratio (refer to XVID_PAR_xxx above) */
626          int par_width;                     /* [in:opt] aspect ratio width */          int par_width;                     /* [in:opt] aspect ratio width */
627          int par_height;                    /* [in:opt] aspect ratio height */          int par_height;                    /* [in:opt] aspect ratio height */
628          /* ---------------------------------------------- */          /* ---------------------------------------------- */

Legend:
Removed from v.1.27.2.30  
changed lines
  Added in v.1.27.2.52

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4