[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 889, Sat Feb 22 08:24:01 2003 UTC revision 1032, Sat May 17 13:37:49 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;
 HINSTANCE hInst;  
 HWND hTooltip;  
8    
9    
10  /* small hack */  /* small hack */
# Line 16  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 27  Line 31 
31  #define XVID_SPECIAL_BUILD      "(Vanilla CVS Build)"  #define XVID_SPECIAL_BUILD      "(Vanilla CVS Build)"
32    
33  /* constants */  /* constants */
34  #define CONFIG_HINTFILE         "\\hintfile.mvh"  #define CONFIG_2PASS_FILE "\\video.pass"
 #define CONFIG_2PASS_1_FILE "\\video.stats"  
 #define CONFIG_2PASS_2_FILE "\\videogk.stats"  
   
 /* property sheets - sheets can be reordered here */  
 #define DLG_COUNT               6  
   
 #define DLG_GLOBAL              0  
 #define DLG_QUANT               1  
 #define DLG_2PASS               2  
 #define DLG_2PASSALT    3  
 #define DLG_CREDITS             4  
 #define DLG_CPU                 5  
35    
36  /* codec modes */  /* codec modes */
37  #define DLG_MODE_CBR                    0  #define RC_MODE_1PASS          0
38  #define DLG_MODE_VBR_QUAL               1  #define RC_MODE_2PASS1         1
39  #define DLG_MODE_VBR_QUANT              2  #define RC_MODE_2PASS2         2
40  #define DLG_MODE_2PASS_1                3  #define RC_MODE_NULL           3
 #define DLG_MODE_2PASS_2_EXT    4  
 #define DLG_MODE_2PASS_2_INT    5  
 #define DLG_MODE_NULL                   6  
41    
42  /* quantizer modes */  #define RC_ZONE_WEIGHT         0
43  #define QUANT_MODE_H263                 0  #define RC_ZONE_QUANT          1
 #define QUANT_MODE_MPEG                 1  
 #define QUANT_MODE_CUSTOM               2  
 #define QUANT_MODE_MOD                  3  
 #define QUANT_MODE_MOD_NEW              4  
   
 /* credits modes */  
 #define CREDITS_MODE_RATE               0  
 #define CREDITS_MODE_QUANT              1  
 #define CREDITS_MODE_SIZE               2  
44    
45  /* vhq modes */  /* vhq modes */
46  #define VHQ_OFF                                 0  #define VHQ_OFF                                 0
# Line 69  Line 49 
49  #define VHQ_MEDIUM_SEARCH               3  #define VHQ_MEDIUM_SEARCH               3
50  #define VHQ_WIDE_SEARCH                 4  #define VHQ_WIDE_SEARCH                 4
51    
52  #define CREDITS_START                   1  /* quantizer modes */
53  #define CREDITS_END                             2  #define QUANT_MODE_H263                 0
54    #define QUANT_MODE_MPEG                 1
55    #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    
 #define RAD2DEG 57.295779513082320876798154814105  
 #define DEG2RAD 0.017453292519943295769236907684886  
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 stats1[MAX_PATH];          //          char stats[MAX_PATH];           //
80  /*******************************/  /*******************************/
81    
82          int quality;      /* profile  */
83          int     quant;      char profile_name[MAX_PATH];
84          int rc_reaction_delay_factor;          int profile;            /* used internally; *not* written to registry */
         int rc_averaging_period;  
         int rc_buffer;  
85    
         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;
94  //added by koepi for gruel's greyscale_mode      int use_bvop;
         int greyscale;  
 // end of koepi's additions  
95          int max_bframes;          int max_bframes;
96          int bquant_ratio;          int bquant_ratio;
97          int bquant_offset;          int bquant_offset;
98          int packed;          int packed;
99          int dx50bvop;          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 */
         BYTE qmatrix_intra[64];  
         BYTE qmatrix_inter[64];  
105    
106        /* 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;
 //added by koepi for new 2pass curve treatment  
113          int kftreshold;          int kftreshold;
114          int kfreduction;          int kfreduction;
 // end of koepi's additions  
115          int discard1pass;          int discard1pass;
         int dummy2pass;  
116          int curve_compression_high;          int curve_compression_high;
117          int curve_compression_low;          int curve_compression_low;
118          int use_alt_curve;          int use_alt_curve;
# Line 137  Line 124 
124          int alt_curve_high_dist;          int alt_curve_high_dist;
125          int alt_curve_low_dist;          int alt_curve_low_dist;
126          int alt_curve_min_rel_qual;          int alt_curve_min_rel_qual;
         int twopass_max_bitrate;  
127          int twopass_max_overflow_improvement;          int twopass_max_overflow_improvement;
128          int twopass_max_overflow_degradation;          int twopass_max_overflow_degradation;
129          int bitrate_payback_delay;          int bitrate_payback_delay;
130          int bitrate_payback_method;          int bitrate_payback_method;
         int hinted_me;  
         char hintfile[MAX_PATH];  
         char stats2[MAX_PATH];  
   
         int credits_start;  
         int credits_start_begin;  
         int credits_start_end;  
         int credits_end;  
         int credits_end_begin;  
         int credits_end_end;  
   
 //added by koepi for gruel's greyscale_mode  
         int credits_greyscale;  
 // end of koepi's additions  
         int credits_mode;  
         int credits_rate;  
         int credits_quant_i;  
         int credits_quant_p;  
         int credits_start_size;  
         int credits_end_size;  
131    
132          int num_threads;      /* motion */
         int chroma_opt;  
133    
134            int motion_search;
135            int vhq_mode;
136            int chromame;
137        int max_key_interval;
138            int min_key_interval;
139          int frame_drop_ratio;          int frame_drop_ratio;
140    
141          /* decoder */      /* quant */
142            int min_iquant;
143            int max_iquant;
144            int min_pquant;
145            int max_pquant;
146            int min_bquant;
147            int max_bquant;
148        int trellis_quant;
149    
150          int deblock_y;      /* debug */
151          int deblock_uv;          int num_threads;
152        int fourcc_used;
153        int vop_debug;
154        int debug;
155    
 //      char build[50];  
156          DWORD cpu;          DWORD cpu;
157          float fquant;  
158        /* internal */
159        int ci_valid;
160        VFWEXT_CONFIGURE_INFO_T ci;
161    
162          BOOL save;          BOOL save;
163  } CONFIG;  } CONFIG;
164    
165  typedef struct PROPSHEETINFO  typedef struct PROPSHEETINFO
166  {  {
167          int page;          int idd;
168          CONFIG * config;          CONFIG * config;
169  } PROPSHEETINFO;  } PROPSHEETINFO;
170    
# Line 199  Line 182 
182          char* def;          char* def;
183  } REG_STR;  } REG_STR;
184    
185  void config_reg_get(CONFIG *);  
186  void config_reg_set(CONFIG *);  #define PROFILE_ADAPTQUANT  0x00000001
187  void config_reg_default(CONFIG *);  #define PROFILE_BVOP            0x00000002
188  int config_get_int(HWND, INT, int);  #define PROFILE_MPEGQUANT       0x00000004
189  int config_get_uint(HWND, UINT, int);  #define PROFILE_INTERLACE       0x00000008
190  void main_download(HWND, CONFIG *);  #define PROFILE_QPEL            0x00000010
191  void main_slider(HWND, CONFIG *);  #define PROFILE_GMC                     0x00000020
192  void main_value(HWND, CONFIG *);  #define PROFILE_REDUCED         0x00000040      /* dynamic resolution conversion */
193  void adv_dialog(HWND, CONFIG *);  
194  void adv_mode(HWND, int);  #define PROFILE_AS                      (PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_MPEGQUANT|PROFILE_INTERLACE|PROFILE_QPEL|PROFILE_GMC)
195  void adv_upload(HWND, int, CONFIG *);  #define PROFILE_ARTS            (PROFILE_ADAPTQUANT|PROFILE_REDUCED)
196  void adv_download(HWND, int, CONFIG *);  
197  void quant_upload(HWND, CONFIG *);  
198  void quant_download(HWND, CONFIG *);  typedef struct
199  BOOL CALLBACK enum_tooltips(HWND, LPARAM);  {
200            char * name;
201        int id;         /* mpeg-4 profile id; iso/iec 14496-2:2001 table G-1 */
202            int width;
203            int height;
204            int fps;
205            int max_objects;
206            int total_vmv_buffer_sz;    /* macroblock memory; when BVOPS=false, vmv = 2*vcv; when BVOPS=true,  vmv = 3*vcv*/
207            int max_vmv_buffer_sz;      /* max macroblocks per vop */
208            int vcv_decoder_rate;   /* macroblocks decoded per second */
209            int max_acpred_mbs;     /* percentage */
210            int max_vbv_size;                       /*    max vbv size (bits) 16368 bits */
211            int max_video_packet_length; /* bits */
212            int max_bitrate;                        /* kbits/s */
213            unsigned int flags;
214    } profile_t;
215    
216    
217    extern const profile_t profiles[];
218    
219    
220    void config_reg_get(CONFIG * config);
221    void config_reg_set(CONFIG * config);
222    
223  BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM);  BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM);
 BOOL CALLBACK adv_proc(HWND, UINT, WPARAM, LPARAM);  
 BOOL CALLBACK quantmatrix_proc(HWND, UINT, WPARAM, LPARAM);  
224  BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM);  BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM);
225    
226    
227  #endif /* _CONFIG_H_ */  #endif /* _CONFIG_H_ */

Legend:
Removed from v.889  
changed lines
  Added in v.1032

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