50 |
* now get Core Version use xvid_init() |
* now get Core Version use xvid_init() |
51 |
* 05.03.2002 Min Chen <chenm001@163.com> |
* 05.03.2002 Min Chen <chenm001@163.com> |
52 |
* Add Core version display to about box |
* Add Core version display to about box |
53 |
* 01.12.2001 inital version; (c)2001 peter ross <suxen_drol@hotmail.com> |
* 01.12.2001 inital version; (c)2001 peter ross <pross@xvid.org> |
54 |
* |
* |
55 |
*************************************************************************/ |
*************************************************************************/ |
56 |
|
|
59 |
#include <commctrl.h> |
#include <commctrl.h> |
60 |
#include <shlobj.h> |
#include <shlobj.h> |
61 |
#include <prsht.h> |
#include <prsht.h> |
62 |
|
#ifdef _SMP |
63 |
|
#include <pthread.h> |
64 |
|
#endif |
65 |
|
|
66 |
|
#include <xvid.h> // XviD API |
67 |
|
|
68 |
#include "codec.h" |
#include "codec.h" |
69 |
#include "config.h" |
#include "config.h" |
|
#include "xvid.h" // cpu masks |
|
70 |
#include "resource.h" |
#include "resource.h" |
71 |
|
|
72 |
|
|
73 |
|
|
74 |
/* registry info structs */ |
/* registry info structs */ |
75 |
|
|
76 |
CONFIG reg; |
CONFIG reg; |
91 |
{"min_key_interval", ®.min_key_interval, 1}, |
{"min_key_interval", ®.min_key_interval, 1}, |
92 |
{"lum_masking", ®.lum_masking, 0}, |
{"lum_masking", ®.lum_masking, 0}, |
93 |
{"interlacing", ®.interlacing, 0}, |
{"interlacing", ®.interlacing, 0}, |
94 |
#ifdef BFRAMES |
{"qpel", ®.qpel, 0}, |
95 |
|
{"gmc", ®.gmc, 0}, |
96 |
|
{"chromame", ®.chromame, 0}, |
97 |
|
//added by koepi for gruel's greyscale_mode |
98 |
|
{"greyscale", ®.greyscale, 0}, |
99 |
|
// end of koepi's additions |
100 |
{"max_bframes", ®.max_bframes, -1}, |
{"max_bframes", ®.max_bframes, -1}, |
101 |
{"bquant_ratio", ®.bquant_ratio, 200}, |
{"bquant_ratio", ®.bquant_ratio, 150}, |
102 |
|
{"bquant_offset", ®.bquant_offset, 100}, |
103 |
{"packed", ®.packed, 0}, |
{"packed", ®.packed, 0}, |
104 |
{"dx50bvop", ®.dx50bvop, 0}, |
{"dx50bvop", ®.dx50bvop, 0}, |
105 |
{"debug", ®.debug, 0}, |
{"debug", ®.debug, 0}, |
106 |
#endif BFRAMES |
{"frame_drop_ratio", ®.frame_drop_ratio, 0}, |
107 |
|
|
108 |
{"min_iquant", ®.min_iquant, 1}, |
{"min_iquant", ®.min_iquant, 2}, |
109 |
{"max_iquant", ®.max_iquant, 31}, |
{"max_iquant", ®.max_iquant, 31}, |
110 |
{"min_pquant", ®.min_pquant, 1}, |
{"min_pquant", ®.min_pquant, 2}, |
111 |
{"max_pquant", ®.max_pquant, 31}, |
{"max_pquant", ®.max_pquant, 31}, |
112 |
|
|
113 |
{"desired_size", ®.desired_size, 570000}, |
{"desired_size", ®.desired_size, 570000}, |
114 |
{"keyframe_boost", ®.keyframe_boost, 20}, |
{"keyframe_boost", ®.keyframe_boost, 0}, |
115 |
{"discard1pass", ®.discard1pass, 1}, |
{"discard1pass", ®.discard1pass, 1}, |
116 |
{"dummy2pass", ®.dummy2pass, 0}, |
{"dummy2pass", ®.dummy2pass, 0}, |
117 |
|
// added by koepi for new two-pass curve treatment |
118 |
|
{"kftreshold", ®.kftreshold, 10}, |
119 |
|
{"kfreduction", ®.kfreduction, 30}, |
120 |
|
// end of koepi's additions |
121 |
{"curve_compression_high", ®.curve_compression_high, 25}, |
{"curve_compression_high", ®.curve_compression_high, 25}, |
122 |
{"curve_compression_low", ®.curve_compression_low, 10}, |
{"curve_compression_low", ®.curve_compression_low, 10}, |
123 |
{"use_alt_curve", ®.use_alt_curve, 0}, |
{"use_alt_curve", ®.use_alt_curve, 1}, |
124 |
{"alt_curve_use_auto", ®.alt_curve_use_auto, 1}, |
{"alt_curve_use_auto", ®.alt_curve_use_auto, 1}, |
125 |
{"alt_curve_auto_str", ®.alt_curve_auto_str, 50}, |
{"alt_curve_auto_str", ®.alt_curve_auto_str, 30}, |
126 |
{"alt_curve_use_auto_bonus_bias", ®.alt_curve_use_auto_bonus_bias, 1}, |
{"alt_curve_use_auto_bonus_bias", ®.alt_curve_use_auto_bonus_bias, 1}, |
127 |
{"alt_curve_bonus_bias", ®.alt_curve_bonus_bias, 50}, |
{"alt_curve_bonus_bias", ®.alt_curve_bonus_bias, 50}, |
128 |
{"alt_curve_type", ®.alt_curve_type, 1}, |
{"alt_curve_type", ®.alt_curve_type, 1}, |
129 |
{"alt_curve_high_dist", ®.alt_curve_high_dist, 300}, |
{"alt_curve_high_dist", ®.alt_curve_high_dist, 500}, |
130 |
{"alt_curve_low_dist", ®.alt_curve_low_dist, 300}, |
{"alt_curve_low_dist", ®.alt_curve_low_dist, 90}, |
131 |
{"alt_curve_min_rel_qual", ®.alt_curve_min_rel_qual, 50}, |
{"alt_curve_min_rel_qual", ®.alt_curve_min_rel_qual, 50}, |
132 |
{"bitrate_payback_delay", ®.bitrate_payback_delay, 240}, |
{"bitrate_payback_delay", ®.bitrate_payback_delay, 250}, |
133 |
{"bitrate_payback_method", ®.bitrate_payback_method, 0}, |
{"bitrate_payback_method", ®.bitrate_payback_method, 0}, |
134 |
{"twopass_max_bitrate", ®.twopass_max_bitrate, 10000 * CONFIG_KBPS}, |
{"twopass_max_bitrate", ®.twopass_max_bitrate, 10000 * CONFIG_KBPS}, |
135 |
{"twopass_max_overflow_improvement", ®.twopass_max_overflow_improvement, 60}, |
{"twopass_max_overflow_improvement", ®.twopass_max_overflow_improvement, 60}, |
143 |
{"credits_end_begin", ®.credits_end_begin, 0}, |
{"credits_end_begin", ®.credits_end_begin, 0}, |
144 |
{"credits_end_end", ®.credits_end_end, 0}, |
{"credits_end_end", ®.credits_end_end, 0}, |
145 |
|
|
146 |
|
// added by koepi for greyscale credits |
147 |
|
{"credits_greyscale", ®.credits_greyscale, 0}, |
148 |
|
// end of koepi's addition |
149 |
{"credits_mode", ®.credits_mode, 0}, |
{"credits_mode", ®.credits_mode, 0}, |
150 |
{"credits_rate", ®.credits_rate, 20}, |
{"credits_rate", ®.credits_rate, 20}, |
151 |
{"credits_quant_i", ®.credits_quant_i, 20}, |
{"credits_quant_i", ®.credits_quant_i, 20}, |
176 |
xvid_init(0, 0, &init_param, NULL); |
xvid_init(0, 0, &init_param, NULL); |
177 |
reg.cpu = init_param.cpu_flags; |
reg.cpu = init_param.cpu_flags; |
178 |
|
|
179 |
|
#ifdef _SMP |
180 |
|
reg.num_threads = pthread_num_processors_np(); |
181 |
|
#endif |
182 |
|
|
183 |
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); |
184 |
|
|
185 |
for (i=0 ; i<sizeof(reg_ints)/sizeof(REG_INT) ; ++i) |
for (i=0 ; i<sizeof(reg_ints)/sizeof(REG_INT) ; ++i) |
501 |
// create arrays of controls to be disabled for each mode |
// create arrays of controls to be disabled for each mode |
502 |
const short twopass_disable[] = { |
const short twopass_disable[] = { |
503 |
IDC_KFBOOST, IDC_DUMMY2PASS, IDC_USEALT, |
IDC_KFBOOST, IDC_DUMMY2PASS, IDC_USEALT, |
504 |
|
// added by koepi for new curve treatment |
505 |
|
IDC_KFTRESHOLD, IDC_KFREDUCTION, |
506 |
|
//end of koepi's additions |
507 |
IDC_CURVECOMPH, IDC_CURVECOMPL, IDC_PAYBACK, IDC_PAYBACKBIAS, IDC_PAYBACKPROP, |
IDC_CURVECOMPH, IDC_CURVECOMPL, IDC_PAYBACK, IDC_PAYBACKBIAS, IDC_PAYBACKPROP, |
508 |
IDC_STATS2, IDC_STATS2_BROWSE, |
IDC_STATS2, IDC_STATS2_BROWSE, |
509 |
}; |
}; |
513 |
IDC_CREDITS_START, IDC_CREDITS_END, IDC_CREDITS_START_BEGIN, IDC_CREDITS_START_END, |
IDC_CREDITS_START, IDC_CREDITS_END, IDC_CREDITS_START_BEGIN, IDC_CREDITS_START_END, |
514 |
IDC_CREDITS_END_BEGIN, IDC_CREDITS_END_END, IDC_CREDITS_RATE_RADIO, |
IDC_CREDITS_END_BEGIN, IDC_CREDITS_END_END, IDC_CREDITS_RATE_RADIO, |
515 |
IDC_CREDITS_QUANT_RADIO, IDC_CREDITS_QUANT_STATIC, IDC_CREDITS_SIZE_RADIO, |
IDC_CREDITS_QUANT_RADIO, IDC_CREDITS_QUANT_STATIC, IDC_CREDITS_SIZE_RADIO, |
516 |
IDC_CREDITS_END_STATIC, IDC_CREDITS_RATE, IDC_CREDITS_QUANTI, IDC_CREDITS_QUANTP, |
IDC_CREDITS_QUANTI, IDC_CREDITS_QUANTP, IDC_CREDITS_END_STATIC, IDC_CREDITS_RATE, |
517 |
IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE, |
IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE, IDC_CREDITS_GREYSCALE, IDC_HINTFILE |
518 |
}; |
}; |
519 |
|
|
520 |
const short qual_disable[] = { |
const short qual_disable[] = { |
521 |
IDC_STATS1, IDC_STATS1_BROWSE, IDC_DISCARD1PASS, IDC_HINTEDME, |
IDC_STATS1, IDC_STATS1_BROWSE, IDC_DISCARD1PASS, IDC_HINTEDME, |
522 |
IDC_CBR_REACTIONDELAY, IDC_CBR_AVERAGINGPERIOD, IDC_CBR_BUFFER, |
IDC_CBR_REACTIONDELAY, IDC_CBR_AVERAGINGPERIOD, IDC_CBR_BUFFER, |
523 |
IDC_CREDITS_SIZE_RADIO, IDC_CREDITS_END_STATIC, IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE |
IDC_CREDITS_SIZE_RADIO, IDC_CREDITS_END_STATIC, IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE, |
524 |
|
IDC_HINTFILE |
525 |
}; |
}; |
526 |
|
|
527 |
const short quant_disable[] = { |
const short quant_disable[] = { |
528 |
IDC_STATS1, IDC_STATS1_BROWSE, IDC_DISCARD1PASS, IDC_HINTEDME, |
IDC_STATS1, IDC_STATS1_BROWSE, IDC_DISCARD1PASS, IDC_HINTEDME, |
529 |
IDC_CBR_REACTIONDELAY, IDC_CBR_AVERAGINGPERIOD, IDC_CBR_BUFFER, |
IDC_CBR_REACTIONDELAY, IDC_CBR_AVERAGINGPERIOD, IDC_CBR_BUFFER, |
530 |
IDC_MINIQUANT, IDC_MAXIQUANT, IDC_MINPQUANT, IDC_MAXPQUANT, |
IDC_MINIQUANT, IDC_MAXIQUANT, IDC_MINPQUANT, IDC_MAXPQUANT, |
531 |
IDC_CREDITS_SIZE_RADIO, IDC_CREDITS_END_STATIC, IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE |
IDC_CREDITS_SIZE_RADIO, IDC_CREDITS_END_STATIC, IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE, |
532 |
|
IDC_HINTFILE |
533 |
}; |
}; |
534 |
|
|
535 |
const short twopass1_disable[] = { |
const short twopass1_disable[] = { |
541 |
|
|
542 |
const short twopass2_ext_disable[] = { |
const short twopass2_ext_disable[] = { |
543 |
IDC_CBR_REACTIONDELAY, IDC_CBR_AVERAGINGPERIOD, IDC_CBR_BUFFER, |
IDC_CBR_REACTIONDELAY, IDC_CBR_AVERAGINGPERIOD, IDC_CBR_BUFFER, |
544 |
IDC_CREDITS_RATE_RADIO, IDC_CREDITS_QUANT_RADIO, IDC_CREDITS_QUANT_STATIC, |
IDC_CREDITS_RATE_RADIO, |
545 |
IDC_CREDITS_SIZE_RADIO, IDC_CREDITS_END_STATIC, IDC_CREDITS_RATE, |
IDC_CREDITS_SIZE_RADIO, IDC_CREDITS_END_STATIC, IDC_CREDITS_RATE, |
546 |
IDC_CREDITS_QUANTI, IDC_CREDITS_QUANTP, IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE |
IDC_CREDITS_START_SIZE, IDC_CREDITS_END_SIZE |
547 |
}; |
}; |
548 |
|
|
549 |
const short twopass2_int_disable[] = { |
const short twopass2_int_disable[] = { |
641 |
SetDlgItemInt(hDlg, IDC_MINKEY, config->min_key_interval, FALSE); |
SetDlgItemInt(hDlg, IDC_MINKEY, config->min_key_interval, FALSE); |
642 |
CheckDlgButton(hDlg, IDC_LUMMASK, config->lum_masking ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_LUMMASK, config->lum_masking ? BST_CHECKED : BST_UNCHECKED); |
643 |
CheckDlgButton(hDlg, IDC_INTERLACING, config->interlacing ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_INTERLACING, config->interlacing ? BST_CHECKED : BST_UNCHECKED); |
644 |
#ifdef BFRAMES |
|
645 |
|
CheckDlgButton(hDlg, IDC_QPEL, config->qpel ? BST_CHECKED : BST_UNCHECKED); |
646 |
|
CheckDlgButton(hDlg, IDC_GMC, config->gmc ? BST_CHECKED : BST_UNCHECKED); |
647 |
|
CheckDlgButton(hDlg, IDC_CHROMAME, config->chromame ? BST_CHECKED : BST_UNCHECKED); |
648 |
|
// added by koepi for gruel's greyscale_mode |
649 |
|
CheckDlgButton(hDlg, IDC_GREYSCALE, config->greyscale ? BST_CHECKED : BST_UNCHECKED); |
650 |
|
// end of koepi's addition |
651 |
SetDlgItemInt(hDlg, IDC_MAXBFRAMES, config->max_bframes, TRUE); |
SetDlgItemInt(hDlg, IDC_MAXBFRAMES, config->max_bframes, TRUE); |
652 |
SetDlgItemInt(hDlg, IDC_BQUANTRATIO, config->bquant_ratio, FALSE); |
SetDlgItemInt(hDlg, IDC_BQUANTRATIO, config->bquant_ratio, FALSE); |
653 |
|
SetDlgItemInt(hDlg, IDC_BQUANTOFFSET, config->bquant_offset, FALSE); |
654 |
CheckDlgButton(hDlg, IDC_PACKED, config->packed ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_PACKED, config->packed ? BST_CHECKED : BST_UNCHECKED); |
655 |
CheckDlgButton(hDlg, IDC_DX50BVOP, config->dx50bvop ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_DX50BVOP, config->dx50bvop ? BST_CHECKED : BST_UNCHECKED); |
656 |
CheckDlgButton(hDlg, IDC_DEBUG, config->debug ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_DEBUG, config->debug ? BST_CHECKED : BST_UNCHECKED); |
|
#endif |
|
657 |
break; |
break; |
658 |
|
|
659 |
case DLG_QUANT : |
case DLG_QUANT : |
667 |
SetDlgItemInt(hDlg, IDC_KFBOOST, config->keyframe_boost, FALSE); |
SetDlgItemInt(hDlg, IDC_KFBOOST, config->keyframe_boost, FALSE); |
668 |
CheckDlgButton(hDlg, IDC_DISCARD1PASS, config->discard1pass ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_DISCARD1PASS, config->discard1pass ? BST_CHECKED : BST_UNCHECKED); |
669 |
CheckDlgButton(hDlg, IDC_DUMMY2PASS, config->dummy2pass ? BST_CHECKED : BST_UNCHECKED); |
CheckDlgButton(hDlg, IDC_DUMMY2PASS, config->dummy2pass ? BST_CHECKED : BST_UNCHECKED); |
670 |
|
// added by koepi for new 2pass curve treatment |
671 |
|
SetDlgItemInt(hDlg, IDC_KFTRESHOLD, config->kftreshold, FALSE); |
672 |
|
SetDlgItemInt(hDlg, IDC_KFREDUCTION, config->kfreduction, FALSE); |
673 |
|
// end of koepi's additions |
674 |
SetDlgItemInt(hDlg, IDC_CURVECOMPH, config->curve_compression_high, FALSE); |
SetDlgItemInt(hDlg, IDC_CURVECOMPH, config->curve_compression_high, FALSE); |
675 |
SetDlgItemInt(hDlg, IDC_CURVECOMPL, config->curve_compression_low, FALSE); |
SetDlgItemInt(hDlg, IDC_CURVECOMPL, config->curve_compression_low, FALSE); |
676 |
SetDlgItemInt(hDlg, IDC_PAYBACK, config->bitrate_payback_delay, FALSE); |
SetDlgItemInt(hDlg, IDC_PAYBACK, config->bitrate_payback_delay, FALSE); |
710 |
SetDlgItemInt(hDlg, IDC_CREDITS_END_BEGIN, config->credits_end_begin, FALSE); |
SetDlgItemInt(hDlg, IDC_CREDITS_END_BEGIN, config->credits_end_begin, FALSE); |
711 |
SetDlgItemInt(hDlg, IDC_CREDITS_END_END, config->credits_end_end, FALSE); |
SetDlgItemInt(hDlg, IDC_CREDITS_END_END, config->credits_end_end, FALSE); |
712 |
|
|
713 |
|
// added by koepi for credits greyscale |
714 |
|
CheckDlgButton(hDlg, IDC_CREDITS_GREYSCALE, config->credits_greyscale ? BST_CHECKED : BST_UNCHECKED); |
715 |
|
// end of koepi's addition |
716 |
SetDlgItemInt(hDlg, IDC_CREDITS_RATE, config->credits_rate, FALSE); |
SetDlgItemInt(hDlg, IDC_CREDITS_RATE, config->credits_rate, FALSE); |
717 |
SetDlgItemInt(hDlg, IDC_CREDITS_QUANTI, config->credits_quant_i, FALSE); |
SetDlgItemInt(hDlg, IDC_CREDITS_QUANTI, config->credits_quant_i, FALSE); |
718 |
SetDlgItemInt(hDlg, IDC_CREDITS_QUANTP, config->credits_quant_p, FALSE); |
SetDlgItemInt(hDlg, IDC_CREDITS_QUANTP, config->credits_quant_p, FALSE); |
744 |
CheckRadioButton(hDlg, IDC_CPU_AUTO, IDC_CPU_FORCE, |
CheckRadioButton(hDlg, IDC_CPU_AUTO, IDC_CPU_FORCE, |
745 |
config->cpu & XVID_CPU_FORCE ? IDC_CPU_FORCE : IDC_CPU_AUTO ); |
config->cpu & XVID_CPU_FORCE ? IDC_CPU_FORCE : IDC_CPU_AUTO ); |
746 |
|
|
747 |
|
#ifdef _SMP |
748 |
|
SetDlgItemInt(hDlg, IDC_NUMTHREADS, config->num_threads, FALSE); |
749 |
|
#endif |
750 |
|
SetDlgItemInt(hDlg, IDC_FRAMEDROP, config->frame_drop_ratio, FALSE); |
751 |
SetDlgItemInt(hDlg, IDC_CBR_REACTIONDELAY, config->rc_reaction_delay_factor, FALSE); |
SetDlgItemInt(hDlg, IDC_CBR_REACTIONDELAY, config->rc_reaction_delay_factor, FALSE); |
752 |
SetDlgItemInt(hDlg, IDC_CBR_AVERAGINGPERIOD, config->rc_averaging_period, FALSE); |
SetDlgItemInt(hDlg, IDC_CBR_AVERAGINGPERIOD, config->rc_averaging_period, FALSE); |
753 |
SetDlgItemInt(hDlg, IDC_CBR_BUFFER, config->rc_buffer, FALSE); |
SetDlgItemInt(hDlg, IDC_CBR_BUFFER, config->rc_buffer, FALSE); |
774 |
config->min_key_interval = config_get_uint(hDlg, IDC_MINKEY, config->min_key_interval); |
config->min_key_interval = config_get_uint(hDlg, IDC_MINKEY, config->min_key_interval); |
775 |
config->lum_masking = ISDLGSET(IDC_LUMMASK); |
config->lum_masking = ISDLGSET(IDC_LUMMASK); |
776 |
config->interlacing = ISDLGSET(IDC_INTERLACING); |
config->interlacing = ISDLGSET(IDC_INTERLACING); |
777 |
#ifdef BFRAMES |
|
778 |
|
config->qpel = ISDLGSET(IDC_QPEL); |
779 |
|
config->gmc = ISDLGSET(IDC_GMC); |
780 |
|
config->chromame = ISDLGSET(IDC_CHROMAME); |
781 |
|
// added by koepi for gruel's greyscale_mode |
782 |
|
config->greyscale = ISDLGSET(IDC_GREYSCALE); |
783 |
|
// end of koepi's addition |
784 |
config->max_bframes = config_get_int(hDlg, IDC_MAXBFRAMES, config->max_bframes); |
config->max_bframes = config_get_int(hDlg, IDC_MAXBFRAMES, config->max_bframes); |
785 |
config->bquant_ratio = config_get_uint(hDlg, IDC_BQUANTRATIO, config->bquant_ratio); |
config->bquant_ratio = config_get_uint(hDlg, IDC_BQUANTRATIO, config->bquant_ratio); |
786 |
|
config->bquant_offset = config_get_uint(hDlg, IDC_BQUANTOFFSET, config->bquant_offset); |
787 |
config->packed = ISDLGSET(IDC_PACKED); |
config->packed = ISDLGSET(IDC_PACKED); |
788 |
config->dx50bvop = ISDLGSET(IDC_DX50BVOP); |
config->dx50bvop = ISDLGSET(IDC_DX50BVOP); |
789 |
config->debug = ISDLGSET(IDC_DEBUG); |
config->debug = ISDLGSET(IDC_DEBUG); |
|
#endif |
|
790 |
break; |
break; |
791 |
|
|
792 |
case DLG_QUANT : |
case DLG_QUANT : |
803 |
|
|
804 |
case DLG_2PASS : |
case DLG_2PASS : |
805 |
config->keyframe_boost = GetDlgItemInt(hDlg, IDC_KFBOOST, NULL, FALSE); |
config->keyframe_boost = GetDlgItemInt(hDlg, IDC_KFBOOST, NULL, FALSE); |
806 |
|
// added by koepi for the new 2pass curve treatment |
807 |
|
config->kftreshold = GetDlgItemInt(hDlg, IDC_KFTRESHOLD, NULL, FALSE); |
808 |
|
config->kfreduction = GetDlgItemInt(hDlg, IDC_KFREDUCTION, NULL, FALSE); |
809 |
|
//end of koepi's additions |
810 |
config->discard1pass = ISDLGSET(IDC_DISCARD1PASS); |
config->discard1pass = ISDLGSET(IDC_DISCARD1PASS); |
811 |
config->dummy2pass = ISDLGSET(IDC_DUMMY2PASS); |
config->dummy2pass = ISDLGSET(IDC_DUMMY2PASS); |
812 |
config->curve_compression_high = GetDlgItemInt(hDlg, IDC_CURVECOMPH, NULL, FALSE); |
config->curve_compression_high = GetDlgItemInt(hDlg, IDC_CURVECOMPH, NULL, FALSE); |
866 |
config->credits_end_begin = config_get_uint(hDlg, IDC_CREDITS_END_BEGIN, config->credits_end_begin); |
config->credits_end_begin = config_get_uint(hDlg, IDC_CREDITS_END_BEGIN, config->credits_end_begin); |
867 |
config->credits_end_end = config_get_uint(hDlg, IDC_CREDITS_END_END, config->credits_end_end); |
config->credits_end_end = config_get_uint(hDlg, IDC_CREDITS_END_END, config->credits_end_end); |
868 |
|
|
869 |
|
// added by koepi for gruel's greyscale_mode |
870 |
|
config->credits_greyscale = ISDLGSET(IDC_CREDITS_GREYSCALE); |
871 |
|
// end of koepi's addition |
872 |
config->credits_rate = config_get_uint(hDlg, IDC_CREDITS_RATE, config->credits_rate); |
config->credits_rate = config_get_uint(hDlg, IDC_CREDITS_RATE, config->credits_rate); |
873 |
config->credits_quant_i = config_get_uint(hDlg, IDC_CREDITS_QUANTI, config->credits_quant_i); |
config->credits_quant_i = config_get_uint(hDlg, IDC_CREDITS_QUANTI, config->credits_quant_i); |
874 |
config->credits_quant_p = config_get_uint(hDlg, IDC_CREDITS_QUANTP, config->credits_quant_p); |
config->credits_quant_p = config_get_uint(hDlg, IDC_CREDITS_QUANTP, config->credits_quant_p); |
906 |
config->cpu |= ISDLGSET(IDC_CPU_3DNOWEXT) ? XVID_CPU_3DNOWEXT: 0; |
config->cpu |= ISDLGSET(IDC_CPU_3DNOWEXT) ? XVID_CPU_3DNOWEXT: 0; |
907 |
config->cpu |= ISDLGSET(IDC_CPU_FORCE) ? XVID_CPU_FORCE : 0; |
config->cpu |= ISDLGSET(IDC_CPU_FORCE) ? XVID_CPU_FORCE : 0; |
908 |
|
|
909 |
|
#ifdef _SMP |
910 |
|
config->num_threads = config_get_uint(hDlg, IDC_NUMTHREADS, config->num_threads); |
911 |
|
#endif |
912 |
|
config->frame_drop_ratio = config_get_uint(hDlg, IDC_FRAMEDROP, config->frame_drop_ratio); |
913 |
config->rc_reaction_delay_factor = config_get_uint(hDlg, IDC_CBR_REACTIONDELAY, config->rc_reaction_delay_factor); |
config->rc_reaction_delay_factor = config_get_uint(hDlg, IDC_CBR_REACTIONDELAY, config->rc_reaction_delay_factor); |
914 |
config->rc_averaging_period = config_get_uint(hDlg, IDC_CBR_AVERAGINGPERIOD, config->rc_averaging_period); |
config->rc_averaging_period = config_get_uint(hDlg, IDC_CBR_AVERAGINGPERIOD, config->rc_averaging_period); |
915 |
config->rc_buffer = config_get_uint(hDlg, IDC_CBR_BUFFER, config->rc_buffer); |
config->rc_buffer = config_get_uint(hDlg, IDC_CBR_BUFFER, config->rc_buffer); |
1122 |
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG"); |
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG"); |
1123 |
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG-Custom"); |
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"MPEG-Custom"); |
1124 |
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"Modulated"); |
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"Modulated"); |
1125 |
|
SendDlgItemMessage(hDlg, IDC_QUANTTYPE, CB_ADDSTRING, 0, (LPARAM)"New Modulated HQ"); |
1126 |
|
|
1127 |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"XVID"); |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"XVID"); |
1128 |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DIVX"); |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DIVX"); |
1129 |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DX50"); |
SendDlgItemMessage(hDlg, IDC_FOURCC, CB_ADDSTRING, 0, (LPARAM)"DX50"); |
1130 |
|
|
|
#ifndef BFRAMES |
|
1131 |
EnableWindow(GetDlgItem(hDlg, IDC_BSTATIC1), FALSE); |
EnableWindow(GetDlgItem(hDlg, IDC_BSTATIC1), FALSE); |
1132 |
EnableWindow(GetDlgItem(hDlg, IDC_BSTATIC2), FALSE); |
EnableWindow(GetDlgItem(hDlg, IDC_BSTATIC2), FALSE); |
1133 |
EnableWindow(GetDlgItem(hDlg, IDC_BSTATIC3), FALSE); |
EnableWindow(GetDlgItem(hDlg, IDC_BSTATIC3), FALSE); |
1136 |
EnableWindow(GetDlgItem(hDlg, IDC_PACKED), FALSE); |
EnableWindow(GetDlgItem(hDlg, IDC_PACKED), FALSE); |
1137 |
EnableWindow(GetDlgItem(hDlg, IDC_DX50BVOP), FALSE); |
EnableWindow(GetDlgItem(hDlg, IDC_DX50BVOP), FALSE); |
1138 |
EnableWindow(GetDlgItem(hDlg, IDC_DEBUG), FALSE); |
EnableWindow(GetDlgItem(hDlg, IDC_DEBUG), FALSE); |
|
#endif |
|
1139 |
} |
} |
1140 |
else if (psi->page == DLG_2PASSALT) |
else if (psi->page == DLG_2PASSALT) |
1141 |
{ |
{ |
1143 |
SendDlgItemMessage(hDlg, IDC_CURVETYPE, CB_ADDSTRING, 0, (LPARAM)"Medium"); |
SendDlgItemMessage(hDlg, IDC_CURVETYPE, CB_ADDSTRING, 0, (LPARAM)"Medium"); |
1144 |
SendDlgItemMessage(hDlg, IDC_CURVETYPE, CB_ADDSTRING, 0, (LPARAM)"High"); |
SendDlgItemMessage(hDlg, IDC_CURVETYPE, CB_ADDSTRING, 0, (LPARAM)"High"); |
1145 |
} |
} |
1146 |
|
else if (psi->page == DLG_CPU) |
1147 |
|
{ |
1148 |
|
#ifndef _SMP |
1149 |
|
|
1150 |
|
EnableWindow(GetDlgItem(hDlg, IDC_NUMTHREADS_STATIC), FALSE); |
1151 |
|
EnableWindow(GetDlgItem(hDlg, IDC_NUMTHREADS), FALSE); |
1152 |
|
#endif |
1153 |
|
EnableWindow(GetDlgItem(hDlg, IDC_FRAMEDROP_STATIC), FALSE); |
1154 |
|
EnableWindow(GetDlgItem(hDlg, IDC_FRAMEDROP), FALSE); |
1155 |
|
} |
1156 |
|
|
1157 |
if (hTooltip) |
if (hTooltip) |
1158 |
{ |
{ |
1384 |
LOGFONT lfData; |
LOGFONT lfData; |
1385 |
|
|
1386 |
SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD); |
SetDlgItemText(hDlg, IDC_BUILD, XVID_BUILD); |
1387 |
|
SetDlgItemText(hDlg, IDC_SPECIAL_BUILD, XVID_SPECIAL_BUILD); |
1388 |
|
|
1389 |
init_param.cpu_flags = XVID_CPU_CHKONLY; |
init_param.cpu_flags = XVID_CPU_CHKONLY; |
1390 |
xvid_init(NULL, 0, &init_param, 0); |
xvid_init(NULL, 0, &init_param, 0); |