[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.1, Sat Feb 22 08:49:44 2003 UTC revision 1.27.2.5, Thu Mar 13 11:07:20 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_PLG_ORIGINAL   1  /* plugin requires a copy of the original (uncompressed) image */
275    
276    
277    typedef struct
278    {
279        int version;
280        int flags;              /* plugin flags */
281    } xvid_plg_info_t;
282    
283    
284    typedef struct
285    {
286        int version;
287    
288        int width, height;
289            int fincr, fbase;
290    
291        void * param;
292    } xvid_plg_create_t;
293    
294    
295    typedef struct
296    {
297        int version;
298    
299        xvid_image_t reference;
300        xvid_image_t current;
301        xvid_image_t original;          /* after: points the original (uncompressed) copy of the current frame */
302    
303        int type;                   /* [in,out] */
304        int quant;                  /* [in,out] */
305    
306        unsigned char * qscale;     /* [in,out]     pointer to quantizer table */
307            int qscale_stride;              /* [in,out]     quantizer scale stride */
308    
309        int vop_flags;          /* [in,out] */
310        int vol_flags;          /* [in,out] */
311        int motion_flags;       /* [in,out] */
312    
313        int length;                 /* [out] after: length of encoded frame */
314        int kblks, mblks, ublks;    /* [out] after: */
315    } xvid_plg_data_t;
316    
317    
318    /*****************************************************************************
319      xvid plugin system -- external
320    
321      the application passes xvid an array of "xvid_plugin_t" at XVID_ENC_CREATE. the array
322      indicates the plugin function pointer and plugin-specific data.
323      xvidcore handles the rest. example:
324    
325      xvid_enc_create_t create;
326      xvid_enc_plugin_t plugins[2];
327    
328      plugins[0].func = xvid_psnr_func;
329      plugins[0].param = NULL;
330      plugins[1].func = xvid_cbr_func;
331      plugins[1].param = &cbr_data;
332    
333      create.num_plugins = 2;
334      create.plugins = plugins;
335    
336     ****************************************************************************/
337    
338    typedef int (xvid_plugin_func)(void * handle, int opt, void * param1, void * param2);
339    
340    typedef struct
341    {
342        xvid_plugin_func * func;
343        void * param;
344    } xvid_enc_plugin_t;
345    
346    
347    
348  /*****************************************************************************  /*****************************************************************************
349   * xvid_encore()   * xvid_encore()
# Line 356  Line 446 
446          int width;                              /* [in]         frame dimensions; width, pixel units */          int width;                              /* [in]         frame dimensions; width, pixel units */
447          int height;                             /* [in]         frame dimensions; height, pixel units */          int height;                             /* [in]         frame dimensions; height, pixel units */
448    
449        int num_plugins;        /* [in:opt] number of plugins */
450        xvid_enc_plugin_t * plugins; /*        ^^ plugin array */
451    
452          int num_threads;                /* [in:opt]     number of threads */          int num_threads;                /* [in:opt]     number of threads */
453          int max_bframes;                /* [in:opt] max sequential bframes (0=disable bframes) */          int max_bframes;                /* [in:opt] max sequential bframes (0=disable bframes) */
454    
# Line 449  Line 542 
542  /* XVID_ENC_ENCODE param2 (optional)  /* XVID_ENC_ENCODE param2 (optional)
543          xvid_enc_stats_t describes individual frame details          xvid_enc_stats_t describes individual frame details
544    
         when bframes>0, you must pass _two_ of these to xvid_encore()  
         ie. xstats[2]; xvid_encore(..., xstats)  
545          coding_type==XVID_TYPE_NOTHING if the stats are not given          coding_type==XVID_TYPE_NOTHING if the stats are not given
546  */  */
547  typedef struct {  typedef struct {
# Line 475  Line 566 
566  }  }
567  #endif  #endif
568    
569    
570  #endif  #endif

Legend:
Removed from v.1.27.2.1  
changed lines
  Added in v.1.27.2.5

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