23 |
* |
* |
24 |
* History: |
* History: |
25 |
* |
* |
26 |
|
* 04.04.2002 interlacing support |
27 |
|
* hinted ME support |
28 |
|
* 24.03.2002 daniel smith <danielsmith@astroboymail.com> |
29 |
|
* added Foxer's new CBR engine |
30 |
|
* - cbr_buffer is being used as reaction delay (quick hack) |
31 |
* 23.03.2002 daniel smith <danielsmith@astroboymail.com> |
* 23.03.2002 daniel smith <danielsmith@astroboymail.com> |
32 |
* added load defaults button |
* added load defaults button |
33 |
* merged foxer's alternative 2-pass code (2-pass alt tab) |
* merged foxer's alternative 2-pass code (2-pass alt tab) |
69 |
{"bitrate", ®.bitrate, 900000}, |
{"bitrate", ®.bitrate, 900000}, |
70 |
{"quality", ®.quality, 85}, |
{"quality", ®.quality, 85}, |
71 |
{"quant", ®.quant, 5}, |
{"quant", ®.quant, 5}, |
72 |
{"rc_buffersize", ®.rc_buffersize, 2048000}, |
{"rc_buffersize", ®.rc_buffersize, 16}, |
73 |
|
|
74 |
{"motion_search", ®.motion_search, 5}, |
{"motion_search", ®.motion_search, 5}, |
75 |
{"quant_type", ®.quant_type, 0}, |
{"quant_type", ®.quant_type, 0}, |
76 |
{"fourcc_used", ®.fourcc_used, 0}, |
{"fourcc_used", ®.fourcc_used, 0}, |
77 |
{"max_key_interval", ®.max_key_interval, 300}, |
{"max_key_interval", ®.max_key_interval, 300}, |
78 |
{"lum_masking", ®.lum_masking, 0}, |
{"lum_masking", ®.lum_masking, 0}, |
79 |
|
{"interlacing", ®.interlacing, 0}, |
80 |
|
|
81 |
{"min_iquant", ®.min_iquant, 1}, |
{"min_iquant", ®.min_iquant, 1}, |
82 |
{"max_iquant", ®.max_iquant, 31}, |
{"max_iquant", ®.max_iquant, 31}, |
101 |
{"alt_curve_min_rel_qual", ®.alt_curve_min_rel_qual, 50}, |
{"alt_curve_min_rel_qual", ®.alt_curve_min_rel_qual, 50}, |
102 |
{"bitrate_payback_delay", ®.bitrate_payback_delay, 240}, |
{"bitrate_payback_delay", ®.bitrate_payback_delay, 240}, |
103 |
{"bitrate_payback_method", ®.bitrate_payback_method, 0}, |
{"bitrate_payback_method", ®.bitrate_payback_method, 0}, |
104 |
|
{"hinted_me", ®.hinted_me, 0}, |
105 |
|
|
106 |
{"credits_start", ®.credits_start, 0}, |
{"credits_start", ®.credits_start, 0}, |
107 |
{"credits_start_begin", ®.credits_start_begin, 0}, |
{"credits_start_begin", ®.credits_start_begin, 0}, |
119 |
}; |
}; |
120 |
|
|
121 |
REG_STR const reg_strs[] = { |
REG_STR const reg_strs[] = { |
122 |
|
{"hintfile", reg.hintfile, CONFIG_HINTFILE}, |
123 |
{"stats1", reg.stats1, CONFIG_2PASS_1_FILE}, |
{"stats1", reg.stats1, CONFIG_2PASS_1_FILE}, |
124 |
{"stats2", reg.stats2, CONFIG_2PASS_2_FILE} |
{"stats2", reg.stats2, CONFIG_2PASS_2_FILE} |
125 |
// {"build", reg.build, XVID_BUILD} |
// {"build", reg.build, XVID_BUILD} |
513 |
int i; |
int i; |
514 |
|
|
515 |
// first perform checkbox-based enable/disable |
// first perform checkbox-based enable/disable |
516 |
|
CONTROLDLG(IDC_HINTFILE, ISDLGSET(IDC_HINTEDME)); |
517 |
|
CONTROLDLG(IDC_HINT_BROWSE, ISDLGSET(IDC_HINTEDME)); |
518 |
|
|
519 |
CONTROLDLG(IDC_USEAUTO, ISDLGSET(IDC_USEALT)); |
CONTROLDLG(IDC_USEAUTO, ISDLGSET(IDC_USEALT)); |
520 |
CONTROLDLG(IDC_AUTOSTR, ISDLGSET(IDC_USEALT) && ISDLGSET(IDC_USEAUTO)); |
CONTROLDLG(IDC_AUTOSTR, ISDLGSET(IDC_USEALT) && ISDLGSET(IDC_USEAUTO)); |
521 |
CONTROLDLG(IDC_USEAUTOBONUS, ISDLGSET(IDC_USEALT)); |
CONTROLDLG(IDC_USEAUTOBONUS, ISDLGSET(IDC_USEALT)); |
564 |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0); |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_SETCURSEL, config->fourcc_used, 0); |
565 |
SetDlgItemInt(hDlg, IDC_MAXKEY, config->max_key_interval, FALSE); |
SetDlgItemInt(hDlg, IDC_MAXKEY, config->max_key_interval, FALSE); |
566 |
CheckDlgButton(hDlg, IDC_LUMMASK, config->lum_masking ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_LUMMASK, config->lum_masking ? BST_CHECKED : BST_UNCHECKED); |
567 |
|
CheckDlgButton(hDlg, IDC_INTERLACING, config->interlacing ? BST_CHECKED : BST_UNCHECKED); |
568 |
break; |
break; |
569 |
|
|
570 |
case DLG_QUANT : |
case DLG_QUANT : |
586 |
CheckDlgButton(hDlg, IDC_PAYBACKBIAS, (config->bitrate_payback_method == 0)); |
CheckDlgButton(hDlg, IDC_PAYBACKBIAS, (config->bitrate_payback_method == 0)); |
587 |
CheckDlgButton(hDlg, IDC_PAYBACKPROP, (config->bitrate_payback_method == 1)); |
CheckDlgButton(hDlg, IDC_PAYBACKPROP, (config->bitrate_payback_method == 1)); |
588 |
|
|
589 |
|
CheckDlgButton(hDlg, IDC_HINTEDME, config->hinted_me ? BST_CHECKED : BST_UNCHECKED); |
590 |
|
SetDlgItemText(hDlg, IDC_HINTFILE, config->hintfile); |
591 |
SetDlgItemText(hDlg, IDC_STATS1, config->stats1); |
SetDlgItemText(hDlg, IDC_STATS1, config->stats1); |
592 |
SetDlgItemText(hDlg, IDC_STATS2, config->stats2); |
SetDlgItemText(hDlg, IDC_STATS2, config->stats2); |
593 |
break; |
break; |
666 |
config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0); |
config->fourcc_used = SendDlgItemMessage(hDlg, IDC_FOURCC, CB_GETCURSEL, 0, 0); |
667 |
config->max_key_interval = config_get_int(hDlg, IDC_MAXKEY, config->max_key_interval); |
config->max_key_interval = config_get_int(hDlg, IDC_MAXKEY, config->max_key_interval); |
668 |
config->lum_masking = ISDLGSET(IDC_LUMMASK); |
config->lum_masking = ISDLGSET(IDC_LUMMASK); |
669 |
|
config->interlacing = ISDLGSET(IDC_INTERLACING); |
670 |
break; |
break; |
671 |
|
|
672 |
case DLG_QUANT : |
case DLG_QUANT : |
690 |
config->curve_compression_low = GetDlgItemInt(hDlg, IDC_CURVECOMPL, NULL, FALSE); |
config->curve_compression_low = GetDlgItemInt(hDlg, IDC_CURVECOMPL, NULL, FALSE); |
691 |
config->bitrate_payback_delay = config_get_int(hDlg, IDC_PAYBACK, config->bitrate_payback_delay); |
config->bitrate_payback_delay = config_get_int(hDlg, IDC_PAYBACK, config->bitrate_payback_delay); |
692 |
config->bitrate_payback_method = ISDLGSET(IDC_PAYBACKPROP); |
config->bitrate_payback_method = ISDLGSET(IDC_PAYBACKPROP); |
693 |
|
config->hinted_me = ISDLGSET(IDC_HINTEDME); |
694 |
|
|
695 |
|
if (GetDlgItemText(hDlg, IDC_HINTFILE, config->hintfile, MAX_PATH) == 0) |
696 |
|
{ |
697 |
|
lstrcpy(config->hintfile, CONFIG_HINTFILE); |
698 |
|
} |
699 |
if (GetDlgItemText(hDlg, IDC_STATS1, config->stats1, MAX_PATH) == 0) |
if (GetDlgItemText(hDlg, IDC_STATS1, config->stats1, MAX_PATH) == 0) |
700 |
{ |
{ |
701 |
lstrcpy(config->stats1, CONFIG_2PASS_1_FILE); |
lstrcpy(config->stats1, CONFIG_2PASS_1_FILE); |
1007 |
{ |
{ |
1008 |
switch (LOWORD(wParam)) |
switch (LOWORD(wParam)) |
1009 |
{ |
{ |
1010 |
|
case IDC_HINTEDME : |
1011 |
case IDC_USEALT : |
case IDC_USEALT : |
1012 |
case IDC_USEAUTO : |
case IDC_USEAUTO : |
1013 |
case IDC_USEAUTOBONUS : |
case IDC_USEAUTOBONUS : |
1022 |
break; |
break; |
1023 |
} |
} |
1024 |
} |
} |
1025 |
if ((LOWORD(wParam) == IDC_STATS1_BROWSE || LOWORD(wParam) == IDC_STATS2_BROWSE) && HIWORD(wParam) == BN_CLICKED) |
if ((LOWORD(wParam) == IDC_HINT_BROWSE || LOWORD(wParam) == IDC_STATS1_BROWSE || LOWORD(wParam) == IDC_STATS2_BROWSE) && HIWORD(wParam) == BN_CLICKED) |
1026 |
{ |
{ |
1027 |
OPENFILENAME ofn; |
OPENFILENAME ofn; |
1028 |
char tmp[MAX_PATH]; |
char tmp[MAX_PATH]; |
1039 |
ofn.nMaxFile = MAX_PATH; |
ofn.nMaxFile = MAX_PATH; |
1040 |
ofn.Flags = OFN_PATHMUSTEXIST; |
ofn.Flags = OFN_PATHMUSTEXIST; |
1041 |
|
|
1042 |
// display save box for stats1 using 1st-pass |
if (LOWORD(wParam) == IDC_HINT_BROWSE) |
1043 |
if (LOWORD(wParam) == IDC_STATS1_BROWSE && |
{ |
1044 |
|
ofn.lpstrFilter = "motion hints (*.mvh)\0*.mvh\0All files (*.*)\0*.*\0\0"; |
1045 |
|
if (GetOpenFileName(&ofn)) |
1046 |
|
{ |
1047 |
|
SetDlgItemText(hDlg, IDC_HINTFILE, tmp); |
1048 |
|
} |
1049 |
|
} |
1050 |
|
else if (LOWORD(wParam) == IDC_STATS1_BROWSE && |
1051 |
psi->config->mode == DLG_MODE_2PASS_1) |
psi->config->mode == DLG_MODE_2PASS_1) |
1052 |
{ |
{ |
1053 |
ofn.Flags |= OFN_OVERWRITEPROMPT; |
ofn.Flags |= OFN_OVERWRITEPROMPT; |