170 |
{"bquant_offset", ®.bquant_offset, 100}, /* 100-base float */ |
{"bquant_offset", ®.bquant_offset, 100}, /* 100-base float */ |
171 |
{"packed", ®.packed, 0}, |
{"packed", ®.packed, 0}, |
172 |
{"closed_gov", ®.closed_gov, 1}, |
{"closed_gov", ®.closed_gov, 1}, |
173 |
{"debug", ®.debug, 0}, |
{"vop_debug", ®.vop_debug, 0}, |
174 |
|
{"debug", ®.debug, 0x0}, |
175 |
{"reduced_resolution", ®.reduced_resolution, 0}, |
{"reduced_resolution", ®.reduced_resolution, 0}, |
176 |
{"frame_drop_ratio", ®.frame_drop_ratio, 0}, |
{"frame_drop_ratio", ®.frame_drop_ratio, 0}, |
177 |
|
|
435 |
} |
} |
436 |
|
|
437 |
|
|
438 |
|
#define HEX_BUF_SZ 16 |
439 |
|
unsigned int get_dlgitem_hex(HWND hDlg, UINT item, unsigned int def) |
440 |
|
{ |
441 |
|
char buf[HEX_BUF_SZ]; |
442 |
|
unsigned int value; |
443 |
|
|
444 |
|
if (GetDlgItemText(hDlg, item, buf, HEX_BUF_SZ) == 0) |
445 |
|
return def; |
446 |
|
|
447 |
|
if (sscanf(buf,"0x%x", &value)==1 || sscanf(buf,"%x", &value)==1) { |
448 |
|
return value; |
449 |
|
} |
450 |
|
|
451 |
|
return def; |
452 |
|
} |
453 |
|
|
454 |
|
void set_dlgitem_hex(HWND hDlg, UINT item, int value) |
455 |
|
{ |
456 |
|
char buf[HEX_BUF_SZ]; |
457 |
|
wsprintf(buf, "0x%x", value); |
458 |
|
SetDlgItemText(hDlg, item, buf); |
459 |
|
} |
460 |
|
|
461 |
/* ===================================================================================== */ |
/* ===================================================================================== */ |
462 |
/* QUANT MATRIX DIALOG ================================================================= */ |
/* QUANT MATRIX DIALOG ================================================================= */ |
463 |
/* ===================================================================================== */ |
/* ===================================================================================== */ |
882 |
|
|
883 |
SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE); |
SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE); |
884 |
|
|
885 |
CheckDlg(hDlg, IDC_DEBUG, config->debug); |
CheckDlg(hDlg, IDC_VOPDEBUG, config->vop_debug); |
886 |
|
set_dlgitem_hex(hDlg, IDC_DEBUG, config->debug); |
887 |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0); |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0); |
888 |
break; |
break; |
889 |
} |
} |
1029 |
config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads); |
config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads); |
1030 |
|
|
1031 |
config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0); |
config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0); |
1032 |
config->debug = IsDlgChecked(hDlg, IDC_DEBUG); |
config->vop_debug = IsDlgChecked(hDlg, IDC_VOPDEBUG); |
1033 |
|
config->debug = get_dlgitem_hex(hDlg, IDC_DEBUG, config->debug); |
1034 |
break; |
break; |
1035 |
} |
} |
1036 |
} |
} |