summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2009-02-20 12:52:45 +0000
committersr55 <[email protected]>2009-02-20 12:52:45 +0000
commit2f2fa642088d470d2ee13adf1451eaf2fcd0af21 (patch)
treede0677f5f0d35d5c5399f143def40a72cad1e618
parentf59877cf970f7e5798aceaa46bad06f37d862722 (diff)
WinGui:
- Forgot to actually check in the x264 panel control with git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@2170 b64f7644-9d1e-0410-96f1-a4d463321fa5
-rw-r--r--win/C#/Controls/x264Panel.Designer.cs794
-rw-r--r--win/C#/Controls/x264Panel.cs1073
-rw-r--r--win/C#/Controls/x264Panel.resx246
3 files changed, 2113 insertions, 0 deletions
diff --git a/win/C#/Controls/x264Panel.Designer.cs b/win/C#/Controls/x264Panel.Designer.cs
new file mode 100644
index 000000000..5f08ed70c
--- /dev/null
+++ b/win/C#/Controls/x264Panel.Designer.cs
@@ -0,0 +1,794 @@
+namespace Handbrake.Controls
+{
+ partial class x264Panel
+ {
+ /// <summary>
+ /// Required designer variable.
+ /// </summary>
+ private System.ComponentModel.IContainer components = null;
+
+ /// <summary>
+ /// Clean up any resources being used.
+ /// </summary>
+ /// <param name="disposing">true if managed resources should be disposed; otherwise, false.</param>
+ protected override void Dispose(bool disposing)
+ {
+ if (disposing && (components != null))
+ {
+ components.Dispose();
+ }
+ base.Dispose(disposing);
+ }
+
+ #region Component Designer generated code
+
+ /// <summary>
+ /// Required method for Designer support - do not modify
+ /// the contents of this method with the code editor.
+ /// </summary>
+ private void InitializeComponent()
+ {
+ this.components = new System.ComponentModel.Container();
+ System.ComponentModel.ComponentResourceManager resources = new System.ComponentModel.ComponentResourceManager(typeof(x264Panel));
+ this.slider_psytrellis = new System.Windows.Forms.TrackBar();
+ this.lbl_psytrellis = new System.Windows.Forms.Label();
+ this.lbl_psyrd = new System.Windows.Forms.Label();
+ this.slider_psyrd = new System.Windows.Forms.TrackBar();
+ this.lbl_adaptBFrames = new System.Windows.Forms.Label();
+ this.drop_adaptBFrames = new System.Windows.Forms.ComboBox();
+ this.label43 = new System.Windows.Forms.Label();
+ this.btn_reset = new System.Windows.Forms.Button();
+ this.rtf_x264Query = new System.Windows.Forms.RichTextBox();
+ this.check_Cabac = new System.Windows.Forms.CheckBox();
+ this.check_noDCTDecimate = new System.Windows.Forms.CheckBox();
+ this.check_noFastPSkip = new System.Windows.Forms.CheckBox();
+ this.lbl_trellis = new System.Windows.Forms.Label();
+ this.drop_trellis = new System.Windows.Forms.ComboBox();
+ this.drop_deblockBeta = new System.Windows.Forms.ComboBox();
+ this.label41 = new System.Windows.Forms.Label();
+ this.drop_deblockAlpha = new System.Windows.Forms.ComboBox();
+ this.panel3 = new System.Windows.Forms.Panel();
+ this.panel1 = new System.Windows.Forms.Panel();
+ this.panel2 = new System.Windows.Forms.Panel();
+ this.check_8x8DCT = new System.Windows.Forms.CheckBox();
+ this.label45 = new System.Windows.Forms.Label();
+ this.drop_analysis = new System.Windows.Forms.ComboBox();
+ this.label48 = new System.Windows.Forms.Label();
+ this.drop_subpixelMotionEstimation = new System.Windows.Forms.ComboBox();
+ this.lbl_merange = new System.Windows.Forms.Label();
+ this.drop_MotionEstimationRange = new System.Windows.Forms.ComboBox();
+ this.label54 = new System.Windows.Forms.Label();
+ this.drop_MotionEstimationMethod = new System.Windows.Forms.ComboBox();
+ this.check_pyrmidalBFrames = new System.Windows.Forms.CheckBox();
+ this.check_weightedBFrames = new System.Windows.Forms.CheckBox();
+ this.lbl_direct_prediction = new System.Windows.Forms.Label();
+ this.drop_directPrediction = new System.Windows.Forms.ComboBox();
+ this.label62 = new System.Windows.Forms.Label();
+ this.drop_bFrames = new System.Windows.Forms.ComboBox();
+ this.label64 = new System.Windows.Forms.Label();
+ this.drop_refFrames = new System.Windows.Forms.ComboBox();
+ this.check_mixedReferences = new System.Windows.Forms.CheckBox();
+ this.ToolTip = new System.Windows.Forms.ToolTip(this.components);
+ ((System.ComponentModel.ISupportInitialize)(this.slider_psytrellis)).BeginInit();
+ ((System.ComponentModel.ISupportInitialize)(this.slider_psyrd)).BeginInit();
+ this.SuspendLayout();
+ //
+ // slider_psytrellis
+ //
+ this.slider_psytrellis.Location = new System.Drawing.Point(436, 194);
+ this.slider_psytrellis.Name = "slider_psytrellis";
+ this.slider_psytrellis.Size = new System.Drawing.Size(131, 42);
+ this.slider_psytrellis.TabIndex = 86;
+ this.ToolTip.SetToolTip(this.slider_psytrellis, "Psychovisual Trellis tries to retain more sharpness and detail, but can cause art" +
+ "ifacting. \r\nIt is considered experimental, which is why it\'s off by default. Goo" +
+ "d values are 0.1 to 0.2.");
+ this.slider_psytrellis.Scroll += new System.EventHandler(this.slider_psytrellis_Scroll);
+ //
+ // lbl_psytrellis
+ //
+ this.lbl_psytrellis.AutoSize = true;
+ this.lbl_psytrellis.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_psytrellis.Location = new System.Drawing.Point(319, 198);
+ this.lbl_psytrellis.Name = "lbl_psytrellis";
+ this.lbl_psytrellis.Size = new System.Drawing.Size(111, 12);
+ this.lbl_psytrellis.TabIndex = 85;
+ this.lbl_psytrellis.Text = "Psychovisual Trellis:";
+ //
+ // lbl_psyrd
+ //
+ this.lbl_psyrd.AutoSize = true;
+ this.lbl_psyrd.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_psyrd.Location = new System.Drawing.Point(275, 164);
+ this.lbl_psyrd.Name = "lbl_psyrd";
+ this.lbl_psyrd.Size = new System.Drawing.Size(155, 12);
+ this.lbl_psyrd.TabIndex = 84;
+ this.lbl_psyrd.Text = "Psychovisual Rate Distortion:";
+ //
+ // slider_psyrd
+ //
+ this.slider_psyrd.Location = new System.Drawing.Point(436, 153);
+ this.slider_psyrd.Name = "slider_psyrd";
+ this.slider_psyrd.Size = new System.Drawing.Size(131, 42);
+ this.slider_psyrd.TabIndex = 83;
+ this.ToolTip.SetToolTip(this.slider_psyrd, resources.GetString("slider_psyrd.ToolTip"));
+ this.slider_psyrd.Scroll += new System.EventHandler(this.slider_psyrd_Scroll);
+ //
+ // lbl_adaptBFrames
+ //
+ this.lbl_adaptBFrames.AutoSize = true;
+ this.lbl_adaptBFrames.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_adaptBFrames.Location = new System.Drawing.Point(17, 124);
+ this.lbl_adaptBFrames.Name = "lbl_adaptBFrames";
+ this.lbl_adaptBFrames.Size = new System.Drawing.Size(106, 12);
+ this.lbl_adaptBFrames.TabIndex = 81;
+ this.lbl_adaptBFrames.Text = "Adaptive B-Frames:";
+ //
+ // drop_adaptBFrames
+ //
+ this.drop_adaptBFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_adaptBFrames.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_adaptBFrames.FormattingEnabled = true;
+ this.drop_adaptBFrames.Items.AddRange(new object[] {
+ "Default (Fast)",
+ "Off",
+ "Fast",
+ "Optimal"});
+ this.drop_adaptBFrames.Location = new System.Drawing.Point(129, 121);
+ this.drop_adaptBFrames.Name = "drop_adaptBFrames";
+ this.drop_adaptBFrames.Size = new System.Drawing.Size(121, 21);
+ this.drop_adaptBFrames.TabIndex = 82;
+ this.ToolTip.SetToolTip(this.drop_adaptBFrames, resources.GetString("drop_adaptBFrames.ToolTip"));
+ this.drop_adaptBFrames.SelectedIndexChanged += new System.EventHandler(this.drop_adaptBFrames_SelectedIndexChanged);
+ //
+ // label43
+ //
+ this.label43.AutoSize = true;
+ this.label43.BackColor = System.Drawing.Color.Transparent;
+ this.label43.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label43.Location = new System.Drawing.Point(13, 18);
+ this.label43.Name = "label43";
+ this.label43.Size = new System.Drawing.Size(165, 13);
+ this.label43.TabIndex = 49;
+ this.label43.Text = "Advanced H.264 Options";
+ //
+ // btn_reset
+ //
+ this.btn_reset.Location = new System.Drawing.Point(13, 229);
+ this.btn_reset.Name = "btn_reset";
+ this.btn_reset.Size = new System.Drawing.Size(75, 23);
+ this.btn_reset.TabIndex = 79;
+ this.btn_reset.Text = "Reset All";
+ this.btn_reset.UseVisualStyleBackColor = true;
+ this.btn_reset.Click += new System.EventHandler(this.btn_reset_Click);
+ //
+ // rtf_x264Query
+ //
+ this.rtf_x264Query.BorderStyle = System.Windows.Forms.BorderStyle.FixedSingle;
+ this.rtf_x264Query.Location = new System.Drawing.Point(13, 258);
+ this.rtf_x264Query.Name = "rtf_x264Query";
+ this.rtf_x264Query.Size = new System.Drawing.Size(698, 43);
+ this.rtf_x264Query.TabIndex = 80;
+ this.rtf_x264Query.Text = "";
+ this.rtf_x264Query.TextChanged += new System.EventHandler(this.rtf_x264Query_TextChanged);
+ //
+ // check_Cabac
+ //
+ this.check_Cabac.AutoSize = true;
+ this.check_Cabac.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_Cabac.Checked = true;
+ this.check_Cabac.CheckState = System.Windows.Forms.CheckState.Checked;
+ this.check_Cabac.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_Cabac.Location = new System.Drawing.Point(273, 128);
+ this.check_Cabac.Name = "check_Cabac";
+ this.check_Cabac.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_Cabac.Size = new System.Drawing.Size(136, 17);
+ this.check_Cabac.TabIndex = 78;
+ this.check_Cabac.Text = "CABAC Entropy Coding:";
+ this.check_Cabac.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.ToolTip.SetToolTip(this.check_Cabac, resources.GetString("check_Cabac.ToolTip"));
+ this.check_Cabac.UseVisualStyleBackColor = true;
+ this.check_Cabac.CheckedChanged += new System.EventHandler(this.check_Cabac_CheckedChanged);
+ //
+ // check_noDCTDecimate
+ //
+ this.check_noDCTDecimate.AutoSize = true;
+ this.check_noDCTDecimate.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_noDCTDecimate.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_noDCTDecimate.Location = new System.Drawing.Point(593, 40);
+ this.check_noDCTDecimate.Name = "check_noDCTDecimate";
+ this.check_noDCTDecimate.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_noDCTDecimate.Size = new System.Drawing.Size(113, 17);
+ this.check_noDCTDecimate.TabIndex = 77;
+ this.check_noDCTDecimate.Text = "No DCT-Decimate:";
+ this.check_noDCTDecimate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.ToolTip.SetToolTip(this.check_noDCTDecimate, resources.GetString("check_noDCTDecimate.ToolTip"));
+ this.check_noDCTDecimate.UseVisualStyleBackColor = true;
+ this.check_noDCTDecimate.CheckedChanged += new System.EventHandler(this.check_noDCTDecimate_CheckedChanged);
+ //
+ // check_noFastPSkip
+ //
+ this.check_noFastPSkip.AutoSize = true;
+ this.check_noFastPSkip.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_noFastPSkip.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_noFastPSkip.Location = new System.Drawing.Point(608, 19);
+ this.check_noFastPSkip.Name = "check_noFastPSkip";
+ this.check_noFastPSkip.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_noFastPSkip.Size = new System.Drawing.Size(97, 17);
+ this.check_noFastPSkip.TabIndex = 76;
+ this.check_noFastPSkip.Text = "No Fast-P-Skip:";
+ this.check_noFastPSkip.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.ToolTip.SetToolTip(this.check_noFastPSkip, "This can help with blocking on solid colors like blue skies, but it also slows do" +
+ "wn the encode.");
+ this.check_noFastPSkip.UseVisualStyleBackColor = true;
+ this.check_noFastPSkip.CheckedChanged += new System.EventHandler(this.check_noFastPSkip_CheckedChanged);
+ //
+ // lbl_trellis
+ //
+ this.lbl_trellis.AutoSize = true;
+ this.lbl_trellis.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_trellis.Location = new System.Drawing.Point(421, 130);
+ this.lbl_trellis.Name = "lbl_trellis";
+ this.lbl_trellis.Size = new System.Drawing.Size(41, 12);
+ this.lbl_trellis.TabIndex = 67;
+ this.lbl_trellis.Text = "Trellis:";
+ //
+ // drop_trellis
+ //
+ this.drop_trellis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_trellis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_trellis.FormattingEnabled = true;
+ this.drop_trellis.Items.AddRange(new object[] {
+ "Default (0)",
+ "0",
+ "1",
+ "2"});
+ this.drop_trellis.Location = new System.Drawing.Point(468, 127);
+ this.drop_trellis.Name = "drop_trellis";
+ this.drop_trellis.Size = new System.Drawing.Size(94, 21);
+ this.drop_trellis.TabIndex = 75;
+ this.ToolTip.SetToolTip(this.drop_trellis, resources.GetString("drop_trellis.ToolTip"));
+ this.drop_trellis.SelectedIndexChanged += new System.EventHandler(this.drop_trellis_SelectedIndexChanged);
+ //
+ // drop_deblockBeta
+ //
+ this.drop_deblockBeta.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_deblockBeta.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_deblockBeta.FormattingEnabled = true;
+ this.drop_deblockBeta.Items.AddRange(new object[] {
+ "Default (0)",
+ "-6",
+ "-5",
+ "-4",
+ "-3",
+ "-2",
+ "-1",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6"});
+ this.drop_deblockBeta.Location = new System.Drawing.Point(642, 95);
+ this.drop_deblockBeta.Name = "drop_deblockBeta";
+ this.drop_deblockBeta.Size = new System.Drawing.Size(69, 21);
+ this.drop_deblockBeta.TabIndex = 74;
+ this.ToolTip.SetToolTip(this.drop_deblockBeta, resources.GetString("drop_deblockBeta.ToolTip"));
+ this.drop_deblockBeta.SelectedIndexChanged += new System.EventHandler(this.drop_deblockBeta_SelectedIndexChanged);
+ //
+ // label41
+ //
+ this.label41.AutoSize = true;
+ this.label41.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label41.Location = new System.Drawing.Point(575, 72);
+ this.label41.Name = "label41";
+ this.label41.Size = new System.Drawing.Size(65, 12);
+ this.label41.TabIndex = 66;
+ this.label41.Text = "Deblocking:";
+ //
+ // drop_deblockAlpha
+ //
+ this.drop_deblockAlpha.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_deblockAlpha.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_deblockAlpha.FormattingEnabled = true;
+ this.drop_deblockAlpha.Items.AddRange(new object[] {
+ "Default (0)",
+ "-6",
+ "-5",
+ "-4",
+ "-3",
+ "-2",
+ "-1",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6"});
+ this.drop_deblockAlpha.Location = new System.Drawing.Point(643, 69);
+ this.drop_deblockAlpha.Name = "drop_deblockAlpha";
+ this.drop_deblockAlpha.Size = new System.Drawing.Size(68, 21);
+ this.drop_deblockAlpha.TabIndex = 73;
+ this.ToolTip.SetToolTip(this.drop_deblockAlpha, resources.GetString("drop_deblockAlpha.ToolTip"));
+ this.drop_deblockAlpha.SelectedIndexChanged += new System.EventHandler(this.drop_deblockAlpha_SelectedIndexChanged);
+ //
+ // panel3
+ //
+ this.panel3.BackColor = System.Drawing.Color.Black;
+ this.panel3.Location = new System.Drawing.Point(277, 123);
+ this.panel3.Margin = new System.Windows.Forms.Padding(0);
+ this.panel3.Name = "panel3";
+ this.panel3.Size = new System.Drawing.Size(290, 1);
+ this.panel3.TabIndex = 65;
+ //
+ // panel1
+ //
+ this.panel1.BackColor = System.Drawing.Color.Black;
+ this.panel1.Location = new System.Drawing.Point(13, 89);
+ this.panel1.Margin = new System.Windows.Forms.Padding(0);
+ this.panel1.Name = "panel1";
+ this.panel1.Size = new System.Drawing.Size(247, 1);
+ this.panel1.TabIndex = 51;
+ //
+ // panel2
+ //
+ this.panel2.BackColor = System.Drawing.Color.Black;
+ this.panel2.Location = new System.Drawing.Point(277, 95);
+ this.panel2.Margin = new System.Windows.Forms.Padding(0);
+ this.panel2.Name = "panel2";
+ this.panel2.Size = new System.Drawing.Size(290, 1);
+ this.panel2.TabIndex = 63;
+ //
+ // check_8x8DCT
+ //
+ this.check_8x8DCT.AutoSize = true;
+ this.check_8x8DCT.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_8x8DCT.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_8x8DCT.Location = new System.Drawing.Point(492, 100);
+ this.check_8x8DCT.Name = "check_8x8DCT";
+ this.check_8x8DCT.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_8x8DCT.Size = new System.Drawing.Size(68, 17);
+ this.check_8x8DCT.TabIndex = 72;
+ this.check_8x8DCT.Text = "8x8 DCT:";
+ this.check_8x8DCT.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.ToolTip.SetToolTip(this.check_8x8DCT, resources.GetString("check_8x8DCT.ToolTip"));
+ this.check_8x8DCT.UseVisualStyleBackColor = true;
+ this.check_8x8DCT.CheckedChanged += new System.EventHandler(this.check_8x8DCT_CheckedChanged);
+ //
+ // label45
+ //
+ this.label45.AutoSize = true;
+ this.label45.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label45.Location = new System.Drawing.Point(364, 102);
+ this.label45.Name = "label45";
+ this.label45.Size = new System.Drawing.Size(53, 12);
+ this.label45.TabIndex = 64;
+ this.label45.Text = "Analysis:";
+ //
+ // drop_analysis
+ //
+ this.drop_analysis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_analysis.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_analysis.FormattingEnabled = true;
+ this.drop_analysis.Items.AddRange(new object[] {
+ "Default (some)",
+ "None",
+ "All"});
+ this.drop_analysis.Location = new System.Drawing.Point(423, 99);
+ this.drop_analysis.Name = "drop_analysis";
+ this.drop_analysis.Size = new System.Drawing.Size(63, 21);
+ this.drop_analysis.TabIndex = 71;
+ this.ToolTip.SetToolTip(this.drop_analysis, resources.GetString("drop_analysis.ToolTip"));
+ this.drop_analysis.SelectedIndexChanged += new System.EventHandler(this.drop_analysis_SelectedIndexChanged);
+ //
+ // label48
+ //
+ this.label48.AutoSize = true;
+ this.label48.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label48.Location = new System.Drawing.Point(271, 45);
+ this.label48.Name = "label48";
+ this.label48.Size = new System.Drawing.Size(146, 12);
+ this.label48.TabIndex = 62;
+ this.label48.Text = "Subpixel Motion Estimation:";
+ //
+ // drop_subpixelMotionEstimation
+ //
+ this.drop_subpixelMotionEstimation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_subpixelMotionEstimation.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_subpixelMotionEstimation.FormattingEnabled = true;
+ this.drop_subpixelMotionEstimation.Items.AddRange(new object[] {
+ "Default (6)",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9"});
+ this.drop_subpixelMotionEstimation.Location = new System.Drawing.Point(423, 42);
+ this.drop_subpixelMotionEstimation.Name = "drop_subpixelMotionEstimation";
+ this.drop_subpixelMotionEstimation.Size = new System.Drawing.Size(139, 21);
+ this.drop_subpixelMotionEstimation.TabIndex = 70;
+ this.ToolTip.SetToolTip(this.drop_subpixelMotionEstimation, resources.GetString("drop_subpixelMotionEstimation.ToolTip"));
+ this.drop_subpixelMotionEstimation.SelectedIndexChanged += new System.EventHandler(this.drop_subpixelMotionEstimation_SelectedIndexChanged);
+ //
+ // lbl_merange
+ //
+ this.lbl_merange.AutoSize = true;
+ this.lbl_merange.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_merange.Location = new System.Drawing.Point(283, 71);
+ this.lbl_merange.Name = "lbl_merange";
+ this.lbl_merange.Size = new System.Drawing.Size(134, 12);
+ this.lbl_merange.TabIndex = 61;
+ this.lbl_merange.Text = "Motion Estimation Range:";
+ //
+ // drop_MotionEstimationRange
+ //
+ this.drop_MotionEstimationRange.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_MotionEstimationRange.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_MotionEstimationRange.FormattingEnabled = true;
+ this.drop_MotionEstimationRange.Items.AddRange(new object[] {
+ "Default (16)",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "15",
+ "16",
+ "17",
+ "18",
+ "19",
+ "20",
+ "21",
+ "22",
+ "23",
+ "24",
+ "25",
+ "26",
+ "27",
+ "28",
+ "29",
+ "30",
+ "31",
+ "32",
+ "33",
+ "34",
+ "35",
+ "36",
+ "37",
+ "38",
+ "39",
+ "40",
+ "41",
+ "42",
+ "43",
+ "44",
+ "45",
+ "46",
+ "47",
+ "48",
+ "49",
+ "50",
+ "51",
+ "52",
+ "53",
+ "54",
+ "55",
+ "56",
+ "57",
+ "58",
+ "59",
+ "60",
+ "61",
+ "62",
+ "63",
+ "64"});
+ this.drop_MotionEstimationRange.Location = new System.Drawing.Point(423, 68);
+ this.drop_MotionEstimationRange.Name = "drop_MotionEstimationRange";
+ this.drop_MotionEstimationRange.Size = new System.Drawing.Size(139, 21);
+ this.drop_MotionEstimationRange.TabIndex = 69;
+ this.ToolTip.SetToolTip(this.drop_MotionEstimationRange, resources.GetString("drop_MotionEstimationRange.ToolTip"));
+ this.drop_MotionEstimationRange.SelectedIndexChanged += new System.EventHandler(this.drop_MotionEstimationRange_SelectedIndexChanged);
+ //
+ // label54
+ //
+ this.label54.AutoSize = true;
+ this.label54.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label54.Location = new System.Drawing.Point(277, 19);
+ this.label54.Name = "label54";
+ this.label54.Size = new System.Drawing.Size(140, 12);
+ this.label54.TabIndex = 60;
+ this.label54.Text = "Motion Estimation Method:";
+ //
+ // drop_MotionEstimationMethod
+ //
+ this.drop_MotionEstimationMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_MotionEstimationMethod.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_MotionEstimationMethod.FormattingEnabled = true;
+ this.drop_MotionEstimationMethod.ItemHeight = 13;
+ this.drop_MotionEstimationMethod.Items.AddRange(new object[] {
+ "Default (Hexagon)",
+ "Diamond",
+ "Hexagon",
+ "Uneven Multi-Hexagon",
+ "Exhaustive",
+ "Transformed Exhaustive"});
+ this.drop_MotionEstimationMethod.Location = new System.Drawing.Point(423, 16);
+ this.drop_MotionEstimationMethod.Name = "drop_MotionEstimationMethod";
+ this.drop_MotionEstimationMethod.Size = new System.Drawing.Size(139, 21);
+ this.drop_MotionEstimationMethod.TabIndex = 68;
+ this.ToolTip.SetToolTip(this.drop_MotionEstimationMethod, resources.GetString("drop_MotionEstimationMethod.ToolTip"));
+ this.drop_MotionEstimationMethod.SelectedIndexChanged += new System.EventHandler(this.drop_MotionEstimationMethod_SelectedIndexChanged);
+ //
+ // check_pyrmidalBFrames
+ //
+ this.check_pyrmidalBFrames.AutoSize = true;
+ this.check_pyrmidalBFrames.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_pyrmidalBFrames.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_pyrmidalBFrames.Location = new System.Drawing.Point(18, 194);
+ this.check_pyrmidalBFrames.Name = "check_pyrmidalBFrames";
+ this.check_pyrmidalBFrames.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_pyrmidalBFrames.Size = new System.Drawing.Size(112, 17);
+ this.check_pyrmidalBFrames.TabIndex = 59;
+ this.check_pyrmidalBFrames.Text = "Pyrmidal B-Frames:";
+ this.check_pyrmidalBFrames.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.ToolTip.SetToolTip(this.check_pyrmidalBFrames, resources.GetString("check_pyrmidalBFrames.ToolTip"));
+ this.check_pyrmidalBFrames.UseVisualStyleBackColor = true;
+ this.check_pyrmidalBFrames.CheckedChanged += new System.EventHandler(this.check_pyrmidalBFrames_CheckedChanged);
+ //
+ // check_weightedBFrames
+ //
+ this.check_weightedBFrames.AutoSize = true;
+ this.check_weightedBFrames.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_weightedBFrames.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_weightedBFrames.Location = new System.Drawing.Point(16, 173);
+ this.check_weightedBFrames.Name = "check_weightedBFrames";
+ this.check_weightedBFrames.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_weightedBFrames.Size = new System.Drawing.Size(119, 17);
+ this.check_weightedBFrames.TabIndex = 58;
+ this.check_weightedBFrames.Text = "Weighted B-Frames:";
+ this.ToolTip.SetToolTip(this.check_weightedBFrames, resources.GetString("check_weightedBFrames.ToolTip"));
+ this.check_weightedBFrames.UseVisualStyleBackColor = true;
+ this.check_weightedBFrames.CheckedChanged += new System.EventHandler(this.check_weightedBFrames_CheckedChanged);
+ //
+ // lbl_direct_prediction
+ //
+ this.lbl_direct_prediction.AutoSize = true;
+ this.lbl_direct_prediction.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.lbl_direct_prediction.Location = new System.Drawing.Point(29, 150);
+ this.lbl_direct_prediction.Name = "lbl_direct_prediction";
+ this.lbl_direct_prediction.Size = new System.Drawing.Size(94, 12);
+ this.lbl_direct_prediction.TabIndex = 53;
+ this.lbl_direct_prediction.Text = "Direct Prediction:";
+ //
+ // drop_directPrediction
+ //
+ this.drop_directPrediction.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_directPrediction.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_directPrediction.FormattingEnabled = true;
+ this.drop_directPrediction.Items.AddRange(new object[] {
+ "Default (Spatial)",
+ "None",
+ "Spatial",
+ "Temporal",
+ "Automatic"});
+ this.drop_directPrediction.Location = new System.Drawing.Point(129, 147);
+ this.drop_directPrediction.Name = "drop_directPrediction";
+ this.drop_directPrediction.Size = new System.Drawing.Size(121, 21);
+ this.drop_directPrediction.TabIndex = 57;
+ this.ToolTip.SetToolTip(this.drop_directPrediction, resources.GetString("drop_directPrediction.ToolTip"));
+ this.drop_directPrediction.SelectedIndexChanged += new System.EventHandler(this.drop_directPrediction_SelectedIndexChanged);
+ //
+ // label62
+ //
+ this.label62.AutoSize = true;
+ this.label62.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label62.Location = new System.Drawing.Point(65, 98);
+ this.label62.Name = "label62";
+ this.label62.Size = new System.Drawing.Size(58, 12);
+ this.label62.TabIndex = 52;
+ this.label62.Text = "B-Frames:";
+ //
+ // drop_bFrames
+ //
+ this.drop_bFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_bFrames.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_bFrames.FormattingEnabled = true;
+ this.drop_bFrames.Items.AddRange(new object[] {
+ "Default (0)",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "15",
+ "16"});
+ this.drop_bFrames.Location = new System.Drawing.Point(129, 95);
+ this.drop_bFrames.Name = "drop_bFrames";
+ this.drop_bFrames.Size = new System.Drawing.Size(121, 21);
+ this.drop_bFrames.TabIndex = 56;
+ this.ToolTip.SetToolTip(this.drop_bFrames, "Sane values are 1-6. B-Frames are smaller than other frames, so they let you pack" +
+ " in more quality at the same bitrate.\r\nUse more of them with animated material: " +
+ "9-16.");
+ this.drop_bFrames.SelectedIndexChanged += new System.EventHandler(this.drop_bFrames_SelectedIndexChanged);
+ //
+ // label64
+ //
+ this.label64.AutoSize = true;
+ this.label64.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
+ this.label64.Location = new System.Drawing.Point(24, 45);
+ this.label64.Name = "label64";
+ this.label64.Size = new System.Drawing.Size(99, 12);
+ this.label64.TabIndex = 50;
+ this.label64.Text = "Reference Frames:";
+ //
+ // drop_refFrames
+ //
+ this.drop_refFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
+ this.drop_refFrames.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
+ this.drop_refFrames.FormattingEnabled = true;
+ this.drop_refFrames.Items.AddRange(new object[] {
+ "Default (1)",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7",
+ "8",
+ "9",
+ "10",
+ "11",
+ "12",
+ "13",
+ "14",
+ "15",
+ "16"});
+ this.drop_refFrames.Location = new System.Drawing.Point(129, 42);
+ this.drop_refFrames.Name = "drop_refFrames";
+ this.drop_refFrames.Size = new System.Drawing.Size(121, 21);
+ this.drop_refFrames.TabIndex = 54;
+ this.ToolTip.SetToolTip(this.drop_refFrames, "Sane values are 1-6. \r\nThe more you add, the higher the quality - but the slower " +
+ "the encode. Be careful...too many and QuickTime struggle to play the video back." +
+ "");
+ this.drop_refFrames.SelectedIndexChanged += new System.EventHandler(this.drop_refFrames_SelectedIndexChanged);
+ //
+ // check_mixedReferences
+ //
+ this.check_mixedReferences.AutoSize = true;
+ this.check_mixedReferences.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_mixedReferences.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_mixedReferences.Location = new System.Drawing.Point(25, 68);
+ this.check_mixedReferences.Name = "check_mixedReferences";
+ this.check_mixedReferences.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_mixedReferences.Size = new System.Drawing.Size(112, 17);
+ this.check_mixedReferences.TabIndex = 55;
+ this.check_mixedReferences.Text = "Mixed References:";
+ this.check_mixedReferences.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.ToolTip.SetToolTip(this.check_mixedReferences, "With this on, different references can be used for different parts of each 16x16 " +
+ "pixel macroblock, increasing quality.");
+ this.check_mixedReferences.UseVisualStyleBackColor = true;
+ this.check_mixedReferences.CheckedChanged += new System.EventHandler(this.check_mixedReferences_CheckedChanged);
+ //
+ // ToolTip
+ //
+ this.ToolTip.Active = false;
+ this.ToolTip.AutomaticDelay = 1000;
+ this.ToolTip.ToolTipIcon = System.Windows.Forms.ToolTipIcon.Info;
+ //
+ // x264Panel
+ //
+ this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.None;
+ this.Controls.Add(this.slider_psytrellis);
+ this.Controls.Add(this.lbl_psytrellis);
+ this.Controls.Add(this.lbl_psyrd);
+ this.Controls.Add(this.slider_psyrd);
+ this.Controls.Add(this.lbl_adaptBFrames);
+ this.Controls.Add(this.drop_adaptBFrames);
+ this.Controls.Add(this.label43);
+ this.Controls.Add(this.btn_reset);
+ this.Controls.Add(this.rtf_x264Query);
+ this.Controls.Add(this.check_Cabac);
+ this.Controls.Add(this.check_noDCTDecimate);
+ this.Controls.Add(this.check_noFastPSkip);
+ this.Controls.Add(this.lbl_trellis);
+ this.Controls.Add(this.drop_trellis);
+ this.Controls.Add(this.drop_deblockBeta);
+ this.Controls.Add(this.label41);
+ this.Controls.Add(this.drop_deblockAlpha);
+ this.Controls.Add(this.panel3);
+ this.Controls.Add(this.panel1);
+ this.Controls.Add(this.panel2);
+ this.Controls.Add(this.check_8x8DCT);
+ this.Controls.Add(this.label45);
+ this.Controls.Add(this.drop_analysis);
+ this.Controls.Add(this.label48);
+ this.Controls.Add(this.drop_subpixelMotionEstimation);
+ this.Controls.Add(this.lbl_merange);
+ this.Controls.Add(this.drop_MotionEstimationRange);
+ this.Controls.Add(this.label54);
+ this.Controls.Add(this.drop_MotionEstimationMethod);
+ this.Controls.Add(this.check_pyrmidalBFrames);
+ this.Controls.Add(this.check_weightedBFrames);
+ this.Controls.Add(this.lbl_direct_prediction);
+ this.Controls.Add(this.drop_directPrediction);
+ this.Controls.Add(this.label62);
+ this.Controls.Add(this.drop_bFrames);
+ this.Controls.Add(this.label64);
+ this.Controls.Add(this.drop_refFrames);
+ this.Controls.Add(this.check_mixedReferences);
+ this.Name = "x264Panel";
+ this.Size = new System.Drawing.Size(720, 306);
+ ((System.ComponentModel.ISupportInitialize)(this.slider_psytrellis)).EndInit();
+ ((System.ComponentModel.ISupportInitialize)(this.slider_psyrd)).EndInit();
+ this.ResumeLayout(false);
+ this.PerformLayout();
+
+ }
+
+ #endregion
+
+ internal System.Windows.Forms.TrackBar slider_psytrellis;
+ internal System.Windows.Forms.Label lbl_psytrellis;
+ internal System.Windows.Forms.Label lbl_psyrd;
+ internal System.Windows.Forms.TrackBar slider_psyrd;
+ internal System.Windows.Forms.Label lbl_adaptBFrames;
+ internal System.Windows.Forms.ComboBox drop_adaptBFrames;
+ internal System.Windows.Forms.Label label43;
+ internal System.Windows.Forms.Button btn_reset;
+ internal System.Windows.Forms.RichTextBox rtf_x264Query;
+ internal System.Windows.Forms.CheckBox check_Cabac;
+ internal System.Windows.Forms.CheckBox check_noDCTDecimate;
+ internal System.Windows.Forms.CheckBox check_noFastPSkip;
+ internal System.Windows.Forms.Label lbl_trellis;
+ internal System.Windows.Forms.ComboBox drop_trellis;
+ internal System.Windows.Forms.ComboBox drop_deblockBeta;
+ internal System.Windows.Forms.Label label41;
+ internal System.Windows.Forms.ComboBox drop_deblockAlpha;
+ internal System.Windows.Forms.Panel panel3;
+ internal System.Windows.Forms.Panel panel1;
+ internal System.Windows.Forms.Panel panel2;
+ internal System.Windows.Forms.CheckBox check_8x8DCT;
+ internal System.Windows.Forms.Label label45;
+ internal System.Windows.Forms.ComboBox drop_analysis;
+ internal System.Windows.Forms.Label label48;
+ internal System.Windows.Forms.ComboBox drop_subpixelMotionEstimation;
+ internal System.Windows.Forms.Label lbl_merange;
+ internal System.Windows.Forms.ComboBox drop_MotionEstimationRange;
+ internal System.Windows.Forms.Label label54;
+ internal System.Windows.Forms.ComboBox drop_MotionEstimationMethod;
+ internal System.Windows.Forms.CheckBox check_pyrmidalBFrames;
+ internal System.Windows.Forms.CheckBox check_weightedBFrames;
+ internal System.Windows.Forms.Label lbl_direct_prediction;
+ internal System.Windows.Forms.ComboBox drop_directPrediction;
+ internal System.Windows.Forms.Label label62;
+ internal System.Windows.Forms.ComboBox drop_bFrames;
+ internal System.Windows.Forms.Label label64;
+ internal System.Windows.Forms.ComboBox drop_refFrames;
+ internal System.Windows.Forms.CheckBox check_mixedReferences;
+ private System.Windows.Forms.ToolTip ToolTip;
+ }
+}
diff --git a/win/C#/Controls/x264Panel.cs b/win/C#/Controls/x264Panel.cs
new file mode 100644
index 000000000..59b049b97
--- /dev/null
+++ b/win/C#/Controls/x264Panel.cs
@@ -0,0 +1,1073 @@
+using System;
+using System.Collections.Generic;
+using System.ComponentModel;
+using System.Drawing;
+using System.Data;
+using System.Text;
+using System.Windows.Forms;
+
+namespace Handbrake.Controls
+{
+ public partial class x264Panel : UserControl
+ {
+ public x264Panel()
+ {
+ InitializeComponent();
+ }
+
+ public string x264Query
+ {
+ get { return rtf_x264Query.Text; }
+ set { rtf_x264Query.Text = value; }
+ }
+ public void setToolTipActive(Boolean active)
+ {
+ ToolTip.Active = active;
+ }
+
+ #region Controls Changed
+ private void drop_refFrames_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("ref");
+ }
+ private void check_mixedReferences_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("mixed-refs");
+ }
+ private void drop_bFrames_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("bframes");
+ }
+ private void drop_directPrediction_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("direct");
+ }
+ private void check_weightedBFrames_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("weightb");
+ }
+ private void check_pyrmidalBFrames_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("b-pyramid");
+ }
+ private void drop_MotionEstimationMethod_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("me");
+ }
+ private void drop_MotionEstimationRange_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("merange");
+ }
+ private void drop_subpixelMotionEstimation_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("subq");
+ }
+ private void drop_analysis_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("analyse");
+ }
+ private void check_8x8DCT_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("8x8dct");
+ }
+ private void drop_deblockAlpha_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("deblock");
+ }
+ private void drop_deblockBeta_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("deblock");
+ }
+ private void drop_trellis_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("trellis");
+ }
+ private void check_noFastPSkip_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("no-fast-pskip");
+ }
+ private void check_noDCTDecimate_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("no-dct-decimate");
+ }
+ private void check_Cabac_CheckedChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("cabac");
+ }
+ private void slider_psyrd_Scroll(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("psy-rd");
+ }
+ private void slider_psytrellis_Scroll(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("psy-rd");
+ }
+ private void drop_adaptBFrames_SelectedIndexChanged(object sender, EventArgs e)
+ {
+ on_x264_WidgetChange("b-adapt");
+ }
+ private void rtf_x264Query_TextChanged(object sender, EventArgs e)
+ {
+ if (rtf_x264Query.Text.EndsWith("\n"))
+ {
+ string query = rtf_x264Query.Text.Replace("\n", "");
+ reset2Defaults();
+ rtf_x264Query.Text = query;
+ X264_StandardizeOptString();
+ X264_SetCurrentSettingsInPanel();
+
+ if (rtf_x264Query.Text == string.Empty)
+ reset2Defaults();
+ }
+ }
+ private void btn_reset_Click(object sender, EventArgs e)
+ {
+ rtf_x264Query.Text = "";
+ reset2Defaults();
+ }
+ #endregion
+
+ /// <summary>
+ /// Reset all components to defaults and clears the x264 rtf box
+ /// </summary>
+ public void reset2Defaults()
+ {
+ check_8x8DCT.CheckState = CheckState.Unchecked;
+ check_Cabac.CheckState = CheckState.Checked;
+ check_mixedReferences.CheckState = CheckState.Unchecked;
+ check_noDCTDecimate.CheckState = CheckState.Unchecked;
+ check_noFastPSkip.CheckState = CheckState.Unchecked;
+ check_pyrmidalBFrames.CheckState = CheckState.Unchecked;
+ check_weightedBFrames.CheckState = CheckState.Unchecked;
+ drop_analysis.SelectedIndex = 0;
+ drop_bFrames.SelectedIndex = 0;
+ drop_deblockAlpha.SelectedIndex = 0;
+ drop_deblockBeta.SelectedIndex = 0;
+ drop_directPrediction.SelectedIndex = 0;
+ drop_MotionEstimationMethod.SelectedIndex = 0;
+ drop_MotionEstimationRange.SelectedIndex = 0;
+ drop_refFrames.SelectedIndex = 0;
+ drop_subpixelMotionEstimation.SelectedIndex = 0;
+ drop_trellis.SelectedIndex = 0;
+ slider_psyrd.Value = 0;
+ slider_psytrellis.Value = 0;
+ drop_adaptBFrames.SelectedIndex = 0;
+
+ rtf_x264Query.Text = "";
+ }
+
+ /// <summary>
+ /// Iterate over every x264 option, standardize it, write the full string to the x264 rtf box
+ /// </summary>
+ public void X264_StandardizeOptString()
+ {
+ /* Set widgets depending on the opt string in field */
+ String thisOpt; // The separated option such as "bframes=3"
+ String optName; // The option name such as "bframes"
+ String optValue;// The option value such as "3"
+ String changedOptString = "";
+ String[] currentOptsArray;
+
+ /*First, we get an opt string to process */
+ String currentOptString = rtf_x264Query.Text;
+
+ /*verify there is an opt string to process */
+ if (currentOptString.Contains("="))
+ {
+ /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
+ currentOptsArray = currentOptString.Split(':');
+
+ /*iterate through the array and get <opts> and <values*/
+ int loopcounter;
+ int currentOptsArrayCount = currentOptsArray.Length;
+ for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
+ {
+ thisOpt = currentOptsArray[loopcounter];
+ if (currentOptsArray[currentOptsArrayCount - 1] == string.Empty)
+ break;
+
+ String[] splitOptRange = thisOpt.Split('=');
+ if (thisOpt != "")
+ {
+ if (thisOpt.Contains("="))
+ {
+ optName = splitOptRange[0];
+ optValue = splitOptRange[1];
+
+ /* Standardize the names here depending on whats in the string */
+ optName = X264_StandardizeOptNames(optName);
+ thisOpt = optName + "=" + optValue;
+ }
+ else // No value given so we use a default of "1"
+ {
+ optName = thisOpt;
+ /* Standardize the names here depending on whats in the string */
+ optName = X264_StandardizeOptNames(optName);
+ thisOpt = optName + "=1";
+ }
+ }
+
+ /* Construct New String for opts here */
+ if (thisOpt == string.Empty)
+ changedOptString = changedOptString + thisOpt;
+ else
+ {
+ if (changedOptString == string.Empty)
+ changedOptString = thisOpt;
+ else
+ changedOptString = changedOptString + ":" + thisOpt;
+ }
+ }
+ }
+
+ /* Change the option string to reflect the new standardized option string */
+ if (changedOptString != "")
+ rtf_x264Query.Text = changedOptString;
+ }
+
+ /// <summary>
+ /// Take a single option and standardize it. Returns as a String
+ /// Input: String. - Single X264 Option. Name only
+ /// Output: String - Single X264 Option. Name only. Changed to standard format
+ /// </summary>
+ /// <param name="cleanOptNameString"></param>
+ /// <returns></returns>
+ private string X264_StandardizeOptNames(String cleanOptNameString)
+ {
+ String input = cleanOptNameString;
+
+ if (input.Equals("ref") || input.Equals("frameref"))
+ cleanOptNameString = "ref";
+
+ /*No Fast PSkip nofast_pskip*/
+ if (input.Equals("no-fast-pskip") || input.Equals("no_fast_pskip") || input.Equals("nofast_pskip"))
+ cleanOptNameString = "no-fast-pskip";
+
+ /*No Dict Decimate*/
+ if (input.Equals("no-dct-decimate") || input.Equals("no_dct_decimate") || input.Equals("nodct_decimate"))
+ cleanOptNameString = "no-dct-decimate";
+
+ /*Subme*/
+ if (input.Equals("subme"))
+ cleanOptNameString = "subq";
+
+ /*ME Range*/
+ if (input.Equals("me-range") || input.Equals("me_range"))
+ cleanOptNameString = "merange";
+
+ /*WeightB*/
+ if (input.Equals("weight-b") || input.Equals("weight_b"))
+ cleanOptNameString = "weightb";
+
+ /*B Pyramid*/
+ if (input.Equals("b_pyramid"))
+ cleanOptNameString = "b-pyramid";
+
+ /*Direct Prediction*/
+ if (input.Equals("direct-pred") || input.Equals("direct_pred"))
+ cleanOptNameString = "direct";
+
+ /*Deblocking*/
+ if (input.Equals("filter"))
+ cleanOptNameString = "deblock";
+
+ /*Analysis*/
+ if (input.Equals("partitions"))
+ cleanOptNameString = "analyse";
+
+ return cleanOptNameString;
+ }
+
+ /// <summary>
+ /// Resets the GUI widgets to the contents of the option string.
+ /// </summary>
+ public void X264_SetCurrentSettingsInPanel()
+ {
+ /* Set widgets depending on the opt string in field */
+ String thisOpt; // The separated option such as "bframes=3"
+ String optName; // The option name such as "bframes"
+ String optValue;// The option value such as "3"
+ String[] currentOptsArray;
+
+ //Set currentOptString to the contents of the text box.
+ String currentOptString = rtf_x264Query.Text.Replace("\n", "");
+
+ /*verify there is an opt string to process */
+ if (currentOptString.Contains("="))
+ {
+ /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
+ currentOptsArray = currentOptString.Split(':');
+
+ /*iterate through the array and get <opts> and <values*/
+ int loopcounter;
+ int currentOptsArrayCount = currentOptsArray.Length;
+
+ /*iterate through the array and get <opts> and <values*/
+ for (loopcounter = 0; loopcounter < currentOptsArrayCount; loopcounter++)
+ {
+ thisOpt = currentOptsArray[loopcounter];
+ String[] splitOptRange = thisOpt.Split('=');
+
+ if (thisOpt.Contains("="))
+ {
+ optName = splitOptRange[0];
+ optValue = splitOptRange[1];
+
+ /*Run through the available widgets for x264 opts and set them, as you add widgets,
+ they need to be added here. This should be moved to its own method probably*/
+ switch (optName)
+ {
+ case "bframes":
+ drop_bFrames.SelectedItem = optValue;
+ continue;
+ case "ref":
+ drop_refFrames.SelectedItem = optValue;
+ continue;
+ case "no-fast-pskip":
+ check_noFastPSkip.CheckState = CheckState.Checked;
+ continue;
+ case "no-dct-decimate":
+ check_noDCTDecimate.CheckState = CheckState.Checked;
+ continue;
+ case "subq":
+ drop_subpixelMotionEstimation.SelectedItem = optValue;
+ continue;
+ case "trellis":
+ drop_trellis.SelectedItem = optValue;
+ continue;
+ case "mixed-refs":
+ check_mixedReferences.CheckState = CheckState.Checked;
+ continue;
+ case "me":
+ if (optValue.Equals("dia"))
+ drop_MotionEstimationMethod.SelectedItem = "Diamond";
+ else if (optValue.Equals("hex"))
+ drop_MotionEstimationMethod.SelectedItem = "Hexagon";
+ else if (optValue.Equals("umh"))
+ drop_MotionEstimationMethod.SelectedItem = "Uneven Multi-Hexagon";
+ else if (optValue.Equals("esa"))
+ drop_MotionEstimationMethod.SelectedItem = "Exhaustive";
+ else if (optValue.Equals("tesa"))
+ drop_MotionEstimationMethod.SelectedItem = "Transformed Exhaustive";
+ continue;
+ case "merange":
+ drop_MotionEstimationRange.SelectedItem = optValue;
+ continue;
+ case "b-adapt":
+ int badapt;
+ int.TryParse(optValue, out badapt);
+ drop_adaptBFrames.SelectedIndex = (badapt + 1);
+ continue;
+ case "weightb":
+ check_weightedBFrames.CheckState = CheckState.Checked;
+ continue;
+ case "b-pyramid":
+ check_pyrmidalBFrames.CheckState = CheckState.Checked;
+ continue;
+ case "direct":
+ if (optValue == "auto")
+ optValue = "Automatic";
+
+ if (optValue != "")
+ {
+ Char[] letters = optValue.ToCharArray();
+ letters[0] = Char.ToUpper(letters[0]);
+ optValue = new string(letters);
+ }
+
+ drop_directPrediction.SelectedItem = optValue;
+ continue;
+ case "deblock":
+ string[] splitDeblock = optValue.Split(',');
+ string alphaDeblock = splitDeblock[0];
+ string betaDeblock = splitDeblock[1];
+
+ if (alphaDeblock.Equals("0") && betaDeblock.Replace("\n", "").Equals("0"))
+ {
+ drop_deblockAlpha.SelectedItem = "Default (0)";
+ drop_deblockBeta.SelectedItem = "Default (0)";
+ }
+ else
+ {
+ if (!alphaDeblock.Equals("0"))
+ drop_deblockAlpha.SelectedItem = alphaDeblock;
+ else
+ drop_deblockAlpha.SelectedItem = "0";
+
+ if (!betaDeblock.Replace("\n", "").Equals("0"))
+ drop_deblockBeta.SelectedItem = betaDeblock.Replace("\n", "");
+ else
+ drop_deblockBeta.SelectedItem = "0";
+ }
+ continue;
+ case "analyse":
+ if (optValue.Equals("p8x8,b8x8,i8x8,i4x4"))
+ drop_analysis.SelectedItem = "Default (some)";
+ if (optValue.Equals("none"))
+ drop_analysis.SelectedItem = "None";
+ if (optValue.Equals("all"))
+ drop_analysis.SelectedItem = "All";
+ continue;
+ case "8x8dct":
+ check_8x8DCT.CheckState = CheckState.Checked;
+ continue;
+ case "cabac":
+ check_Cabac.CheckState = CheckState.Unchecked;
+ continue;
+ case "psy-rd":
+ string[] x = optValue.Split(',');
+
+ double psyrd = 0, psytrellis = 0;
+ int val, val2;
+ double.TryParse(x[0], out psyrd);
+ double.TryParse(x[1], out psytrellis);
+
+ psyrd = psyrd * 10;
+ psytrellis = psytrellis * 10;
+
+ int.TryParse(psyrd.ToString(), out val);
+ int.TryParse(psytrellis.ToString(), out val2);
+
+ slider_psyrd.Value = val;
+ slider_psytrellis.Value = val2;
+ continue;
+ }
+ }
+ }
+ }
+ }
+
+ /// <summary>
+ /// This function will update the X264 Query when one of the GUI widgets changes.
+ /// </summary>
+ private void on_x264_WidgetChange(string sender)
+ {
+ animate(sender);
+ String optNameToChange = sender;
+ String currentOptString = rtf_x264Query.Text;
+
+ /*First, we create a pattern to check for ":"optNameToChange"=" to modify the option if the name falls after
+ the first character of the opt string (hence the ":") */
+ String checkOptNameToChange = ":" + optNameToChange + "=";
+ String checkOptNameToChangeBegin = optNameToChange + "=";
+
+ // IF the current H264 Option String Contains Multiple Items or Just 1 Item
+ if ((currentOptString.Contains(checkOptNameToChange)) || (currentOptString.StartsWith(checkOptNameToChangeBegin)))
+ hasOptions(currentOptString, optNameToChange);
+ else // IF there is no options in the rich text box!
+ hasNoOptions(optNameToChange);
+ }
+
+ /// <summary>
+ /// Called when the current x264 option string contains multiple (or a single) item(s) in it seperated by :
+ /// it updates the current option that the widget corrosponds to, if it is already in thes string.
+ /// </summary>
+ /// <param name="currentOptString"></param>
+ /// <param name="optNameToChange"></param>
+ private void hasOptions(string currentOptString, string optNameToChange)
+ {
+ String thisOpt; // The separated option such as "bframes=3"
+ String optName; // The option name such as "bframes"
+ String[] currentOptsArray;
+
+ /* Create new empty opt string*/
+ String changedOptString = "";
+
+ /*Put individual options into an array based on the ":" separator for processing, result is "<opt>=<value>"*/
+ currentOptsArray = currentOptString.Split(':');
+
+ /*iterate through the array and get <opts> and <values*/
+ for (int loopcounter = 0; loopcounter < currentOptsArray.Length; loopcounter++)
+ {
+ thisOpt = currentOptsArray[loopcounter];
+
+ if (thisOpt.Contains("="))
+ {
+ string[] splitOptRange = thisOpt.Split('=');
+
+ optName = splitOptRange[0]; // e.g bframes
+
+ /*
+ * Run through the available widgets for x264 opts and set them, as you add widgets,
+ * they need to be added here. This should be moved to its own method probably
+ * If the optNameToChange is found, appropriately change the value or delete it if
+ * "unspecified" is set.
+ */
+ if (optName.Equals(optNameToChange))
+ {
+ if (optNameToChange.Equals("deblock"))
+ {
+ String da = drop_deblockAlpha.SelectedItem.ToString();
+ String db = drop_deblockBeta.SelectedItem.ToString();
+
+ if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))
+ {
+ drop_deblockBeta.SelectedItem = "Default (0)";
+ drop_deblockAlpha.SelectedItem = "Default (0)";
+ thisOpt = "";
+ }
+ else if ((!da.Contains("Default")) && (db.Contains("Default")))
+ {
+ drop_deblockBeta.SelectedItem = "0";
+ thisOpt = "deblock=" + da + ",0";
+ }
+ else if ((da.Contains("Default")) && (!db.Contains("Default")))
+ {
+ drop_deblockAlpha.SelectedItem = "0";
+ thisOpt = "deblock=0," + db;
+ }
+ else if ((!da.Contains("Default")) && (!db.Contains("Default")))
+ thisOpt = "deblock=" + da + "," + db;
+ }
+ else if (optNameToChange.Equals("psy-rd"))
+ {
+ if (slider_psyrd.Value == 10 && slider_psytrellis.Value == 0)
+ thisOpt = "";
+ else
+ {
+ double psyrd = slider_psyrd.Value * 0.1;
+ double psytre = slider_psytrellis.Value * 0.1;
+ string rd, rt;
+ if (psyrd == 1)
+ rd = "1.0";
+ else
+ rd = psyrd.ToString();
+
+ if (psytre == 1)
+ rt = "1.0";
+ else
+ rt = psytre.ToString();
+
+ thisOpt = "psy-rd=" + rd + "," + rt;
+ }
+ }
+ else if (optNameToChange.Equals("mixed-refs"))
+ {
+ if (check_mixedReferences.CheckState == CheckState.Checked)
+ thisOpt = "mixed-refs=1";
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("weightb"))
+ {
+ if (check_weightedBFrames.CheckState == CheckState.Checked)
+ thisOpt = "weightb=1";
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("b-pyramid"))
+ {
+ if (check_pyrmidalBFrames.CheckState == CheckState.Checked)
+ thisOpt = "b-pyramid=1";
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("no-fast-pskip"))
+ {
+ if (check_noFastPSkip.CheckState == CheckState.Checked)
+ thisOpt = "no-fast-pskip=1";
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("no-dct-decimate"))
+ {
+ if (check_noDCTDecimate.CheckState == CheckState.Checked)
+ thisOpt = "no-dct-decimate=1";
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("8x8dct"))
+ {
+ if (check_8x8DCT.CheckState == CheckState.Checked)
+ thisOpt = "8x8dct=1";
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("cabac"))
+ {
+ if (check_Cabac.CheckState == CheckState.Checked)
+ thisOpt = "";
+ else
+ thisOpt = "cabac=0";
+ }
+ else if (optNameToChange.Equals("me"))
+ {
+ switch (drop_MotionEstimationMethod.SelectedIndex)
+ {
+ case 1:
+ thisOpt = "me=dia";
+ break;
+
+ case 2:
+ thisOpt = "me=hex";
+ break;
+
+ case 3:
+ thisOpt = "me=umh";
+ break;
+
+ case 4:
+ thisOpt = "me=esa";
+ break;
+
+ case 5:
+ thisOpt = "me=tesa";
+ break;
+
+ default:
+ thisOpt = "";
+ break;
+ }
+ }
+ else if (optNameToChange.Equals("direct"))
+ {
+ switch (drop_directPrediction.SelectedIndex)
+ {
+ case 1:
+ thisOpt = "direct=none";
+ break;
+
+ case 2:
+ thisOpt = "direct=spatial";
+ break;
+
+ case 3:
+ thisOpt = "direct=temporal";
+ break;
+
+ case 4:
+ thisOpt = "direct=auto";
+ break;
+
+ default:
+ thisOpt = "";
+ break;
+ }
+ }
+ else if (optNameToChange.Equals("analyse"))
+ {
+ switch (drop_analysis.SelectedIndex)
+ {
+ case 1:
+ thisOpt = "analyse=none";
+ break;
+
+ case 2:
+ thisOpt = "analyse=all";
+ break;
+
+ default:
+ thisOpt = "";
+ break;
+ }
+ }
+ else if (optNameToChange.Equals("merange"))
+ {
+ if (!drop_MotionEstimationRange.SelectedItem.ToString().Contains("Default"))
+ thisOpt = "merange=" + drop_MotionEstimationRange.SelectedItem;
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("b-adapt"))
+ {
+ if (!drop_adaptBFrames.SelectedItem.ToString().Contains("Default"))
+ thisOpt = "b-adapt=" + (drop_adaptBFrames.SelectedIndex - 1);
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("ref"))
+ {
+ if (!drop_refFrames.SelectedItem.ToString().Contains("Default"))
+ thisOpt = "ref=" + drop_refFrames.SelectedItem;
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("bframes"))
+ {
+ String value = drop_bFrames.SelectedItem.ToString();
+ if (!drop_bFrames.SelectedItem.ToString().Contains("Default"))
+ thisOpt = "bframes=" + value;
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("subq"))
+ {
+ String value = drop_subpixelMotionEstimation.SelectedItem.ToString();
+ if (!drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))
+ thisOpt = "subq=" + value;
+ else
+ thisOpt = "";
+ }
+ else if (optNameToChange.Equals("trellis"))
+ {
+ String value = drop_trellis.SelectedItem.ToString();
+ if (!drop_trellis.SelectedItem.ToString().Contains("Default"))
+ thisOpt = "trellis=" + value;
+ else
+ thisOpt = "";
+ }
+ }
+ }
+
+ /* Construct New String for opts here */
+ if (!thisOpt.Equals(""))
+ {
+ if (changedOptString.Equals(""))
+ changedOptString = thisOpt;
+ else
+ changedOptString = changedOptString + ":" + thisOpt;
+ }
+ }
+
+ /* Change the option string to reflect the new mod settings */
+ rtf_x264Query.Text = changedOptString;
+ }
+
+ /// <summary>
+ /// Add's an option to the x264 query string.
+ /// Handles 2 cases. 1 Where rtf_x264Query.Text is empty, and one where there is an option with no value,
+ /// e.g no-fast-pskip
+ /// </summary>
+ /// <param name="optNameToChange"></param>
+ private void hasNoOptions(string optNameToChange)
+ {
+ string colon = "";
+ if (rtf_x264Query.Text != "")
+ colon = ":";
+
+ string query = rtf_x264Query.Text;
+ if (optNameToChange.Equals("me"))
+ {
+ switch (drop_MotionEstimationMethod.SelectedIndex)
+ {
+ case 1:
+ query = query + colon + "me=dia";
+ break;
+
+ case 2:
+ query = query + colon + "me=hex";
+ break;
+
+ case 3:
+ query = query + colon + "me=umh";
+ break;
+
+ case 4:
+ query = query + colon + "me=esa";
+ break;
+
+ case 5:
+ query = query + colon + "me=tesa";
+ break;
+
+ default:
+ break;
+ }
+ }
+ else if (optNameToChange.Equals("direct"))
+ {
+ switch (drop_directPrediction.SelectedIndex)
+ {
+ case 1:
+ query = query + colon + "direct=none";
+ break;
+
+ case 2:
+ query = query + colon + "direct=spatial";
+ break;
+
+ case 3:
+ query = query + colon + "direct=temporal";
+ break;
+
+ case 4:
+ query = query + colon + "direct=auto";
+ break;
+
+ default:
+ break;
+ }
+ }
+ else if (optNameToChange.Equals("analyse"))
+ {
+ switch (drop_analysis.SelectedIndex)
+ {
+ case 1:
+ query = query + colon + "analyse=none";
+ break;
+
+ case 2:
+ query = query + colon + "analyse=all";
+ break;
+
+ default:
+ break;
+ }
+ }
+ else if (optNameToChange.Equals("merange"))
+ {
+ int value = drop_MotionEstimationRange.SelectedIndex + 3;
+ query = query + colon + "merange=" + value;
+ }
+ else if (optNameToChange.Equals("b-adapt"))
+ {
+ int value = drop_adaptBFrames.SelectedIndex - 1;
+ query = query + colon + "b-adapt=" + value;
+ }
+
+ else if (optNameToChange.Equals("deblock"))
+ {
+ String da = drop_deblockAlpha.SelectedItem.ToString();
+ String db = drop_deblockBeta.Text;
+
+ if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))
+ {
+ drop_deblockBeta.SelectedItem = "Default (0)";
+ drop_deblockAlpha.SelectedItem = "Default (0)";
+ }
+ else
+ {
+ if (db.Contains("Default"))
+ db = "0";
+
+ if (da.Contains("Default"))
+ da = "0";
+
+ query = query + colon + "deblock=" + da + "," + db;
+ }
+ }
+ else if (optNameToChange.Equals("psy-rd"))
+ {
+ if (slider_psyrd.Value == 10 && slider_psytrellis.Value == 0)
+ query += "";
+ else
+ {
+ double psyrd = slider_psyrd.Value * 0.1;
+ double psytre = slider_psytrellis.Value * 0.1;
+ string rd, rt;
+ if (psyrd == 1)
+ rd = "1.0";
+ else
+ rd = psyrd.ToString();
+
+ if (psytre == 1)
+ rt = "1.0";
+ else
+ rt = psytre.ToString();
+
+ query += colon + "psy-rd=" + rd + "," + rt;
+ }
+ }
+ else if (optNameToChange.Equals("mixed-refs"))
+ {
+ if (check_mixedReferences.CheckState == CheckState.Checked)
+ query = query + colon + "mixed-refs=1";
+ }
+ else if (optNameToChange.Equals("weightb"))
+ {
+ if (check_weightedBFrames.CheckState == CheckState.Checked)
+ query = query + colon + "weightb=1";
+ }
+ else if (optNameToChange.Equals("b-pyramid"))
+ {
+ if (check_pyrmidalBFrames.CheckState == CheckState.Checked)
+ query = query + colon + "b-pyramid=1";
+ }
+ else if (optNameToChange.Equals("no-fast-pskip"))
+ {
+ if (check_noFastPSkip.CheckState == CheckState.Checked)
+ query = query + colon + "no-fast-pskip=1";
+ }
+ else if (optNameToChange.Equals("no-dct-decimate"))
+ {
+ if (check_noDCTDecimate.CheckState == CheckState.Checked)
+ query = query + colon + "no-dct-decimate=1";
+ }
+ else if (optNameToChange.Equals("8x8dct"))
+ {
+ if (check_8x8DCT.CheckState == CheckState.Checked)
+ query = query + colon + "8x8dct=1";
+ }
+ else if (optNameToChange.Equals("cabac"))
+ {
+ if (check_Cabac.CheckState != CheckState.Checked)
+ query = query + colon + "cabac=0";
+ }
+ else if (optNameToChange.Equals("ref"))
+ {
+ if (!drop_refFrames.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "ref=" + drop_refFrames.SelectedItem;
+ }
+ else if (optNameToChange.Equals("bframes"))
+ {
+ String value = drop_bFrames.SelectedItem.ToString();
+ if (!drop_bFrames.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "bframes=" + value;
+ }
+ else if (optNameToChange.Equals("subq"))
+ {
+ String value = drop_subpixelMotionEstimation.SelectedItem.ToString();
+ if (!drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "subq=" + value;
+ }
+ else if (optNameToChange.Equals("trellis"))
+ {
+ if (!drop_trellis.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "trellis=" + drop_trellis.SelectedItem;
+ }
+
+ rtf_x264Query.Text = query;
+ }
+
+ /// <summary>
+ /// Shows and hides controls based on the values of other controls.
+ /// </summary>
+ /// <param name="sender"></param>
+ private void animate(string sender)
+ {
+ /* Lots of situations to cover.
+ - B-frames (when 0 turn of b-frame specific stuff, when < 2 disable b-pyramid)
+ - CABAC (when 0 turn off trellis)
+ - analysis (if none, turn off 8x8dct)
+ - refs (under 2, disable mixed-refs)
+ - subme (if under 6, turn off psy-rd and psy-trel)
+ - trellis (if 0, turn off psy-trel)
+ */
+
+ switch(sender)
+ {
+ case "bframes":
+ if (drop_bFrames.SelectedIndex < 2)
+ {
+ /* If the b-frame widget is at 0 or 1, the user has chosen
+ not to use b-frames at all. So disable the options
+ that can only be used when b-frames are enabled. */
+ check_weightedBFrames.Visible = false;
+ check_pyrmidalBFrames.Visible = false;
+ drop_directPrediction.Visible = false;
+ lbl_direct_prediction.Visible = false;
+
+ check_weightedBFrames.CheckState = CheckState.Unchecked;
+ check_pyrmidalBFrames.CheckState = CheckState.Unchecked;
+ drop_directPrediction.SelectedIndex = 0;
+
+ drop_adaptBFrames.Visible = false;
+ lbl_adaptBFrames.Visible = false;
+ drop_adaptBFrames.SelectedIndex = 0;
+ }
+ else if (drop_bFrames.SelectedIndex == 2)
+ {
+ /* Only 1 b-frame? Disable b-pyramid. */
+ check_pyrmidalBFrames.Visible = false;
+ check_pyrmidalBFrames.CheckState = CheckState.Unchecked;
+
+ check_weightedBFrames.Visible = true;
+ drop_directPrediction.Visible = true;
+ lbl_direct_prediction.Visible = true;
+
+ drop_adaptBFrames.Visible = true;
+ lbl_adaptBFrames.Visible = true;
+ }
+ else
+ {
+ check_weightedBFrames.Visible = true;
+ check_pyrmidalBFrames.Visible = true;
+ drop_directPrediction.Visible = true;
+ lbl_direct_prediction.Visible = true;
+
+ drop_adaptBFrames.Visible = true;
+ lbl_adaptBFrames.Visible = true;
+ }
+ break;
+ case "cabac":
+ if (check_Cabac.Checked == false)
+ {
+ /* Without CABAC entropy coding, trellis doesn't run. */
+ drop_trellis.Visible = false;
+ drop_trellis.SelectedIndex = 0;
+ lbl_trellis.Visible = false;
+ }
+ else
+ {
+ drop_trellis.Visible = true;
+ lbl_trellis.Visible = true;
+ }
+ break;
+ case "analyse":
+ if (drop_analysis.SelectedIndex == 1)
+ {
+ /* No analysis? Disable 8x8dct */
+ check_8x8DCT.Visible = false;
+ if (sender != "8x8dct")
+ check_8x8DCT.CheckState = CheckState.Unchecked;
+ }
+ else
+ check_8x8DCT.Visible = true;
+ break;
+ case "ref":
+ if (drop_refFrames.SelectedIndex < 3)
+ {
+ check_mixedReferences.Visible = false;
+ if (sender != "mixed-refs")
+ check_mixedReferences.CheckState = CheckState.Unchecked;
+ }
+ else
+ check_mixedReferences.Visible = true;
+ break;
+ case "me": // Motion Estimation
+ if (drop_MotionEstimationMethod.SelectedIndex < 3)
+ {
+ drop_MotionEstimationRange.Visible = false;
+ lbl_merange.Visible = false;
+ drop_MotionEstimationRange.SelectedIndex = 0;
+ }
+ else
+ {
+ drop_MotionEstimationRange.Visible = true;
+ lbl_merange.Visible = true;
+ }
+ break;
+ case "subq": // subme
+ if (drop_subpixelMotionEstimation.SelectedIndex != 0 && drop_subpixelMotionEstimation.SelectedIndex < 7)
+ {
+ slider_psyrd.Visible = false;
+ slider_psyrd.Value = 10;
+ lbl_psyrd.Visible = false;
+
+
+ slider_psytrellis.Visible = false;
+ slider_psytrellis.Value = 0;
+ lbl_psytrellis.Visible = false;
+ }
+ else
+ {
+ slider_psyrd.Visible = true;
+ lbl_psyrd.Visible = true;
+
+ if (drop_trellis.SelectedIndex >= 2 && check_Cabac.Checked && slider_psytrellis.Visible == false)
+ {
+ slider_psytrellis.Visible = true;
+ lbl_psytrellis.Visible = true;
+ }
+ }
+ break;
+ case "trellis": // subme
+ if (drop_trellis.SelectedIndex < 2)
+ {
+ slider_psytrellis.Visible = false;
+ slider_psytrellis.Value = 0;
+ lbl_psytrellis.Visible = false;
+ }
+ else
+ {
+ if ((drop_subpixelMotionEstimation.SelectedIndex == 0 || drop_subpixelMotionEstimation.SelectedIndex >= 7) && check_Cabac.Checked && slider_psytrellis.Visible == false)
+ {
+ slider_psytrellis.Visible = true;
+ lbl_psytrellis.Visible = true;
+ }
+ }
+ break;
+ }
+ }
+ }
+} \ No newline at end of file
diff --git a/win/C#/Controls/x264Panel.resx b/win/C#/Controls/x264Panel.resx
new file mode 100644
index 000000000..8dca4f1d7
--- /dev/null
+++ b/win/C#/Controls/x264Panel.resx
@@ -0,0 +1,246 @@
+<?xml version="1.0" encoding="utf-8"?>
+<root>
+ <!--
+ Microsoft ResX Schema
+
+ Version 2.0
+
+ The primary goals of this format is to allow a simple XML format
+ that is mostly human readable. The generation and parsing of the
+ various data types are done through the TypeConverter classes
+ associated with the data types.
+
+ Example:
+
+ ... ado.net/XML headers & schema ...
+ <resheader name="resmimetype">text/microsoft-resx</resheader>
+ <resheader name="version">2.0</resheader>
+ <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
+ <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
+ <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
+ <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
+ <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
+ <value>[base64 mime encoded serialized .NET Framework object]</value>
+ </data>
+ <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
+ <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
+ <comment>This is a comment</comment>
+ </data>
+
+ There are any number of "resheader" rows that contain simple
+ name/value pairs.
+
+ Each data row contains a name, and value. The row also contains a
+ type or mimetype. Type corresponds to a .NET class that support
+ text/value conversion through the TypeConverter architecture.
+ Classes that don't support this are serialized and stored with the
+ mimetype set.
+
+ The mimetype is used for serialized objects, and tells the
+ ResXResourceReader how to depersist the object. This is currently not
+ extensible. For a given mimetype the value must be set accordingly:
+
+ Note - application/x-microsoft.net.object.binary.base64 is the format
+ that the ResXResourceWriter will generate, however the reader can
+ read any of the formats listed below.
+
+ mimetype: application/x-microsoft.net.object.binary.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Binary.BinaryFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.soap.base64
+ value : The object must be serialized with
+ : System.Runtime.Serialization.Formatters.Soap.SoapFormatter
+ : and then encoded with base64 encoding.
+
+ mimetype: application/x-microsoft.net.object.bytearray.base64
+ value : The object must be serialized into a byte array
+ : using a System.ComponentModel.TypeConverter
+ : and then encoded with base64 encoding.
+ -->
+ <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
+ <xsd:import namespace="http://www.w3.org/XML/1998/namespace" />
+ <xsd:element name="root" msdata:IsDataSet="true">
+ <xsd:complexType>
+ <xsd:choice maxOccurs="unbounded">
+ <xsd:element name="metadata">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" />
+ </xsd:sequence>
+ <xsd:attribute name="name" use="required" type="xsd:string" />
+ <xsd:attribute name="type" type="xsd:string" />
+ <xsd:attribute name="mimetype" type="xsd:string" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="assembly">
+ <xsd:complexType>
+ <xsd:attribute name="alias" type="xsd:string" />
+ <xsd:attribute name="name" type="xsd:string" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="data">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" msdata:Ordinal="1" />
+ <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
+ <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
+ <xsd:attribute ref="xml:space" />
+ </xsd:complexType>
+ </xsd:element>
+ <xsd:element name="resheader">
+ <xsd:complexType>
+ <xsd:sequence>
+ <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
+ </xsd:sequence>
+ <xsd:attribute name="name" type="xsd:string" use="required" />
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:choice>
+ </xsd:complexType>
+ </xsd:element>
+ </xsd:schema>
+ <resheader name="resmimetype">
+ <value>text/microsoft-resx</value>
+ </resheader>
+ <resheader name="version">
+ <value>2.0</value>
+ </resheader>
+ <resheader name="reader">
+ <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <resheader name="writer">
+ <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
+ </resheader>
+ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <metadata name="ToolTip.TrayLocation" type="System.Drawing.Point, System.Drawing, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a">
+ <value>17, 17</value>
+ </metadata>
+ <data name="slider_psyrd.ToolTip" xml:space="preserve">
+ <value>Psychovisual Rate Distortion Optimization sure is a mouthful, isn't it? Basically, it means x264 tries to retain detail, for better quality to the human eye,
+as opposed to trying to maximize quality the way a computer understands it, through signal-to-noise ratios that have trouble telling apart fine detail and noise.</value>
+ </data>
+ <data name="drop_adaptBFrames.ToolTip" xml:space="preserve">
+ <value>When adaptive B-Frames are disabled, the number of B-Frames you specify is the constant length of every B-Frame sequence.
+When one of the adaptive modes is enabled, the number of B-Frames is treated as a maximum, with the length of each sequence varying, but never exceeding the max.
+
+Fast mode takes the same amount of time no matter how many B-frames you specify. However, it doesn't always make the best decisions on how many B-Frames to use in a sequence.
+
+Optimal mode gets slower as the maximum number of B-Frames increases, but does a much better job at deciding sequence length, which can mean smaller file sizes and better quality.</value>
+ </data>
+ <data name="check_Cabac.ToolTip" xml:space="preserve">
+ <value>CABAC, or context adaptive binary arithmetic coding, is used by x264 to reduce the bitrate needed for a given quality by 15\%.
+This makes it very cool and very useful, and it should be left on whenever possible. However, it is incompatible with the iPod, and makes the AppleTV struggle. So turn it off for those.
+
+CABAC is a kind of entropy coding, which means that it compresses data by making shorthand symbols to represent long streams of data. The \"entropy\" part means that the symbols it uses the most often are the smallest.
+When you disable CABAC, another entropy coding scheme gets enabled, called CAVLC (context adaptive variable-length coding).
+CAVLC is a lot less efficient, which is why it needs 15\% more bitrate to achieve the same quality as CABAC.</value>
+ </data>
+ <data name="check_noDCTDecimate.ToolTip" xml:space="preserve">
+ <value>To save space, x264 will \"zero out\" blocks when it thinks they won't be perceptible by the viewer.
+This negligibly reduces quality, but in rare cases it can mess up and produce visible artifacts.
+This situation can be alleviated by telling x264 not to decimate DCT blocks.
+
+It increases quality but also bitrate/file size, so if you use it when you've specified a target bitrate you will end up with a worse picture than without it.
+However, when used with constant quality encoding, or if you boost the average bitrate to compensate, you might get a better result.</value>
+ </data>
+ <data name="drop_trellis.ToolTip" xml:space="preserve">
+ <value>Trellis fine-tunes how bitrate is doled out, so it can reduce file size/bitrate or increase quality.
+A value of 1 means it only fine-tunes the final encode of a block of pixels, while 2 means it is considered during earlier phases of the decision-making process as well.</value>
+ </data>
+ <data name="drop_deblockBeta.ToolTip" xml:space="preserve">
+ <value>x264 includes an in-loop deblocking filter. What this means is that blocky compression artifacts are smoothed away when you play back the video.
+It has two settings: strength and threshold, just like a simple filter in Photoshop.
+
+Strength controls the amount of deblocking applied to the whole frame. If you drop down below 0, you reduce the amount of blurring.
+Go too negative, and you'll get an effect somewhat like oversharpening an image. Go into positive values, and the image may become too soft.
+
+Threshold controls how sensitive the filter is to whether something in a block is detail that needs to be preserved: lower numbers blur details less.
+
+The default deblocking values are 0 and 0.
+This does not mean zero deblocking.
+It means x264 will apply the regular deblocking strength and thresholds the codec authors have selected as working the best in most cases.
+
+While many, many people stick with the default deblocking values of 0,0, and you should never change the deblocking without disabling adaptive quantization,
+other people disagree.
+Some prefer a slightly less blurred image for live action material, and use values like -2,-1 or -2,-2. Others will raise it to 1,1 or even 3,3 for animation.
+While the values for each setting extend from -6 to 6, the consensus is that going below -3 or above 3 is worthless.</value>
+ </data>
+ <data name="drop_deblockAlpha.ToolTip" xml:space="preserve">
+ <value>x264 includes an in-loop deblocking filter. What this means is that blocky compression artifacts are smoothed away when you play back the video.
+It has two settings: strength and threshold, just like a simple filter in Photoshop.
+
+Strength controls the amount of deblocking applied to the whole frame. If you drop down below 0, you reduce the amount of blurring.
+Go too negative, and you'll get an effect somewhat like oversharpening an image. Go into positive values, and the image may become too soft.
+
+Threshold controls how sensitive the filter is to whether something in a block is detail that needs to be preserved: lower numbers blur details less.
+
+The default deblocking values are 0 and 0.
+This does not mean zero deblocking.
+It means x264 will apply the regular deblocking strength and thresholds the codec authors have selected as working the best in most cases.
+
+While many, many people stick with the default deblocking values of 0,0, and you should never change the deblocking without disabling adaptive quantization,
+other people disagree.
+Some prefer a slightly less blurred image for live action material, and use values like -2,-1 or -2,-2. Others will raise it to 1,1 or even 3,3 for animation.
+While the values for each setting extend from -6 to 6, the consensus is that going below -3 or above 3 is worthless.</value>
+ </data>
+ <data name="check_8x8DCT.ToolTip" xml:space="preserve">
+ <value>Checking this box lets x264 break key frames down into 8x8 blocks of pixels for analysis.
+This is a high profile feature of H.264, which makes it less compatible. It should slightly decrease bitrate or improve quality.
+Turn it on whenever possible.</value>
+ </data>
+ <data name="drop_analysis.ToolTip" xml:space="preserve">
+ <value>Analysis controls how finely x264 divides up a frame to capture detail. Full macroblocks are 16x16 pixels, but x264 can go down all the way to 4x4 blocks if it judges it necessary.
+By default it only breaks up key frames that much. To give x264 the freedom to make the best decisions for all frames, use \"all\" analysis.
+If you want to create a high profile H.264 video (which is less compatible with the world at large than main profile), also check the \"8x8 DCT blocks\" box to add yet another block size for analysis.</value>
+ </data>
+ <data name="drop_subpixelMotionEstimation.ToolTip" xml:space="preserve">
+ <value>This setting is finer-grained than the motion estimation settings above. Instead of dealing with whole pixels, it deals with 4 fractional pixels, or quarter pixels (qpel).
+Higher levels increase quality by further refining the motion prediction for these quarter pixels, but take longer to encode.
+
+The default, 6, turns on a feature called rate distortion optimization, including psychovisual enhancements.
+7 enables that rate distortion for B-frames. 8 refines those decisions for I and P frames, and 9 adds on refinement for B-frames as well.</value>
+ </data>
+ <data name="drop_MotionEstimationRange.ToolTip" xml:space="preserve">
+ <value>This range is the radius, in pixels, x264 should use for motion estimation searches.
+It only has an effect when you use Uneven Multi-Hexagonal, Exhaustive, or Transformed Exhaustive searching.
+24, 32, and 64 are good values, with each being progressively smaller for progressively less improvement to picture quality.</value>
+ </data>
+ <data name="drop_MotionEstimationMethod.ToolTip" xml:space="preserve">
+ <value>Controls the motion estimation method.
+Motion estimation is how the encoder decides how each block of pixels in a frame has moved, compared to most similar blocks in the other frames it references.
+There are many ways of finding the most similar blocks, with varying speeds and accuracy.
+
+At the most basic setting, dia, x264 will only consider a diamond-shaped region around each pixel.
+
+The default setting, hex, is similar to dia but uses a hexagon shape.
+
+Uneven multi-hexagon, umh, searches a number of different patterns across a wider area and thus is slower than hex and dia but further increases compression efficiency and quality.
+
+esa, an exhaustive search of a square around each pixel (whose size is controlled by the me-range parameter), is much slower and offers only minimal quality gains.
+
+tesa, transformed exhaustive search, which performs just as thorough a search, is slower still but offers further slight improvements to quality.</value>
+ </data>
+ <data name="check_pyrmidalBFrames.ToolTip" xml:space="preserve">
+ <value>B-frame pyramids are a High Profile feature. Pyramidal B-frames mean that B-frames don't just reference surrounding reference frames -
+instead, it also treats a previous B-frame as a reference, improving quality/lowering bitrate at the expense of complexity.
+Logically, to reference an earlier B-frame, you must tell x264 to use at least 2 B-frames.</value>
+ </data>
+ <data name="check_weightedBFrames.ToolTip" xml:space="preserve">
+ <value>Sometimes x264 will base a B-frame's motion compensation on frames both before and after.
+With weighted B-frames, the amount of influence each frame has is related to its distance from the frame being encoded, instead of both having equal influence.</value>
+ </data>
+ <data name="drop_directPrediction.ToolTip" xml:space="preserve">
+ <value>Direct prediction tells x264 what method to use when guessing motion for certain parts of a B-frame.
+It can either look at other parts of the current frame (spatial) or compare against the following P-frameframe (temporal).
+You're best off setting this to automatic, so x264 decides which method is best on its own.
+Don't select none assuming it will be faster; instead it will take longer and look worse. If you're going to choose between spatial and temporal, spatial is usually better.</value>
+ </data>
+</root> \ No newline at end of file