]> granicus.if.org Git - handbrake/commitdiff
WinGui:
authorsr55 <sr55.hb@outlook.com>
Tue, 31 Jul 2007 21:01:26 +0000 (21:01 +0000)
committersr55 <sr55.hb@outlook.com>
Tue, 31 Jul 2007 21:01:26 +0000 (21:01 +0000)
- Detelecine, Deblock and Denoise options added and working

git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@775 b64f7644-9d1e-0410-96f1-a4d463321fa5

win/C#/Properties/Settings.Designer.cs
win/C#/Properties/Settings.settings
win/C#/app.config
win/C#/frmMain.Designer.cs
win/C#/frmMain.cs

index e097fdbf1b99808a0b425b94677f865cb4794e12..10e95cd384ce7f70a325f12591b4f1c5180de13d 100644 (file)
@@ -489,5 +489,41 @@ namespace Handbrake.Properties {
                 this["FullDVDInfo"] = value;\r
             }\r
         }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string denoise {\r
+            get {\r
+                return ((string)(this["denoise"]));\r
+            }\r
+            set {\r
+                this["denoise"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string detelecine {\r
+            get {\r
+                return ((string)(this["detelecine"]));\r
+            }\r
+            set {\r
+                this["detelecine"] = value;\r
+            }\r
+        }\r
+        \r
+        [global::System.Configuration.UserScopedSettingAttribute()]\r
+        [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]\r
+        [global::System.Configuration.DefaultSettingValueAttribute("")]\r
+        public string deblock {\r
+            get {\r
+                return ((string)(this["deblock"]));\r
+            }\r
+            set {\r
+                this["deblock"] = value;\r
+            }\r
+        }\r
     }\r
 }\r
index ef867a5261f5c32734df1d83dfd3620bff2914a2..0e08257258807ef55fb67b2012946dcddb0d5040 100644 (file)
     <Setting Name="FullDVDInfo" Type="System.String" Scope="User">\r
       <Value Profile="(Default)" />\r
     </Setting>\r
+    <Setting Name="denoise" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="detelecine" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
+    <Setting Name="deblock" Type="System.String" Scope="User">\r
+      <Value Profile="(Default)" />\r
+    </Setting>\r
   </Settings>\r
 </SettingsFile>
\ No newline at end of file
index 889981a19d9f1da93f358f661cd76d64bbf1449c..57d4ee9f4207c2ba17f9b1984490ab13195d9e5f 100644 (file)
             <setting name="FullDVDInfo" serializeAs="String">\r
                 <value />\r
             </setting>\r
+            <setting name="denoise" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="detelecine" serializeAs="String">\r
+                <value />\r
+            </setting>\r
+            <setting name="deblock" serializeAs="String">\r
+                <value />\r
+            </setting>\r
         </Handbrake.Properties.Settings>\r
     </userSettings>\r
 </configuration>
\ No newline at end of file
index cffc8d3a4f394fc969d371745b52283aea0fb87b..37fc8d1a828b6d60ec945490c8df58a388eb4c81 100644 (file)
@@ -47,11 +47,9 @@ namespace Handbrake
             this.drp_videoEncoder = new System.Windows.Forms.ComboBox();\r
             this.drp_audioCodec = new System.Windows.Forms.ComboBox();\r
             this.CheckCRF = new System.Windows.Forms.CheckBox();\r
-            this.drp_deBlock = new System.Windows.Forms.ComboBox();\r
-            this.drp_DeNoise = new System.Windows.Forms.ComboBox();\r
-            this.drp_deTelecine = new System.Windows.Forms.ComboBox();\r
             this.drp_subtitle = new System.Windows.Forms.ComboBox();\r
             this.drp_deInterlace_option = new System.Windows.Forms.ComboBox();\r
+            this.drp_deNoise = new System.Windows.Forms.ComboBox();\r
             this.DVD_Open = new System.Windows.Forms.FolderBrowserDialog();\r
             this.File_Open = new System.Windows.Forms.OpenFileDialog();\r
             this.ISO_Open = new System.Windows.Forms.OpenFileDialog();\r
@@ -134,9 +132,10 @@ namespace Handbrake
             this.Label18 = new System.Windows.Forms.Label();\r
             this.drp_audioSampleRate = new System.Windows.Forms.ComboBox();\r
             this.TabPage3 = new System.Windows.Forms.TabPage();\r
-            this.label25 = new System.Windows.Forms.Label();\r
             this.label24 = new System.Windows.Forms.Label();\r
             this.label11 = new System.Windows.Forms.Label();\r
+            this.check_deblock = new System.Windows.Forms.CheckBox();\r
+            this.check_detelecine = new System.Windows.Forms.CheckBox();\r
             this.label4 = new System.Windows.Forms.Label();\r
             this.Label37 = new System.Windows.Forms.Label();\r
             this.check_largeFile = new System.Windows.Forms.CheckBox();\r
@@ -388,54 +387,6 @@ namespace Handbrake
             this.ToolTip.SetToolTip(this.CheckCRF, "Constant Rate Factor");\r
             this.CheckCRF.UseVisualStyleBackColor = true;\r
             // \r
-            // drp_deBlock\r
-            // \r
-            this.drp_deBlock.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.drp_deBlock.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.drp_deBlock.FormattingEnabled = true;\r
-            this.drp_deBlock.Items.AddRange(new object[] {\r
-            "Normal (-d)",\r
-            "yadif(-d=\"1\")",\r
-            "yadif+mcdeint(-d=\"1:-1:1\")"});\r
-            this.drp_deBlock.Location = new System.Drawing.Point(470, 151);\r
-            this.drp_deBlock.Name = "drp_deBlock";\r
-            this.drp_deBlock.Size = new System.Drawing.Size(147, 21);\r
-            this.drp_deBlock.TabIndex = 61;\r
-            this.drp_deBlock.Text = "None";\r
-            this.ToolTip.SetToolTip(this.drp_deBlock, "Select the subtitle language you require from this dropdown.");\r
-            // \r
-            // drp_DeNoise\r
-            // \r
-            this.drp_DeNoise.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.drp_DeNoise.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.drp_DeNoise.FormattingEnabled = true;\r
-            this.drp_DeNoise.Items.AddRange(new object[] {\r
-            "Normal (-d)",\r
-            "yadif(-d=\"1\")",\r
-            "yadif+mcdeint(-d=\"1:-1:1\")"});\r
-            this.drp_DeNoise.Location = new System.Drawing.Point(470, 178);\r
-            this.drp_DeNoise.Name = "drp_DeNoise";\r
-            this.drp_DeNoise.Size = new System.Drawing.Size(147, 21);\r
-            this.drp_DeNoise.TabIndex = 64;\r
-            this.drp_DeNoise.Text = "None";\r
-            this.ToolTip.SetToolTip(this.drp_DeNoise, "Select the subtitle language you require from this dropdown.");\r
-            // \r
-            // drp_deTelecine\r
-            // \r
-            this.drp_deTelecine.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
-            this.drp_deTelecine.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.drp_deTelecine.FormattingEnabled = true;\r
-            this.drp_deTelecine.Items.AddRange(new object[] {\r
-            "Normal (-d)",\r
-            "yadif(-d=\"1\")",\r
-            "yadif+mcdeint(-d=\"1:-1:1\")"});\r
-            this.drp_deTelecine.Location = new System.Drawing.Point(470, 205);\r
-            this.drp_deTelecine.Name = "drp_deTelecine";\r
-            this.drp_deTelecine.Size = new System.Drawing.Size(147, 21);\r
-            this.drp_deTelecine.TabIndex = 65;\r
-            this.drp_deTelecine.Text = "None";\r
-            this.ToolTip.SetToolTip(this.drp_deTelecine, "Select the subtitle language you require from this dropdown.");\r
-            // \r
             // drp_subtitle\r
             // \r
             this.drp_subtitle.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
@@ -455,17 +406,33 @@ namespace Handbrake
             this.drp_deInterlace_option.FormattingEnabled = true;\r
             this.drp_deInterlace_option.Items.AddRange(new object[] {\r
             "None",\r
-            "Origional ( Fast )",\r
-            "yadif ( Slow )",\r
-            "yadif + mcdeint ( Slower )",\r
-            "yadif + mcdeint  ( Slowest )"});\r
-            this.drp_deInterlace_option.Location = new System.Drawing.Point(470, 124);\r
+            "Origional (Fast)",\r
+            "yadif (Slow)",\r
+            "yadif + mcdeint (Slower)",\r
+            "yadif + mcdeint  (Slowest)"});\r
+            this.drp_deInterlace_option.Location = new System.Drawing.Point(467, 154);\r
             this.drp_deInterlace_option.Name = "drp_deInterlace_option";\r
-            this.drp_deInterlace_option.Size = new System.Drawing.Size(147, 21);\r
+            this.drp_deInterlace_option.Size = new System.Drawing.Size(161, 21);\r
             this.drp_deInterlace_option.TabIndex = 67;\r
             this.drp_deInterlace_option.Text = "None";\r
             this.ToolTip.SetToolTip(this.drp_deInterlace_option, "Select the subtitle language you require from this dropdown.");\r
             // \r
+            // drp_deNoise\r
+            // \r
+            this.drp_deNoise.FlatStyle = System.Windows.Forms.FlatStyle.Flat;\r
+            this.drp_deNoise.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.drp_deNoise.FormattingEnabled = true;\r
+            this.drp_deNoise.Items.AddRange(new object[] {\r
+            "None",\r
+            "Weak",\r
+            "Strong"});\r
+            this.drp_deNoise.Location = new System.Drawing.Point(467, 211);\r
+            this.drp_deNoise.Name = "drp_deNoise";\r
+            this.drp_deNoise.Size = new System.Drawing.Size(161, 21);\r
+            this.drp_deNoise.TabIndex = 72;\r
+            this.drp_deNoise.Text = "None";\r
+            this.ToolTip.SetToolTip(this.drp_deNoise, "Select the subtitle language you require from this dropdown.");\r
+            // \r
             // File_Open\r
             // \r
             this.File_Open.DefaultExt = "hb";\r
@@ -1321,14 +1288,13 @@ namespace Handbrake
             // TabPage3\r
             // \r
             this.TabPage3.BackColor = System.Drawing.SystemColors.Control;\r
-            this.TabPage3.Controls.Add(this.label25);\r
             this.TabPage3.Controls.Add(this.label24);\r
+            this.TabPage3.Controls.Add(this.drp_deNoise);\r
             this.TabPage3.Controls.Add(this.label11);\r
+            this.TabPage3.Controls.Add(this.check_deblock);\r
+            this.TabPage3.Controls.Add(this.check_detelecine);\r
             this.TabPage3.Controls.Add(this.label4);\r
             this.TabPage3.Controls.Add(this.drp_deInterlace_option);\r
-            this.TabPage3.Controls.Add(this.drp_deTelecine);\r
-            this.TabPage3.Controls.Add(this.drp_DeNoise);\r
-            this.TabPage3.Controls.Add(this.drp_deBlock);\r
             this.TabPage3.Controls.Add(this.Label37);\r
             this.TabPage3.Controls.Add(this.check_largeFile);\r
             this.TabPage3.Controls.Add(this.check_turbo);\r
@@ -1354,41 +1320,53 @@ namespace Handbrake
             this.TabPage3.Text = "Video Settings";\r
             this.TabPage3.UseVisualStyleBackColor = true;\r
             // \r
-            // label25\r
-            // \r
-            this.label25.AutoSize = true;\r
-            this.label25.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label25.Location = new System.Drawing.Point(365, 208);\r
-            this.label25.Name = "label25";\r
-            this.label25.Size = new System.Drawing.Size(72, 13);\r
-            this.label25.TabIndex = 71;\r
-            this.label25.Text = "Detelecine:";\r
-            // \r
             // label24\r
             // \r
             this.label24.AutoSize = true;\r
-            this.label24.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label24.Location = new System.Drawing.Point(365, 182);\r
+            this.label24.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Bold, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.label24.Location = new System.Drawing.Point(365, 133);\r
             this.label24.Name = "label24";\r
-            this.label24.Size = new System.Drawing.Size(58, 13);\r
-            this.label24.TabIndex = 70;\r
-            this.label24.Text = "Denoise:";\r
+            this.label24.Size = new System.Drawing.Size(109, 13);\r
+            this.label24.TabIndex = 73;\r
+            this.label24.Text = "Picture Cleanup";\r
             // \r
             // label11\r
             // \r
             this.label11.AutoSize = true;\r
             this.label11.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label11.Location = new System.Drawing.Point(365, 154);\r
+            this.label11.Location = new System.Drawing.Point(365, 214);\r
             this.label11.Name = "label11";\r
             this.label11.Size = new System.Drawing.Size(58, 13);\r
-            this.label11.TabIndex = 69;\r
-            this.label11.Text = "Deblock:";\r
+            this.label11.TabIndex = 71;\r
+            this.label11.Text = "Denoise:";\r
+            // \r
+            // check_deblock\r
+            // \r
+            this.check_deblock.AutoSize = true;\r
+            this.check_deblock.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_deblock.Location = new System.Drawing.Point(467, 186);\r
+            this.check_deblock.Name = "check_deblock";\r
+            this.check_deblock.Size = new System.Drawing.Size(72, 17);\r
+            this.check_deblock.TabIndex = 70;\r
+            this.check_deblock.Text = "Deblock";\r
+            this.check_deblock.UseVisualStyleBackColor = true;\r
+            // \r
+            // check_detelecine\r
+            // \r
+            this.check_detelecine.AutoSize = true;\r
+            this.check_detelecine.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
+            this.check_detelecine.Location = new System.Drawing.Point(368, 185);\r
+            this.check_detelecine.Name = "check_detelecine";\r
+            this.check_detelecine.Size = new System.Drawing.Size(86, 17);\r
+            this.check_detelecine.TabIndex = 69;\r
+            this.check_detelecine.Text = "Detelecine";\r
+            this.check_detelecine.UseVisualStyleBackColor = true;\r
             // \r
             // label4\r
             // \r
             this.label4.AutoSize = true;\r
             this.label4.Font = new System.Drawing.Font("Verdana", 8.25F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(0)));\r
-            this.label4.Location = new System.Drawing.Point(365, 127);\r
+            this.label4.Location = new System.Drawing.Point(365, 157);\r
             this.label4.Name = "label4";\r
             this.label4.Size = new System.Drawing.Size(77, 13);\r
             this.label4.TabIndex = 68;\r
@@ -1956,9 +1934,6 @@ namespace Handbrake
         internal System.Windows.Forms.Label Label18;\r
         internal System.Windows.Forms.ComboBox drp_audioSampleRate;\r
         internal System.Windows.Forms.TabPage TabPage3;\r
-        internal System.Windows.Forms.ComboBox drp_deTelecine;\r
-        internal System.Windows.Forms.ComboBox drp_DeNoise;\r
-        internal System.Windows.Forms.ComboBox drp_deBlock;\r
         internal System.Windows.Forms.Label Label37;\r
         internal System.Windows.Forms.CheckBox check_largeFile;\r
         internal System.Windows.Forms.CheckBox check_turbo;\r
@@ -1998,11 +1973,13 @@ namespace Handbrake
         internal System.Windows.Forms.TextBox text_left;\r
         internal System.Windows.Forms.TabControl advancedOptions;\r
         internal System.Windows.Forms.ComboBox drp_deInterlace_option;\r
-        internal System.Windows.Forms.Label label24;\r
-        internal System.Windows.Forms.Label label11;\r
         internal System.Windows.Forms.Label label4;\r
         internal System.Windows.Forms.Label Label46;\r
-        internal System.Windows.Forms.Label label25;\r
+        internal System.Windows.Forms.CheckBox check_deblock;\r
+        internal System.Windows.Forms.CheckBox check_detelecine;\r
+        internal System.Windows.Forms.Label label24;\r
+        internal System.Windows.Forms.ComboBox drp_deNoise;\r
+        internal System.Windows.Forms.Label label11;\r
 \r
     }\r
 }
\ No newline at end of file
index 7712f030ec390db016901f48424cc4171f056e28..fbe65919c21821b37e32623167150baf5d0ba1c9 100644 (file)
@@ -59,6 +59,7 @@ namespace Handbrake
             Thread.Sleep(3000);\r
             splash.Close();\r
         }\r
+\r
         public void loadUserDefaults()\r
         { \r
             try\r
@@ -97,6 +98,18 @@ namespace Handbrake
                     }\r
   \r
                     drp_deInterlace_option.Text = Properties.Settings.Default.DeInterlace;\r
+                    drp_deNoise.Text = Properties.Settings.Default.denoise;\r
+\r
+                    if (Properties.Settings.Default.detelecine == "Checked")\r
+                    {\r
+                        check_detelecine.CheckState = CheckState.Checked;\r
+                    }\r
+\r
+                    if (Properties.Settings.Default.detelecine == "Checked")\r
+                    {\r
+                        check_deblock.CheckState = CheckState.Checked;\r
+                    }\r
+\r
 \r
                     if (Properties.Settings.Default.Grayscale == "Checked")\r
                     {\r
@@ -488,6 +501,9 @@ namespace Handbrake
             Properties.Settings.Default.PixelRatio = CheckPixelRatio.CheckState.ToString();\r
             Properties.Settings.Default.turboFirstPass = check_turbo.CheckState.ToString();\r
             Properties.Settings.Default.largeFile = check_largeFile.CheckState.ToString();\r
+            Properties.Settings.Default.detelecine = check_detelecine.CheckState.ToString();\r
+            Properties.Settings.Default.denoise = drp_deNoise.Text;\r
+            Properties.Settings.Default.deblock = check_deblock.CheckState.ToString();\r
             //Audio Settings Tab\r
             Properties.Settings.Default.AudioBitrate = drp_audioBitrate.Text;\r
             Properties.Settings.Default.AudioSampleRate = drp_audioSampleRate.Text;\r
@@ -1304,16 +1320,16 @@ namespace Handbrake
                     case "None":\r
                         deinterlace = "";\r
                         break;\r
-                    case "Origional ( Fast )":\r
+                    case "Origional (Fast)":\r
                         deinterlace = " --deinterlace";\r
                         break;\r
-                    case "yadif ( Slow )":\r
+                    case "yadif (Slow)":\r
                         deinterlace = " --deinterlace=" + '"' + "1" + '"';\r
                         break;\r
-                    case "yadif + mcdeint ( Slower )":\r
-                        deinterlace = " -" + '"' + "1:-1:1" + '"';\r
+                    case "yadif + mcdeint (Slower)":\r
+                        deinterlace = " --deinterlace=" + '"' + "1:-1:1" + '"';\r
                         break;\r
-                    case "yadif + mcdeint  ( Slowest )":\r
+                    case "yadif + mcdeint (Slowest)":\r
                         deinterlace = " --deinterlace=" + '"' + "3:-1:2" + '"';\r
                         break;\r
                     default:\r
@@ -1343,6 +1359,9 @@ namespace Handbrake
             string videoFramerate = drp_videoFramerate.Text;\r
             string turboH264 = "";\r
             string largeFile = "";\r
+            string deblock = "";\r
+            string detelecine = "";\r
+            string denoise = "";\r
 \r
             if (videoBitrate !=  "")\r
                 videoBitrate = " -b "+ videoBitrate;\r
@@ -1379,16 +1398,29 @@ namespace Handbrake
             if (check_largeFile.Checked)\r
                 largeFile = " -4 ";\r
 \r
-            /*\r
-             * -7, --deblock           Deblock video with pp7 filter\r
-             * <QP:M>            (default 0:2)\r
-             * -8, --denoise           Denoise video with hqdn3d filter\r
-             * <SL:SC:TL:TC>     (default 4:3:6:4.5)\r
-             * -9, --detelecine        Detelecine video with pullup filter\r
-             * <L:R:T:B:SB:MP>   (default 1:1:4:4:0:0)\r
-             */\r
+            if (check_deblock.Checked)\r
+                deblock = " --deblock";\r
+\r
+            if (check_detelecine.Checked)\r
+                detelecine = " --detelecine";\r
 \r
-            string queryVideoSettings = videoBitrate + videoFilesize + vidQSetting + twoPassEncoding  + videoFramerate + turboH264 + largeFile;\r
+            switch (drp_deNoise.Text)\r
+            {\r
+                case "None":\r
+                    denoise = "";\r
+                    break;\r
+                case "Weak":\r
+                    denoise = " --denoise=3:2:3:3";\r
+                    break;\r
+                case "Strong":\r
+                    denoise = " --denoise=7:7:5:5";\r
+                    break;\r
+                default:\r
+                    denoise = "";\r
+                    break;\r
+            }\r
+\r
+            string queryVideoSettings = videoBitrate + videoFilesize + vidQSetting + twoPassEncoding + videoFramerate + turboH264 + largeFile + deblock + detelecine + denoise;\r
             // ----------------------------------------------------------------------\r
 \r
             // Audio Settings Tab\r
@@ -1492,7 +1524,6 @@ namespace Handbrake
             return querySource+ queryDestination+ queryPictureSettings+ queryVideoSettings+ h264Settings+ queryAudioSettings+ queryAdvancedSettings+ verbose;\r
         }\r
 \r
-\r
         // This is the END of the road ------------------------------------------------------------------------------\r
     }\r
 }
\ No newline at end of file