[svn] / trunk / xvidcore / vfw / src / config.h Repository:
ViewVC logotype

Diff of /trunk/xvidcore/vfw/src/config.h

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

revision 1382, Mon Mar 22 22:36:25 2004 UTC revision 1915, Tue Dec 21 20:23:07 2010 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - VFW configuration header  -   *  - VFW configuration header  -
5   *   *
6   *  Copyright(C) 2002-2003 Anonymous <xvid-devel@xvid.org>   *  Copyright(C) Peter Ross <pross@xvid.org>
7   *   *
8   *  This program is free software ; you can redistribute it and/or modify   *  This program is free software ; you can redistribute it and/or modify
9   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 19  Line 19 
19   *  along with this program ; if not, write to the Free Software   *  along with this program ; if not, write to the Free Software
20   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
21   *   *
22   * $Id: config.h,v 1.2 2004-03-22 22:36:25 edgomez Exp $   * $Id: config.h,v 1.16 2010-12-21 20:23:07 Isibaar Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
26  #ifndef _CONFIG_H_  #ifndef _CONFIG_H_
27  #define _CONFIG_H_  #define _CONFIG_H_
28    
# Line 42  Line 43 
43    
44  /* min/max bitrate when not specified by profile */  /* min/max bitrate when not specified by profile */
45  #define DEFAULT_MIN_KBPS        16  #define DEFAULT_MIN_KBPS        16
46  #define DEFAULT_MAX_KBPS        10000  #define DEFAULT_MAX_KBPS        20480
47  #define DEFAULT_QUANT           400  #define DEFAULT_QUANT           400
48    
49  /* registry stuff */  /* registry stuff */
# Line 53  Line 54 
54    
55  #define XVID_BUILD              __TIME__ ", " __DATE__  #define XVID_BUILD              __TIME__ ", " __DATE__
56  #define XVID_WEBSITE    "http://www.xvid.org/"  #define XVID_WEBSITE    "http://www.xvid.org/"
57  #define XVID_SPECIAL_BUILD      "(Vanilla CVS Build)"  #define XVID_SPECIAL_BUILD      "Vanilla CVS Build"
58    
59  /* constants */  /* constants */
60  #define CONFIG_2PASS_FILE "\\video.pass"  #define CONFIG_2PASS_FILE ".\\video.pass"
61    
62  /* codec modes */  /* codec modes */
63  #define RC_MODE_1PASS             0  #define RC_MODE_1PASS             0
# Line 93  Line 94 
94          unsigned int greyscale;          unsigned int greyscale;
95          unsigned int chroma_opt;          unsigned int chroma_opt;
96          unsigned int bvop_threshold;          unsigned int bvop_threshold;
97            unsigned int cartoon_mode;
98  } zone_t;  } zone_t;
99    
100    
101    /* this structure represents a quality preset. it encapsulates
102       options from the motion and quantizer config pages. */
103    #define QUALITY_GENERAL_STRING  "General purpose"
104    #define QUALITY_USER_STRING     "(User defined)"
105    typedef struct {
106            char * name;
107            /* motion */
108            int motion_search;
109            int vhq_mode;
110            int vhq_metric;
111            int vhq_bframe;
112            int chromame;
113            int turbo;
114            int max_key_interval;
115            int frame_drop_ratio;
116    
117            /* quant */
118            int min_iquant;
119            int max_iquant;
120            int min_pquant;
121            int max_pquant;
122            int min_bquant;
123            int max_bquant;
124            int trellis_quant;
125    } quality_t;
126    
127    
128  typedef struct  typedef struct
129  {  {
130  /********** ATTENTION **********/  /********** ATTENTION **********/
# Line 111  Line 140 
140          char profile_name[MAX_PATH];          char profile_name[MAX_PATH];
141          int profile;                    /* used internally; *not* written to registry */          int profile;                    /* used internally; *not* written to registry */
142    
143      /* quality preset */
144            char quality_name[MAX_PATH];
145            int quality;                    /* used internally; *not* written to registry */
146    
147          int quant_type;          int quant_type;
148          BYTE qmatrix_intra[64];          BYTE qmatrix_intra[64];
149          BYTE qmatrix_inter[64];          BYTE qmatrix_inter[64];
150          int lum_masking;          int lum_masking;
151          int interlacing;          int interlacing;
152            int tff;
153          int qpel;          int qpel;
154          int gmc;          int gmc;
         int reduced_resolution;  
155          int use_bvop;          int use_bvop;
156          int max_bframes;          int max_bframes;
157          int bquant_ratio;          int bquant_ratio;
158          int bquant_offset;          int bquant_offset;
159          int packed;          int packed;
         int closed_gov;  
160          int display_aspect_ratio;                               /* aspect ratio */          int display_aspect_ratio;                               /* aspect ratio */
161          int ar_x, ar_y;                                                 /* picture aspect ratio */          int ar_x, ar_y;                                                 /* picture aspect ratio */
162          int par_x, par_y;                                               /* custom pixel aspect ratio */          int par_x, par_y;                                               /* custom pixel aspect ratio */
# Line 166  Line 198 
198          int audio_rate;          int audio_rate;
199          int audio_size;          int audio_size;
200    
201          /* motion */    /* user defined quality settings */
202          int motion_search;    quality_t quality_user;
         int vhq_mode;  
         int chromame;  
         int cartoon_mode;  
         int turbo;  
         int max_key_interval;  
         int frame_drop_ratio;  
   
         /* quant */  
         int min_iquant;  
         int max_iquant;  
         int min_pquant;  
         int max_pquant;  
         int min_bquant;  
         int max_bquant;  
         int trellis_quant;  
203    
204          /* debug */          /* debug */
205          int num_threads;          int num_threads;
# Line 194  Line 211 
211    
212          DWORD cpu;          DWORD cpu;
213    
214            int num_slices;
215    
216          /* internal */          /* internal */
217          int ci_valid;          int ci_valid;
218          VFWEXT_CONFIGURE_INFO_T ci;          VFWEXT_CONFIGURE_INFO_T ci;
# Line 228  Line 247 
247  #define PROFILE_INTERLACE       0x00000008  #define PROFILE_INTERLACE       0x00000008
248  #define PROFILE_QPEL            0x00000010  #define PROFILE_QPEL            0x00000010
249  #define PROFILE_GMC                     0x00000020  #define PROFILE_GMC                     0x00000020
250  #define PROFILE_REDUCED         0x00000040      /* dynamic resolution conversion */  #define PROFILE_4MV                 0x00000040
251    #define PROFILE_PACKED      0x00000080
252  #define PROFILE_AS                      (PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_MPEGQUANT|PROFILE_INTERLACE|PROFILE_QPEL|PROFILE_GMC)  #define PROFILE_EXTRA       0x00000100
253  #define PROFILE_ARTS            (PROFILE_ADAPTQUANT|PROFILE_REDUCED)  #define PROFILE_XVID        0x00000200
254    
255  static const int PARS[][2] = {  static const int PARS[][2] = {
256          {1, 1},          {1, 1},
# Line 248  Line 267 
267  typedef struct  typedef struct
268  {  {
269          char * name;          char * name;
270            char * short_name;
271          int id;          /* mpeg-4 profile id; iso/iec 14496-2:2001 table G-1 */          int id;          /* mpeg-4 profile id; iso/iec 14496-2:2001 table G-1 */
272          int width;          int width;
273          int height;          int height;
# Line 259  Line 279 
279          int max_acpred_mbs;     /* percentage */          int max_acpred_mbs;     /* percentage */
280          int max_vbv_size;                       /*      max vbv size (bits) 16368 bits */          int max_vbv_size;                       /*      max vbv size (bits) 16368 bits */
281          int max_video_packet_length; /* bits */          int max_video_packet_length; /* bits */
282          int max_bitrate;                        /* kbits/s */          int max_bitrate;                        /* bits per second */
283        int vbv_peakrate;                   /* max bits over anyone second period; 0=don't care */
284        int xvid_max_bframes;               /* xvid: max consecutive bframes */
285          unsigned int flags;          unsigned int flags;
286  } profile_t;  } profile_t;
287    
288    
289  extern const profile_t profiles[];  extern const profile_t profiles[];
290    
291    extern const quality_t quality_table[];
292    extern const int quality_table_num; /* number of elements in quality table */
293    
294    
295  void config_reg_get(CONFIG * config);  void config_reg_get(CONFIG * config);
296  void config_reg_set(CONFIG * config);  void config_reg_set(CONFIG * config);
297  void sort_zones(zone_t * zones, int zone_num, int * sel);  void sort_zones(zone_t * zones, int zone_num, int * sel);
298    
299    
300  BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM);  INT_PTR CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM);
301  BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM);  INT_PTR CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM);
302    
303  #endif /* _CONFIG_H_ */  #endif /* _CONFIG_H_ */

Legend:
Removed from v.1382  
changed lines
  Added in v.1915

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