3 |
|
|
4 |
#include <windows.h> |
#include <windows.h> |
5 |
|
|
6 |
|
extern HINSTANCE g_hInst; |
|
HINSTANCE hInst; |
|
|
HWND hTooltip; |
|
7 |
|
|
8 |
|
|
9 |
/* small hack */ |
/* small hack */ |
25 |
#define XVID_SPECIAL_BUILD "(Vanilla CVS Build)" |
#define XVID_SPECIAL_BUILD "(Vanilla CVS Build)" |
26 |
|
|
27 |
/* constants */ |
/* constants */ |
28 |
#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 |
|
29 |
|
|
30 |
/* codec modes */ |
/* codec modes */ |
31 |
#define DLG_MODE_CBR 0 |
#define RC_MODE_CBR 0 |
32 |
#define DLG_MODE_VBR_QUAL 1 |
#define RC_MODE_VBR_QUAL 1 /* deprecated */ |
33 |
#define DLG_MODE_VBR_QUANT 2 |
#define RC_MODE_FIXED 2 |
34 |
#define DLG_MODE_2PASS_1 3 |
#define RC_MODE_2PASS1 3 |
35 |
#define DLG_MODE_2PASS_2_EXT 4 |
#define RC_MODE_2PASS2_EXT 4 |
36 |
#define DLG_MODE_2PASS_2_INT 5 |
#define RC_MODE_2PASS2_INT 5 |
37 |
#define DLG_MODE_NULL 6 |
#define RC_MODE_NULL 6 |
|
|
|
|
/* quantizer modes */ |
|
|
#define QUANT_MODE_H263 0 |
|
|
#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 |
|
38 |
|
|
39 |
/* vhq modes */ |
/* vhq modes */ |
40 |
#define VHQ_OFF 0 |
#define VHQ_OFF 0 |
43 |
#define VHQ_MEDIUM_SEARCH 3 |
#define VHQ_MEDIUM_SEARCH 3 |
44 |
#define VHQ_WIDE_SEARCH 4 |
#define VHQ_WIDE_SEARCH 4 |
45 |
|
|
46 |
#define CREDITS_START 1 |
/* quantizer modes */ |
47 |
#define CREDITS_END 2 |
#define QUANT_MODE_H263 0 |
48 |
|
#define QUANT_MODE_MPEG 1 |
49 |
|
#define QUANT_MODE_CUSTOM 2 |
50 |
|
|
|
#define RAD2DEG 57.295779513082320876798154814105 |
|
|
#define DEG2RAD 0.017453292519943295769236907684886 |
|
51 |
|
|
52 |
typedef struct |
typedef struct |
53 |
{ |
{ |
55 |
int mode; // Vidomi directly accesses these vars |
int mode; // Vidomi directly accesses these vars |
56 |
int rc_bitrate; // |
int rc_bitrate; // |
57 |
int desired_size; // please try to avoid modifications here |
int desired_size; // please try to avoid modifications here |
58 |
char stats1[MAX_PATH]; // |
char stats[MAX_PATH]; // |
59 |
/*******************************/ |
/*******************************/ |
60 |
|
|
61 |
|
char profile_name[MAX_PATH]; |
62 |
|
int profile; |
63 |
|
|
64 |
int quality; |
int quality; |
65 |
int quant; |
int quant; |
66 |
int rc_reaction_delay_factor; |
int rc_reaction_delay_factor; |
78 |
int qpel; |
int qpel; |
79 |
int gmc; |
int gmc; |
80 |
int chromame; |
int chromame; |
|
//added by koepi for gruel's greyscale_mode |
|
81 |
int greyscale; |
int greyscale; |
82 |
// end of koepi's additions |
int use_bvop; |
83 |
int max_bframes; |
int max_bframes; |
84 |
int bquant_ratio; |
int bquant_ratio; |
85 |
int bquant_offset; |
int bquant_offset; |
86 |
|
int bvop_threshold; |
87 |
int packed; |
int packed; |
88 |
int dx50bvop; |
int closed_gov; |
89 |
int debug; |
int debug; |
90 |
int reduced_resolution; |
int reduced_resolution; |
91 |
|
|
97 |
BYTE qmatrix_inter[64]; |
BYTE qmatrix_inter[64]; |
98 |
|
|
99 |
int keyframe_boost; |
int keyframe_boost; |
|
//added by koepi for new 2pass curve treatment |
|
100 |
int kftreshold; |
int kftreshold; |
101 |
int kfreduction; |
int kfreduction; |
|
// end of koepi's additions |
|
102 |
int discard1pass; |
int discard1pass; |
|
int dummy2pass; |
|
103 |
int curve_compression_high; |
int curve_compression_high; |
104 |
int curve_compression_low; |
int curve_compression_low; |
105 |
int use_alt_curve; |
int use_alt_curve; |
117 |
int bitrate_payback_delay; |
int bitrate_payback_delay; |
118 |
int bitrate_payback_method; |
int bitrate_payback_method; |
119 |
int hinted_me; |
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; |
|
120 |
|
|
121 |
int num_threads; |
int num_threads; |
122 |
int chroma_opt; |
int chroma_opt; |
125 |
|
|
126 |
/* decoder */ |
/* decoder */ |
127 |
|
|
128 |
int deblock_y; |
// int deblock_y; |
129 |
int deblock_uv; |
// int deblock_uv; |
130 |
|
|
|
// char build[50]; |
|
131 |
DWORD cpu; |
DWORD cpu; |
132 |
float fquant; |
float fquant; |
133 |
BOOL save; |
BOOL save; |
135 |
|
|
136 |
typedef struct PROPSHEETINFO |
typedef struct PROPSHEETINFO |
137 |
{ |
{ |
138 |
int page; |
int idd; |
139 |
CONFIG * config; |
CONFIG * config; |
140 |
} PROPSHEETINFO; |
} PROPSHEETINFO; |
141 |
|
|
153 |
char* def; |
char* def; |
154 |
} REG_STR; |
} REG_STR; |
155 |
|
|
156 |
void config_reg_get(CONFIG *); |
|
157 |
void config_reg_set(CONFIG *); |
void config_reg_get(CONFIG * config); |
158 |
void config_reg_default(CONFIG *); |
void config_reg_set(CONFIG * config); |
159 |
int config_get_int(HWND, INT, int); |
|
|
int config_get_uint(HWND, UINT, int); |
|
|
void main_download(HWND, CONFIG *); |
|
|
void main_slider(HWND, CONFIG *); |
|
|
void main_value(HWND, CONFIG *); |
|
|
void adv_dialog(HWND, CONFIG *); |
|
|
void adv_mode(HWND, int); |
|
|
void adv_upload(HWND, int, CONFIG *); |
|
|
void adv_download(HWND, int, CONFIG *); |
|
|
void quant_upload(HWND, CONFIG *); |
|
|
void quant_download(HWND, CONFIG *); |
|
|
BOOL CALLBACK enum_tooltips(HWND, LPARAM); |
|
160 |
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); |
|
161 |
BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM); |
BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM); |
162 |
|
|
163 |
|
|
164 |
#endif /* _CONFIG_H_ */ |
#endif /* _CONFIG_H_ */ |