1 |
|
#ifndef _CONFIG_H_ |
2 |
|
#define _CONFIG_H_ |
3 |
|
|
4 |
|
#include <windows.h> |
5 |
|
|
6 |
|
|
7 |
|
HINSTANCE hInst; |
8 |
|
HWND hTooltip; |
9 |
|
|
10 |
|
|
11 |
|
/* small hack */ |
12 |
|
#ifndef IDC_HAND |
13 |
|
#define IDC_HAND MAKEINTRESOURCE(32649) |
14 |
|
#endif |
15 |
|
|
16 |
|
/* one kilobit */ |
17 |
|
#define CONFIG_KBPS 1000 |
18 |
|
|
19 |
|
/* registry stuff */ |
20 |
|
#define XVID_REG_KEY HKEY_CURRENT_USER |
21 |
|
#define XVID_REG_PARENT "Software\\GNU" |
22 |
|
#define XVID_REG_CHILD "XviD" |
23 |
|
#define XVID_REG_CLASS "config" |
24 |
|
|
25 |
|
#define XVID_BUILD __TIME__ ", " __DATE__ |
26 |
|
#define XVID_WEBSITE "http://www.xvid.org/" |
27 |
|
#define XVID_SPECIAL_BUILD "(Vanilla CVS Build)" |
28 |
|
|
29 |
|
/* constants */ |
30 |
|
#define CONFIG_HINTFILE "\\hintfile.mvh" |
31 |
|
#define CONFIG_2PASS_1_FILE "\\video.stats" |
32 |
|
#define CONFIG_2PASS_2_FILE "\\videogk.stats" |
33 |
|
|
34 |
|
/* property sheets - sheets can be reordered here */ |
35 |
|
#define DLG_COUNT 6 |
36 |
|
|
37 |
|
#define DLG_GLOBAL 0 |
38 |
|
#define DLG_QUANT 1 |
39 |
|
#define DLG_2PASS 2 |
40 |
|
#define DLG_2PASSALT 3 |
41 |
|
#define DLG_CREDITS 4 |
42 |
|
#define DLG_CPU 5 |
43 |
|
|
44 |
|
/* codec modes */ |
45 |
|
#define DLG_MODE_CBR 0 |
46 |
|
#define DLG_MODE_VBR_QUAL 1 |
47 |
|
#define DLG_MODE_VBR_QUANT 2 |
48 |
|
#define DLG_MODE_2PASS_1 3 |
49 |
|
#define DLG_MODE_2PASS_2_EXT 4 |
50 |
|
#define DLG_MODE_2PASS_2_INT 5 |
51 |
|
#define DLG_MODE_NULL 6 |
52 |
|
|
53 |
|
/* quantizer modes */ |
54 |
|
#define QUANT_MODE_H263 0 |
55 |
|
#define QUANT_MODE_MPEG 1 |
56 |
|
#define QUANT_MODE_CUSTOM 2 |
57 |
|
#define QUANT_MODE_MOD 3 |
58 |
|
#define QUANT_MODE_MOD_NEW 4 |
59 |
|
|
60 |
|
/* credits modes */ |
61 |
|
#define CREDITS_MODE_RATE 0 |
62 |
|
#define CREDITS_MODE_QUANT 1 |
63 |
|
#define CREDITS_MODE_SIZE 2 |
64 |
|
|
65 |
|
/* vhq modes */ |
66 |
|
#define VHQ_OFF 0 |
67 |
|
#define VHQ_MODE_DECISION 1 |
68 |
|
#define VHQ_LIMITED_SEARCH 2 |
69 |
|
#define VHQ_MEDIUM_SEARCH 3 |
70 |
|
#define VHQ_WIDE_SEARCH 4 |
71 |
|
|
72 |
|
#define CREDITS_START 1 |
73 |
|
#define CREDITS_END 2 |
74 |
|
|
75 |
|
#define RAD2DEG 57.295779513082320876798154814105 |
76 |
|
#define DEG2RAD 0.017453292519943295769236907684886 |
77 |
|
|
78 |
|
typedef struct |
79 |
|
{ |
80 |
|
/********** ATTENTION **********/ |
81 |
|
int mode; // Vidomi directly accesses these vars |
82 |
|
int rc_bitrate; // |
83 |
|
int desired_size; // please try to avoid modifications here |
84 |
|
char stats1[MAX_PATH]; // |
85 |
|
/*******************************/ |
86 |
|
|
87 |
|
int quality; |
88 |
|
int quant; |
89 |
|
int rc_reaction_delay_factor; |
90 |
|
int rc_averaging_period; |
91 |
|
int rc_buffer; |
92 |
|
|
93 |
|
int motion_search; |
94 |
|
int quant_type; |
95 |
|
int fourcc_used; |
96 |
|
int vhq_mode; |
97 |
|
int max_key_interval; |
98 |
|
int min_key_interval; |
99 |
|
int lum_masking; |
100 |
|
int interlacing; |
101 |
|
int qpel; |
102 |
|
int gmc; |
103 |
|
int chromame; |
104 |
|
//added by koepi for gruel's greyscale_mode |
105 |
|
int greyscale; |
106 |
|
// end of koepi's additions |
107 |
|
int max_bframes; |
108 |
|
int bquant_ratio; |
109 |
|
int bquant_offset; |
110 |
|
int packed; |
111 |
|
int dx50bvop; |
112 |
|
int debug; |
113 |
|
int reduced_resolution; |
114 |
|
|
115 |
|
int min_iquant; |
116 |
|
int max_iquant; |
117 |
|
int min_pquant; |
118 |
|
int max_pquant; |
119 |
|
BYTE qmatrix_intra[64]; |
120 |
|
BYTE qmatrix_inter[64]; |
121 |
|
|
122 |
|
int keyframe_boost; |
123 |
|
//added by koepi for new 2pass curve treatment |
124 |
|
int kftreshold; |
125 |
|
int kfreduction; |
126 |
|
// end of koepi's additions |
127 |
|
int discard1pass; |
128 |
|
int dummy2pass; |
129 |
|
int curve_compression_high; |
130 |
|
int curve_compression_low; |
131 |
|
int use_alt_curve; |
132 |
|
int alt_curve_use_auto; |
133 |
|
int alt_curve_auto_str; |
134 |
|
int alt_curve_use_auto_bonus_bias; |
135 |
|
int alt_curve_bonus_bias; |
136 |
|
int alt_curve_type; |
137 |
|
int alt_curve_high_dist; |
138 |
|
int alt_curve_low_dist; |
139 |
|
int alt_curve_min_rel_qual; |
140 |
|
int twopass_max_bitrate; |
141 |
|
int twopass_max_overflow_improvement; |
142 |
|
int twopass_max_overflow_degradation; |
143 |
|
int bitrate_payback_delay; |
144 |
|
int bitrate_payback_method; |
145 |
|
int hinted_me; |
146 |
|
char hintfile[MAX_PATH]; |
147 |
|
char stats2[MAX_PATH]; |
148 |
|
|
149 |
|
int credits_start; |
150 |
|
int credits_start_begin; |
151 |
|
int credits_start_end; |
152 |
|
int credits_end; |
153 |
|
int credits_end_begin; |
154 |
|
int credits_end_end; |
155 |
|
|
156 |
|
//added by koepi for gruel's greyscale_mode |
157 |
|
int credits_greyscale; |
158 |
|
// end of koepi's additions |
159 |
|
int credits_mode; |
160 |
|
int credits_rate; |
161 |
|
int credits_quant_i; |
162 |
|
int credits_quant_p; |
163 |
|
int credits_start_size; |
164 |
|
int credits_end_size; |
165 |
|
|
166 |
|
int num_threads; |
167 |
|
int chroma_opt; |
168 |
|
|
169 |
|
int frame_drop_ratio; |
170 |
|
|
171 |
|
/* decoder */ |
172 |
|
|
173 |
|
int deblock_y; |
174 |
|
int deblock_uv; |
175 |
|
|
176 |
|
// char build[50]; |
177 |
|
DWORD cpu; |
178 |
|
float fquant; |
179 |
|
BOOL save; |
180 |
|
} CONFIG; |
181 |
|
|
182 |
|
typedef struct PROPSHEETINFO |
183 |
|
{ |
184 |
|
int page; |
185 |
|
CONFIG * config; |
186 |
|
} PROPSHEETINFO; |
187 |
|
|
188 |
|
typedef struct REG_INT |
189 |
|
{ |
190 |
|
char* reg_value; |
191 |
|
int* config_int; |
192 |
|
int def; |
193 |
|
} REG_INT; |
194 |
|
|
195 |
|
typedef struct REG_STR |
196 |
|
{ |
197 |
|
char* reg_value; |
198 |
|
char* config_str; |
199 |
|
char* def; |
200 |
|
} REG_STR; |
201 |
|
|
202 |
|
void config_reg_get(CONFIG *); |
203 |
|
void config_reg_set(CONFIG *); |
204 |
|
void config_reg_default(CONFIG *); |
205 |
|
int config_get_int(HWND, INT, int); |
206 |
|
int config_get_uint(HWND, UINT, int); |
207 |
|
void main_download(HWND, CONFIG *); |
208 |
|
void main_slider(HWND, CONFIG *); |
209 |
|
void main_value(HWND, CONFIG *); |
210 |
|
void adv_dialog(HWND, CONFIG *); |
211 |
|
void adv_mode(HWND, int); |
212 |
|
void adv_upload(HWND, int, CONFIG *); |
213 |
|
void adv_download(HWND, int, CONFIG *); |
214 |
|
void quant_upload(HWND, CONFIG *); |
215 |
|
void quant_download(HWND, CONFIG *); |
216 |
|
BOOL CALLBACK enum_tooltips(HWND, LPARAM); |
217 |
|
BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM); |
218 |
|
BOOL CALLBACK adv_proc(HWND, UINT, WPARAM, LPARAM); |
219 |
|
BOOL CALLBACK quantmatrix_proc(HWND, UINT, WPARAM, LPARAM); |
220 |
|
BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM); |
221 |
|
|
222 |
|
#endif /* _CONFIG_H_ */ |