diff options
author | sr55 <[email protected]> | 2008-08-09 18:59:33 +0000 |
---|---|---|
committer | sr55 <[email protected]> | 2008-08-09 18:59:33 +0000 |
commit | 4be456c1c6b177a1774a8c998d3ac39c94292057 (patch) | |
tree | cf3a70f260d81ea9494d6a35b780499a9187b085 /win | |
parent | e5bfe9599b4f572c43f8508199f2731e58edec5c (diff) |
WinGui:
- Added Memory and screen bounds to the activity log.
- Removed some x264 code from frmMain. The x264 widgets are now populated from the designer file.
- Removed some duplicate code from x264Panel.cs
- Added the macgui's animate function to x264Panel.cs
- Setup the Audio panel to default the sample rate to audio on audio track change.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@1621 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'win')
-rw-r--r-- | win/C#/Functions/SystemInfo.cs | 57 | ||||
-rw-r--r-- | win/C#/Functions/x264Panel.cs | 733 | ||||
-rw-r--r-- | win/C#/HandBrakeCS.csproj | 1 | ||||
-rw-r--r-- | win/C#/Program.cs | 39 | ||||
-rw-r--r-- | win/C#/frmActivityWindow.cs | 9 | ||||
-rw-r--r-- | win/C#/frmMain.Designer.cs | 432 | ||||
-rw-r--r-- | win/C#/frmMain.cs | 139 |
7 files changed, 650 insertions, 760 deletions
diff --git a/win/C#/Functions/SystemInfo.cs b/win/C#/Functions/SystemInfo.cs new file mode 100644 index 000000000..0b7457324 --- /dev/null +++ b/win/C#/Functions/SystemInfo.cs @@ -0,0 +1,57 @@ +using System;
+using System.Collections.Generic;
+using System.Collections.Specialized;
+using System.ComponentModel;
+using System.Data;
+using System.Drawing;
+using System.Text;
+using System.Windows.Forms;
+using System.Net;
+using System.IO;
+using System.Diagnostics;
+using System.Threading;
+using System.Runtime.InteropServices;
+using System.Globalization;
+
+namespace Handbrake.Functions
+{
+ class SystemInfo
+ {
+ #region CheckRam
+ private struct MEMORYSTATUS
+ {
+ public UInt32 dwLength;
+ public UInt32 dwMemoryLoad;
+ public UInt32 dwTotalPhys; // Used
+ public UInt32 dwAvailPhys;
+ public UInt32 dwTotalPageFile;
+ public UInt32 dwAvailPageFile;
+ public UInt32 dwTotalVirtual;
+ public UInt32 dwAvailVirtual;
+ }
+
+ [DllImport("kernel32.dll")]
+ private static extern void GlobalMemoryStatus
+ (
+ ref MEMORYSTATUS lpBuffer
+ );
+
+
+ /// <summary>
+ /// Returns the total physical ram in a system
+ /// </summary>
+ /// <returns></returns>
+ public uint TotalPhysicalMemory()
+ {
+ MEMORYSTATUS memStatus = new MEMORYSTATUS();
+ GlobalMemoryStatus(ref memStatus);
+
+ uint MemoryInfo = memStatus.dwTotalPhys;
+ MemoryInfo = MemoryInfo / 1024 / 1024;
+
+ return MemoryInfo;
+ }
+ #endregion
+
+ }
+}
diff --git a/win/C#/Functions/x264Panel.cs b/win/C#/Functions/x264Panel.cs index 0aeac2920..0101f0fcf 100644 --- a/win/C#/Functions/x264Panel.cs +++ b/win/C#/Functions/x264Panel.cs @@ -7,7 +7,6 @@ namespace Handbrake.Functions {
class x264Panel
{
- Boolean NoWidgetUpdate = false;
/// <summary>
/// Reset all components to defaults and clears the x264 rtf box
@@ -15,7 +14,7 @@ namespace Handbrake.Functions public void reset2Defaults(frmMain mainWindow)
{
mainWindow.check_8x8DCT.CheckState = CheckState.Unchecked;
- mainWindow.check_bFrameDistortion.CheckState = CheckState.Unchecked;
+ mainWindow.check_bFrameRateDistortion.CheckState = CheckState.Unchecked;
mainWindow.check_BidirectionalRefinement.CheckState = CheckState.Unchecked;
mainWindow.check_Cabac.CheckState = CheckState.Checked;
mainWindow.check_mixedReferences.CheckState = CheckState.Unchecked;
@@ -42,10 +41,6 @@ namespace Handbrake.Functions /// </summary>
public void X264_SetCurrentSettingsInPanel(frmMain mainWindow)
{
- // When the widgets are changed, we don't want them to update the text box again. No Need.
- // This boolean controls the Widget Change function
-
-
/* 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"
@@ -64,12 +59,12 @@ namespace Handbrake.Functions /*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('=');
@@ -132,7 +127,7 @@ namespace Handbrake.Functions /*BRDO NSPopUpButton*/
else if (optName.Equals("brdo"))
- mainWindow.check_bFrameDistortion.CheckState = CheckState.Checked;
+ mainWindow.check_bFrameRateDistortion.CheckState = CheckState.Checked;
/*B Pyramid NSPopUpButton*/
else if (optName.Equals("b-pyramid"))
@@ -278,43 +273,90 @@ namespace Handbrake.Functions if (changedOptString != "")
mainWindow.rtf_x264Query.Text = changedOptString;
}
+ /*
+ * 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
+ */
+ 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";
+
+ /*BRDO*/
+ if (input.Equals("b-rdo") || input.Equals("b_rdo"))
+ cleanOptNameString = "brdo";
+
+ /*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>
/// This function will update the X264 Query when one of the GUI widgets changes.
/// </summary>
public void on_x264_WidgetChange(string sender, frmMain mainWindow)
{
- if (NoWidgetUpdate == false)
- {
- String optNameToChange = sender;
- String currentOptString = mainWindow.rtf_x264Query.Text;
+ animate(mainWindow, sender);
+ String optNameToChange = sender;
+ String currentOptString = mainWindow.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 + "=";
+ /*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)))
- hasFullOption(currentOptString, optNameToChange, mainWindow);
- else // IF there is no options in the rich text box!
- hasNoOptions(optNameToChange, mainWindow);
- }
- else
- {
- NoWidgetUpdate = false;
- }
+ // IF the current H264 Option String Contains Multiple Items or Just 1 Item
+ if ((currentOptString.Contains(checkOptNameToChange)) || (currentOptString.StartsWith(checkOptNameToChangeBegin)))
+ hasOptions(currentOptString, optNameToChange, mainWindow);
+ else // IF there is no options in the rich text box!
+ hasNoOptions(optNameToChange, mainWindow);
}
-
-
- // Some Private Functions used by the above Public Functions
/*
* Used by on_x264_WidgetChange()
- * Called when the current x264 option string contains multiple (or a single) item(s) in it seperated by :
- * Basically, it updates the current option that the widget corrosponds to, if it is already in thes string
- * otherwise, it adds it to the string.
+ ** hasOptions - 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.
+ ** hasNoOptions - 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
*/
- private void hasFullOption(string currentOptString, string optNameToChange, frmMain mainWindow)
+ private void hasOptions(string currentOptString, string optNameToChange, frmMain mainWindow)
{
String thisOpt; // The separated option such as "bframes=3"
String optName = ""; // The option name such as "bframes"
@@ -388,7 +430,7 @@ namespace Handbrake.Functions }
else if (optNameToChange.Equals("brdo"))
{
- if (mainWindow.check_bFrameDistortion.CheckState == CheckState.Checked)
+ if (mainWindow.check_bFrameRateDistortion.CheckState == CheckState.Checked)
thisOpt = "brdo=1";
else
thisOpt = "";
@@ -557,445 +599,304 @@ namespace Handbrake.Functions /* Change the option string to reflect the new mod settings */
mainWindow.rtf_x264Query.Text = changedOptString;
}
-
- /*
- * Used by on_x264_WidgetChange()
- * Called when the current x264 option string contains no options.
- * This simply adds the option to the x264 query in the gui.
- */
private void hasNoOptions(string optNameToChange, frmMain mainWindow)
{
- // If the text box is blank
- if (mainWindow.rtf_x264Query.Text == "")
+ string query = "";
+ string colon = "";
+ if (mainWindow.rtf_x264Query.Text != "")
+ colon = ":";
+
+ query = mainWindow.rtf_x264Query.Text;
+ if (optNameToChange.Equals("me"))
{
- if (optNameToChange.Equals("me"))
+ switch (mainWindow.drop_MotionEstimationMethod.SelectedIndex)
{
- switch (mainWindow.drop_MotionEstimationMethod.SelectedIndex)
- {
- case 1:
- mainWindow.rtf_x264Query.Text = "me=dia";
- break;
-
- case 2:
- mainWindow.rtf_x264Query.Text = "me=hex";
+ case 1:
+ query = query + colon + "me=dia";
+ break;
- break;
+ case 2:
+ query = query + colon + "me=hex";
+ break;
- case 3:
- mainWindow.rtf_x264Query.Text = "me=umh";
- break;
+ case 3:
+ query = query + colon + "me=umh";
+ break;
- case 4:
- mainWindow.rtf_x264Query.Text = "me=esa";
- break;
+ case 4:
+ query = query + colon + "me=esa";
+ break;
- default:
- break;
- }
+ default:
+ break;
}
- else if (optNameToChange.Equals("direct"))
+ }
+ else if (optNameToChange.Equals("direct"))
+ {
+ switch (mainWindow.drop_directPrediction.SelectedIndex)
{
- switch (mainWindow.drop_directPrediction.SelectedIndex)
- {
- case 1:
- mainWindow.rtf_x264Query.Text = "direct=none";
- break;
+ case 1:
+ query = query + colon + "direct=none";
+ break;
- case 2:
- mainWindow.rtf_x264Query.Text = "direct=spatial";
- break;
+ case 2:
+ query = query + colon + "direct=spatial";
+ break;
- case 3:
- mainWindow.rtf_x264Query.Text = "direct=temporal";
- break;
+ case 3:
+ query = query + colon + "direct=temporal";
+ break;
- case 4:
- mainWindow.rtf_x264Query.Text = "direct=auto";
- break;
+ case 4:
+ query = query + colon + "direct=auto";
+ break;
- default:
- break;
- }
+ default:
+ break;
}
- else if (optNameToChange.Equals("analyse"))
+ }
+ else if (optNameToChange.Equals("analyse"))
+ {
+ switch (mainWindow.drop_analysis.SelectedIndex)
{
- switch (mainWindow.drop_analysis.SelectedIndex)
- {
- case 1:
- mainWindow.rtf_x264Query.Text = "analyse=none";
- break;
+ case 1:
+ query = query + colon + "analyse=none";
+ break;
- case 2:
- mainWindow.rtf_x264Query.Text = "analyse=all";
- break;
+ case 2:
+ query = query + colon + "analyse=all";
+ break;
- default:
- break;
- }
+ default:
+ break;
}
+ }
+ else if (optNameToChange.Equals("merange"))
+ {
+ int value = mainWindow.drop_MotionEstimationRange.SelectedIndex + 3;
+ query = query + colon + "merange=" + value.ToString();
+ }
+ else if (optNameToChange.Equals("deblock"))
+ {
+ String da = mainWindow.drop_deblockAlpha.SelectedItem.ToString();
+ String db = mainWindow.drop_deblockBeta.Text.ToString();
- else if (optNameToChange.Equals("merange"))
+ if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))
{
- int value = mainWindow.drop_MotionEstimationRange.SelectedIndex + 3;
- mainWindow.rtf_x264Query.Text = "merange=" + value.ToString();
+ mainWindow.drop_deblockBeta.SelectedItem = "Default (0)";
+ mainWindow.drop_deblockAlpha.SelectedItem = "Default (0)";
}
- else if (optNameToChange.Equals("deblock"))
+ else
{
- String da = mainWindow.drop_deblockAlpha.SelectedItem.ToString();
- String db = mainWindow.drop_deblockBeta.SelectedItem.ToString();
+ if (db.Contains("Default"))
+ db = "0";
- if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))
- {
- mainWindow.drop_deblockBeta.SelectedItem = "Default (0)";
- mainWindow.drop_deblockAlpha.SelectedItem = "Default (0)";
- mainWindow.rtf_x264Query.Text = "";
- }
- else if ((!da.Contains("Default")) && (db.Contains("Default")))
- {
- mainWindow.drop_deblockBeta.SelectedItem = "0";
- mainWindow.rtf_x264Query.Text = "deblock=" + da + ",0";
- }
- else if ((da.Contains("Default")) && (!db.Contains("Default")))
- {
- mainWindow.drop_deblockAlpha.SelectedItem = "0";
- mainWindow.rtf_x264Query.Text = "deblock=0," + db;
- }
- else if ((!da.Contains("Default")) && (!db.Contains("Default")))
- {
- mainWindow.rtf_x264Query.Text = "deblock=" + da + "," + db;
- }
- }
- else if (optNameToChange.Equals("mixed-refs"))
- {
- if (mainWindow.check_mixedReferences.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "mixed-refs=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("weightb"))
- {
- if (mainWindow.check_weightedBFrames.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "weightb=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("brdo"))
- {
- if (mainWindow.check_bFrameDistortion.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "brdo=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("bime"))
- {
- if (mainWindow.check_BidirectionalRefinement.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "bime=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("b-pyramid"))
- {
- if (mainWindow.check_pyrmidalBFrames.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "b-pyramid=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("no-fast-pskip"))
- {
- if (mainWindow.check_noFastPSkip.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "no-fast-pskip=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("no-dct-decimate"))
- {
- if (mainWindow.check_noDCTDecimate.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "no-dct-decimate=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("8x8dct"))
- {
- if (mainWindow.check_8x8DCT.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "8x8dct=1";
- else
- mainWindow.rtf_x264Query.Text = "";
- }
- else if (optNameToChange.Equals("cabac"))
- {
- if (mainWindow.check_Cabac.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = "";
- else
- mainWindow.rtf_x264Query.Text = "cabac=0";
- }
- else if (optNameToChange.Equals("ref"))
- {
- string refItem = mainWindow.drop_refFrames.SelectedItem.ToString();
- if (!refItem.Contains("default"))
- mainWindow.rtf_x264Query.Text = "ref=" + mainWindow.drop_refFrames.SelectedItem.ToString();
- }
- else if (optNameToChange.Equals("bframes"))
- {
- String value = mainWindow.drop_bFrames.SelectedItem.ToString();
- if (!mainWindow.drop_bFrames.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = "bframes=" + value;
- }
- else if (optNameToChange.Equals("subq"))
- {
- String value = mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString();
- if (!mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = "subq=" + value;
- }
- else if (optNameToChange.Equals("trellis"))
- {
- String value = mainWindow.drop_trellis.SelectedItem.ToString();
- if (!mainWindow.drop_trellis.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = "trellis=" + value;
- }
+ if (da.Contains("Default"))
+ da = "0";
- //*******************************************************
+ query = query + colon + "deblock=" + da + "," + db;
+ }
}
- else // There was some text in the box. This deals with options with no value. e.g "no-fast-pskip"
+ else if (optNameToChange.Equals("mixed-refs"))
{
- //*******************************************************
- if (optNameToChange.Equals("me"))
- {
- switch (mainWindow.drop_MotionEstimationMethod.SelectedIndex)
- {
- case 1:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":me=dia";
- break;
-
- case 2:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":me=hex";
- break;
-
- case 3:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":me=umh";
- break;
-
- case 4:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":me=esa";
- break;
-
- default:
- break;
- }
- }
- else if (optNameToChange.Equals("direct"))
- {
- switch (mainWindow.drop_directPrediction.SelectedIndex)
- {
- case 1:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":direct=none";
- break;
-
- case 2:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":direct=spatial";
- break;
-
- case 3:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":direct=temporal";
- break;
+ if (mainWindow.check_mixedReferences.CheckState == CheckState.Checked)
+ query = query + colon + "mixed-refs=1";
+ }
+ else if (optNameToChange.Equals("weightb"))
+ {
+ if (mainWindow.check_weightedBFrames.CheckState == CheckState.Checked)
+ query = query + colon + "weightb=1";
+ }
+ else if (optNameToChange.Equals("brdo"))
+ {
+ if (mainWindow.check_bFrameRateDistortion.CheckState == CheckState.Checked)
+ query = query + colon + "brdo=1";
+ }
+ else if (optNameToChange.Equals("bime"))
+ {
+ if (mainWindow.check_BidirectionalRefinement.CheckState == CheckState.Checked)
+ query = query + colon + "bime=1";
+ }
+ else if (optNameToChange.Equals("b-pyramid"))
+ {
+ if (mainWindow.check_pyrmidalBFrames.CheckState == CheckState.Checked)
+ query = query + colon + "b-pyramid=1";
+ }
+ else if (optNameToChange.Equals("no-fast-pskip"))
+ {
+ if (mainWindow.check_noFastPSkip.CheckState == CheckState.Checked)
+ query = query + colon + "no-fast-pskip=1";
+ }
+ else if (optNameToChange.Equals("no-dct-decimate"))
+ {
+ if (mainWindow.check_noDCTDecimate.CheckState == CheckState.Checked)
+ query = query + colon + "no-dct-decimate=1";
+ }
+ else if (optNameToChange.Equals("8x8dct"))
+ {
+ if (mainWindow.check_8x8DCT.CheckState == CheckState.Checked)
+ query = query + colon + "8x8dct=1";
+ }
+ else if (optNameToChange.Equals("cabac"))
+ {
+ if (mainWindow.check_Cabac.CheckState != CheckState.Checked)
+ query = query + colon + "cabac=0";
+ }
+ else if (optNameToChange.Equals("ref"))
+ {
+ if (!mainWindow.drop_refFrames.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "ref=" + mainWindow.drop_refFrames.SelectedItem.ToString();
+ }
+ else if (optNameToChange.Equals("bframes"))
+ {
+ String value = mainWindow.drop_bFrames.SelectedItem.ToString();
+ if (!mainWindow.drop_bFrames.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "bframes=" + value;
+ }
+ else if (optNameToChange.Equals("subq"))
+ {
+ String value = mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString();
+ if (!mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "subq=" + value;
+ }
+ else if (optNameToChange.Equals("trellis"))
+ {
+ if (!mainWindow.drop_trellis.SelectedItem.ToString().Contains("Default"))
+ query = query + colon + "trellis=" + mainWindow.drop_trellis.SelectedItem.ToString();
+ }
- case 4:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":direct=auto";
- break;
+ mainWindow.rtf_x264Query.Text = query;
+ }
+ private void animate(frmMain mainWindow, 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)
+ - subme (if under 6 turn off brdo)
+ - analysis (if none, turn off 8x8dct and direct pred)
+ - refs (under 2, disable mixed-refs)
+ */
+ if (mainWindow.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. */
+ mainWindow.check_weightedBFrames.Visible = false;
+ mainWindow.check_bFrameRateDistortion.Visible = false;
+ mainWindow.check_pyrmidalBFrames.Visible = false;
+ mainWindow.check_BidirectionalRefinement.Visible = false;
+ mainWindow.drop_directPrediction.Visible = false;
+ mainWindow.lbl_direct_prediction.Visible = false;
+
+ mainWindow.check_weightedBFrames.CheckState = CheckState.Unchecked;
+ mainWindow.check_bFrameRateDistortion.CheckState = CheckState.Unchecked;
+ mainWindow.check_pyrmidalBFrames.CheckState = CheckState.Unchecked;
+ mainWindow.check_BidirectionalRefinement.CheckState = CheckState.Unchecked;
+ mainWindow.drop_directPrediction.SelectedIndex = 0;
+ }
+ else if (mainWindow.drop_bFrames.SelectedIndex == 2)
+ {
+ /* Only 1 b-frame? Disable b-pyramid. */
+ mainWindow.check_pyrmidalBFrames.Visible = false;
+ mainWindow.check_pyrmidalBFrames.CheckState = CheckState.Unchecked;
- default:
- break;
- }
- }
- else if (optNameToChange.Equals("analyse"))
- {
- switch (mainWindow.drop_analysis.SelectedIndex)
- {
- case 1:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":analyse=none";
- break;
+ mainWindow.check_weightedBFrames.Visible = true;
+ mainWindow.check_BidirectionalRefinement.Visible = true;
- case 2:
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":analyse=all";
- break;
- default:
- break;
- }
+ /* Only show B-RDO if both bframes and subme allow it. */
+ if (mainWindow.drop_subpixelMotionEstimation.SelectedIndex >= 7)
+ mainWindow.check_bFrameRateDistortion.Visible = true;
+
+ /* Only show direct pred when allowed by both bframes and analysis.*/
+ if ( mainWindow.drop_analysis.SelectedIndex != 1)
+ {
+ mainWindow.drop_directPrediction.Visible = true;
+ mainWindow.lbl_direct_prediction.Visible = true;
}
+ }
+ else
+ {
+ mainWindow.check_weightedBFrames.Visible = true;
+ mainWindow.check_pyrmidalBFrames.Visible = true;
+ mainWindow.check_BidirectionalRefinement.Visible = true;
- else if (optNameToChange.Equals("merange"))
- {
- int value = mainWindow.drop_MotionEstimationRange.SelectedIndex + 3;
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":merange=" + value.ToString();
+ /* Only show B-RDO if both bframes and subme allow it. */
+ if (mainWindow.drop_subpixelMotionEstimation.SelectedIndex >= 7)
+ mainWindow.check_bFrameRateDistortion.Visible = true;
+
+ /* Only show direct pred when allowed by both bframes and analysis.*/
+ if ( mainWindow.drop_analysis.SelectedIndex != 1)
+ {
+ mainWindow.drop_directPrediction.Visible = true;
+ mainWindow.lbl_direct_prediction.Visible = true;
}
- else if (optNameToChange.Equals("deblock"))
- {
- String da = mainWindow.drop_deblockAlpha.SelectedItem.ToString();
- String db = mainWindow.drop_deblockBeta.Text.ToString();
-
- if (((da.Contains("Default")) && (db.Contains("Default"))) || ((da.Contains("0")) && (db.Contains("0"))))
- {
- mainWindow.drop_deblockBeta.SelectedItem = "Default (0)";
- mainWindow.drop_deblockAlpha.SelectedItem = "Default (0)";
- }
- else
- {
- if (db.Contains("Default"))
- db = "0";
- if (da.Contains("Default"))
- da = "0";
-
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":deblock=" + da + "," + db;
- }
- }
- else if (optNameToChange.Equals("mixed-refs"))
- {
- if (mainWindow.check_mixedReferences.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":mixed-refs=1";
- }
- else if (optNameToChange.Equals("weightb"))
- {
- if (mainWindow.check_weightedBFrames.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":weightb=1";
- }
- else if (optNameToChange.Equals("brdo"))
- {
- if (mainWindow.check_bFrameDistortion.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":brdo=1";
- }
- else if (optNameToChange.Equals("bime"))
- {
- if (mainWindow.check_BidirectionalRefinement.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":bime=1";
- }
- else if (optNameToChange.Equals("b-pyramid"))
- {
- if (mainWindow.check_pyrmidalBFrames.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":b-pyramid=1";
- }
- else if (optNameToChange.Equals("no-fast-pskip"))
- {
- if (mainWindow.check_noFastPSkip.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":no-fast-pskip=1";
- }
- else if (optNameToChange.Equals("no-dct-decimate"))
- {
- if (mainWindow.check_noDCTDecimate.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":no-dct-decimate=1";
- }
- else if (optNameToChange.Equals("8x8dct"))
- {
- if (mainWindow.check_8x8DCT.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":8x8dct=1";
- }
- else if (optNameToChange.Equals("cabac"))
- {
- if (mainWindow.check_Cabac.CheckState == CheckState.Checked)
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text;
- else
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":cabac=0";
- }
- else if (optNameToChange.Equals("ref"))
- {
- if (!mainWindow.drop_refFrames.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":ref=" + mainWindow.drop_refFrames.SelectedItem.ToString();
- }
- else if (optNameToChange.Equals("bframes"))
- {
- int value = mainWindow.drop_bFrames.SelectedIndex;
- value = value - 1;
- if (!mainWindow.drop_bFrames.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":bframes=" + value.ToString();
- }
- else if (optNameToChange.Equals("subq"))
- {
- String value = mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString();
- if (!mainWindow.drop_subpixelMotionEstimation.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":subq=" + value;
- }
- else if (optNameToChange.Equals("trellis"))
- {
- if (!mainWindow.drop_trellis.SelectedItem.ToString().Contains("Default"))
- mainWindow.rtf_x264Query.Text = mainWindow.rtf_x264Query.Text + ":trellis=" + mainWindow.drop_trellis.SelectedItem.ToString();
- }
}
- }
- /*
- * 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
- */
- private string X264_StandardizeOptNames(String cleanOptNameString)
- {
- String input = cleanOptNameString;
- if (input.Equals("ref") || input.Equals("frameref"))
+ if (mainWindow.check_Cabac.Checked == false)
{
- cleanOptNameString = "ref";
+ /* Without CABAC entropy coding, trellis doesn't run. */
+ mainWindow.drop_trellis.Visible = false;
+ mainWindow.drop_trellis.SelectedIndex = 0;
+ mainWindow.lbl_trellis.Visible = false;
}
-
- /*No Fast PSkip nofast_pskip*/
- if (input.Equals("no-fast-pskip") || input.Equals("no_fast_pskip") || input.Equals("nofast_pskip"))
+ else
{
- cleanOptNameString = "no-fast-pskip";
+ mainWindow.drop_trellis.Visible = true;
+ mainWindow.lbl_trellis.Visible = true;
}
- /*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"))
+ if (mainWindow.drop_subpixelMotionEstimation.SelectedIndex < 7)
{
- cleanOptNameString = "subq";
+ /* When subme < 6, B-RDO doesn't work. */
+ mainWindow.check_bFrameRateDistortion.Visible = false;
+ if (sender == "subq" && sender != "brdo")
+ mainWindow.check_bFrameRateDistortion.CheckState = CheckState.Unchecked;
}
-
- /*ME Range*/
- if (input.Equals("me-range") || input.Equals("me_range"))
+ else if (mainWindow.drop_bFrames.SelectedIndex >= 2 )
{
- cleanOptNameString = "merange";
+ /* Make sure to only display B-RDO if allowed by both
+ the subme and bframe option settings. */
+ mainWindow.check_bFrameRateDistortion.Visible = true;
}
- /*WeightB*/
- if (input.Equals("weight-b") || input.Equals("weight_b"))
- {
- cleanOptNameString = "weightb";
- }
- /*BRDO*/
- if (input.Equals("b-rdo") || input.Equals("b_rdo"))
+ if (mainWindow.drop_analysis.SelectedIndex == 1)
{
- cleanOptNameString = "brdo";
+ /* No analysis? Disable 8x8dct and direct pred */
+ mainWindow.check_8x8DCT.Visible = false;
+ if (sender != "8x8dct")
+ mainWindow.check_8x8DCT.CheckState = CheckState.Unchecked;
+
+ mainWindow.drop_directPrediction.Visible = false;
+ if (sender != "direct")
+ mainWindow.drop_directPrediction.SelectedIndex = 0;
}
-
- /*B Pyramid*/
- if (input.Equals("b_pyramid"))
+ else
{
- cleanOptNameString = "b-pyramid";
- }
+ mainWindow.check_8x8DCT.Visible = true;
- /*Direct Prediction*/
- if (input.Equals("direct-pred") || input.Equals("direct_pred"))
- {
- cleanOptNameString = "direct";
+ if ( mainWindow.drop_bFrames.SelectedIndex >= 2)
+ {
+ /* Onlt show direct pred when allowed by both analysis and bframes */
+ mainWindow.drop_directPrediction.Visible = true;
+ }
}
- /*Deblocking*/
- if (input.Equals("filter"))
+
+ if (mainWindow.drop_refFrames.SelectedIndex < 3)
{
- cleanOptNameString = "deblock";
+ mainWindow.check_mixedReferences.Visible = false;
+ if (sender != "mixed-refs")
+ mainWindow.check_mixedReferences.CheckState = CheckState.Unchecked;
}
-
- /*Analysis*/
- if (input.Equals("partitions"))
+ else
{
- cleanOptNameString = "analyse";
+ mainWindow.check_mixedReferences.Visible = true;
}
-
- return cleanOptNameString;
}
+
}
-}
+}
\ No newline at end of file diff --git a/win/C#/HandBrakeCS.csproj b/win/C#/HandBrakeCS.csproj index 33bddfefa..7d15c73dc 100644 --- a/win/C#/HandBrakeCS.csproj +++ b/win/C#/HandBrakeCS.csproj @@ -140,6 +140,7 @@ <Compile Include="frmUpdater.Designer.cs">
<DependentUpon>frmUpdater.cs</DependentUpon>
</Compile>
+ <Compile Include="Functions\SystemInfo.cs" />
<Compile Include="Functions\Common.cs" />
<Compile Include="Functions\Presets.cs" />
<Compile Include="Functions\Queue.cs" />
diff --git a/win/C#/Program.cs b/win/C#/Program.cs index 605195703..ae9edec6f 100644 --- a/win/C#/Program.cs +++ b/win/C#/Program.cs @@ -47,9 +47,9 @@ namespace Handbrake }
// Make sure the system has enough RAM. 384MB or greater
- uint memory = MemoryCheck.CheckMemeory();
- memory = memory / 1024 / 1024;
-
+ Functions.SystemInfo info = new Functions.SystemInfo();
+ uint memory = info.TotalPhysicalMemory();
+
if (memory < 256)
{
MessageBox.Show("Your system does not meet the minimum requirements for HandBrake. \n Insufficient RAM. 384MB or greater required. You have: " + memory.ToString() + "MB", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error);
@@ -75,37 +75,4 @@ namespace Handbrake }
}
- class MemoryCheck
- {
- public struct MEMORYSTATUS
- {
- public UInt32 dwLength;
- public UInt32 dwMemoryLoad;
- public UInt32 dwTotalPhys; // Used
- public UInt32 dwAvailPhys;
- public UInt32 dwTotalPageFile;
- public UInt32 dwAvailPageFile;
- public UInt32 dwTotalVirtual;
- public UInt32 dwAvailVirtual;
- // Aditional Varibles left in for future usage (JIC)
- }
-
- [DllImport("kernel32.dll")]
- public static extern void GlobalMemoryStatus
- (
- ref MEMORYSTATUS lpBuffer
- );
-
- public static uint CheckMemeory()
- {
- // Call the native GlobalMemoryStatus method
- // with the defined structure.
- MEMORYSTATUS memStatus = new MEMORYSTATUS();
- GlobalMemoryStatus(ref memStatus);
-
- uint MemoryInfo = memStatus.dwTotalPhys;
-
- return MemoryInfo;
- }
- }
}
\ No newline at end of file diff --git a/win/C#/frmActivityWindow.cs b/win/C#/frmActivityWindow.cs index 36e405b38..63157909c 100644 --- a/win/C#/frmActivityWindow.cs +++ b/win/C#/frmActivityWindow.cs @@ -54,10 +54,19 @@ namespace Handbrake RegKey = RegKey.OpenSubKey("HARDWARE\\DESCRIPTION\\System\\CentralProcessor\\0");
Object cpuType = RegKey.GetValue("ProcessorNameString");
+ // Get the screen resolution
+ System.Windows.Forms.Screen scr = System.Windows.Forms.Screen.PrimaryScreen;
+
+ // Physical Ram
+ Functions.SystemInfo info = new Functions.SystemInfo();
+ uint memory = info.TotalPhysicalMemory();
+
// Add a header to the log file indicating that it's from the Windows GUI and display the windows version
rtf_actLog.AppendText("### Windows GUI \n");
rtf_actLog.AppendText(String.Format("### Running: {0} \n###\n", Environment.OSVersion.ToString()));
rtf_actLog.AppendText(String.Format("### CPU: {0} \n", cpuType));
+ rtf_actLog.AppendText(String.Format("### Ram: {0} MB \n", memory));
+ rtf_actLog.AppendText(String.Format("### Screen: {0}x{1} \n", scr.Bounds.Width, scr.Bounds.Height));
rtf_actLog.AppendText(String.Format("### Temp Dir: {0} \n", Path.GetTempPath()));
rtf_actLog.AppendText(String.Format("### Install Dir: {0} \n", Application.StartupPath));
rtf_actLog.AppendText(String.Format("### Data Dir: {0} \n###\n", Application.UserAppDataPath));
diff --git a/win/C#/frmMain.Designer.cs b/win/C#/frmMain.Designer.cs index 291013f81..bea92357d 100644 --- a/win/C#/frmMain.Designer.cs +++ b/win/C#/frmMain.Designer.cs @@ -200,13 +200,10 @@ namespace Handbrake this.label43 = new System.Windows.Forms.Label();
this.btn_reset = new System.Windows.Forms.Button();
this.rtf_x264Query = new System.Windows.Forms.RichTextBox();
- this.label35 = new System.Windows.Forms.Label();
this.check_Cabac = new System.Windows.Forms.CheckBox();
- this.label36 = new System.Windows.Forms.Label();
this.check_noDCTDecimate = new System.Windows.Forms.CheckBox();
- this.label37 = new System.Windows.Forms.Label();
this.check_noFastPSkip = new System.Windows.Forms.CheckBox();
- this.label39 = new System.Windows.Forms.Label();
+ 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();
@@ -214,7 +211,6 @@ namespace Handbrake this.panel3 = new System.Windows.Forms.Panel();
this.panel1 = new System.Windows.Forms.Panel();
this.panel2 = new System.Windows.Forms.Panel();
- this.label44 = new System.Windows.Forms.Label();
this.check_8x8DCT = new System.Windows.Forms.CheckBox();
this.label45 = new System.Windows.Forms.Label();
this.drop_analysis = new System.Windows.Forms.ComboBox();
@@ -224,19 +220,14 @@ namespace Handbrake this.drop_MotionEstimationRange = new System.Windows.Forms.ComboBox();
this.label54 = new System.Windows.Forms.Label();
this.drop_MotionEstimationMethod = new System.Windows.Forms.ComboBox();
- this.label57 = new System.Windows.Forms.Label();
this.check_pyrmidalBFrames = new System.Windows.Forms.CheckBox();
- this.label58 = new System.Windows.Forms.Label();
this.check_BidirectionalRefinement = new System.Windows.Forms.CheckBox();
- this.label59 = new System.Windows.Forms.Label();
- this.check_bFrameDistortion = new System.Windows.Forms.CheckBox();
- this.label60 = new System.Windows.Forms.Label();
+ this.check_bFrameRateDistortion = new System.Windows.Forms.CheckBox();
this.check_weightedBFrames = new System.Windows.Forms.CheckBox();
- this.label61 = new System.Windows.Forms.Label();
+ 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.label63 = new System.Windows.Forms.Label();
this.label64 = new System.Windows.Forms.Label();
this.drop_refFrames = new System.Windows.Forms.ComboBox();
this.check_mixedReferences = new System.Windows.Forms.CheckBox();
@@ -2282,13 +2273,10 @@ namespace Handbrake this.h264Tab.Controls.Add(this.label43);
this.h264Tab.Controls.Add(this.btn_reset);
this.h264Tab.Controls.Add(this.rtf_x264Query);
- this.h264Tab.Controls.Add(this.label35);
this.h264Tab.Controls.Add(this.check_Cabac);
- this.h264Tab.Controls.Add(this.label36);
this.h264Tab.Controls.Add(this.check_noDCTDecimate);
- this.h264Tab.Controls.Add(this.label37);
this.h264Tab.Controls.Add(this.check_noFastPSkip);
- this.h264Tab.Controls.Add(this.label39);
+ this.h264Tab.Controls.Add(this.lbl_trellis);
this.h264Tab.Controls.Add(this.drop_trellis);
this.h264Tab.Controls.Add(this.drop_deblockBeta);
this.h264Tab.Controls.Add(this.label41);
@@ -2296,7 +2284,6 @@ namespace Handbrake this.h264Tab.Controls.Add(this.panel3);
this.h264Tab.Controls.Add(this.panel1);
this.h264Tab.Controls.Add(this.panel2);
- this.h264Tab.Controls.Add(this.label44);
this.h264Tab.Controls.Add(this.check_8x8DCT);
this.h264Tab.Controls.Add(this.label45);
this.h264Tab.Controls.Add(this.drop_analysis);
@@ -2306,19 +2293,14 @@ namespace Handbrake this.h264Tab.Controls.Add(this.drop_MotionEstimationRange);
this.h264Tab.Controls.Add(this.label54);
this.h264Tab.Controls.Add(this.drop_MotionEstimationMethod);
- this.h264Tab.Controls.Add(this.label57);
this.h264Tab.Controls.Add(this.check_pyrmidalBFrames);
- this.h264Tab.Controls.Add(this.label58);
this.h264Tab.Controls.Add(this.check_BidirectionalRefinement);
- this.h264Tab.Controls.Add(this.label59);
- this.h264Tab.Controls.Add(this.check_bFrameDistortion);
- this.h264Tab.Controls.Add(this.label60);
+ this.h264Tab.Controls.Add(this.check_bFrameRateDistortion);
this.h264Tab.Controls.Add(this.check_weightedBFrames);
- this.h264Tab.Controls.Add(this.label61);
+ this.h264Tab.Controls.Add(this.lbl_direct_prediction);
this.h264Tab.Controls.Add(this.drop_directPrediction);
this.h264Tab.Controls.Add(this.label62);
this.h264Tab.Controls.Add(this.drop_bFrames);
- this.h264Tab.Controls.Add(this.label63);
this.h264Tab.Controls.Add(this.label64);
this.h264Tab.Controls.Add(this.drop_refFrames);
this.h264Tab.Controls.Add(this.check_mixedReferences);
@@ -2343,7 +2325,7 @@ namespace Handbrake //
// btn_reset
//
- this.btn_reset.Location = new System.Drawing.Point(13, 226);
+ this.btn_reset.Location = new System.Drawing.Point(277, 224);
this.btn_reset.Name = "btn_reset";
this.btn_reset.Size = new System.Drawing.Size(75, 23);
this.btn_reset.TabIndex = 41;
@@ -2362,90 +2344,73 @@ namespace Handbrake this.rtf_x264Query.LostFocus += new System.EventHandler(this.rtf_x264Query_TextChanged);
this.rtf_x264Query.TextChanged += new System.EventHandler(this.rtf_x264Query_TextChanged);
//
- // label35
- //
- this.label35.AutoSize = true;
- this.label35.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label35.Location = new System.Drawing.Point(534, 213);
- this.label35.Name = "label35";
- this.label35.Size = new System.Drawing.Size(128, 12);
- this.label35.TabIndex = 29;
- this.label35.Text = "CABAC Entropy Coding:";
- //
// 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(668, 214);
+ this.check_Cabac.Location = new System.Drawing.Point(536, 214);
this.check_Cabac.Name = "check_Cabac";
this.check_Cabac.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_Cabac.Size = new System.Drawing.Size(12, 11);
+ this.check_Cabac.Size = new System.Drawing.Size(144, 16);
this.check_Cabac.TabIndex = 40;
+ this.check_Cabac.Text = "CABAC Entropy Coding:";
this.check_Cabac.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_Cabac.UseVisualStyleBackColor = true;
this.check_Cabac.CheckStateChanged += new System.EventHandler(this.check_Cabac_CheckedChanged);
//
- // label36
- //
- this.label36.AutoSize = true;
- this.label36.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label36.Location = new System.Drawing.Point(561, 194);
- this.label36.Name = "label36";
- this.label36.Size = new System.Drawing.Size(102, 12);
- this.label36.TabIndex = 28;
- this.label36.Text = "No DCT-Decimate:";
- //
// 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(668, 195);
+ this.check_noDCTDecimate.Location = new System.Drawing.Point(562, 192);
this.check_noDCTDecimate.Name = "check_noDCTDecimate";
this.check_noDCTDecimate.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_noDCTDecimate.Size = new System.Drawing.Size(12, 11);
+ this.check_noDCTDecimate.Size = new System.Drawing.Size(118, 16);
this.check_noDCTDecimate.TabIndex = 39;
+ this.check_noDCTDecimate.Text = "No DCT-Decimate:";
this.check_noDCTDecimate.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_noDCTDecimate.UseVisualStyleBackColor = true;
this.check_noDCTDecimate.CheckStateChanged += new System.EventHandler(this.check_noDCTDecimate_CheckedChanged);
//
- // label37
- //
- this.label37.AutoSize = true;
- this.label37.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label37.Location = new System.Drawing.Point(444, 193);
- this.label37.Name = "label37";
- this.label37.Size = new System.Drawing.Size(87, 12);
- this.label37.TabIndex = 27;
- this.label37.Text = "No Fast-P-Skip:";
- //
// 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(537, 194);
+ this.check_noFastPSkip.Location = new System.Drawing.Point(444, 192);
this.check_noFastPSkip.Name = "check_noFastPSkip";
this.check_noFastPSkip.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_noFastPSkip.Size = new System.Drawing.Size(12, 11);
+ this.check_noFastPSkip.Size = new System.Drawing.Size(103, 16);
this.check_noFastPSkip.TabIndex = 38;
+ this.check_noFastPSkip.Text = "No Fast-P-Skip:";
this.check_noFastPSkip.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_noFastPSkip.UseVisualStyleBackColor = true;
this.check_noFastPSkip.CheckStateChanged += new System.EventHandler(this.check_noFastPSkip_CheckedChanged);
//
- // label39
+ // lbl_trellis
//
- this.label39.AutoSize = true;
- this.label39.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label39.Location = new System.Drawing.Point(490, 169);
- this.label39.Name = "label39";
- this.label39.Size = new System.Drawing.Size(41, 12);
- this.label39.TabIndex = 26;
- this.label39.Text = "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(490, 169);
+ this.lbl_trellis.Name = "lbl_trellis";
+ this.lbl_trellis.Size = new System.Drawing.Size(41, 12);
+ this.lbl_trellis.TabIndex = 26;
+ this.lbl_trellis.Text = "Trellis:";
//
// drop_trellis
//
this.drop_trellis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_trellis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(537, 166);
this.drop_trellis.Name = "drop_trellis";
this.drop_trellis.Size = new System.Drawing.Size(143, 20);
@@ -2455,8 +2420,23 @@ namespace Handbrake // drop_deblockBeta
//
this.drop_deblockBeta.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_deblockBeta.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(611, 139);
this.drop_deblockBeta.Name = "drop_deblockBeta";
this.drop_deblockBeta.Size = new System.Drawing.Size(69, 20);
@@ -2476,8 +2456,23 @@ namespace Handbrake // drop_deblockAlpha
//
this.drop_deblockAlpha.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_deblockAlpha.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(537, 139);
this.drop_deblockAlpha.Name = "drop_deblockAlpha";
this.drop_deblockAlpha.Size = new System.Drawing.Size(68, 20);
@@ -2511,25 +2506,17 @@ namespace Handbrake this.panel2.Size = new System.Drawing.Size(284, 1);
this.panel2.TabIndex = 21;
//
- // label44
- //
- this.label44.AutoSize = true;
- this.label44.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label44.Location = new System.Drawing.Point(606, 109);
- this.label44.Name = "label44";
- this.label44.Size = new System.Drawing.Size(55, 12);
- this.label44.TabIndex = 23;
- this.label44.Text = "8x8 DCT:";
- //
// 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(664, 109);
+ this.check_8x8DCT.Location = new System.Drawing.Point(608, 106);
this.check_8x8DCT.Name = "check_8x8DCT";
this.check_8x8DCT.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_8x8DCT.Size = new System.Drawing.Size(12, 11);
+ this.check_8x8DCT.Size = new System.Drawing.Size(71, 16);
this.check_8x8DCT.TabIndex = 34;
+ this.check_8x8DCT.Text = "8x8 DCT:";
this.check_8x8DCT.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_8x8DCT.UseVisualStyleBackColor = true;
this.check_8x8DCT.CheckStateChanged += new System.EventHandler(this.check_8x8DCT_CheckedChanged);
@@ -2547,8 +2534,12 @@ namespace Handbrake // drop_analysis
//
this.drop_analysis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_analysis.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(537, 105);
this.drop_analysis.Name = "drop_analysis";
this.drop_analysis.Size = new System.Drawing.Size(63, 20);
@@ -2568,8 +2559,18 @@ namespace Handbrake // drop_subpixelMotionEstimation
//
this.drop_subpixelMotionEstimation.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_subpixelMotionEstimation.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.drop_subpixelMotionEstimation.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.drop_subpixelMotionEstimation.FormattingEnabled = true;
+ this.drop_subpixelMotionEstimation.Items.AddRange(new object[] {
+ "Default (4)",
+ "0",
+ "1",
+ "2",
+ "3",
+ "4",
+ "5",
+ "6",
+ "7"});
this.drop_subpixelMotionEstimation.Location = new System.Drawing.Point(537, 69);
this.drop_subpixelMotionEstimation.Name = "drop_subpixelMotionEstimation";
this.drop_subpixelMotionEstimation.Size = new System.Drawing.Size(139, 20);
@@ -2589,8 +2590,71 @@ namespace Handbrake // drop_MotionEstimationRange
//
this.drop_MotionEstimationRange.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_MotionEstimationRange.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(537, 40);
this.drop_MotionEstimationRange.Name = "drop_MotionEstimationRange";
this.drop_MotionEstimationRange.Size = new System.Drawing.Size(139, 20);
@@ -2610,122 +2674,101 @@ namespace Handbrake // drop_MotionEstimationMethod
//
this.drop_MotionEstimationMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_MotionEstimationMethod.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.drop_MotionEstimationMethod.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
this.drop_MotionEstimationMethod.FormattingEnabled = true;
this.drop_MotionEstimationMethod.ItemHeight = 12;
+ this.drop_MotionEstimationMethod.Items.AddRange(new object[] {
+ "Default (Hexagon)",
+ "Diamond",
+ "Hexagon",
+ "Uneven Multi-Hexagon",
+ "Exhaustive"});
this.drop_MotionEstimationMethod.Location = new System.Drawing.Point(537, 11);
this.drop_MotionEstimationMethod.Name = "drop_MotionEstimationMethod";
this.drop_MotionEstimationMethod.Size = new System.Drawing.Size(139, 20);
this.drop_MotionEstimationMethod.TabIndex = 30;
this.drop_MotionEstimationMethod.SelectedIndexChanged += new System.EventHandler(this.drop_MotionEstimationMethod_SelectedIndexChanged);
//
- // label57
- //
- this.label57.AutoSize = true;
- this.label57.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label57.Location = new System.Drawing.Point(41, 204);
- this.label57.Name = "label57";
- this.label57.Size = new System.Drawing.Size(105, 12);
- this.label57.TabIndex = 9;
- this.label57.Text = "Pyrmidal B-Frames:";
- //
// 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(157, 205);
+ this.check_pyrmidalBFrames.Location = new System.Drawing.Point(47, 210);
this.check_pyrmidalBFrames.Name = "check_pyrmidalBFrames";
this.check_pyrmidalBFrames.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_pyrmidalBFrames.Size = new System.Drawing.Size(12, 11);
+ this.check_pyrmidalBFrames.Size = new System.Drawing.Size(121, 16);
this.check_pyrmidalBFrames.TabIndex = 17;
+ this.check_pyrmidalBFrames.Text = "Pyrmidal B-Frames:";
this.check_pyrmidalBFrames.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_pyrmidalBFrames.UseVisualStyleBackColor = true;
this.check_pyrmidalBFrames.CheckStateChanged += new System.EventHandler(this.check_pyrmidalBFrames_CheckedChanged);
//
- // label58
- //
- this.label58.AutoSize = true;
- this.label58.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label58.Location = new System.Drawing.Point(15, 184);
- this.label58.Name = "label58";
- this.label58.Size = new System.Drawing.Size(131, 12);
- this.label58.TabIndex = 8;
- this.label58.Text = "Bidirectional Refinement:";
- //
// check_BidirectionalRefinement
//
this.check_BidirectionalRefinement.AutoSize = true;
+ this.check_BidirectionalRefinement.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_BidirectionalRefinement.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.check_BidirectionalRefinement.Location = new System.Drawing.Point(157, 185);
+ this.check_BidirectionalRefinement.Location = new System.Drawing.Point(21, 188);
this.check_BidirectionalRefinement.Name = "check_BidirectionalRefinement";
this.check_BidirectionalRefinement.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_BidirectionalRefinement.Size = new System.Drawing.Size(12, 11);
+ this.check_BidirectionalRefinement.Size = new System.Drawing.Size(147, 16);
this.check_BidirectionalRefinement.TabIndex = 16;
+ this.check_BidirectionalRefinement.Text = "Bidirectional Refinement:";
this.check_BidirectionalRefinement.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_BidirectionalRefinement.UseVisualStyleBackColor = true;
this.check_BidirectionalRefinement.CheckStateChanged += new System.EventHandler(this.check_BidirectionalRefinement_CheckedChanged);
//
- // label59
- //
- this.label59.AutoSize = true;
- this.label59.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label59.Location = new System.Drawing.Point(15, 164);
- this.label59.Name = "label59";
- this.label59.Size = new System.Drawing.Size(131, 12);
- this.label59.TabIndex = 7;
- this.label59.Text = "B-Frame Rate Distortion:";
- //
- // check_bFrameDistortion
- //
- this.check_bFrameDistortion.AutoSize = true;
- this.check_bFrameDistortion.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
- this.check_bFrameDistortion.Location = new System.Drawing.Point(157, 165);
- this.check_bFrameDistortion.Name = "check_bFrameDistortion";
- this.check_bFrameDistortion.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_bFrameDistortion.Size = new System.Drawing.Size(12, 11);
- this.check_bFrameDistortion.TabIndex = 15;
- this.check_bFrameDistortion.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
- this.check_bFrameDistortion.UseVisualStyleBackColor = true;
- this.check_bFrameDistortion.CheckStateChanged += new System.EventHandler(this.check_bFrameDistortion_CheckedChanged);
- //
- // label60
- //
- this.label60.AutoSize = true;
- this.label60.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label60.Location = new System.Drawing.Point(39, 146);
- this.label60.Name = "label60";
- this.label60.Size = new System.Drawing.Size(107, 12);
- this.label60.TabIndex = 6;
- this.label60.Text = "Weighted B-Frames:";
+ // check_bFrameRateDistortion
+ //
+ this.check_bFrameRateDistortion.AutoSize = true;
+ this.check_bFrameRateDistortion.CheckAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_bFrameRateDistortion.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ this.check_bFrameRateDistortion.Location = new System.Drawing.Point(20, 166);
+ this.check_bFrameRateDistortion.Name = "check_bFrameRateDistortion";
+ this.check_bFrameRateDistortion.RightToLeft = System.Windows.Forms.RightToLeft.No;
+ this.check_bFrameRateDistortion.Size = new System.Drawing.Size(147, 16);
+ this.check_bFrameRateDistortion.TabIndex = 15;
+ this.check_bFrameRateDistortion.Text = "B-Frame Rate Distortion:";
+ this.check_bFrameRateDistortion.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_bFrameRateDistortion.UseVisualStyleBackColor = true;
+ this.check_bFrameRateDistortion.CheckStateChanged += new System.EventHandler(this.check_bFrameDistortion_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(157, 147);
+ this.check_weightedBFrames.Location = new System.Drawing.Point(44, 144);
this.check_weightedBFrames.Name = "check_weightedBFrames";
this.check_weightedBFrames.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_weightedBFrames.Size = new System.Drawing.Size(12, 11);
+ this.check_weightedBFrames.Size = new System.Drawing.Size(123, 16);
this.check_weightedBFrames.TabIndex = 14;
- this.check_weightedBFrames.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
+ this.check_weightedBFrames.Text = "Weighted B-Frames:";
this.check_weightedBFrames.UseVisualStyleBackColor = true;
this.check_weightedBFrames.CheckStateChanged += new System.EventHandler(this.check_weightedBFrames_CheckedChanged);
//
- // label61
+ // lbl_direct_prediction
//
- this.label61.AutoSize = true;
- this.label61.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label61.Location = new System.Drawing.Point(52, 121);
- this.label61.Name = "label61";
- this.label61.Size = new System.Drawing.Size(94, 12);
- this.label61.TabIndex = 5;
- this.label61.Text = "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(52, 121);
+ this.lbl_direct_prediction.Name = "lbl_direct_prediction";
+ this.lbl_direct_prediction.Size = new System.Drawing.Size(94, 12);
+ this.lbl_direct_prediction.TabIndex = 5;
+ 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.Flat;
+ 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(157, 118);
this.drop_directPrediction.Name = "drop_directPrediction";
this.drop_directPrediction.Size = new System.Drawing.Size(121, 20);
@@ -2745,24 +2788,33 @@ namespace Handbrake // drop_bFrames
//
this.drop_bFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_bFrames.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(157, 91);
this.drop_bFrames.Name = "drop_bFrames";
this.drop_bFrames.Size = new System.Drawing.Size(121, 20);
this.drop_bFrames.TabIndex = 12;
this.drop_bFrames.SelectedIndexChanged += new System.EventHandler(this.drop_bFrames_SelectedIndexChanged);
//
- // label63
- //
- this.label63.AutoSize = true;
- this.label63.Font = new System.Drawing.Font("Verdana", 6.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
- this.label63.Location = new System.Drawing.Point(48, 64);
- this.label63.Name = "label63";
- this.label63.Size = new System.Drawing.Size(98, 12);
- this.label63.TabIndex = 2;
- this.label63.Text = "Mixed References:";
- //
// label64
//
this.label64.AutoSize = true;
@@ -2776,8 +2828,27 @@ namespace Handbrake // drop_refFrames
//
this.drop_refFrames.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList;
- this.drop_refFrames.FlatStyle = System.Windows.Forms.FlatStyle.Flat;
+ 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(157, 37);
this.drop_refFrames.Name = "drop_refFrames";
this.drop_refFrames.Size = new System.Drawing.Size(121, 20);
@@ -2787,12 +2858,14 @@ namespace Handbrake // 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(157, 65);
+ this.check_mixedReferences.Location = new System.Drawing.Point(54, 63);
this.check_mixedReferences.Name = "check_mixedReferences";
this.check_mixedReferences.RightToLeft = System.Windows.Forms.RightToLeft.No;
- this.check_mixedReferences.Size = new System.Drawing.Size(12, 11);
+ this.check_mixedReferences.Size = new System.Drawing.Size(114, 16);
this.check_mixedReferences.TabIndex = 11;
+ this.check_mixedReferences.Text = "Mixed References:";
this.check_mixedReferences.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
this.check_mixedReferences.UseVisualStyleBackColor = true;
this.check_mixedReferences.CheckStateChanged += new System.EventHandler(this.check_mixedReferences_CheckedChanged);
@@ -3078,8 +3151,8 @@ namespace Handbrake //
this.lbl_encode.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));
this.lbl_encode.Name = "lbl_encode";
- this.lbl_encode.Size = new System.Drawing.Size(148, 17);
- this.lbl_encode.Text = "Encoding: Not Started";
+ this.lbl_encode.Size = new System.Drawing.Size(31, 17);
+ this.lbl_encode.Text = "{0}";
//
// panel4
//
@@ -3303,13 +3376,10 @@ namespace Handbrake internal System.Windows.Forms.RichTextBox rtf_x264Query;
internal System.Windows.Forms.Label label43;
internal System.Windows.Forms.Button btn_reset;
- internal System.Windows.Forms.Label label35;
internal System.Windows.Forms.CheckBox check_Cabac;
- internal System.Windows.Forms.Label label36;
internal System.Windows.Forms.CheckBox check_noDCTDecimate;
- internal System.Windows.Forms.Label label37;
internal System.Windows.Forms.CheckBox check_noFastPSkip;
- internal System.Windows.Forms.Label label39;
+ 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;
@@ -3317,7 +3387,6 @@ namespace Handbrake internal System.Windows.Forms.Panel panel3;
internal System.Windows.Forms.Panel panel1;
internal System.Windows.Forms.Panel panel2;
- internal System.Windows.Forms.Label label44;
internal System.Windows.Forms.CheckBox check_8x8DCT;
internal System.Windows.Forms.Label label45;
internal System.Windows.Forms.ComboBox drop_analysis;
@@ -3327,19 +3396,14 @@ namespace Handbrake internal System.Windows.Forms.ComboBox drop_MotionEstimationRange;
internal System.Windows.Forms.Label label54;
internal System.Windows.Forms.ComboBox drop_MotionEstimationMethod;
- internal System.Windows.Forms.Label label57;
internal System.Windows.Forms.CheckBox check_pyrmidalBFrames;
- internal System.Windows.Forms.Label label58;
internal System.Windows.Forms.CheckBox check_BidirectionalRefinement;
- internal System.Windows.Forms.Label label59;
- internal System.Windows.Forms.CheckBox check_bFrameDistortion;
- internal System.Windows.Forms.Label label60;
+ internal System.Windows.Forms.CheckBox check_bFrameRateDistortion;
internal System.Windows.Forms.CheckBox check_weightedBFrames;
- internal System.Windows.Forms.Label label61;
+ 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 label63;
internal System.Windows.Forms.Label label64;
internal System.Windows.Forms.ComboBox drop_refFrames;
internal System.Windows.Forms.CheckBox check_mixedReferences;
diff --git a/win/C#/frmMain.cs b/win/C#/frmMain.cs index c300dc3b8..504ca4443 100644 --- a/win/C#/frmMain.cs +++ b/win/C#/frmMain.cs @@ -98,6 +98,7 @@ namespace Handbrake // Enabled GUI tooltip's if Required
if (Properties.Settings.Default.tooltipEnable == "Checked")
ToolTip.Active = true;
+ lbl_encode.Text = "";
Thread.Sleep(400);
@@ -118,7 +119,7 @@ namespace Handbrake this.Enabled = true;
// Some event Handlers. Used for minimize to taskbar
- this.Resize += new EventHandler(frmMain_Resize);
+ this.Resize += new EventHandler(frmMain_Resize);
}
// Startup Functions
@@ -156,127 +157,16 @@ namespace Handbrake }
private void setupH264Panel()
{
- /*Set opt widget values here*/
-
- /*B-Frames fX264optBframesPopUp*/
- int i;
- drop_bFrames.Items.Clear();
- drop_bFrames.Items.Add("Default (0)");
drop_bFrames.Text = "Default (0)";
-
- for (i = 0; i < 17; i++)
- {
- drop_bFrames.Items.Add(i.ToString());
- }
-
- /*Reference Frames fX264optRefPopUp*/
- drop_refFrames.Items.Clear();
- drop_refFrames.Items.Add("Default (1)");
drop_refFrames.Text = "Default (1)";
- for (i = 0; i < 17; i++)
- {
- drop_refFrames.Items.Add(i.ToString());
- }
-
- /*No Fast P-Skip fX264optNfpskipSwitch BOOLEAN*/
- check_noFastPSkip.CheckState = CheckState.Unchecked;
-
- /*No Dict Decimate fX264optNodctdcmtSwitch BOOLEAN*/
- check_noDCTDecimate.CheckState = CheckState.Unchecked;
-
-
- /*Sub Me fX264optSubmePopUp*/
- drop_subpixelMotionEstimation.Items.Clear();
- drop_subpixelMotionEstimation.Items.Add("Default (4)");
drop_subpixelMotionEstimation.Text = "Default (4)";
- for (i = 0; i < 8; i++)
- {
- drop_subpixelMotionEstimation.Items.Add(i.ToString());
- }
-
- /*Trellis fX264optTrellisPopUp*/
- drop_trellis.Items.Clear();
- drop_trellis.Items.Add("Default (0)");
drop_trellis.Text = "Default (0)";
- for (i = 0; i < 3; i++)
- {
- drop_trellis.Items.Add(i.ToString());
- }
-
- /*Mixed-references fX264optMixedRefsSwitch BOOLEAN*/
- check_mixedReferences.CheckState = CheckState.Unchecked;
-
- /*Motion Estimation fX264optMotionEstPopUp*/
- drop_MotionEstimationMethod.Items.Clear();
- drop_MotionEstimationMethod.Items.Add("Default (Hexagon)");
- drop_MotionEstimationMethod.Items.Add("Diamond");
- drop_MotionEstimationMethod.Items.Add("Hexagon");
- drop_MotionEstimationMethod.Items.Add("Uneven Multi-Hexagon");
- drop_MotionEstimationMethod.Items.Add("Exhaustive");
drop_MotionEstimationMethod.Text = "Default (Hexagon)";
-
- /*Motion Estimation range fX264optMERangePopUp*/
- drop_MotionEstimationRange.Items.Clear();
- drop_MotionEstimationRange.Items.Add("Default (16)");
drop_MotionEstimationRange.Text = "Default (16)";
- for (i = 4; i < 65; i++)
- {
- drop_MotionEstimationRange.Items.Add(i.ToString());
- }
-
- /*Weighted B-Frame Prediction fX264optWeightBSwitch BOOLEAN*/
- check_weightedBFrames.CheckState = CheckState.Unchecked;
-
- /*B-Frame Rate Distortion Optimization fX264optBRDOSwitch BOOLEAN*/
- check_bFrameDistortion.CheckState = CheckState.Unchecked;
-
- /*B-frame Pyramids fX264optBPyramidSwitch BOOLEAN*/
- check_pyrmidalBFrames.CheckState = CheckState.Unchecked;
-
- /*Bidirectional Motion Estimation Refinement fX264optBiMESwitch BOOLEAN*/
- check_BidirectionalRefinement.CheckState = CheckState.Unchecked;
-
- /*Direct B-Frame Prediction Mode fX264optDirectPredPopUp*/
- drop_directPrediction.Items.Clear();
- drop_directPrediction.Items.Add("Default (Spatial)");
- drop_directPrediction.Items.Add("None");
- drop_directPrediction.Items.Add("Spatial");
- drop_directPrediction.Items.Add("Temporal");
- drop_directPrediction.Items.Add("Automatic");
drop_directPrediction.Text = "Default (Spatial)";
-
- /*Alpha Deblock*/
- drop_deblockAlpha.Items.Clear();
- drop_deblockAlpha.Items.Add("Default (0)");
drop_deblockAlpha.Text = "Default (0)";
- for (i = -6; i < 7; i++)
- {
- drop_deblockAlpha.Items.Add(i.ToString());
- }
-
- /*Beta Deblock*/
- drop_deblockBeta.Items.Clear();
- drop_deblockBeta.Items.Add("Default (0)");
drop_deblockBeta.Text = "Default (0)";
- for (i = -6; i < 7; i++)
- {
- drop_deblockBeta.Items.Add(i.ToString());
- }
-
- /* Analysis fX264optAnalysePopUp */
- drop_analysis.Items.Clear();
- drop_analysis.Items.Add("Default (some)"); /* 0=default */
- drop_analysis.Items.Add("None"); /* 1=none */
- drop_analysis.Items.Add("All"); /* 2=all */
drop_analysis.Text = "Default (some)";
-
- /* 8x8 DCT fX264op8x8dctSwitch */
- check_8x8DCT.CheckState = CheckState.Unchecked;
-
- /* CABAC fX264opCabacSwitch */
- check_Cabac.CheckState = CheckState.Checked;
-
- /* Standardize the option string */
rtf_x264Query.Text = "";
}
private void loadUserDefaults()
@@ -459,7 +349,7 @@ namespace Handbrake ThreadPool.QueueUserWorkItem(procMonitor, query);
lbl_encode.Visible = true;
- lbl_encode.Text = "Encoding: in Progress";
+ lbl_encode.Text = "Encoding in Progress";
btn_start.Text = "Stop";
btn_start.Image = Properties.Resources.stop;
@@ -522,7 +412,7 @@ namespace Handbrake if (drp_dvdtitle.Items.Count == 0)
MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- lbl_encode.Text = "Encoding: Not Started";
+ lbl_encode.Text = "";
}
}
private void btn_file_source_Click(object sender, EventArgs e)
@@ -551,7 +441,7 @@ namespace Handbrake if (drp_dvdtitle.Items.Count == 0)
MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- lbl_encode.Text = "Encoding: Not Started";
+ lbl_encode.Text = "";
}
}
private void mnu_dvd_drive_Click(object sender, EventArgs e)
@@ -571,7 +461,7 @@ namespace Handbrake if (drp_dvdtitle.Items.Count == 0)
MessageBox.Show("No Title(s) found. Please make sure you have selected a valid, non-copy protected source. Please refer to the FAQ (see Help Menu).", "Error", MessageBoxButtons.OK, MessageBoxIcon.Hand);
- lbl_encode.Text = "Encoding: Not Started";
+ lbl_encode.Text = "";
}
private void drp_dvdtitle_Click(object sender, EventArgs e)
@@ -1159,7 +1049,7 @@ namespace Handbrake drp_audmix_1.Text = "Automatic";
drp_audbit_1.Text = "160";
- drp_audsr_1.Text = "48";
+ drp_audsr_1.Text = "Auto";
}
@@ -1194,7 +1084,7 @@ namespace Handbrake drp_audmix_2.Text = "Automatic";
drp_audbit_2.Text = "160";
- drp_audsr_2.Text = "48";
+ drp_audsr_2.Text = "Auto";
}
else
{
@@ -1207,7 +1097,7 @@ namespace Handbrake drp_audmix_2.Text = "Automatic";
drp_audbit_2.Text = "160";
- drp_audsr_2.Text = "48";
+ drp_audsr_2.Text = "Auto";
}
}
@@ -1242,7 +1132,7 @@ namespace Handbrake drp_audmix_3.Text = "Automatic";
drp_audbit_3.Text = "160";
- drp_audsr_3.Text = "48";
+ drp_audsr_3.Text = "Auto";
}
else
{
@@ -1255,7 +1145,7 @@ namespace Handbrake drp_audmix_3.Text = "Automatic";
drp_audbit_3.Text = "160";
- drp_audsr_3.Text = "48";
+ drp_audsr_3.Text = "Auto";
}
}
@@ -1291,7 +1181,7 @@ namespace Handbrake drp_audmix_4.Text = "Automatic";
drp_audbit_4.Text = "160";
- drp_audsr_4.Text = "48";
+ drp_audsr_4.Text = "Auto";
}
else
{
@@ -1304,7 +1194,7 @@ namespace Handbrake drp_audmix_4.Text = "Automatic";
drp_audbit_4.Text = "160";
- drp_audsr_4.Text = "48";
+ drp_audsr_4.Text = "Auto";
}
}
@@ -1471,6 +1361,7 @@ namespace Handbrake }
private void check_Cabac_CheckedChanged(object sender, EventArgs e)
{
+
x264PanelFunctions.on_x264_WidgetChange("cabac", this);
}
@@ -2009,7 +1900,7 @@ namespace Handbrake this.BeginInvoke(new UpdateUIHandler(setEncodeLabelFinished));
return;
}
- lbl_encode.Text = "Encoding: Finished";
+ lbl_encode.Text = "Encoding Finished";
btn_start.Text = "Start";
btn_start.Image = Properties.Resources.Play;
}
|