Imports Stax
Imports Stax.UI
Imports Stax.AppFramework
Imports Stax.ComponentModel

Public Class x264Form
    Inherits ExtendedForm

#Region " Designer "

    Protected Overloads Overrides Sub Dispose(ByVal disposing As Boolean)
        If disposing Then
            If Not (components Is Nothing) Then
                components.Dispose()
            End If
        End If
        MyBase.Dispose(disposing)
    End Sub

    Friend WithEvents SmartTagProvider As Stax.UI.Design.SmartTagProvider
    Friend WithEvents bOK As System.Windows.Forms.Button
    Friend WithEvents bCancel As System.Windows.Forms.Button
    Friend WithEvents tbCommandLine As System.Windows.Forms.TextBox
    Friend WithEvents PageControl1 As Stax.UI.PageControl
    Friend WithEvents TabControl As System.Windows.Forms.TabControl
    Friend WithEvents tpMain As System.Windows.Forms.TabPage
    Friend WithEvents cbMode As System.Windows.Forms.ComboBox
    Friend WithEvents nudQP As System.Windows.Forms.NumericUpDown
    Friend WithEvents lQuanAndQuality As System.Windows.Forms.Label
    Friend WithEvents PictureBox1 As System.Windows.Forms.PictureBox
    Friend WithEvents tpAdvanced As System.Windows.Forms.TabPage
    Friend WithEvents PageControl As Stax.UI.PageControl
    Friend WithEvents ToolStrip As Stax.UI.ExtendedToolStrip
    Friend WithEvents gbBFrames As System.Windows.Forms.GroupBox
    Friend WithEvents cbRDO As System.Windows.Forms.CheckBox
    Friend WithEvents nudBFrames As System.Windows.Forms.NumericUpDown
    Friend WithEvents cbWeightedPrediction As System.Windows.Forms.CheckBox
    Friend WithEvents lMaxConsecutive As System.Windows.Forms.Label
    Friend WithEvents cbAdaptive As System.Windows.Forms.CheckBox
    Friend WithEvents nudBFramesBias As System.Windows.Forms.NumericUpDown
    Friend WithEvents lBias As System.Windows.Forms.Label
    Friend WithEvents cbPyramid As System.Windows.Forms.CheckBox
    Friend WithEvents gbFrameOptions As System.Windows.Forms.GroupBox
    Friend WithEvents lReferenceFrames As System.Windows.Forms.Label
    Friend WithEvents Label1 As System.Windows.Forms.Label
    Friend WithEvents nudSceneCut As System.Windows.Forms.NumericUpDown
    Friend WithEvents lMinimumGOPSize As System.Windows.Forms.Label
    Friend WithEvents nudGOPSizeMax As System.Windows.Forms.NumericUpDown
    Friend WithEvents nudGOPSizeMin As System.Windows.Forms.NumericUpDown
    Friend WithEvents lSceneCut As System.Windows.Forms.Label
    Friend WithEvents lDeblockBeta As System.Windows.Forms.Label
    Friend WithEvents cbCABAC As System.Windows.Forms.CheckBox
    Friend WithEvents lDeblockAlpha As System.Windows.Forms.Label
    Friend WithEvents nudReferenceFrames As System.Windows.Forms.NumericUpDown
    Friend WithEvents nudDeblockBeta As System.Windows.Forms.NumericUpDown
    Friend WithEvents cbLoopFilter As System.Windows.Forms.CheckBox
    Friend WithEvents nudDeblockAlpha As System.Windows.Forms.NumericUpDown
    Friend WithEvents gbPartitions As System.Windows.Forms.GroupBox
    Friend WithEvents cb8x8DCT As System.Windows.Forms.CheckBox
    Friend WithEvents cbP8x8 As System.Windows.Forms.CheckBox
    Friend WithEvents cbI8x8 As System.Windows.Forms.CheckBox
    Friend WithEvents cbb8x8 As System.Windows.Forms.CheckBox
    Friend WithEvents cbP4x4 As System.Windows.Forms.CheckBox
    Friend WithEvents cbi4x4 As System.Windows.Forms.CheckBox
    Friend WithEvents gbIO As System.Windows.Forms.GroupBox
    Friend WithEvents nudThreads As System.Windows.Forms.NumericUpDown
    Friend WithEvents lThreads As System.Windows.Forms.Label
    Friend WithEvents lOutputType As System.Windows.Forms.Label
    Friend WithEvents cbOutputType As System.Windows.Forms.ComboBox
    Friend WithEvents cbNoPSNR As System.Windows.Forms.CheckBox
    Friend WithEvents cbShowprogressindicator As System.Windows.Forms.CheckBox
    Friend WithEvents gbAnalysis As System.Windows.Forms.GroupBox
    Friend WithEvents lMotionEstimationMethod As System.Windows.Forms.Label
    Friend WithEvents cbMEMethod As System.Windows.Forms.ComboBox
    Friend WithEvents cbTrellis As System.Windows.Forms.ComboBox
    Friend WithEvents lTrellisRDQuantization As System.Windows.Forms.Label
    Friend WithEvents cbMixedReferences As System.Windows.Forms.CheckBox
    Friend WithEvents lSubpixelMotionEstimation As System.Windows.Forms.Label
    Friend WithEvents cbSubME As System.Windows.Forms.ComboBox
    Friend WithEvents LineControl1 As Stax.UI.LineControl
    Friend WithEvents LineControl2 As Stax.UI.LineControl
    Friend WithEvents bTools As System.Windows.Forms.Button
    Friend WithEvents cmsTools As System.Windows.Forms.ContextMenuStrip
    Friend WithEvents LoadDefaultsToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents HelpToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents ToolStripItemExtender As Stax.UI.Design.ToolStripItemExtender
    Friend WithEvents ShowCommandLineToolStripMenuItem As System.Windows.Forms.ToolStripMenuItem
    Friend WithEvents gbCLI As System.Windows.Forms.GroupBox
    Friend WithEvents lAddtotoprecedingpasses As System.Windows.Forms.Label
    Friend WithEvents lRemovefromprecedingpasses As System.Windows.Forms.Label
    Friend WithEvents tbTurboRemove As System.Windows.Forms.TextBox
    Friend WithEvents tbAddAll As System.Windows.Forms.TextBox
    Friend WithEvents lAdd As System.Windows.Forms.Label
    Friend WithEvents tbTurboAdd As System.Windows.Forms.TextBox
    Friend WithEvents gbStaxRip As System.Windows.Forms.GroupBox
    Friend WithEvents lAimedQuality As System.Windows.Forms.Label
    Friend WithEvents nudPercent As System.Windows.Forms.NumericUpDown

    Private components As System.ComponentModel.IContainer

    <System.Diagnostics.DebuggerStepThrough()> Private Sub InitializeComponent()
        Me.components = New System.ComponentModel.Container
        Dim resources As System.ComponentModel.ComponentResourceManager = New System.ComponentModel.ComponentResourceManager(GetType(x264Form))
        Me.SmartTagProvider = New Stax.UI.Design.SmartTagProvider
        Me.bOK = New System.Windows.Forms.Button
        Me.bCancel = New System.Windows.Forms.Button
        Me.tbCommandLine = New System.Windows.Forms.TextBox
        Me.TabControl = New System.Windows.Forms.TabControl
        Me.tpMain = New System.Windows.Forms.TabPage
        Me.PictureBox1 = New System.Windows.Forms.PictureBox
        Me.cbMode = New System.Windows.Forms.ComboBox
        Me.nudQP = New System.Windows.Forms.NumericUpDown
        Me.lQuanAndQuality = New System.Windows.Forms.Label
        Me.tpAdvanced = New System.Windows.Forms.TabPage
        Me.ToolStrip = New Stax.UI.ExtendedToolStrip
        Me.PageControl = New Stax.UI.PageControl
        Me.gbStaxRip = New System.Windows.Forms.GroupBox
        Me.lAimedQuality = New System.Windows.Forms.Label
        Me.nudPercent = New System.Windows.Forms.NumericUpDown
        Me.gbAnalysis = New System.Windows.Forms.GroupBox
        Me.lMotionEstimationMethod = New System.Windows.Forms.Label
        Me.cbMEMethod = New System.Windows.Forms.ComboBox
        Me.cbTrellis = New System.Windows.Forms.ComboBox
        Me.lTrellisRDQuantization = New System.Windows.Forms.Label
        Me.cbMixedReferences = New System.Windows.Forms.CheckBox
        Me.lSubpixelMotionEstimation = New System.Windows.Forms.Label
        Me.cbSubME = New System.Windows.Forms.ComboBox
        Me.gbCLI = New System.Windows.Forms.GroupBox
        Me.tbAddAll = New System.Windows.Forms.TextBox
        Me.lAdd = New System.Windows.Forms.Label
        Me.tbTurboAdd = New System.Windows.Forms.TextBox
        Me.lAddtotoprecedingpasses = New System.Windows.Forms.Label
        Me.lRemovefromprecedingpasses = New System.Windows.Forms.Label
        Me.tbTurboRemove = New System.Windows.Forms.TextBox
        Me.gbPartitions = New System.Windows.Forms.GroupBox
        Me.cb8x8DCT = New System.Windows.Forms.CheckBox
        Me.cbP8x8 = New System.Windows.Forms.CheckBox
        Me.cbI8x8 = New System.Windows.Forms.CheckBox
        Me.cbb8x8 = New System.Windows.Forms.CheckBox
        Me.cbP4x4 = New System.Windows.Forms.CheckBox
        Me.cbi4x4 = New System.Windows.Forms.CheckBox
        Me.gbIO = New System.Windows.Forms.GroupBox
        Me.nudThreads = New System.Windows.Forms.NumericUpDown
        Me.lThreads = New System.Windows.Forms.Label
        Me.lOutputType = New System.Windows.Forms.Label
        Me.cbOutputType = New System.Windows.Forms.ComboBox
        Me.cbNoPSNR = New System.Windows.Forms.CheckBox
        Me.cbShowprogressindicator = New System.Windows.Forms.CheckBox
        Me.gbFrameOptions = New System.Windows.Forms.GroupBox
        Me.LineControl2 = New Stax.UI.LineControl
        Me.LineControl1 = New Stax.UI.LineControl
        Me.lReferenceFrames = New System.Windows.Forms.Label
        Me.Label1 = New System.Windows.Forms.Label
        Me.nudSceneCut = New System.Windows.Forms.NumericUpDown
        Me.lMinimumGOPSize = New System.Windows.Forms.Label
        Me.nudGOPSizeMax = New System.Windows.Forms.NumericUpDown
        Me.nudGOPSizeMin = New System.Windows.Forms.NumericUpDown
        Me.lSceneCut = New System.Windows.Forms.Label
        Me.lDeblockBeta = New System.Windows.Forms.Label
        Me.cbCABAC = New System.Windows.Forms.CheckBox
        Me.lDeblockAlpha = New System.Windows.Forms.Label
        Me.nudReferenceFrames = New System.Windows.Forms.NumericUpDown
        Me.nudDeblockBeta = New System.Windows.Forms.NumericUpDown
        Me.cbLoopFilter = New System.Windows.Forms.CheckBox
        Me.nudDeblockAlpha = New System.Windows.Forms.NumericUpDown
        Me.gbBFrames = New System.Windows.Forms.GroupBox
        Me.cbRDO = New System.Windows.Forms.CheckBox
        Me.nudBFrames = New System.Windows.Forms.NumericUpDown
        Me.cbWeightedPrediction = New System.Windows.Forms.CheckBox
        Me.lMaxConsecutive = New System.Windows.Forms.Label
        Me.cbAdaptive = New System.Windows.Forms.CheckBox
        Me.nudBFramesBias = New System.Windows.Forms.NumericUpDown
        Me.lBias = New System.Windows.Forms.Label
        Me.cbPyramid = New System.Windows.Forms.CheckBox
        Me.bTools = New System.Windows.Forms.Button
        Me.cmsTools = New System.Windows.Forms.ContextMenuStrip(Me.components)
        Me.LoadDefaultsToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ShowCommandLineToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.HelpToolStripMenuItem = New System.Windows.Forms.ToolStripMenuItem
        Me.ToolStripItemExtender = New Stax.UI.Design.ToolStripItemExtender
        Me.TabControl.SuspendLayout()
        Me.tpMain.SuspendLayout()
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudQP, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.tpAdvanced.SuspendLayout()
        Me.PageControl.SuspendLayout()
        Me.gbStaxRip.SuspendLayout()
        CType(Me.nudPercent, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.gbAnalysis.SuspendLayout()
        Me.gbCLI.SuspendLayout()
        Me.gbPartitions.SuspendLayout()
        Me.gbIO.SuspendLayout()
        CType(Me.nudThreads, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.gbFrameOptions.SuspendLayout()
        CType(Me.nudSceneCut, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudGOPSizeMax, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudGOPSizeMin, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudReferenceFrames, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudDeblockBeta, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudDeblockAlpha, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.gbBFrames.SuspendLayout()
        CType(Me.nudBFrames, System.ComponentModel.ISupportInitialize).BeginInit()
        CType(Me.nudBFramesBias, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.cmsTools.SuspendLayout()
        CType(Me.ToolStripItemExtender, System.ComponentModel.ISupportInitialize).BeginInit()
        Me.SuspendLayout()
        '
        'bOK
        '
        Me.bOK.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.bOK.DialogResult = System.Windows.Forms.DialogResult.OK
        Me.bOK.Location = New System.Drawing.Point(166, 384)
        Me.bOK.Name = "bOK"
        Me.bOK.Size = New System.Drawing.Size(75, 24)
        Me.bOK.TabIndex = 0
        Me.bOK.Text = "OK"
        '
        'bCancel
        '
        Me.bCancel.Anchor = CType((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.bCancel.DialogResult = System.Windows.Forms.DialogResult.Cancel
        Me.bCancel.Location = New System.Drawing.Point(247, 384)
        Me.bCancel.Name = "bCancel"
        Me.bCancel.Size = New System.Drawing.Size(75, 24)
        Me.bCancel.TabIndex = 1
        Me.bCancel.Text = "Cancel"
        '
        'tbCommandLine
        '
        Me.tbCommandLine.Anchor = CType(((System.Windows.Forms.AnchorStyles.Bottom Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.tbCommandLine.Location = New System.Drawing.Point(13, 315)
        Me.tbCommandLine.Multiline = True
        Me.tbCommandLine.Name = "tbCommandLine"
        Me.tbCommandLine.ReadOnly = True
        Me.tbCommandLine.Size = New System.Drawing.Size(309, 63)
        Me.tbCommandLine.TabIndex = 7
        Me.tbCommandLine.Visible = False
        '
        'TabControl
        '
        Me.TabControl.Anchor = CType((((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Bottom) _
                    Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.TabControl.Controls.Add(Me.tpMain)
        Me.TabControl.Controls.Add(Me.tpAdvanced)
        Me.TabControl.Location = New System.Drawing.Point(12, 12)
        Me.TabControl.Name = "TabControl"
        Me.TabControl.SelectedIndex = 0
        Me.TabControl.Size = New System.Drawing.Size(312, 366)
        Me.TabControl.TabIndex = 8
        '
        'tpMain
        '
        Me.tpMain.Controls.Add(Me.PictureBox1)
        Me.tpMain.Controls.Add(Me.cbMode)
        Me.tpMain.Controls.Add(Me.nudQP)
        Me.tpMain.Controls.Add(Me.lQuanAndQuality)
        Me.tpMain.Location = New System.Drawing.Point(4, 22)
        Me.tpMain.Name = "tpMain"
        Me.tpMain.Padding = New System.Windows.Forms.Padding(3)
        Me.tpMain.Size = New System.Drawing.Size(304, 340)
        Me.tpMain.TabIndex = 3
        Me.tpMain.Text = "Main"
        Me.tpMain.UseVisualStyleBackColor = True
        '
        'PictureBox1
        '
        Me.PictureBox1.BorderStyle = System.Windows.Forms.BorderStyle.Fixed3D
        Me.PictureBox1.Image = CType(resources.GetObject("PictureBox1.Image"), System.Drawing.Image)
        Me.PictureBox1.Location = New System.Drawing.Point(52, 49)
        Me.PictureBox1.Name = "PictureBox1"
        Me.PictureBox1.Size = New System.Drawing.Size(204, 63)
        Me.PictureBox1.SizeMode = System.Windows.Forms.PictureBoxSizeMode.AutoSize
        Me.PictureBox1.TabIndex = 28
        Me.PictureBox1.TabStop = False
        '
        'cbMode
        '
        Me.cbMode.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbMode.FormattingEnabled = True
        Me.cbMode.Location = New System.Drawing.Point(52, 128)
        Me.cbMode.Name = "cbMode"
        Me.cbMode.Size = New System.Drawing.Size(204, 21)
        Me.cbMode.TabIndex = 27
        '
        'nudQP
        '
        Me.nudQP.Enabled = False
        Me.nudQP.Location = New System.Drawing.Point(206, 166)
        Me.nudQP.Maximum = New Decimal(New Integer() {51, 0, 0, 0})
        Me.nudQP.Name = "nudQP"
        Me.nudQP.Size = New System.Drawing.Size(50, 20)
        Me.nudQP.TabIndex = 25
        Me.nudQP.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'lQuanAndQuality
        '
        Me.lQuanAndQuality.AutoSize = True
        Me.lQuanAndQuality.Location = New System.Drawing.Point(49, 168)
        Me.lQuanAndQuality.Name = "lQuanAndQuality"
        Me.lQuanAndQuality.Size = New System.Drawing.Size(55, 13)
        Me.lQuanAndQuality.TabIndex = 24
        Me.lQuanAndQuality.Text = "Quantizer:"
        '
        'tpAdvanced
        '
        Me.tpAdvanced.Controls.Add(Me.ToolStrip)
        Me.tpAdvanced.Controls.Add(Me.PageControl)
        Me.tpAdvanced.Location = New System.Drawing.Point(4, 22)
        Me.tpAdvanced.Name = "tpAdvanced"
        Me.tpAdvanced.Padding = New System.Windows.Forms.Padding(3)
        Me.tpAdvanced.Size = New System.Drawing.Size(304, 340)
        Me.tpAdvanced.TabIndex = 4
        Me.tpAdvanced.Text = "Advanced"
        Me.tpAdvanced.UseVisualStyleBackColor = True
        '
        'ToolStrip
        '
        Me.ToolStrip.AutoSize = False
        Me.ToolStrip.BackColor = System.Drawing.SystemColors.Window
        Me.ToolStrip.Dock = System.Windows.Forms.DockStyle.None
        Me.ToolStrip.Font = New System.Drawing.Font("Tahoma", 8.25!, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, CType(0, Byte))
        Me.ToolStrip.GripStyle = System.Windows.Forms.ToolStripGripStyle.Hidden
        Me.ToolStrip.LayoutStyle = System.Windows.Forms.ToolStripLayoutStyle.VerticalStackWithOverflow
        Me.ToolStrip.Location = New System.Drawing.Point(3, 13)
        Me.ToolStrip.Name = "ToolStrip"
        Me.ToolStrip.OverdrawLine = True
        Me.ToolStrip.Padding = New System.Windows.Forms.Padding(1)
        Me.ToolStrip.RenderMode = System.Windows.Forms.ToolStripRenderMode.System
        Me.ToolStrip.ShowControlBorder = True
        Me.ToolStrip.ShowItemToolTips = False
        Me.ToolStrip.SingleAutoChecked = True
        Me.ToolStrip.Size = New System.Drawing.Size(97, 321)
        Me.ToolStrip.TabIndex = 5
        '
        'PageControl
        '
        Me.PageControl.ActivePage = Me.gbStaxRip
        Me.PageControl.Controls.Add(Me.gbStaxRip)
        Me.PageControl.Controls.Add(Me.gbAnalysis)
        Me.PageControl.Controls.Add(Me.gbCLI)
        Me.PageControl.Controls.Add(Me.gbPartitions)
        Me.PageControl.Controls.Add(Me.gbIO)
        Me.PageControl.Controls.Add(Me.gbFrameOptions)
        Me.PageControl.Controls.Add(Me.gbBFrames)
        Me.PageControl.Location = New System.Drawing.Point(106, 6)
        Me.PageControl.Name = "PageControl"
        Me.PageControl.Size = New System.Drawing.Size(192, 328)
        Me.PageControl.TabIndex = 0
        '
        'gbStaxRip
        '
        Me.gbStaxRip.Controls.Add(Me.lAimedQuality)
        Me.gbStaxRip.Controls.Add(Me.nudPercent)
        Me.gbStaxRip.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbStaxRip.Location = New System.Drawing.Point(0, 0)
        Me.gbStaxRip.Name = "gbStaxRip"
        Me.gbStaxRip.Size = New System.Drawing.Size(192, 328)
        Me.gbStaxRip.TabIndex = 6
        Me.gbStaxRip.TabStop = False
        Me.gbStaxRip.Text = "StaxRip"
        '
        'lAimedQuality
        '
        Me.lAimedQuality.AutoSize = True
        Me.lAimedQuality.Location = New System.Drawing.Point(6, 22)
        Me.lAimedQuality.Name = "lAimedQuality"
        Me.lAimedQuality.Size = New System.Drawing.Size(74, 13)
        Me.lAimedQuality.TabIndex = 16
        Me.lAimedQuality.Text = "Aimed Quality:"
        '
        'nudPercent
        '
        Me.nudPercent.Increment = New Decimal(New Integer() {5, 0, 0, 0})
        Me.nudPercent.Location = New System.Drawing.Point(86, 19)
        Me.nudPercent.Maximum = New Decimal(New Integer() {200, 0, 0, 0})
        Me.nudPercent.Name = "nudPercent"
        Me.nudPercent.Size = New System.Drawing.Size(46, 20)
        Me.nudPercent.TabIndex = 15
        Me.nudPercent.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'gbAnalysis
        '
        Me.gbAnalysis.Controls.Add(Me.lMotionEstimationMethod)
        Me.gbAnalysis.Controls.Add(Me.cbMEMethod)
        Me.gbAnalysis.Controls.Add(Me.cbTrellis)
        Me.gbAnalysis.Controls.Add(Me.lTrellisRDQuantization)
        Me.gbAnalysis.Controls.Add(Me.cbMixedReferences)
        Me.gbAnalysis.Controls.Add(Me.lSubpixelMotionEstimation)
        Me.gbAnalysis.Controls.Add(Me.cbSubME)
        Me.gbAnalysis.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbAnalysis.Location = New System.Drawing.Point(0, 0)
        Me.gbAnalysis.Name = "gbAnalysis"
        Me.gbAnalysis.Size = New System.Drawing.Size(192, 328)
        Me.gbAnalysis.TabIndex = 3
        Me.gbAnalysis.TabStop = False
        Me.gbAnalysis.Text = "Analysis"
        '
        'lMotionEstimationMethod
        '
        Me.lMotionEstimationMethod.AutoSize = True
        Me.lMotionEstimationMethod.Location = New System.Drawing.Point(6, 48)
        Me.lMotionEstimationMethod.Name = "lMotionEstimationMethod"
        Me.lMotionEstimationMethod.Size = New System.Drawing.Size(132, 13)
        Me.lMotionEstimationMethod.TabIndex = 67
        Me.lMotionEstimationMethod.Text = "Motion Estimation Method:"
        '
        'cbMEMethod
        '
        Me.cbMEMethod.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbMEMethod.FormattingEnabled = True
        Me.cbMEMethod.Location = New System.Drawing.Point(9, 64)
        Me.cbMEMethod.Name = "cbMEMethod"
        Me.cbMEMethod.Size = New System.Drawing.Size(79, 21)
        Me.cbMEMethod.TabIndex = 66
        '
        'cbTrellis
        '
        Me.cbTrellis.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbTrellis.FormattingEnabled = True
        Me.cbTrellis.Location = New System.Drawing.Point(9, 166)
        Me.cbTrellis.Name = "cbTrellis"
        Me.cbTrellis.Size = New System.Drawing.Size(79, 21)
        Me.cbTrellis.TabIndex = 65
        '
        'lTrellisRDQuantization
        '
        Me.lTrellisRDQuantization.AutoSize = True
        Me.lTrellisRDQuantization.Location = New System.Drawing.Point(3, 150)
        Me.lTrellisRDQuantization.Name = "lTrellisRDQuantization"
        Me.lTrellisRDQuantization.Size = New System.Drawing.Size(118, 13)
        Me.lTrellisRDQuantization.TabIndex = 64
        Me.lTrellisRDQuantization.Text = "Trellis RD Quantization:"
        '
        'cbMixedReferences
        '
        Me.cbMixedReferences.AutoSize = True
        Me.cbMixedReferences.Location = New System.Drawing.Point(9, 19)
        Me.cbMixedReferences.Name = "cbMixedReferences"
        Me.cbMixedReferences.Size = New System.Drawing.Size(112, 17)
        Me.cbMixedReferences.TabIndex = 63
        Me.cbMixedReferences.Text = "Mixed References"
        Me.cbMixedReferences.UseVisualStyleBackColor = True
        '
        'lSubpixelMotionEstimation
        '
        Me.lSubpixelMotionEstimation.AutoSize = True
        Me.lSubpixelMotionEstimation.Location = New System.Drawing.Point(6, 99)
        Me.lSubpixelMotionEstimation.Name = "lSubpixelMotionEstimation"
        Me.lSubpixelMotionEstimation.Size = New System.Drawing.Size(136, 13)
        Me.lSubpixelMotionEstimation.TabIndex = 62
        Me.lSubpixelMotionEstimation.Text = "Subpixel Motion Estimation:"
        '
        'cbSubME
        '
        Me.cbSubME.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbSubME.FormattingEnabled = True
        Me.cbSubME.Location = New System.Drawing.Point(9, 115)
        Me.cbSubME.Name = "cbSubME"
        Me.cbSubME.Size = New System.Drawing.Size(79, 21)
        Me.cbSubME.TabIndex = 61
        '
        'gbCLI
        '
        Me.gbCLI.Controls.Add(Me.tbAddAll)
        Me.gbCLI.Controls.Add(Me.lAdd)
        Me.gbCLI.Controls.Add(Me.tbTurboAdd)
        Me.gbCLI.Controls.Add(Me.lAddtotoprecedingpasses)
        Me.gbCLI.Controls.Add(Me.lRemovefromprecedingpasses)
        Me.gbCLI.Controls.Add(Me.tbTurboRemove)
        Me.gbCLI.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbCLI.Location = New System.Drawing.Point(0, 0)
        Me.gbCLI.Name = "gbCLI"
        Me.gbCLI.Size = New System.Drawing.Size(192, 328)
        Me.gbCLI.TabIndex = 5
        Me.gbCLI.TabStop = False
        Me.gbCLI.Text = "CLI"
        '
        'tbAddAll
        '
        Me.tbAddAll.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.tbAddAll.Location = New System.Drawing.Point(6, 32)
        Me.tbAddAll.Multiline = True
        Me.tbAddAll.Name = "tbAddAll"
        Me.tbAddAll.Size = New System.Drawing.Size(180, 80)
        Me.tbAddAll.TabIndex = 5
        '
        'lAdd
        '
        Me.lAdd.AutoSize = True
        Me.lAdd.Location = New System.Drawing.Point(3, 16)
        Me.lAdd.Name = "lAdd"
        Me.lAdd.Size = New System.Drawing.Size(29, 13)
        Me.lAdd.TabIndex = 4
        Me.lAdd.Text = "Add:"
        '
        'tbTurboAdd
        '
        Me.tbTurboAdd.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.tbTurboAdd.Location = New System.Drawing.Point(6, 240)
        Me.tbTurboAdd.Multiline = True
        Me.tbTurboAdd.Name = "tbTurboAdd"
        Me.tbTurboAdd.Size = New System.Drawing.Size(180, 80)
        Me.tbTurboAdd.TabIndex = 3
        '
        'lAddtotoprecedingpasses
        '
        Me.lAddtotoprecedingpasses.AutoSize = True
        Me.lAddtotoprecedingpasses.Location = New System.Drawing.Point(3, 224)
        Me.lAddtotoprecedingpasses.Name = "lAddtotoprecedingpasses"
        Me.lAddtotoprecedingpasses.Size = New System.Drawing.Size(139, 13)
        Me.lAddtotoprecedingpasses.TabIndex = 2
        Me.lAddtotoprecedingpasses.Text = "Add to to preceding passes:"
        '
        'lRemovefromprecedingpasses
        '
        Me.lRemovefromprecedingpasses.AutoSize = True
        Me.lRemovefromprecedingpasses.Location = New System.Drawing.Point(3, 121)
        Me.lRemovefromprecedingpasses.Name = "lRemovefromprecedingpasses"
        Me.lRemovefromprecedingpasses.Size = New System.Drawing.Size(159, 13)
        Me.lRemovefromprecedingpasses.TabIndex = 1
        Me.lRemovefromprecedingpasses.Text = "Remove from preceding passes:"
        '
        'tbTurboRemove
        '
        Me.tbTurboRemove.Anchor = CType(((System.Windows.Forms.AnchorStyles.Top Or System.Windows.Forms.AnchorStyles.Left) _
                    Or System.Windows.Forms.AnchorStyles.Right), System.Windows.Forms.AnchorStyles)
        Me.tbTurboRemove.Location = New System.Drawing.Point(6, 137)
        Me.tbTurboRemove.Multiline = True
        Me.tbTurboRemove.Name = "tbTurboRemove"
        Me.tbTurboRemove.Size = New System.Drawing.Size(180, 80)
        Me.tbTurboRemove.TabIndex = 0
        '
        'gbPartitions
        '
        Me.gbPartitions.Controls.Add(Me.cb8x8DCT)
        Me.gbPartitions.Controls.Add(Me.cbP8x8)
        Me.gbPartitions.Controls.Add(Me.cbI8x8)
        Me.gbPartitions.Controls.Add(Me.cbb8x8)
        Me.gbPartitions.Controls.Add(Me.cbP4x4)
        Me.gbPartitions.Controls.Add(Me.cbi4x4)
        Me.gbPartitions.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbPartitions.Location = New System.Drawing.Point(0, 0)
        Me.gbPartitions.Name = "gbPartitions"
        Me.gbPartitions.Size = New System.Drawing.Size(192, 328)
        Me.gbPartitions.TabIndex = 2
        Me.gbPartitions.TabStop = False
        Me.gbPartitions.Text = "Partitions"
        '
        'cb8x8DCT
        '
        Me.cb8x8DCT.AutoSize = True
        Me.cb8x8DCT.Location = New System.Drawing.Point(11, 133)
        Me.cb8x8DCT.Name = "cb8x8DCT"
        Me.cb8x8DCT.Size = New System.Drawing.Size(68, 17)
        Me.cb8x8DCT.TabIndex = 59
        Me.cb8x8DCT.Text = "8x8 DCT"
        '
        'cbP8x8
        '
        Me.cbP8x8.AutoSize = True
        Me.cbP8x8.Location = New System.Drawing.Point(11, 64)
        Me.cbP8x8.Name = "cbP8x8"
        Me.cbP8x8.Size = New System.Drawing.Size(50, 17)
        Me.cbP8x8.TabIndex = 56
        Me.cbP8x8.Text = "P8x8"
        '
        'cbI8x8
        '
        Me.cbI8x8.AutoSize = True
        Me.cbI8x8.Location = New System.Drawing.Point(11, 110)
        Me.cbI8x8.Name = "cbI8x8"
        Me.cbI8x8.Size = New System.Drawing.Size(46, 17)
        Me.cbI8x8.TabIndex = 58
        Me.cbI8x8.Text = "I8x8"
        '
        'cbb8x8
        '
        Me.cbb8x8.AutoSize = True
        Me.cbb8x8.Location = New System.Drawing.Point(11, 87)
        Me.cbb8x8.Name = "cbb8x8"
        Me.cbb8x8.Size = New System.Drawing.Size(50, 17)
        Me.cbb8x8.TabIndex = 57
        Me.cbb8x8.Text = "B8x8"
        '
        'cbP4x4
        '
        Me.cbP4x4.AutoSize = True
        Me.cbP4x4.Location = New System.Drawing.Point(11, 18)
        Me.cbP4x4.Name = "cbP4x4"
        Me.cbP4x4.Size = New System.Drawing.Size(50, 17)
        Me.cbP4x4.TabIndex = 54
        Me.cbP4x4.Text = "P4x4"
        '
        'cbi4x4
        '
        Me.cbi4x4.AutoSize = True
        Me.cbi4x4.Location = New System.Drawing.Point(11, 41)
        Me.cbi4x4.Name = "cbi4x4"
        Me.cbi4x4.Size = New System.Drawing.Size(46, 17)
        Me.cbi4x4.TabIndex = 55
        Me.cbi4x4.Text = "I4x4"
        '
        'gbIO
        '
        Me.gbIO.Controls.Add(Me.nudThreads)
        Me.gbIO.Controls.Add(Me.lThreads)
        Me.gbIO.Controls.Add(Me.lOutputType)
        Me.gbIO.Controls.Add(Me.cbOutputType)
        Me.gbIO.Controls.Add(Me.cbNoPSNR)
        Me.gbIO.Controls.Add(Me.cbShowprogressindicator)
        Me.gbIO.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbIO.Location = New System.Drawing.Point(0, 0)
        Me.gbIO.Name = "gbIO"
        Me.gbIO.Size = New System.Drawing.Size(192, 328)
        Me.gbIO.TabIndex = 4
        Me.gbIO.TabStop = False
        Me.gbIO.Text = "Input/Output"
        '
        'nudThreads
        '
        Me.nudThreads.Location = New System.Drawing.Point(83, 65)
        Me.nudThreads.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
        Me.nudThreads.Name = "nudThreads"
        Me.nudThreads.Size = New System.Drawing.Size(59, 20)
        Me.nudThreads.TabIndex = 21
        Me.nudThreads.Value = New Decimal(New Integer() {1, 0, 0, 0})
        '
        'lThreads
        '
        Me.lThreads.AutoSize = True
        Me.lThreads.Location = New System.Drawing.Point(7, 67)
        Me.lThreads.Name = "lThreads"
        Me.lThreads.Size = New System.Drawing.Size(49, 13)
        Me.lThreads.TabIndex = 20
        Me.lThreads.Text = "Threads:"
        '
        'lOutputType
        '
        Me.lOutputType.AutoSize = True
        Me.lOutputType.Location = New System.Drawing.Point(7, 94)
        Me.lOutputType.Name = "lOutputType"
        Me.lOutputType.Size = New System.Drawing.Size(69, 13)
        Me.lOutputType.TabIndex = 19
        Me.lOutputType.Text = "Output Type:"
        '
        'cbOutputType
        '
        Me.cbOutputType.DropDownStyle = System.Windows.Forms.ComboBoxStyle.DropDownList
        Me.cbOutputType.FormattingEnabled = True
        Me.cbOutputType.Location = New System.Drawing.Point(83, 91)
        Me.cbOutputType.Name = "cbOutputType"
        Me.cbOutputType.Size = New System.Drawing.Size(59, 21)
        Me.cbOutputType.TabIndex = 18
        '
        'cbNoPSNR
        '
        Me.cbNoPSNR.AutoSize = True
        Me.cbNoPSNR.Location = New System.Drawing.Point(10, 42)
        Me.cbNoPSNR.Name = "cbNoPSNR"
        Me.cbNoPSNR.Size = New System.Drawing.Size(155, 17)
        Me.cbNoPSNR.TabIndex = 17
        Me.cbNoPSNR.Text = "Disable PSNR computation"
        '
        'cbShowprogressindicator
        '
        Me.cbShowprogressindicator.AutoSize = True
        Me.cbShowprogressindicator.Location = New System.Drawing.Point(10, 19)
        Me.cbShowprogressindicator.Name = "cbShowprogressindicator"
        Me.cbShowprogressindicator.Size = New System.Drawing.Size(139, 17)
        Me.cbShowprogressindicator.TabIndex = 16
        Me.cbShowprogressindicator.Text = "Show progress indicator"
        '
        'gbFrameOptions
        '
        Me.gbFrameOptions.Controls.Add(Me.LineControl2)
        Me.gbFrameOptions.Controls.Add(Me.LineControl1)
        Me.gbFrameOptions.Controls.Add(Me.lReferenceFrames)
        Me.gbFrameOptions.Controls.Add(Me.Label1)
        Me.gbFrameOptions.Controls.Add(Me.nudSceneCut)
        Me.gbFrameOptions.Controls.Add(Me.lMinimumGOPSize)
        Me.gbFrameOptions.Controls.Add(Me.nudGOPSizeMax)
        Me.gbFrameOptions.Controls.Add(Me.nudGOPSizeMin)
        Me.gbFrameOptions.Controls.Add(Me.lSceneCut)
        Me.gbFrameOptions.Controls.Add(Me.lDeblockBeta)
        Me.gbFrameOptions.Controls.Add(Me.cbCABAC)
        Me.gbFrameOptions.Controls.Add(Me.lDeblockAlpha)
        Me.gbFrameOptions.Controls.Add(Me.nudReferenceFrames)
        Me.gbFrameOptions.Controls.Add(Me.nudDeblockBeta)
        Me.gbFrameOptions.Controls.Add(Me.cbLoopFilter)
        Me.gbFrameOptions.Controls.Add(Me.nudDeblockAlpha)
        Me.gbFrameOptions.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbFrameOptions.Location = New System.Drawing.Point(0, 0)
        Me.gbFrameOptions.Name = "gbFrameOptions"
        Me.gbFrameOptions.Size = New System.Drawing.Size(192, 328)
        Me.gbFrameOptions.TabIndex = 1
        Me.gbFrameOptions.TabStop = False
        Me.gbFrameOptions.Text = "Frame Options"
        '
        'LineControl2
        '
        Me.LineControl2.Location = New System.Drawing.Point(81, 182)
        Me.LineControl2.Name = "LineControl2"
        Me.LineControl2.Size = New System.Drawing.Size(105, 10)
        Me.LineControl2.TabIndex = 127
        Me.LineControl2.TabStop = False
        '
        'LineControl1
        '
        Me.LineControl1.Location = New System.Drawing.Point(6, 108)
        Me.LineControl1.Name = "LineControl1"
        Me.LineControl1.Size = New System.Drawing.Size(180, 16)
        Me.LineControl1.TabIndex = 126
        Me.LineControl1.TabStop = False
        Me.LineControl1.Text = "GOP Size"
        '
        'lReferenceFrames
        '
        Me.lReferenceFrames.AutoSize = True
        Me.lReferenceFrames.Location = New System.Drawing.Point(6, 22)
        Me.lReferenceFrames.Name = "lReferenceFrames"
        Me.lReferenceFrames.Size = New System.Drawing.Size(97, 13)
        Me.lReferenceFrames.TabIndex = 117
        Me.lReferenceFrames.Text = "Reference Frames:"
        '
        'Label1
        '
        Me.Label1.AutoSize = True
        Me.Label1.Location = New System.Drawing.Point(102, 128)
        Me.Label1.Name = "Label1"
        Me.Label1.Size = New System.Drawing.Size(30, 13)
        Me.Label1.TabIndex = 111
        Me.Label1.Text = "Max:"
        '
        'nudSceneCut
        '
        Me.nudSceneCut.Increment = New Decimal(New Integer() {10, 0, 0, 0})
        Me.nudSceneCut.Location = New System.Drawing.Point(109, 46)
        Me.nudSceneCut.Minimum = New Decimal(New Integer() {1, 0, 0, -2147483648})
        Me.nudSceneCut.Name = "nudSceneCut"
        Me.nudSceneCut.Size = New System.Drawing.Size(50, 20)
        Me.nudSceneCut.TabIndex = 125
        Me.nudSceneCut.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'lMinimumGOPSize
        '
        Me.lMinimumGOPSize.AutoSize = True
        Me.lMinimumGOPSize.Location = New System.Drawing.Point(48, 128)
        Me.lMinimumGOPSize.Name = "lMinimumGOPSize"
        Me.lMinimumGOPSize.Size = New System.Drawing.Size(27, 13)
        Me.lMinimumGOPSize.TabIndex = 112
        Me.lMinimumGOPSize.Text = "Min:"
        '
        'nudGOPSizeMax
        '
        Me.nudGOPSizeMax.Increment = New Decimal(New Integer() {50, 0, 0, 0})
        Me.nudGOPSizeMax.Location = New System.Drawing.Point(98, 144)
        Me.nudGOPSizeMax.Maximum = New Decimal(New Integer() {1000, 0, 0, 0})
        Me.nudGOPSizeMax.Name = "nudGOPSizeMax"
        Me.nudGOPSizeMax.Size = New System.Drawing.Size(50, 20)
        Me.nudGOPSizeMax.TabIndex = 124
        Me.nudGOPSizeMax.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'nudGOPSizeMin
        '
        Me.nudGOPSizeMin.Increment = New Decimal(New Integer() {10, 0, 0, 0})
        Me.nudGOPSizeMin.Location = New System.Drawing.Point(42, 144)
        Me.nudGOPSizeMin.Maximum = New Decimal(New Integer() {500, 0, 0, 0})
        Me.nudGOPSizeMin.Name = "nudGOPSizeMin"
        Me.nudGOPSizeMin.Size = New System.Drawing.Size(50, 20)
        Me.nudGOPSizeMin.TabIndex = 123
        Me.nudGOPSizeMin.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'lSceneCut
        '
        Me.lSceneCut.AutoSize = True
        Me.lSceneCut.Location = New System.Drawing.Point(6, 49)
        Me.lSceneCut.Name = "lSceneCut"
        Me.lSceneCut.Size = New System.Drawing.Size(60, 13)
        Me.lSceneCut.TabIndex = 114
        Me.lSceneCut.Text = "Scene Cut:"
        '
        'lDeblockBeta
        '
        Me.lDeblockBeta.AutoSize = True
        Me.lDeblockBeta.Location = New System.Drawing.Point(102, 201)
        Me.lDeblockBeta.Name = "lDeblockBeta"
        Me.lDeblockBeta.Size = New System.Drawing.Size(32, 13)
        Me.lDeblockBeta.TabIndex = 122
        Me.lDeblockBeta.Text = "Beta:"
        '
        'cbCABAC
        '
        Me.cbCABAC.AutoSize = True
        Me.cbCABAC.Location = New System.Drawing.Point(9, 75)
        Me.cbCABAC.Name = "cbCABAC"
        Me.cbCABAC.Size = New System.Drawing.Size(61, 17)
        Me.cbCABAC.TabIndex = 115
        Me.cbCABAC.Text = "CABAC"
        '
        'lDeblockAlpha
        '
        Me.lDeblockAlpha.AutoSize = True
        Me.lDeblockAlpha.Location = New System.Drawing.Point(48, 201)
        Me.lDeblockAlpha.Name = "lDeblockAlpha"
        Me.lDeblockAlpha.Size = New System.Drawing.Size(37, 13)
        Me.lDeblockAlpha.TabIndex = 121
        Me.lDeblockAlpha.Text = "Alpha:"
        '
        'nudReferenceFrames
        '
        Me.nudReferenceFrames.Location = New System.Drawing.Point(109, 20)
        Me.nudReferenceFrames.Maximum = New Decimal(New Integer() {16, 0, 0, 0})
        Me.nudReferenceFrames.Minimum = New Decimal(New Integer() {1, 0, 0, 0})
        Me.nudReferenceFrames.Name = "nudReferenceFrames"
        Me.nudReferenceFrames.Size = New System.Drawing.Size(50, 20)
        Me.nudReferenceFrames.TabIndex = 116
        Me.nudReferenceFrames.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        Me.nudReferenceFrames.Value = New Decimal(New Integer() {1, 0, 0, 0})
        '
        'nudDeblockBeta
        '
        Me.nudDeblockBeta.Location = New System.Drawing.Point(98, 217)
        Me.nudDeblockBeta.Maximum = New Decimal(New Integer() {6, 0, 0, 0})
        Me.nudDeblockBeta.Minimum = New Decimal(New Integer() {6, 0, 0, -2147483648})
        Me.nudDeblockBeta.Name = "nudDeblockBeta"
        Me.nudDeblockBeta.Size = New System.Drawing.Size(50, 20)
        Me.nudDeblockBeta.TabIndex = 120
        Me.nudDeblockBeta.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'cbLoopFilter
        '
        Me.cbLoopFilter.AutoSize = True
        Me.cbLoopFilter.Location = New System.Drawing.Point(9, 179)
        Me.cbLoopFilter.Name = "cbLoopFilter"
        Me.cbLoopFilter.Size = New System.Drawing.Size(75, 17)
        Me.cbLoopFilter.TabIndex = 118
        Me.cbLoopFilter.Text = "Loop Filter"
        '
        'nudDeblockAlpha
        '
        Me.nudDeblockAlpha.Location = New System.Drawing.Point(42, 217)
        Me.nudDeblockAlpha.Maximum = New Decimal(New Integer() {6, 0, 0, 0})
        Me.nudDeblockAlpha.Minimum = New Decimal(New Integer() {6, 0, 0, -2147483648})
        Me.nudDeblockAlpha.Name = "nudDeblockAlpha"
        Me.nudDeblockAlpha.Size = New System.Drawing.Size(50, 20)
        Me.nudDeblockAlpha.TabIndex = 119
        Me.nudDeblockAlpha.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'gbBFrames
        '
        Me.gbBFrames.Controls.Add(Me.cbRDO)
        Me.gbBFrames.Controls.Add(Me.nudBFrames)
        Me.gbBFrames.Controls.Add(Me.cbWeightedPrediction)
        Me.gbBFrames.Controls.Add(Me.lMaxConsecutive)
        Me.gbBFrames.Controls.Add(Me.cbAdaptive)
        Me.gbBFrames.Controls.Add(Me.nudBFramesBias)
        Me.gbBFrames.Controls.Add(Me.lBias)
        Me.gbBFrames.Controls.Add(Me.cbPyramid)
        Me.gbBFrames.Dock = System.Windows.Forms.DockStyle.Fill
        Me.gbBFrames.Location = New System.Drawing.Point(0, 0)
        Me.gbBFrames.Name = "gbBFrames"
        Me.gbBFrames.Size = New System.Drawing.Size(192, 328)
        Me.gbBFrames.TabIndex = 0
        Me.gbBFrames.TabStop = False
        Me.gbBFrames.Text = "B-Frames"
        '
        'cbRDO
        '
        Me.cbRDO.AutoSize = True
        Me.cbRDO.Location = New System.Drawing.Point(9, 117)
        Me.cbRDO.Name = "cbRDO"
        Me.cbRDO.Size = New System.Drawing.Size(50, 17)
        Me.cbRDO.TabIndex = 120
        Me.cbRDO.Text = "RDO"
        '
        'nudBFrames
        '
        Me.nudBFrames.Location = New System.Drawing.Point(104, 16)
        Me.nudBFrames.Maximum = New Decimal(New Integer() {16, 0, 0, 0})
        Me.nudBFrames.Name = "nudBFrames"
        Me.nudBFrames.Size = New System.Drawing.Size(50, 20)
        Me.nudBFrames.TabIndex = 114
        Me.nudBFrames.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'cbWeightedPrediction
        '
        Me.cbWeightedPrediction.AutoSize = True
        Me.cbWeightedPrediction.Location = New System.Drawing.Point(9, 140)
        Me.cbWeightedPrediction.Name = "cbWeightedPrediction"
        Me.cbWeightedPrediction.Size = New System.Drawing.Size(122, 17)
        Me.cbWeightedPrediction.TabIndex = 119
        Me.cbWeightedPrediction.Text = "Weighted Prediction"
        '
        'lMaxConsecutive
        '
        Me.lMaxConsecutive.AutoSize = True
        Me.lMaxConsecutive.Location = New System.Drawing.Point(6, 18)
        Me.lMaxConsecutive.Name = "lMaxConsecutive"
        Me.lMaxConsecutive.Size = New System.Drawing.Size(92, 13)
        Me.lMaxConsecutive.TabIndex = 113
        Me.lMaxConsecutive.Text = "Max Consecutive:"
        '
        'cbAdaptive
        '
        Me.cbAdaptive.AutoSize = True
        Me.cbAdaptive.Location = New System.Drawing.Point(9, 71)
        Me.cbAdaptive.Name = "cbAdaptive"
        Me.cbAdaptive.Size = New System.Drawing.Size(68, 17)
        Me.cbAdaptive.TabIndex = 115
        Me.cbAdaptive.Text = "Adaptive"
        '
        'nudBFramesBias
        '
        Me.nudBFramesBias.Location = New System.Drawing.Point(104, 42)
        Me.nudBFramesBias.Minimum = New Decimal(New Integer() {100, 0, 0, -2147483648})
        Me.nudBFramesBias.Name = "nudBFramesBias"
        Me.nudBFramesBias.Size = New System.Drawing.Size(50, 20)
        Me.nudBFramesBias.TabIndex = 116
        Me.nudBFramesBias.TextAlign = System.Windows.Forms.HorizontalAlignment.Center
        '
        'lBias
        '
        Me.lBias.AutoSize = True
        Me.lBias.Location = New System.Drawing.Point(6, 44)
        Me.lBias.Name = "lBias"
        Me.lBias.Size = New System.Drawing.Size(30, 13)
        Me.lBias.TabIndex = 117
        Me.lBias.Text = "Bias:"
        '
        'cbPyramid
        '
        Me.cbPyramid.AutoSize = True
        Me.cbPyramid.Location = New System.Drawing.Point(9, 94)
        Me.cbPyramid.Name = "cbPyramid"
        Me.cbPyramid.Size = New System.Drawing.Size(63, 17)
        Me.cbPyramid.TabIndex = 118
        Me.cbPyramid.Text = "Pyramid"
        '
        'bTools
        '
        Me.bTools.Location = New System.Drawing.Point(68, 384)
        Me.bTools.Name = "bTools"
        Me.bTools.Size = New System.Drawing.Size(75, 24)
        Me.bTools.TabIndex = 9
        Me.bTools.Text = "Tools"
        Me.bTools.UseVisualStyleBackColor = True
        '
        'cmsTools
        '
        Me.cmsTools.Items.AddRange(New System.Windows.Forms.ToolStripItem() {Me.LoadDefaultsToolStripMenuItem, Me.ShowCommandLineToolStripMenuItem, Me.HelpToolStripMenuItem})
        Me.cmsTools.Name = "cmsTools"
        Me.cmsTools.Size = New System.Drawing.Size(184, 70)
        '
        'LoadDefaultsToolStripMenuItem
        '
        Me.LoadDefaultsToolStripMenuItem.Name = "LoadDefaultsToolStripMenuItem"
        Me.LoadDefaultsToolStripMenuItem.Size = New System.Drawing.Size(183, 22)
        Me.LoadDefaultsToolStripMenuItem.Text = "Load Defaults"
        '
        'ShowCommandLineToolStripMenuItem
        '
        Me.ShowCommandLineToolStripMenuItem.Name = "ShowCommandLineToolStripMenuItem"
        Me.ShowCommandLineToolStripMenuItem.Size = New System.Drawing.Size(183, 22)
        Me.ShowCommandLineToolStripMenuItem.Text = "Show Command Line"
        '
        'HelpToolStripMenuItem
        '
        Me.ToolStripItemExtender.SetKeyData(Me.HelpToolStripMenuItem, System.Windows.Forms.Keys.F1)
        Me.HelpToolStripMenuItem.Name = "HelpToolStripMenuItem"
        Me.HelpToolStripMenuItem.Size = New System.Drawing.Size(183, 22)
        Me.HelpToolStripMenuItem.Text = "Help"
        '
        'ToolStripItemExtender
        '
        Me.ToolStripItemExtender.Owner = Me
        '
        'x264Form
        '
        Me.AcceptButton = Me.bOK
        Me.CancelButton = Me.bCancel
        Me.ClientSize = New System.Drawing.Size(336, 420)
        Me.Controls.Add(Me.bCancel)
        Me.Controls.Add(Me.TabControl)
        Me.Controls.Add(Me.bTools)
        Me.Controls.Add(Me.tbCommandLine)
        Me.Controls.Add(Me.bOK)
        Me.FormBorderStyle = System.Windows.Forms.FormBorderStyle.FixedDialog
        Me.KeyPreview = True
        Me.MaximizeBox = False
        Me.MinimizeBox = False
        Me.Name = "x264Form"
        Me.ShowIcon = False
        Me.ShowInTaskbar = False
        Me.StartPosition = System.Windows.Forms.FormStartPosition.CenterParent
        Me.Text = "x264"
        Me.TabControl.ResumeLayout(False)
        Me.tpMain.ResumeLayout(False)
        Me.tpMain.PerformLayout()
        CType(Me.PictureBox1, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudQP, System.ComponentModel.ISupportInitialize).EndInit()
        Me.tpAdvanced.ResumeLayout(False)
        Me.PageControl.ResumeLayout(False)
        Me.gbStaxRip.ResumeLayout(False)
        Me.gbStaxRip.PerformLayout()
        CType(Me.nudPercent, System.ComponentModel.ISupportInitialize).EndInit()
        Me.gbAnalysis.ResumeLayout(False)
        Me.gbAnalysis.PerformLayout()
        Me.gbCLI.ResumeLayout(False)
        Me.gbCLI.PerformLayout()
        Me.gbPartitions.ResumeLayout(False)
        Me.gbPartitions.PerformLayout()
        Me.gbIO.ResumeLayout(False)
        Me.gbIO.PerformLayout()
        CType(Me.nudThreads, System.ComponentModel.ISupportInitialize).EndInit()
        Me.gbFrameOptions.ResumeLayout(False)
        Me.gbFrameOptions.PerformLayout()
        CType(Me.nudSceneCut, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudGOPSizeMax, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudGOPSizeMin, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudReferenceFrames, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudDeblockBeta, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudDeblockAlpha, System.ComponentModel.ISupportInitialize).EndInit()
        Me.gbBFrames.ResumeLayout(False)
        Me.gbBFrames.PerformLayout()
        CType(Me.nudBFrames, System.ComponentModel.ISupportInitialize).EndInit()
        CType(Me.nudBFramesBias, System.ComponentModel.ISupportInitialize).EndInit()
        Me.cmsTools.ResumeLayout(False)
        CType(Me.ToolStripItemExtender, System.ComponentModel.ISupportInitialize).EndInit()
        Me.ResumeLayout(False)
        Me.PerformLayout()

    End Sub

#End Region

    Public Encoder As x264Encoder

    Private Params As x264Params
    Private IntBags As New Dictionary(Of Control, SettingBag(Of Integer))
    Private StringBags As New Dictionary(Of Control, SettingBag(Of String))
    Private BoolBags As New Dictionary(Of Control, SettingBag(Of Boolean))
    Private IsLoading As Boolean = True

    Public Sub New(ByVal encoder As x264Encoder)
        MyBase.New()
        InitializeComponent()

        Me.Encoder = encoder
        Me.Params = DirectCast(ObjectHelp.GetCopy(encoder.Params), x264Params)

        AddButton("B-Frames", gbBFrames)
        AddButton("Frame Options", gbFrameOptions)
        AddButton("Analysis", gbAnalysis)
        AddButton("Partitions", gbPartitions)
        AddButton("Input/Output", gbIO)
        AddButton("CLI", gbCLI)
        AddButton("StaxRip", gbStaxRip)

        ToolStrip.Items(0).PerformClick()

        PopulateWithIntBags(Of x264SubMEMode)(cbSubME.Items)
        PopulateWithIntBags(Of x264TrellisMode)(cbTrellis.Items)
        PopulateWithIntBags(Of MEMethodMode)(cbMEMethod.Items)
        PopulateWithIntBags(Of x264OutputType)(cbOutputType.Items)
        PopulateWithIntBags(Of x264Mode)(cbMode.Items)

        nudPercent.Value = encoder.AutoCompCheckValue

        LoadControls()
    End Sub

    Private Sub LoadControls()
        IsLoading = True

        'analysis
        LoadComboBox(cbMEMethod, Params.MEMethod)
        LoadComboBox(cbSubME, Params.SubME)
        LoadComboBox(cbTrellis, Params.Trellis)
        LoadCheckBox(cb8x8DCT, Params.AdaptiveDCT)
        LoadCheckBox(cbb8x8, Params.B8x8)
        LoadCheckBox(cbi4x4, Params.I4x4)
        LoadCheckBox(cbI8x8, Params.I8x8)
        LoadCheckBox(cbMixedReferences, Params.MixedRefs)
        LoadCheckBox(cbP4x4, Params.P4x4)
        LoadCheckBox(cbP8x8, Params.P8x8)
        LoadCheckBox(cbRDO, Params.BFramesRDO)

        'frame options
        LoadCheckBox(cbAdaptive, Params.BFramesAdaptive)
        LoadCheckBox(cbCABAC, Params.CABAC)
        LoadCheckBox(cbLoopFilter, Params.LoopFilter)
        LoadCheckBox(cbPyramid, Params.BFramesPyramid)
        LoadCheckBox(cbWeightedPrediction, Params.BFramesWeightedPrediction)
        LoadNumericUpDown(nudBFrames, Params.BFrames)
        LoadNumericUpDown(nudBFramesBias, Params.BFramesBias)
        LoadNumericUpDown(nudDeblockAlpha, Params.DeblockAlpha)
        LoadNumericUpDown(nudDeblockBeta, Params.DeblockBeta)
        LoadNumericUpDown(nudGOPSizeMax, Params.GOPSizeMax)
        LoadNumericUpDown(nudGOPSizeMin, Params.GOPSizeMin)
        LoadNumericUpDown(nudReferenceFrames, Params.ReferenceFrames)
        LoadNumericUpDown(nudSceneCut, Params.SceneCut)

        'io
        LoadCheckBox(cbShowprogressindicator, Params.Progress)
        LoadCheckBox(cbNoPSNR, Params.NoPSNR)
        LoadComboBox(cbOutputType, Params.OutputType)
        LoadNumericUpDown(nudThreads, Params.Threads)

        'rate control
        LoadComboBox(cbMode, Params.Mode)
        LoadNumericUpDown(nudQP, Params.Quant)

        'cli
        LoadTextBox(tbTurboRemove, Params.TurboRemove)
        LoadTextBox(tbTurboAdd, Params.TurboAdd)
        LoadTextBox(tbAddAll, Params.AddAll)

        IsLoading = False
        UpdateControls()
    End Sub

    Private Sub UpdateControls()
        'Analysis
        Dim subMEMode As x264SubMEMode = GetEnum(Of x264SubMEMode)(cbSubME.SelectedItem)

        If subMEMode <> x264SubMEMode.V6 AndAlso subMEMode <> x264SubMEMode.V7 Then
            cbRDO.Checked = False
            cbRDO.Enabled = False
        Else
            cbRDO.Enabled = True
        End If

        If cb8x8DCT.Checked Then
            cbI8x8.Enabled = True
        Else
            cbI8x8.Enabled = False
            cbI8x8.Checked = False
        End If

        If cbP8x8.Checked Then
            cbP4x4.Enabled = True
        Else
            cbP4x4.Enabled = False
            cbP4x4.Checked = False
        End If

        'RateControl
        If GetEnum(Of x264Mode)(cbMode.SelectedItem) = x264Mode.SingleQuant Then
            nudQP.Enabled = True
            lQuanAndQuality.Enabled = True
            lQuanAndQuality.Text = "Quantizer"
        ElseIf GetEnum(Of x264Mode)(cbMode.SelectedItem) = x264Mode.SingleCRF Then
            nudQP.Enabled = True
            lQuanAndQuality.Enabled = True
            lQuanAndQuality.Text = "Quality"
        Else
            nudQP.Enabled = False
            lQuanAndQuality.Enabled = False
        End If

        'FrameOptions
        If nudBFrames.Value >= 2 Then
            cbPyramid.Enabled = True
        Else
            cbPyramid.Enabled = False
            cbPyramid.Checked = False
        End If

        If nudBFrames.Value >= 1 Then
            cbAdaptive.Enabled = True
            cbWeightedPrediction.Enabled = True
            nudBFramesBias.Enabled = True
        Else
            cbAdaptive.Enabled = False
            cbAdaptive.Checked = False
            cbWeightedPrediction.Enabled = False
            cbWeightedPrediction.Checked = False
            nudBFramesBias.Enabled = False
            nudBFramesBias.Value = 0
        End If

        nudDeblockAlpha.Enabled = cbLoopFilter.Checked
        nudDeblockBeta.Enabled = cbLoopFilter.Checked
        lDeblockAlpha.Enabled = cbLoopFilter.Checked
        lDeblockBeta.Enabled = cbLoopFilter.Checked

        If cbCABAC.Checked Then
            cbTrellis.Enabled = True
        Else
            cbTrellis.Enabled = False
            cbTrellis.SelectedIndex = 0
        End If
    End Sub

    Protected Function GetEnum(Of T)(ByVal o As Object) As T
        Dim ret As Object = DirectCast(o, ListBag(Of Integer)).Value
        Return CType(ret, T)
    End Function

    Private Sub x264Form_ActivatedFirstTime() Handles Me.ActivatedFirstTime
        If Not s.StringList.Contains(Me.GetType.FullName) Then
            HelpToolStripMenuItem.PerformClick()
            s.StringList.Add(Me.GetType.FullName)
        End If
    End Sub

    Private Sub LoadComboBox(ByVal cb As ComboBox, ByVal bag As SettingBag(Of Integer))
        If Not IntBags.ContainsKey(cb) Then
            AddHandler cb.SelectedIndexChanged, AddressOf ComboBoxSelectedIndexChanged
        End If

        IntBags(cb) = bag
        SetValue(cb, bag.Value)
    End Sub

    Private Sub LoadCheckBox(ByVal cb As CheckBox, ByVal bag As SettingBag(Of Boolean))
        If Not BoolBags.ContainsKey(cb) Then
            AddHandler cb.CheckStateChanged, AddressOf CheckBoxCheckStateChanged
        End If

        BoolBags(cb) = bag
        cb.Checked = bag.Value
    End Sub

    Private Sub LoadNumericUpDown(ByVal nud As NumericUpDown, ByVal bag As SettingBag(Of Integer))
        If Not IntBags.ContainsKey(nud) Then
            AddHandler nud.ValueChanged, AddressOf NumericUpDownValueChanged
        End If

        IntBags(nud) = bag
        nud.Value = bag.Value
    End Sub

    Private Sub LoadTextBox(ByVal tb As TextBox, ByVal bag As SettingBag(Of String))
        If Not StringBags.ContainsKey(tb) Then
            AddHandler tb.TextChanged, AddressOf TextBoxTextChanged
        End If

        StringBags(tb) = bag
        tb.Text = bag.Value
    End Sub

    Private Sub NumericUpDownValueChanged(ByVal sender As Object, ByVal e As EventArgs)
        If Not IsLoading Then
            Dim nud As NumericUpDown = DirectCast(sender, NumericUpDown)
            IntBags(nud).Value = CInt(nud.Value)
            UpdateControls()
        End If
    End Sub

    Private Sub TextBoxTextChanged(ByVal sender As Object, ByVal e As EventArgs)
        If Not IsLoading Then
            Dim tb As TextBox = DirectCast(sender, TextBox)
            StringBags(tb).Value = tb.Text
            UpdateControls()
        End If
    End Sub

    Private Sub CheckBoxCheckStateChanged(ByVal sender As Object, ByVal e As EventArgs)
        If Not IsLoading Then
            Dim cb As CheckBox = DirectCast(sender, CheckBox)
            BoolBags(cb).Value = cb.Checked
            UpdateControls()
        End If
    End Sub

    Private Sub SetValue(ByVal cb As ComboBox, ByVal value As Integer)
        For i As Integer = 0 To cb.Items.Count - 1
            If DirectCast(cb.Items(i), ListBag(Of Integer)).Value = value Then
                cb.SelectedIndex = i
                Exit For
            End If
        Next
    End Sub

    Private Sub ComboBoxSelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs)
        If Not IsLoading Then
            Dim cb As ComboBox = DirectCast(sender, ComboBox)
            IntBags(cb).Value = DirectCast(cb.SelectedItem, ListBag(Of Integer)).Value
            UpdateControls()
        End If
    End Sub

    Private Sub PopulateWithIntBags(Of T)(ByVal l As IList)
        For Each i As T In System.Enum.GetValues(GetType(T))
            Dim o As Object = i
            l.Add(New ListBag(Of Integer)(NameAttribute.GetEnumName(Of T)(i), CInt(o)))
        Next
    End Sub

    Private Sub bOK_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bOK.Click
        Encoder.Params = Params
        Encoder.AutoCompCheckValue = CInt(nudPercent.Value)
    End Sub

    Private Sub AddButton(ByVal name As String, ByVal c As Control)
        Dim b As New ToolStripButton

        b.DisplayStyle = ToolStripItemDisplayStyle.Text
        b.AutoSize = False
        b.Height = 30
        b.Width = ToolStrip.Width - 4
        b.Text = c.Text
        b.Tag = c

        ToolStrip.Items.Add(b)
    End Sub

    Private Sub ToolStrip_ItemClicked(ByVal sender As Object, ByVal e As ToolStripItemClickedEventArgs) Handles ToolStrip.ItemClicked
        PageControl.ActivePage = DirectCast(DirectCast(e.ClickedItem, ToolStripButton).Tag, Control)
    End Sub

    Private Sub bTools_Paint(ByVal sender As Object, ByVal e As PaintEventArgs) Handles bTools.Paint
        ButtonHelp.DrawDropDownGlyph(bTools, e.Graphics, HorizontalAlignment.Right)
    End Sub

    Private Sub LoadDefaultsToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles LoadDefaultsToolStripMenuItem.Click
        Params = New x264Params
        LoadControls()
    End Sub

    Private Sub HelpToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles HelpToolStripMenuItem.Click
        Dim f As New HelpForm
        f.Document.WriteStart("x264 Configuration")
        f.Document.WriteParagraph("A x264 guide can be found [[http://forum.doom9.org/showthread.php?t=98247|here]], the default profiles are explained [[http://forum.doom9.org/showthread.php?t=101813|here]].")
        f.Show()
    End Sub

    Private Sub ShowCommandLineToolStripMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs) Handles ShowCommandLineToolStripMenuItem.Click
        Dim tempEnc As x264Encoder = CType(ObjectHelp.GetCopy(Encoder), x264Encoder)
        tempEnc.Params = Params

        Dim s As String = Nothing

        If Params.Mode.Value = x264Mode.TwoPass Then
            s = """" + Paths.x264.GetPath(False) + """ " + tempEnc.GetCommandLineArgs(1) + vbCrLf + """" + Paths.x264.GetPath(False) + """ " + tempEnc.GetCommandLineArgs(2)
        ElseIf Params.Mode.Value = x264Mode.ThreePass Then
            s = """" + Paths.x264.GetPath(False) + """ " + tempEnc.GetCommandLineArgs(1) + vbCrLf + """" + Paths.x264.GetPath(False) + """ " + tempEnc.GetCommandLineArgs(2) + vbCrLf + """" + Paths.x264.GetPath(False) + """ " + tempEnc.GetCommandLineArgs(3)
        Else
            s = """" + Paths.x264.GetPath(False) + """ " + tempEnc.GetCommandLineArgs(1)
        End If

        g.ShowCommandLinePreview(s)
    End Sub

    Private Sub bTools_Click(ByVal sender As Object, ByVal e As EventArgs) Handles bTools.Click
        cmsTools.Show(bTools, 0, bTools.Height)
    End Sub
End Class