[svn] / branches / dev-api-4 / xvidcore / vfw / src / config.h Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/vfw/src/config.h

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

revision 983, Sat Apr 12 06:58:50 2003 UTC revision 1052, Mon Jun 2 11:47:30 2003 UTC
# Line 2  Line 2 
2  #define _CONFIG_H_  #define _CONFIG_H_
3    
4  #include <windows.h>  #include <windows.h>
5    #include "vfwext.h"
6    
7  extern HINSTANCE g_hInst;  extern HINSTANCE g_hInst;
8    
# Line 14  Line 15 
15  /* one kilobit */  /* one kilobit */
16  #define CONFIG_KBPS 1000  #define CONFIG_KBPS 1000
17    
18    /* min/max bitrate when not specified by profile */
19    #define DEFAULT_MIN_KBPS    16
20    #define DEFAULT_MAX_KBPS    10000
21    
22    
23  /* registry stuff */  /* registry stuff */
24  #define XVID_REG_KEY    HKEY_CURRENT_USER  #define XVID_REG_KEY    HKEY_CURRENT_USER
25  #define XVID_REG_PARENT "Software\\GNU"  #define XVID_REG_PARENT "Software\\GNU"
# Line 28  Line 34 
34  #define CONFIG_2PASS_FILE "\\video.pass"  #define CONFIG_2PASS_FILE "\\video.pass"
35    
36  /* codec modes */  /* codec modes */
37  #define RC_MODE_CBR                             0  #define RC_MODE_1PASS          0
38  #define RC_MODE_VBR_QUAL                1       /* deprecated */  #define RC_MODE_2PASS1         1
39  #define RC_MODE_FIXED                   2  #define RC_MODE_2PASS2         2
40  #define RC_MODE_2PASS1                  3  #define RC_MODE_NULL           3
41  #define RC_MODE_2PASS2_EXT              4  
42  #define RC_MODE_2PASS2_INT              5  #define RC_ZONE_WEIGHT         0
43  #define RC_MODE_NULL                    6  #define RC_ZONE_QUANT          1
44    
45  /* vhq modes */  /* vhq modes */
46  #define VHQ_OFF                                 0  #define VHQ_OFF                                 0
# Line 49  Line 55 
55  #define QUANT_MODE_CUSTOM               2  #define QUANT_MODE_CUSTOM               2
56    
57    
58    #define MAX_ZONES    64
59    typedef struct
60    {
61        int frame;
62    
63        int mode;
64        int weight;
65        int quant;
66        /* overrides: when ==MODIFIER_USE_DEFAULT use default/global setting */
67        unsigned int greyscale;
68        unsigned int chroma_opt;
69        unsigned int bvop_threshold;
70    } zone_t;
71    
72    
73  typedef struct  typedef struct
74  {  {
75  /********** ATTENTION **********/  /********** ATTENTION **********/
76          int mode;                                       // Vidomi directly accesses these vars          int mode;                                       // Vidomi directly accesses these vars
77          int rc_bitrate;                         //          int bitrate;                            //
78          int desired_size;                       // please try to avoid modifications here          int desired_size;                       // please try to avoid modifications here
79          char stats[MAX_PATH];           //          char stats[MAX_PATH];           //
80  /*******************************/  /*******************************/
81    
82        /* profile  */
83      char profile_name[MAX_PATH];      char profile_name[MAX_PATH];
84          int profile;          int profile;            /* used internally; *not* written to registry */
85    
         int quality;  
         int     quant;  
         int rc_reaction_delay_factor;  
         int rc_averaging_period;  
         int rc_buffer;  
   
         int motion_search;  
86          int quant_type;          int quant_type;
87          int fourcc_used;          BYTE qmatrix_intra[64];
88          int vhq_mode;          BYTE qmatrix_inter[64];
         int max_key_interval;  
         int min_key_interval;  
89          int lum_masking;          int lum_masking;
90          int interlacing;          int interlacing;
91          int qpel;          int qpel;
92          int gmc;          int gmc;
93          int chromame;          int reduced_resolution;
         int greyscale;  
94      int use_bvop;      int use_bvop;
95          int max_bframes;          int max_bframes;
96          int bquant_ratio;          int bquant_ratio;
97          int bquant_offset;          int bquant_offset;
     int bvop_threshold;  
98          int packed;          int packed;
99          int closed_gov;          int closed_gov;
         int debug;  
         int reduced_resolution;  
100    
101          int min_iquant;      /* zones */
102          int max_iquant;      int num_zones;
103          int min_pquant;      zone_t zones[MAX_ZONES];
104          int max_pquant;      int cur_zone;        /* used internally; *not* written to registry */
105          BYTE qmatrix_intra[64];  
106          BYTE qmatrix_inter[64];      /* single pass */
107            int rc_reaction_delay_factor;
108            int rc_averaging_period;
109            int rc_buffer;
110    
111        /* 2pass2 */
112          int keyframe_boost;          int keyframe_boost;
113          int kftreshold;          int kftreshold;
114          int kfreduction;          int kfreduction;
115          int discard1pass;          int discard1pass;
116          int curve_compression_high;          int curve_compression_high;
117          int curve_compression_low;          int curve_compression_low;
         int use_alt_curve;  
         int alt_curve_use_auto;  
         int alt_curve_auto_str;  
         int alt_curve_use_auto_bonus_bias;  
         int alt_curve_bonus_bias;  
         int alt_curve_type;  
         int alt_curve_high_dist;  
         int alt_curve_low_dist;  
         int alt_curve_min_rel_qual;  
         int twopass_max_bitrate;  
118          int twopass_max_overflow_improvement;          int twopass_max_overflow_improvement;
119          int twopass_max_overflow_degradation;          int twopass_max_overflow_degradation;
120          int bitrate_payback_delay;          int bitrate_payback_delay;
121          int bitrate_payback_method;          int bitrate_payback_method;
         int hinted_me;  
   
         int num_threads;  
         int chroma_opt;  
122    
123        /* motion */
124            int motion_search;
125            int vhq_mode;
126            int chromame;
127        int max_key_interval;
128            int min_key_interval;
129          int frame_drop_ratio;          int frame_drop_ratio;
130    
131          /* decoder */      /* quant */
132            int min_iquant;
133            int max_iquant;
134            int min_pquant;
135            int max_pquant;
136            int min_bquant;
137            int max_bquant;
138        int trellis_quant;
139    
140  //      int deblock_y;      /* debug */
141  //      int deblock_uv;          int num_threads;
142        int fourcc_used;
143        int vop_debug;
144        int debug;
145    
146          DWORD cpu;          DWORD cpu;
147          float fquant;  
148        /* internal */
149        int ci_valid;
150        VFWEXT_CONFIGURE_INFO_T ci;
151    
152          BOOL save;          BOOL save;
153  } CONFIG;  } CONFIG;
154    
# Line 154  Line 173 
173  } REG_STR;  } REG_STR;
174    
175    
176    #define PROFILE_ADAPTQUANT  0x00000001
177    #define PROFILE_BVOP            0x00000002
178    #define PROFILE_MPEGQUANT       0x00000004
179    #define PROFILE_INTERLACE       0x00000008
180    #define PROFILE_QPEL            0x00000010
181    #define PROFILE_GMC                     0x00000020
182    #define PROFILE_REDUCED         0x00000040      /* dynamic resolution conversion */
183    
184    #define PROFILE_AS                      (PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_MPEGQUANT|PROFILE_INTERLACE|PROFILE_QPEL|PROFILE_GMC)
185    #define PROFILE_ARTS            (PROFILE_ADAPTQUANT|PROFILE_REDUCED)
186    
187    
188    typedef struct
189    {
190            char * name;
191        int id;         /* mpeg-4 profile id; iso/iec 14496-2:2001 table G-1 */
192            int width;
193            int height;
194            int fps;
195            int max_objects;
196            int total_vmv_buffer_sz;    /* macroblock memory; when BVOPS=false, vmv = 2*vcv; when BVOPS=true,  vmv = 3*vcv*/
197            int max_vmv_buffer_sz;      /* max macroblocks per vop */
198            int vcv_decoder_rate;   /* macroblocks decoded per second */
199            int max_acpred_mbs;     /* percentage */
200            int max_vbv_size;                       /*    max vbv size (bits) 16368 bits */
201            int max_video_packet_length; /* bits */
202            int max_bitrate;                        /* kbits/s */
203            unsigned int flags;
204    } profile_t;
205    
206    
207    extern const profile_t profiles[];
208    
209    
210  void config_reg_get(CONFIG * config);  void config_reg_get(CONFIG * config);
211  void config_reg_set(CONFIG * config);  void config_reg_set(CONFIG * config);
212    

Legend:
Removed from v.983  
changed lines
  Added in v.1052

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