19 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
20 |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. |
21 |
* |
* |
22 |
* $Id: config.c,v 1.42 2010-12-21 16:56:42 Isibaar Exp $ |
* $Id: config.c,v 1.43 2010-12-21 20:23:06 Isibaar Exp $ |
23 |
* |
* |
24 |
*************************************************************************/ |
*************************************************************************/ |
25 |
|
|
125 |
{ "MPEG4 Advanced Simple @ L4", "MPEG4 ASP @ L4", 0xf4, 352, 576, 30, 4, 2376, 792, 23760, 50, 80*16368, 8192, 3000000, 0, -1, PROFILE_AS }, |
{ "MPEG4 Advanced Simple @ L4", "MPEG4 ASP @ L4", 0xf4, 352, 576, 30, 4, 2376, 792, 23760, 50, 80*16368, 8192, 3000000, 0, -1, PROFILE_AS }, |
126 |
{ "MPEG4 Advanced Simple @ L5", "MPEG4 ASP @ L5", 0xf5, 720, 576, 30, 4, 4860, 1620, 48600, 25, 112*16368, 16384, 8000000, 0, -1, PROFILE_AS }, |
{ "MPEG4 Advanced Simple @ L5", "MPEG4 ASP @ L5", 0xf5, 720, 576, 30, 4, 4860, 1620, 48600, 25, 112*16368, 16384, 8000000, 0, -1, PROFILE_AS }, |
127 |
|
|
128 |
{ "(unrestricted)", "(unrestricted)", 0x00, 0, 0, 0, 0, 0, 0, 0, 100, 0*16368, -1, 0, 0, -1, 0xffffffff & ~(PROFILE_EXTRA | PROFILE_PACKED)}, |
{ "(unrestricted)", "(unrestricted)", 0x00, 0, 0, 0, 0, 0, 0, 0, 100, 0*16368, -1, 0, 0, -1, 0xffffffff & ~(PROFILE_EXTRA | PROFILE_PACKED | PROFILE_XVID)}, |
129 |
}; |
}; |
130 |
|
|
131 |
|
|
132 |
const quality_t quality_table[] = |
const quality_t quality_table[] = |
133 |
{ |
{ |
134 |
/* name | m vhq bf cme tbo kfi fdr | iquant pquant bquant trellis */ |
/* name | m vhq mtc bf cme tbo kfi fdr | iquant pquant bquant trellis */ |
135 |
{ "Real-time", 1, 0, 0, 0, 0, 300, 0, 1, 31, 1, 31, 1, 31, 0 }, |
{ "Real-time", 1, 0, 0, 0, 0, 0, 300, 0, 1, 31, 1, 31, 1, 31, 0 }, |
136 |
{ QUALITY_GENERAL_STRING, 6, 1, 0, 1, 0, 300, 0, 1, 31, 1, 31, 1, 31, 1 }, |
{ QUALITY_GENERAL_STRING, 6, 1, 0, 0, 1, 0, 300, 0, 1, 31, 1, 31, 1, 31, 1 }, |
137 |
}; |
}; |
138 |
|
|
139 |
const int quality_table_num = sizeof(quality_table)/sizeof(quality_t); |
const int quality_table_num = sizeof(quality_table)/sizeof(quality_t); |
201 |
{"bquant_ratio", ®.bquant_ratio, 150}, /* 100-base float */ |
{"bquant_ratio", ®.bquant_ratio, 150}, /* 100-base float */ |
202 |
{"bquant_offset", ®.bquant_offset, 100}, /* 100-base float */ |
{"bquant_offset", ®.bquant_offset, 100}, /* 100-base float */ |
203 |
{"packed", ®.packed, 1}, |
{"packed", ®.packed, 1}, |
204 |
|
{"num_slices", ®.num_slices, 1}, |
205 |
|
|
206 |
/* aspect ratio */ |
/* aspect ratio */ |
207 |
{"ar_mode", ®.ar_mode, 0}, |
{"ar_mode", ®.ar_mode, 0}, |
253 |
{"vhq_bframe", ®.quality_user.vhq_bframe, 0}, |
{"vhq_bframe", ®.quality_user.vhq_bframe, 0}, |
254 |
{"chromame", ®.quality_user.chromame, 1}, |
{"chromame", ®.quality_user.chromame, 1}, |
255 |
{"turbo", ®.quality_user.turbo, 0}, |
{"turbo", ®.quality_user.turbo, 0}, |
256 |
{"max_key_interval", ®.quality_user.max_key_interval, 300}, |
{"max_key_interval", ®.quality_user.max_key_interval, 250}, |
257 |
{"frame_drop_ratio", ®.quality_user.frame_drop_ratio, 0}, |
{"frame_drop_ratio", ®.quality_user.frame_drop_ratio, 0}, |
258 |
|
|
259 |
/* quant */ |
/* quant */ |
270 |
{"debug", ®.debug, 0x0}, |
{"debug", ®.debug, 0x0}, |
271 |
{"vop_debug", ®.vop_debug, 0}, |
{"vop_debug", ®.vop_debug, 0}, |
272 |
{"display_status", ®.display_status, 1}, |
{"display_status", ®.display_status, 1}, |
273 |
|
{"cpu_flags", ®.cpu, 0}, |
274 |
|
|
275 |
/* smp */ |
/* smp */ |
276 |
{"num_threads", ®.num_threads, 0}, |
{"num_threads", ®.num_threads, 0}, |
|
{"num_slices", ®.num_slices, 1}, |
|
277 |
|
|
278 |
/* decoder, shared with dshow */ |
/* decoder, shared with dshow */ |
279 |
{"Brightness", &pp_brightness, 0}, |
{"Brightness", &pp_brightness, 0}, |
354 |
FreeLibrary(m_hdll); |
FreeLibrary(m_hdll); |
355 |
} |
} |
356 |
|
|
|
reg.cpu = info.cpu_flags; |
|
|
reg.num_threads = info.num_threads; |
|
|
|
|
357 |
RegOpenKeyEx(XVID_REG_KEY, XVID_REG_PARENT "\\" XVID_REG_CHILD, 0, KEY_READ, &hKey); |
RegOpenKeyEx(XVID_REG_KEY, XVID_REG_PARENT "\\" XVID_REG_CHILD, 0, KEY_READ, &hKey); |
358 |
|
|
359 |
/* read integer values */ |
/* read integer values */ |
418 |
memcpy(&config->zones[i], &stmp, sizeof(zone_t)); |
memcpy(&config->zones[i], &stmp, sizeof(zone_t)); |
419 |
} |
} |
420 |
|
|
421 |
if (config->num_threads == 0) |
if (!(config->cpu&XVID_CPU_FORCE)) { |
422 |
config->num_threads = info.num_threads; /* old autodetect */ |
config->cpu = info.cpu_flags; |
423 |
|
config->num_threads = info.num_threads; /* autodetect */ |
424 |
|
} |
425 |
|
|
426 |
RegCloseKey(hKey); |
RegCloseKey(hKey); |
427 |
} |
} |