[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.3, Mon Mar 10 00:43:31 2003 UTC revision 1.27.2.7, Sat Mar 15 16:04:38 2003 UTC
# Line 26  Line 26 
26  #ifndef _XVID_H_  #ifndef _XVID_H_
27  #define _XVID_H_  #define _XVID_H_
28    
29    
30  #ifdef __cplusplus  #ifdef __cplusplus
31  extern "C" {  extern "C" {
32  #endif  #endif
# Line 254  Line 255 
255  } xvid_dec_stats_t;  } xvid_dec_stats_t;
256    
257    
258    /*****************************************************************************
259      xvid plugin system -- internals
260    
261      xvidcore will call XVID_PLG_INFO and XVID_PLG_CREATE during XVID_ENC_CREATE
262      before encoding each frame xvidcore will call XVID_PLG_BEFORE
263      after encoding each frame xvidcore will call XVID_PLG_AFTER
264      xvidcore will call XVID_PLG_DESTROY during XVID_ENC_DESTROY
265     ****************************************************************************/
266    
267    #define XVID_PLG_CREATE     0
268    #define XVID_PLG_DESTROY    1
269    #define XVID_PLG_INFO       2
270    #define XVID_PLG_BEFORE     3
271    #define XVID_PLG_AFTER      4
272    
273    /* xvid_plg_info_t.flags */
274    #define XVID_REQORIGINAL    1  /* plugin requires a copy of the original (uncompressed) image */
275    #define XVID_REQPSNR        2  /* plugin requires psnr between the uncompressed and compressed image*/
276    
277    
278    typedef struct
279    {
280        int version;
281        int flags;              /* plugin flags */
282    } xvid_plg_info_t;
283    
284    
285    typedef struct
286    {
287        int version;
288    
289        int width, height;
290            int fincr, fbase;
291    
292        void * param;
293    } xvid_plg_create_t;
294    
295    
296    typedef struct
297    {
298        int version;
299    
300        int width;              /* [out] */
301        int height;             /* [out] */
302            int fincr;              /* [out] */
303        int fbase;              /* [out] */
304    
305        xvid_image_t reference; /* [out] -> [out] */
306        xvid_image_t current;   /* [out] -> [in,out] */
307        xvid_image_t original;      /* [out] after: points the original (uncompressed) copy of the current frame */
308        int frame_num;          /* [out] frame number */
309    
310        int type;               /* [in,out] */
311        int quant;              /* [in,out] */
312    
313        unsigned char * qscale;     /* [in,out]     pointer to quantizer table */
314            int qscale_stride;              /* [in,out]     quantizer scale stride */
315    
316        int vop_flags;          /* [in,out] */
317        int vol_flags;          /* [in,out] */
318        int motion_flags;       /* [in,out] */
319    
320        int length;                 /* [out] after: length of encoded frame */
321        int kblks, mblks, ublks;    /* [out] after: */
322        int sse_y, sse_u, sse_v;    /* [out] */
323    } xvid_plg_data_t;
324    
325    
326    /*****************************************************************************
327      xvid plugin system -- external
328    
329      the application passes xvid an array of "xvid_plugin_t" at XVID_ENC_CREATE. the array
330      indicates the plugin function pointer and plugin-specific data.
331      xvidcore handles the rest. example:
332    
333      xvid_enc_create_t create;
334      xvid_enc_plugin_t plugins[2];
335    
336      plugins[0].func = xvid_psnr_func;
337      plugins[0].param = NULL;
338      plugins[1].func = xvid_cbr_func;
339      plugins[1].param = &cbr_data;
340    
341      create.num_plugins = 2;
342      create.plugins = plugins;
343    
344     ****************************************************************************/
345    
346    typedef int (xvid_plugin_func)(void * handle, int opt, void * param1, void * param2);
347    
348    typedef struct
349    {
350        xvid_plugin_func * func;
351        void * param;
352    } xvid_enc_plugin_t;
353    
354    xvid_plugin_func xvid_plugin_psnr;  /* stdout psnr calculator */
355    xvid_plugin_func xvid_plugin_dump;  /* dump before and after yuvpgms */
356    
357    
358    
359  /*****************************************************************************  /*****************************************************************************
360   * xvid_encore()   * xvid_encore()
# Line 283  Line 384 
384  /* vol-based flags */  /* vol-based flags */
385  typedef enum {  typedef enum {
386      XVID_MPEGQUANT          = 0x00000001,      XVID_MPEGQUANT          = 0x00000001,
387          XVID_H263QUANT          = 0x00000002,      XVID_EXTRASTATS         = 0x00000002,
388      XVID_QUARTERPEL             = 0x00000004,   /* enable quarterpel: frames will encoded as quarterpel */      XVID_QUARTERPEL             = 0x00000004,   /* enable quarterpel: frames will encoded as quarterpel */
389      XVID_GMC                        = 0x00000008,       /* enable GMC; frames will be checked for gmc suitability */      XVID_GMC                        = 0x00000008,       /* enable GMC; frames will be checked for gmc suitability */
390      XVID_REDUCED_ENABLE     = 0x00000010,       /* enable reduced resolution vops: frames will be checked for rrv suitability */      XVID_REDUCED_ENABLE     = 0x00000010,       /* enable reduced resolution vops: frames will be checked for rrv suitability */
# Line 294  Line 395 
395  /* vop-based flags */  /* vop-based flags */
396  typedef enum {  typedef enum {
397      XVID_DEBUG              = 0x00000001,      XVID_DEBUG              = 0x00000001,
398      XVID_EXTRASTATS         = 0x00000002,  
399      XVID_HALFPEL            = 0x00000004, /* use halfpel interpolation */      XVID_HALFPEL            = 0x00000004, /* use halfpel interpolation */
400      XVID_INTER4V            = 0x00000008,      XVID_INTER4V            = 0x00000008,
401      XVID_LUMIMASKING        = 0x00000010,      XVID_LUMIMASKING        = 0x00000010,
# Line 357  Line 458 
458          int width;                              /* [in]         frame dimensions; width, pixel units */          int width;                              /* [in]         frame dimensions; width, pixel units */
459          int height;                             /* [in]         frame dimensions; height, pixel units */          int height;                             /* [in]         frame dimensions; height, pixel units */
460    
461        int num_plugins;        /* [in:opt] number of plugins */
462        xvid_enc_plugin_t * plugins; /*        ^^ plugin array */
463    
464          int num_threads;                /* [in:opt]     number of threads */          int num_threads;                /* [in:opt]     number of threads */
465          int max_bframes;                /* [in:opt] max sequential bframes (0=disable bframes) */          int max_bframes;                /* [in:opt] max sequential bframes (0=disable bframes) */
466    
# Line 474  Line 578 
578  }  }
579  #endif  #endif
580    
581    
582  #endif  #endif

Legend:
Removed from v.1.27.2.3  
changed lines
  Added in v.1.27.2.7

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