Parent Directory | Revision Log
Revision 1.1.2.4 - (view) (download)
1 : | suxen_drol | 1.1.2.1 | #ifndef _CONFIG_H_ |
2 : | #define _CONFIG_H_ | ||
3 : | |||
4 : | #include <windows.h> | ||
5 : | suxen_drol | 1.1.2.3 | #include "vfwext.h" |
6 : | suxen_drol | 1.1.2.1 | |
7 : | suxen_drol | 1.1.2.2 | extern HINSTANCE g_hInst; |
8 : | suxen_drol | 1.1.2.1 | |
9 : | |||
10 : | /* small hack */ | ||
11 : | #ifndef IDC_HAND | ||
12 : | #define IDC_HAND MAKEINTRESOURCE(32649) | ||
13 : | #endif | ||
14 : | |||
15 : | /* one kilobit */ | ||
16 : | #define CONFIG_KBPS 1000 | ||
17 : | |||
18 : | suxen_drol | 1.1.2.3 | /* min/max bitrate when not specified by profile */ |
19 : | #define DEFAULT_MIN_KBPS 16 | ||
20 : | #define DEFAULT_MAX_KBPS 10000 | ||
21 : | |||
22 : | |||
23 : | suxen_drol | 1.1.2.1 | /* registry stuff */ |
24 : | #define XVID_REG_KEY HKEY_CURRENT_USER | ||
25 : | #define XVID_REG_PARENT "Software\\GNU" | ||
26 : | #define XVID_REG_CHILD "XviD" | ||
27 : | #define XVID_REG_CLASS "config" | ||
28 : | |||
29 : | #define XVID_BUILD __TIME__ ", " __DATE__ | ||
30 : | #define XVID_WEBSITE "http://www.xvid.org/" | ||
31 : | #define XVID_SPECIAL_BUILD "(Vanilla CVS Build)" | ||
32 : | |||
33 : | /* constants */ | ||
34 : | suxen_drol | 1.1.2.2 | #define CONFIG_2PASS_FILE "\\video.pass" |
35 : | suxen_drol | 1.1.2.1 | |
36 : | /* codec modes */ | ||
37 : | suxen_drol | 1.1.2.3 | #define RC_MODE_1PASS 0 |
38 : | #define RC_MODE_2PASS1 1 | ||
39 : | #define RC_MODE_2PASS2 2 | ||
40 : | #define RC_MODE_NULL 3 | ||
41 : | |||
42 : | #define RC_ZONE_WEIGHT 0 | ||
43 : | #define RC_ZONE_QUANT 1 | ||
44 : | suxen_drol | 1.1.2.1 | |
45 : | /* vhq modes */ | ||
46 : | #define VHQ_OFF 0 | ||
47 : | #define VHQ_MODE_DECISION 1 | ||
48 : | #define VHQ_LIMITED_SEARCH 2 | ||
49 : | #define VHQ_MEDIUM_SEARCH 3 | ||
50 : | #define VHQ_WIDE_SEARCH 4 | ||
51 : | |||
52 : | suxen_drol | 1.1.2.2 | /* quantizer modes */ |
53 : | #define QUANT_MODE_H263 0 | ||
54 : | #define QUANT_MODE_MPEG 1 | ||
55 : | #define QUANT_MODE_CUSTOM 2 | ||
56 : | suxen_drol | 1.1.2.1 | |
57 : | |||
58 : | suxen_drol | 1.1.2.3 | #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 : | |||
72 : | |||
73 : | suxen_drol | 1.1.2.1 | typedef struct |
74 : | { | ||
75 : | /********** ATTENTION **********/ | ||
76 : | int mode; // Vidomi directly accesses these vars | ||
77 : | suxen_drol | 1.1.2.3 | int bitrate; // |
78 : | suxen_drol | 1.1.2.1 | int desired_size; // please try to avoid modifications here |
79 : | suxen_drol | 1.1.2.2 | char stats[MAX_PATH]; // |
80 : | suxen_drol | 1.1.2.1 | /*******************************/ |
81 : | |||
82 : | suxen_drol | 1.1.2.3 | /* profile */ |
83 : | suxen_drol | 1.1.2.2 | char profile_name[MAX_PATH]; |
84 : | suxen_drol | 1.1.2.3 | int profile; /* used internally; *not* written to registry */ |
85 : | suxen_drol | 1.1.2.2 | |
86 : | suxen_drol | 1.1.2.3 | int quant_type; |
87 : | BYTE qmatrix_intra[64]; | ||
88 : | BYTE qmatrix_inter[64]; | ||
89 : | suxen_drol | 1.1.2.1 | int lum_masking; |
90 : | int interlacing; | ||
91 : | int qpel; | ||
92 : | int gmc; | ||
93 : | suxen_drol | 1.1.2.3 | int reduced_resolution; |
94 : | suxen_drol | 1.1.2.2 | int use_bvop; |
95 : | suxen_drol | 1.1.2.1 | int max_bframes; |
96 : | int bquant_ratio; | ||
97 : | int bquant_offset; | ||
98 : | int packed; | ||
99 : | suxen_drol | 1.1.2.2 | int closed_gov; |
100 : | suxen_drol | 1.1.2.1 | |
101 : | suxen_drol | 1.1.2.3 | /* zones */ |
102 : | int num_zones; | ||
103 : | zone_t zones[MAX_ZONES]; | ||
104 : | int cur_zone; /* used internally; *not* written to registry */ | ||
105 : | suxen_drol | 1.1.2.1 | |
106 : | suxen_drol | 1.1.2.3 | /* single pass */ |
107 : | int rc_reaction_delay_factor; | ||
108 : | int rc_averaging_period; | ||
109 : | int rc_buffer; | ||
110 : | |||
111 : | /* 2pass2 */ | ||
112 : | suxen_drol | 1.1.2.1 | int keyframe_boost; |
113 : | int kftreshold; | ||
114 : | int kfreduction; | ||
115 : | int discard1pass; | ||
116 : | int curve_compression_high; | ||
117 : | int curve_compression_low; | ||
118 : | int use_alt_curve; | ||
119 : | int alt_curve_use_auto; | ||
120 : | int alt_curve_auto_str; | ||
121 : | int alt_curve_use_auto_bonus_bias; | ||
122 : | int alt_curve_bonus_bias; | ||
123 : | int alt_curve_type; | ||
124 : | int alt_curve_high_dist; | ||
125 : | int alt_curve_low_dist; | ||
126 : | int alt_curve_min_rel_qual; | ||
127 : | int twopass_max_overflow_improvement; | ||
128 : | int twopass_max_overflow_degradation; | ||
129 : | int bitrate_payback_delay; | ||
130 : | int bitrate_payback_method; | ||
131 : | |||
132 : | suxen_drol | 1.1.2.3 | /* motion */ |
133 : | |||
134 : | int motion_search; | ||
135 : | int vhq_mode; | ||
136 : | int chromame; | ||
137 : | int max_key_interval; | ||
138 : | int min_key_interval; | ||
139 : | suxen_drol | 1.1.2.1 | int frame_drop_ratio; |
140 : | |||
141 : | suxen_drol | 1.1.2.3 | /* 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 : | suxen_drol | 1.1.2.1 | |
150 : | suxen_drol | 1.1.2.3 | /* debug */ |
151 : | int num_threads; | ||
152 : | int fourcc_used; | ||
153 : | suxen_drol | 1.1.2.4 | int vop_debug; |
154 : | suxen_drol | 1.1.2.3 | int debug; |
155 : | suxen_drol | 1.1.2.1 | |
156 : | DWORD cpu; | ||
157 : | suxen_drol | 1.1.2.3 | |
158 : | /* internal */ | ||
159 : | int ci_valid; | ||
160 : | VFWEXT_CONFIGURE_INFO_T ci; | ||
161 : | |||
162 : | suxen_drol | 1.1.2.1 | BOOL save; |
163 : | } CONFIG; | ||
164 : | |||
165 : | typedef struct PROPSHEETINFO | ||
166 : | { | ||
167 : | suxen_drol | 1.1.2.2 | int idd; |
168 : | suxen_drol | 1.1.2.1 | CONFIG * config; |
169 : | } PROPSHEETINFO; | ||
170 : | |||
171 : | typedef struct REG_INT | ||
172 : | { | ||
173 : | char* reg_value; | ||
174 : | int* config_int; | ||
175 : | int def; | ||
176 : | } REG_INT; | ||
177 : | |||
178 : | typedef struct REG_STR | ||
179 : | { | ||
180 : | char* reg_value; | ||
181 : | char* config_str; | ||
182 : | char* def; | ||
183 : | } REG_STR; | ||
184 : | suxen_drol | 1.1.2.3 | |
185 : | |||
186 : | #define PROFILE_ADAPTQUANT 0x00000001 | ||
187 : | #define PROFILE_BVOP 0x00000002 | ||
188 : | #define PROFILE_MPEGQUANT 0x00000004 | ||
189 : | #define PROFILE_INTERLACE 0x00000008 | ||
190 : | #define PROFILE_QPEL 0x00000010 | ||
191 : | #define PROFILE_GMC 0x00000020 | ||
192 : | #define PROFILE_REDUCED 0x00000040 /* dynamic resolution conversion */ | ||
193 : | |||
194 : | #define PROFILE_AS (PROFILE_ADAPTQUANT|PROFILE_BVOP|PROFILE_MPEGQUANT|PROFILE_INTERLACE|PROFILE_QPEL|PROFILE_GMC) | ||
195 : | #define PROFILE_ARTS (PROFILE_ADAPTQUANT|PROFILE_REDUCED) | ||
196 : | |||
197 : | |||
198 : | typedef struct | ||
199 : | { | ||
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 : | suxen_drol | 1.1.2.1 | |
219 : | suxen_drol | 1.1.2.2 | |
220 : | void config_reg_get(CONFIG * config); | ||
221 : | void config_reg_set(CONFIG * config); | ||
222 : | |||
223 : | suxen_drol | 1.1.2.1 | BOOL CALLBACK main_proc(HWND, UINT, WPARAM, LPARAM); |
224 : | BOOL CALLBACK about_proc(HWND, UINT, WPARAM, LPARAM); | ||
225 : | suxen_drol | 1.1.2.2 | |
226 : | suxen_drol | 1.1.2.1 | |
227 : | #endif /* _CONFIG_H_ */ |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |