5 |
|
|
6 |
|
|
7 |
HINSTANCE hInst; |
HINSTANCE hInst; |
8 |
|
HWND hTooltip; |
9 |
|
|
10 |
|
|
11 |
/* small hack */ |
/* small hack */ |
22 |
#define XVID_REG_CHILD "XviD" |
#define XVID_REG_CHILD "XviD" |
23 |
#define XVID_REG_CLASS "config" |
#define XVID_REG_CLASS "config" |
24 |
|
|
25 |
#define XVID_HELP "Move cursor over item to view help" |
#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_GLOBAL 0 |
#define DLG_GLOBAL 0 |
37 |
#define DLG_QUANT 1 |
#define DLG_QUANT 1 |
38 |
#define DLG_2PASS 2 |
#define DLG_2PASS 2 |
39 |
#define DLG_CREDITS 3 |
#define DLG_2PASSALT 3 |
40 |
#define DLG_CPU 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 |
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 |
{ |
{ |
79 |
int fourcc_used; |
int fourcc_used; |
80 |
int max_key_interval; |
int max_key_interval; |
81 |
int lum_masking; |
int lum_masking; |
82 |
|
int interlacing; |
83 |
|
|
84 |
int min_iquant; |
int min_iquant; |
85 |
int max_iquant; |
int max_iquant; |
95 |
int dummy2pass; |
int dummy2pass; |
96 |
int curve_compression_high; |
int curve_compression_high; |
97 |
int curve_compression_low; |
int curve_compression_low; |
98 |
|
int use_alt_curve; |
99 |
|
int alt_curve_use_auto; |
100 |
|
int alt_curve_auto_str; |
101 |
|
int alt_curve_use_auto_bonus_bias; |
102 |
|
int alt_curve_bonus_bias; |
103 |
|
int alt_curve_type; |
104 |
|
int alt_curve_high_dist; |
105 |
|
int alt_curve_low_dist; |
106 |
|
int alt_curve_min_rel_qual; |
107 |
int bitrate_payback_delay; |
int bitrate_payback_delay; |
108 |
int bitrate_payback_method; |
int bitrate_payback_method; |
109 |
|
int hinted_me; |
110 |
|
char hintfile[MAX_PATH]; |
111 |
char stats1[MAX_PATH]; |
char stats1[MAX_PATH]; |
112 |
char stats2[MAX_PATH]; |
char stats2[MAX_PATH]; |
113 |
|
|
125 |
int credits_start_size; |
int credits_start_size; |
126 |
int credits_end_size; |
int credits_end_size; |
127 |
|
|
128 |
|
// char build[50]; |
129 |
DWORD cpu; |
DWORD cpu; |
|
|
|
130 |
float fquant; |
float fquant; |
|
|
|
131 |
BOOL save; |
BOOL save; |
132 |
} CONFIG; |
} CONFIG; |
133 |
|
|
|
typedef struct HELPRECT |
|
|
{ |
|
|
int item; |
|
|
RECT rect; |
|
|
} HELPRECT; |
|
|
|
|
134 |
typedef struct PROPSHEETINFO |
typedef struct PROPSHEETINFO |
135 |
{ |
{ |
136 |
int page; |
int page; |
137 |
CONFIG * config; |
CONFIG * config; |
138 |
} PROPSHEETINFO; |
} PROPSHEETINFO; |
139 |
|
|
140 |
|
typedef struct REG_INT |
141 |
|
{ |
142 |
|
char* reg_value; |
143 |
|
int* config_int; |
144 |
|
int def; |
145 |
|
} REG_INT; |
146 |
|
|
147 |
|
typedef struct REG_STR |
148 |
|
{ |
149 |
|
char* reg_value; |
150 |
|
char* config_str; |
151 |
|
char* def; |
152 |
|
} REG_STR; |
153 |
|
|
154 |
void config_reg_get(CONFIG *); |
void config_reg_get(CONFIG *); |
155 |
void config_reg_set(CONFIG *); |
void config_reg_set(CONFIG *); |
164 |
void adv_download(HWND, int, CONFIG *); |
void adv_download(HWND, int, CONFIG *); |
165 |
void quant_upload(HWND, CONFIG *); |
void quant_upload(HWND, CONFIG *); |
166 |
void quant_download(HWND, CONFIG *); |
void quant_download(HWND, CONFIG *); |
167 |
LRESULT CALLBACK msg_proc(int, WPARAM, LPARAM); |
BOOL CALLBACK enum_tooltips(HWND, LPARAM); |
168 |
BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM); |
169 |
BOOL CALLBACK adv_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK adv_proc(HWND, UINT, WPARAM, LPARAM); |
170 |
BOOL CALLBACK quantmatrix_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK quantmatrix_proc(HWND, UINT, WPARAM, LPARAM); |