5 |
|
|
6 |
|
|
7 |
HINSTANCE hInst; |
HINSTANCE hInst; |
8 |
|
HWND hTooltip; |
9 |
|
|
10 |
|
|
11 |
/* small hack */ |
/* small hack */ |
18 |
|
|
19 |
/* registry stuff */ |
/* registry stuff */ |
20 |
#define XVID_REG_KEY HKEY_CURRENT_USER |
#define XVID_REG_KEY HKEY_CURRENT_USER |
21 |
#define XVID_REG_SUBKEY "Software\\GNU\\XviD" |
#define XVID_REG_PARENT "Software\\GNU" |
22 |
|
#define XVID_REG_CHILD "XviD" |
23 |
#define XVID_REG_CLASS "config" |
#define XVID_REG_CLASS "config" |
24 |
|
|
25 |
|
#define XVID_BUILD __TIME__ ", " __DATE__ |
26 |
#define XVID_WEBSITE "http://www.xvid.org" |
#define XVID_WEBSITE "http://www.xvid.org" |
27 |
|
|
28 |
/* constants */ |
/* constants */ |
29 |
|
#define CONFIG_HINTFILE "\\hintfile.mvh" |
30 |
#define CONFIG_2PASS_1_FILE "\\video.stats" |
#define CONFIG_2PASS_1_FILE "\\video.stats" |
31 |
#define CONFIG_2PASS_2_FILE "\\videogk.stats" |
#define CONFIG_2PASS_2_FILE "\\videogk.stats" |
32 |
|
|
33 |
/* property sheets - sheets can be reordered here */ |
/* property sheets - sheets can be reordered here */ |
34 |
#define DLG_COUNT 5 |
#define DLG_COUNT 6 |
35 |
|
|
36 |
#define DLG_MAIN 0 |
#define DLG_GLOBAL 0 |
37 |
#define DLG_ADV 1 |
#define DLG_QUANT 1 |
38 |
#define DLG_DEBUG 2 |
#define DLG_2PASS 2 |
39 |
#define DLG_CPU 3 |
#define DLG_2PASSALT 3 |
40 |
#define DLG_ABOUT 4 |
#define DLG_CREDITS 4 |
41 |
|
#define DLG_CPU 5 |
42 |
|
|
43 |
/* codec modes */ |
/* codec modes */ |
44 |
#define DLG_MODE_CBR 0 |
#define DLG_MODE_CBR 0 |
53 |
#define QUANT_MODE_H263 0 |
#define QUANT_MODE_H263 0 |
54 |
#define QUANT_MODE_MPEG 1 |
#define QUANT_MODE_MPEG 1 |
55 |
#define QUANT_MODE_CUSTOM 2 |
#define QUANT_MODE_CUSTOM 2 |
56 |
|
#define QUANT_MODE_MOD 3 |
57 |
|
|
58 |
/* credits modes */ |
/* credits modes */ |
59 |
#define CREDITS_MODE_RATE 0 |
#define CREDITS_MODE_RATE 0 |
63 |
#define CREDITS_START 1 |
#define CREDITS_START 1 |
64 |
#define CREDITS_END 2 |
#define CREDITS_END 2 |
65 |
|
|
66 |
|
#define RAD2DEG 57.295779513082320876798154814105 |
67 |
|
#define DEG2RAD 0.017453292519943295769236907684886 |
68 |
|
|
69 |
typedef struct |
typedef struct |
70 |
{ |
{ |
71 |
int mode; |
/********** ATTENTION **********/ |
72 |
int bitrate; |
int mode; // Vidomi directly accesses these vars |
73 |
|
int rc_bitrate; // |
74 |
|
int desired_size; // please try to avoid modifications here |
75 |
|
char stats1[MAX_PATH]; // |
76 |
|
/*******************************/ |
77 |
|
|
78 |
int quality; |
int quality; |
79 |
int quant; |
int quant; |
80 |
|
int rc_reaction_delay_factor; |
81 |
|
int rc_averaging_period; |
82 |
|
int rc_buffer; |
83 |
|
|
84 |
char stats1[MAX_PATH]; |
int motion_search; |
85 |
char stats2[MAX_PATH]; |
int quant_type; |
86 |
int discard1pass; |
int fourcc_used; |
87 |
int dummy2pass; |
int max_key_interval; |
88 |
int desired_size; |
int min_key_interval; |
89 |
|
int lum_masking; |
90 |
|
int interlacing; |
91 |
|
#ifdef BFRAMES |
92 |
|
int max_bframes; |
93 |
|
int bquant_ratio; |
94 |
|
int packed; |
95 |
|
int dx50bvop; |
96 |
|
int debug; |
97 |
|
#endif |
98 |
|
|
99 |
int min_iquant; |
int min_iquant; |
100 |
int max_iquant; |
int max_iquant; |
101 |
|
int min_pquant; |
102 |
|
int max_pquant; |
103 |
|
BYTE qmatrix_intra[64]; |
104 |
|
BYTE qmatrix_inter[64]; |
105 |
|
|
106 |
int keyframe_boost; |
int keyframe_boost; |
107 |
int min_key_interval; |
int discard1pass; |
108 |
int bitrate_payback_delay; |
int dummy2pass; |
|
int bitrate_payback_method; |
|
109 |
int curve_compression_high; |
int curve_compression_high; |
110 |
int curve_compression_low; |
int curve_compression_low; |
111 |
|
int use_alt_curve; |
112 |
float fquant; |
int alt_curve_use_auto; |
113 |
|
int alt_curve_auto_str; |
114 |
|
int alt_curve_use_auto_bonus_bias; |
115 |
|
int alt_curve_bonus_bias; |
116 |
|
int alt_curve_type; |
117 |
|
int alt_curve_high_dist; |
118 |
|
int alt_curve_low_dist; |
119 |
|
int alt_curve_min_rel_qual; |
120 |
|
int twopass_max_bitrate; |
121 |
|
int twopass_max_overflow_improvement; |
122 |
|
int twopass_max_overflow_degradation; |
123 |
|
int bitrate_payback_delay; |
124 |
|
int bitrate_payback_method; |
125 |
|
int hinted_me; |
126 |
|
char hintfile[MAX_PATH]; |
127 |
|
char stats2[MAX_PATH]; |
128 |
|
|
129 |
int credits_start; |
int credits_start; |
130 |
int credits_start_begin; |
int credits_start_begin; |
140 |
int credits_start_size; |
int credits_start_size; |
141 |
int credits_end_size; |
int credits_end_size; |
142 |
|
|
143 |
int motion_search; |
// char build[50]; |
|
int quant_type; |
|
|
int max_key_interval; |
|
|
|
|
|
int rc_buffersize; |
|
|
|
|
|
int min_quant; |
|
|
int max_quant; |
|
|
int lum_masking; |
|
|
|
|
|
int fourcc_used; |
|
|
|
|
|
BYTE qmatrix_intra[64]; |
|
|
BYTE qmatrix_inter[64]; |
|
|
|
|
144 |
DWORD cpu; |
DWORD cpu; |
145 |
|
float fquant; |
146 |
BOOL save; |
BOOL save; |
|
|
|
147 |
} CONFIG; |
} CONFIG; |
148 |
|
|
|
|
|
149 |
typedef struct PROPSHEETINFO |
typedef struct PROPSHEETINFO |
150 |
{ |
{ |
151 |
int page; |
int page; |
152 |
CONFIG * config; |
CONFIG * config; |
153 |
} PROPSHEETINFO; |
} PROPSHEETINFO; |
154 |
|
|
155 |
|
typedef struct REG_INT |
156 |
|
{ |
157 |
|
char* reg_value; |
158 |
|
int* config_int; |
159 |
|
int def; |
160 |
|
} REG_INT; |
161 |
|
|
162 |
|
typedef struct REG_STR |
163 |
|
{ |
164 |
|
char* reg_value; |
165 |
|
char* config_str; |
166 |
|
char* def; |
167 |
|
} REG_STR; |
168 |
|
|
169 |
void config_reg_get(CONFIG *); |
void config_reg_get(CONFIG *); |
170 |
void config_reg_set(CONFIG *); |
void config_reg_set(CONFIG *); |
171 |
void config_mode(HWND); |
void config_reg_default(CONFIG *); |
172 |
void config_upload(HWND, int, CONFIG *); |
int config_get_int(HWND, INT, int); |
173 |
void config_download(HWND, int, CONFIG *); |
int config_get_uint(HWND, UINT, int); |
174 |
void config_slider(HWND, CONFIG *); |
void main_download(HWND, CONFIG *); |
175 |
void config_value(HWND, CONFIG *); |
void main_slider(HWND, CONFIG *); |
176 |
int config_get_int(HWND, UINT, int); |
void main_value(HWND, CONFIG *); |
177 |
void credits_controls(HWND); |
void adv_dialog(HWND, CONFIG *); |
178 |
|
void adv_mode(HWND, int); |
179 |
|
void adv_upload(HWND, int, CONFIG *); |
180 |
|
void adv_download(HWND, int, CONFIG *); |
181 |
void quant_upload(HWND, CONFIG *); |
void quant_upload(HWND, CONFIG *); |
182 |
void quant_download(HWND, CONFIG *); |
void quant_download(HWND, CONFIG *); |
183 |
BOOL CALLBACK config_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK enum_tooltips(HWND, LPARAM); |
184 |
BOOL CALLBACK credits_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM); |
185 |
BOOL CALLBACK twopass_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK adv_proc(HWND, UINT, WPARAM, LPARAM); |
186 |
BOOL CALLBACK quantmatrix_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK quantmatrix_proc(HWND, UINT, WPARAM, LPARAM); |
187 |
|
BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM); |
188 |
|
|
189 |
#endif /* _CONFIG_H_ */ |
#endif /* _CONFIG_H_ */ |