]> granicus.if.org Git - handbrake/commitdiff
Improving the Deinterlace / Decomb Filters Tab UI. Now uses the same "presets /...
authorScott <sr55.hb@outlook.com>
Sat, 24 Oct 2015 21:34:31 +0000 (22:34 +0100)
committerScott <sr55.hb@outlook.com>
Sat, 24 Oct 2015 21:34:31 +0000 (22:34 +0100)
12 files changed:
win/CS/HandBrake.ApplicationServices/HandBrake.ApplicationServices.csproj
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Decomb.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs
win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs [new file with mode: 0644]
win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.Designer.cs
win/CS/HandBrakeWPF/Properties/ResourcesUI.resx
win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs
win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
win/CS/HandBrakeWPF/Views/FiltersView.xaml

index 1a99efd1d0ca06d398db30f2ae9d4021a072fbd7..16afa531b29669f99fa94ffed7d52cdb7284aafe 100644 (file)
     <Compile Include="Interop\Json\Encode\SubtitleTrack.cs" />\r
     <Compile Include="Interop\Json\Encode\Video.cs" />\r
     <Compile Include="Interop\Factories\AnamorphicFactory.cs" />\r
+    <Compile Include="Interop\Model\Encoding\DeinterlaceFilter.cs" />\r
     <Compile Include="Properties\AssemblyInfo.cs" />\r
     <Compile Include="Interop\Json\Scan\SourceAudioTrack.cs" />\r
     <Compile Include="Interop\Json\Scan\SourceChapter.cs" />\r
index 58e1003e3b7b073463dcaaf2c18ef34cf815c2fe..eab94ef2a4441a8dea80172884b0082cc5bcb555 100644 (file)
@@ -16,19 +16,16 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// </summary>\r
     public enum Decomb\r
     {\r
-        [ShortName("off")]\r
-        Off = 0,\r
-\r
         [ShortName("default")]\r
-        Default = 2,\r
+        Default,\r
 \r
         [ShortName("fast")]\r
-        Fast = 3,\r
+        Fast,\r
 \r
         [ShortName("bob")]\r
-        Bob = 4,\r
+        Bob,\r
 \r
         [ShortName("custom")]\r
-        Custom = 1\r
+        Custom \r
     }\r
 }\r
index f7b8f0a42370312ba36044a5ba573089b0e171ba..e8da9304346eea3a8fa8fcdadc4f50be1e9b64af 100644 (file)
@@ -16,22 +16,19 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding
     /// </summary>\r
     public enum Deinterlace\r
     {\r
-        [ShortName("off")]\r
-        Off = 0,\r
-\r
         [ShortName("fast")]\r
-        Fast = 2,\r
+        Fast,\r
 \r
         [ShortName("slow")]\r
-        Slow = 3,\r
+        Slow,\r
 \r
         [ShortName("slower")]\r
-        Slower = 4,\r
+        Slower,\r
 \r
         [ShortName("bob")]\r
-        Bob = 5,\r
+        Bob,\r
 \r
         [ShortName("custom")]\r
-        Custom = 1\r
+        Custom\r
     }\r
 }\r
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs
new file mode 100644 (file)
index 0000000..27e8f44
--- /dev/null
@@ -0,0 +1,28 @@
+// --------------------------------------------------------------------------------------------------------------------
+// <copyright file="Deinterlace.cs" company="HandBrake Project (http://handbrake.fr)">
+//   This file is part of the HandBrake source code - It may be used under the terms of the GNU General Public License.
+// </copyright>
+// <summary>
+//   Defines the Deinterlace type.
+// </summary>
+// --------------------------------------------------------------------------------------------------------------------
+
+namespace HandBrake.ApplicationServices.Interop.Model.Encoding
+{
+    using HandBrake.ApplicationServices.Attributes;
+
+    /// <summary>
+    /// The deinterlace.
+    /// </summary>
+    public enum DeinterlaceFilter
+    {
+        [ShortName("off")]
+        Off = 0,
+
+        [ShortName("Deinterlace")]
+        Deinterlace = 1,
+
+        [ShortName("Decomb")]
+        Decomb = 2
+    }
+}
index 2f92db92cc2bd0be8f081ad2a51dcbd874f3a5f0..b154c4dce610eed5f8d661af71a5c60d642f0d6b 100644 (file)
@@ -91,6 +91,10 @@ namespace HandBrakeWPF.Converters
             {\r
                 return EnumHelper<OutputFormat>.GetEnumDisplayValues(typeof(OutputFormat));\r
             }\r
+            if (value is IEnumerable<DeinterlaceFilter>)\r
+            {\r
+                return EnumHelper<DeinterlaceFilter>.GetEnumDisplayValues(typeof(DeinterlaceFilter));\r
+            }\r
 \r
             // Single Items\r
             if (targetType == typeof(VideoEncoder) || value.GetType() == typeof(VideoEncoder))\r
@@ -136,7 +140,12 @@ namespace HandBrakeWPF.Converters
             {\r
                 return EnumHelper<OutputFormat>.GetDisplay((OutputFormat)value);\r
             }\r
\r
+\r
+            if (targetType == typeof(DeinterlaceFilter) || value.GetType() == typeof(DeinterlaceFilter))\r
+            {\r
+                return EnumHelper<DeinterlaceFilter>.GetDisplay((DeinterlaceFilter)value);\r
+            }\r
+\r
             return null;\r
         }\r
 \r
@@ -201,6 +210,11 @@ namespace HandBrakeWPF.Converters
                 return EnumHelper<OutputFormat>.GetValue(value.ToString());\r
             }\r
 \r
+            if (targetType == typeof(DeinterlaceFilter) || value.GetType() == typeof(DeinterlaceFilter))\r
+            {\r
+                return EnumHelper<DeinterlaceFilter>.GetValue(value.ToString());\r
+            }\r
+\r
             return null;\r
         }\r
     }\r
index 10afa9c83baffc020ef6715309dcd7c2cb9a8a10..3bfe5da97c40a25cad88dad60582388d9e9a0675 100644 (file)
@@ -412,7 +412,7 @@ namespace HandBrakeWPF.Properties {
         }\r
         \r
         /// <summary>\r
-        ///   Looks up a localized string similar to Deinterlace.\r
+        ///   Looks up a localized string similar to Deinterlace:.\r
         /// </summary>\r
         public static string FiltersView_Deinterlace {\r
             get {\r
index 2d9793240ef5c6a92f28fad54d40299ea800ba0d..1a5da42c9d391002a2355967764a2e22519150c2 100644 (file)
     <value>Decomb</value>\r
   </data>\r
   <data name="FiltersView_Deinterlace" xml:space="preserve">\r
-    <value>Deinterlace</value>\r
+    <value>Deinterlace:</value>\r
   </data>\r
   <data name="FiltersView_Denoise" xml:space="preserve">\r
     <value>Denoise:</value>\r
index 31688c3342777ca49718dc1a03025abd9315a968..80873c5109e7ae9dea26ef96a4fe5f486ccd170e 100644 (file)
@@ -406,7 +406,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
             }
 
             // Decomb
-            if (job.Decomb != Decomb.Off)
+            if (job.DeinterlaceFilter == DeinterlaceFilter.Decomb)
             {
                 string options;
                 if (job.Decomb == Decomb.Fast)
@@ -427,7 +427,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
             }
 
             // Deinterlace
-            if (job.Deinterlace != Deinterlace.Off)
+            if (job.DeinterlaceFilter == DeinterlaceFilter.Deinterlace)
             {
                 string options;
                 if (job.Deinterlace == Deinterlace.Fast)
index f4d5a988ef2c9f0b92cda8bcc4364f0689a8fb70..8d7440f06420f2883bce2d5572fdcfc01b4eaedd 100644 (file)
@@ -99,6 +99,7 @@ namespace HandBrakeWPF.Services.Encode.Model
             this.Deblock = task.Deblock;
             this.Decomb = task.Decomb;
             this.Deinterlace = task.Deinterlace;
+            this.DeinterlaceFilter = task.DeinterlaceFilter;
             this.Denoise = task.Denoise;
             this.DenoisePreset = task.DenoisePreset;
             this.DenoiseTune = task.DenoiseTune;
@@ -277,6 +278,11 @@ namespace HandBrakeWPF.Services.Encode.Model
 
         #region Filters
 
+        /// <summary>
+        /// Gets or sets Deinterlace Filter Mode
+        /// </summary>
+        public DeinterlaceFilter DeinterlaceFilter { get; set; }
+
         /// <summary>
         /// Gets or sets Deinterlace.
         /// </summary>
index 2a5a8d4aae8e2735071d0f681a6c7bafae28433b..52c0c6e993f49fc9b45fd080cd08b24e68bc3ce2 100644 (file)
@@ -101,19 +101,22 @@ namespace HandBrakeWPF.Services.Presets.Factories
             {\r
                 case "decomb":\r
                     preset.Task.Decomb = Decomb.Default;\r
-                    preset.Task.Deinterlace = Deinterlace.Off;\r
+                    preset.Task.Deinterlace = Deinterlace.Fast;\r
+                    preset.Task.DeinterlaceFilter = DeinterlaceFilter.Decomb;\r
                     break;\r
                 case "deinterlace":\r
-                    preset.Task.Decomb = Decomb.Off;\r
+                    preset.Task.Decomb = Decomb.Default;\r
                     preset.Task.Deinterlace = Deinterlace.Fast;\r
+                    preset.Task.DeinterlaceFilter = DeinterlaceFilter.Deinterlace;\r
                     break;\r
                 default:\r
-                    preset.Task.Decomb = Decomb.Off;\r
-                    preset.Task.Deinterlace = Deinterlace.Off;\r
+                    preset.Task.Decomb = Decomb.Default;\r
+                    preset.Task.Deinterlace = Deinterlace.Fast;\r
+                    preset.Task.DeinterlaceFilter = DeinterlaceFilter.Off;\r
                     break;\r
             }\r
 \r
-            if (preset.Task.Decomb != Decomb.Off)\r
+            if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb)\r
             {\r
                 switch (importedPreset.PictureDeinterlaceFilter)\r
                 {\r
@@ -140,7 +143,7 @@ namespace HandBrakeWPF.Services.Presets.Factories
                 }\r
             }\r
 \r
-            if (preset.Task.Deinterlace != Deinterlace.Off)\r
+            if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace)\r
             {\r
                 switch (importedPreset.PictureDeinterlaceFilter)\r
                 {\r
@@ -533,9 +536,15 @@ namespace HandBrakeWPF.Services.Presets.Factories
 \r
             // Filters\r
             preset.PictureDeblock = export.Task.Deblock;\r
-            preset.PictureDeinterlaceFilter = export.Task.Decomb != Decomb.Off ? "decomb" : export.Task.Deinterlace != Deinterlace.Off ? "deinterlace" : "off";  \r
-            preset.PictureDeinterlacePreset = export.Task.Decomb != Decomb.Off ? EnumHelper<Decomb>.GetShortName(export.Task.Decomb) : export.Task.Deinterlace != Deinterlace.Off ? EnumHelper<Deinterlace>.GetShortName(export.Task.Deinterlace) : string.Empty;\r
-            preset.PictureDeinterlaceCustom = export.Task.Decomb != Decomb.Off ? export.Task.CustomDecomb : export.Task.Deinterlace != Deinterlace.Off ? export.Task.CustomDeinterlace : string.Empty;\r
+            preset.PictureDeinterlaceFilter = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb \r
+                ? "decomb" \r
+                : export.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace ? "deinterlace" : "off";  \r
+            preset.PictureDeinterlacePreset = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb \r
+                ? EnumHelper<Decomb>.GetShortName(export.Task.Decomb) \r
+                : export.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace ? EnumHelper<Deinterlace>.GetShortName(export.Task.Deinterlace) : string.Empty;\r
+            preset.PictureDeinterlaceCustom = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb \r
+                ? export.Task.CustomDecomb \r
+                : export.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace ? export.Task.CustomDeinterlace : string.Empty;\r
             preset.PictureDeinterlaceCustom = export.Task.CustomDeinterlace;\r
             preset.PictureDenoiseCustom = export.Task.CustomDenoise;\r
             preset.PictureDenoiseFilter = EnumHelper<Denoise>.GetShortName(export.Task.Denoise);\r
index 8810c65d9f8d8b0febf25cb1f1e7f3bbf526b238..f136035abb54794cb5147a80afd41d3cafb23b53 100644 (file)
@@ -32,10 +32,7 @@ namespace HandBrakeWPF.ViewModels
     /// </summary>\r
     public class FiltersViewModel : ViewModelBase, IFiltersViewModel\r
     {\r
-        /// <summary>\r
-        /// The is deinterlace mode.\r
-        /// </summary>\r
-        private bool isDeinterlaceMode;\r
+        private DeinterlaceFilter deinterlaceFilter;\r
 \r
         #region Constructors and Destructors\r
 \r
@@ -52,7 +49,7 @@ namespace HandBrakeWPF.ViewModels
         {\r
             this.CurrentTask = new EncodeTask();\r
             this.DeblockValue = 4; // OFF\r
-            this.IsDeinterlaceMode = true;\r
+            this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;\r
         }\r
 \r
         #endregion\r
@@ -205,6 +202,17 @@ namespace HandBrakeWPF.ViewModels
             }\r
         }\r
 \r
+        /// <summary>\r
+        /// Gets DeinterlaceFilterOptions.\r
+        /// </summary>\r
+        public IEnumerable<DeinterlaceFilter> DeinterlaceFilterOptions\r
+        {\r
+            get\r
+            {\r
+                return EnumHelper<DeinterlaceFilter>.GetEnumList();\r
+            }\r
+        }\r
+\r
         /// <summary>\r
         /// Gets or sets a value indicating whether Grayscale.\r
         /// </summary>\r
@@ -235,23 +243,14 @@ namespace HandBrakeWPF.ViewModels
             set\r
             {\r
                 this.CurrentTask.Deinterlace = value;\r
-                if (this.CurrentTask.Deinterlace != Deinterlace.Off)\r
-                {\r
-                    this.SelectedDecomb = Decomb.Off;\r
-                }\r
-\r
                 this.NotifyOfPropertyChange(() => this.SelectedDeInterlace);\r
 \r
                 if (value != Deinterlace.Custom) this.CustomDeinterlace = string.Empty;\r
 \r
                 // Show / Hide the Custom Control\r
-                this.ShowDeinterlaceCustom = this.CurrentTask.Deinterlace == Deinterlace.Custom;\r
+                this.NotifyOfPropertyChange(() => this.ShowDecombCustom);\r
                 this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);\r
-\r
-                if (value != Deinterlace.Off)\r
-                {\r
-                    this.IsDeinterlaceMode = true;\r
-                }\r
+                this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);\r
             }\r
         }\r
 \r
@@ -268,23 +267,14 @@ namespace HandBrakeWPF.ViewModels
             set\r
             {\r
                 this.CurrentTask.Decomb = value;\r
-                if (this.CurrentTask.Decomb != Decomb.Off)\r
-                {\r
-                    this.SelectedDeInterlace = Deinterlace.Off;\r
-                }\r
-\r
                 this.NotifyOfPropertyChange(() => this.SelectedDecomb);\r
 \r
                 if (value != Decomb.Custom) this.CustomDecomb = string.Empty;\r
 \r
                 // Show / Hide the Custom Control\r
-                this.ShowDecombCustom = this.CurrentTask.Decomb == Decomb.Custom;\r
                 this.NotifyOfPropertyChange(() => this.ShowDecombCustom);\r
-\r
-                if (value != Decomb.Off)\r
-                {\r
-                    this.IsDeinterlaceMode = false;\r
-                }\r
+                this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);\r
+                this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);\r
             }\r
         }\r
 \r
@@ -339,12 +329,17 @@ namespace HandBrakeWPF.ViewModels
         /// <summary>\r
         /// Gets or sets a value indicating whether ShowDecombCustom.\r
         /// </summary>\r
-        public bool ShowDecombCustom { get; set; }\r
+        public bool ShowDecombCustom => this.SelectedDeinterlaceFilter == DeinterlaceFilter.Decomb && this.SelectedDecomb == Decomb.Custom;\r
+\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether ShowDeinterlaceDecombCustom.\r
+        /// </summary>\r
+        public bool ShowDeinterlaceDecombCustom => (this.SelectedDeinterlaceFilter == DeinterlaceFilter.Decomb && this.SelectedDecomb == Decomb.Custom) || (this.SelectedDeinterlaceFilter == DeinterlaceFilter.Deinterlace && this.SelectedDeInterlace == Deinterlace.Custom);\r
 \r
         /// <summary>\r
         /// Gets or sets a value indicating whether ShowDelelecineCustom.\r
         /// </summary>\r
-        public bool ShowDeinterlaceCustom { get; set; }\r
+        public bool ShowDeinterlaceCustom => this.SelectedDeinterlaceFilter == DeinterlaceFilter.Deinterlace && this.SelectedDeInterlace == Deinterlace.Custom;\r
 \r
         /// <summary>\r
         /// Gets or sets a value indicating whether ShowDenoiseCustom.\r
@@ -357,41 +352,64 @@ namespace HandBrakeWPF.ViewModels
         public bool ShowDetelecineCustom { get; set; }\r
 \r
         /// <summary>\r
-        /// Gets or sets a value indicating whether is deinterlace mode.\r
+        /// Gets or sets the selected deinterlace filter mode.\r
         /// </summary>\r
-        public bool IsDeinterlaceMode\r
+        public DeinterlaceFilter SelectedDeinterlaceFilter\r
         {\r
             get\r
             {\r
-                return this.isDeinterlaceMode;\r
+                return this.deinterlaceFilter;\r
             }\r
             set\r
             {\r
-                if (!Equals(this.isDeinterlaceMode, value))\r
+                if (value == this.deinterlaceFilter)\r
                 {\r
-                    this.isDeinterlaceMode = value;\r
-                    this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);\r
-\r
-                    this.DeinterlaceControlText = value ? "Deinterlace:" : "Decomb:";\r
+                    return;\r
+                }\r
 \r
-                    if (value)\r
-                    {\r
-                        this.SelectedDecomb = Decomb.Off;\r
-                    }\r
-                    else\r
-                    {\r
-                        this.SelectedDeInterlace = Deinterlace.Off;\r
-                    }\r
+                this.deinterlaceFilter = value;\r
+                this.CurrentTask.DeinterlaceFilter = value;\r
 \r
-                    this.NotifyOfPropertyChange(() => this.DeinterlaceControlText);\r
+                if (this.deinterlaceFilter == DeinterlaceFilter.Deinterlace)\r
+                {\r
+                    this.IsDeinterlaceMode = true;\r
+                    this.IsDecombMode = false;\r
+                }\r
+                else if (this.deinterlaceFilter == DeinterlaceFilter.Decomb)\r
+                {\r
+                    this.IsDeinterlaceMode = false;\r
+                    this.IsDecombMode = true;\r
+                }\r
+                else\r
+                {\r
+                    this.IsDeinterlaceMode = false;\r
+                    this.IsDecombMode = false;\r
                 }\r
+\r
+                this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);\r
+                this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);\r
+                this.NotifyOfPropertyChange(() => this.IsDecombMode);\r
+                this.NotifyOfPropertyChange(() => this.IsDeinterlaceDecomb);\r
+                this.NotifyOfPropertyChange(() => this.ShowDecombCustom);\r
+                this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);\r
+                this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);\r
             }\r
         }\r
 \r
         /// <summary>\r
-        /// Gets or sets the deinterlace control text.\r
+        /// Gets or sets a value indicating whether is deinterlace mode.\r
+        /// </summary>\r
+        public bool IsDeinterlaceMode { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether is decomb mode.\r
         /// </summary>\r
-        public string DeinterlaceControlText { get; set; }\r
+        public bool IsDecombMode { get; set; }\r
+\r
+        /// <summary>\r
+        /// Gets or sets a value indicating whether is deinterlace or decomb mode.\r
+        /// </summary>\r
+        public bool IsDeinterlaceDecomb => this.SelectedDeinterlaceFilter != DeinterlaceFilter.Off;\r
 \r
         /// <summary>\r
         /// Gets or sets the selected denoise tune.\r
@@ -501,9 +519,24 @@ namespace HandBrakeWPF.ViewModels
             {\r
                 // Properties\r
                 this.SelectedDenoise = preset.Task.Denoise;\r
+                this.SelectedDetelecine = preset.Task.Detelecine;\r
+\r
                 this.SelectedDecomb = preset.Task.Decomb;\r
                 this.SelectedDeInterlace = preset.Task.Deinterlace;\r
-                this.SelectedDetelecine = preset.Task.Detelecine;\r
+                if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace)\r
+                {\r
+                    this.SelectedDeinterlaceFilter = DeinterlaceFilter.Deinterlace;\r
+                }\r
+                else if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb)\r
+                {\r
+                    this.SelectedDeinterlaceFilter = DeinterlaceFilter.Decomb;\r
+                }\r
+                else \r
+                {\r
+                    this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;\r
+                }\r
+\r
+\r
                 this.Grayscale = preset.Task.Grayscale;\r
                 this.DeblockValue = preset.Task.Deblock == 0 ? 4 : preset.Task.Deblock;\r
                 this.SelectedDenoisePreset = preset.Task.DenoisePreset;\r
@@ -519,8 +552,8 @@ namespace HandBrakeWPF.ViewModels
             {\r
                 // Default everything to off\r
                 this.SelectedDenoise = Denoise.Off;\r
-                this.SelectedDecomb = Decomb.Off;\r
-                this.SelectedDeInterlace = Deinterlace.Off;\r
+                this.SelectedDecomb = Decomb.Default;\r
+                this.SelectedDeInterlace = Deinterlace.Fast;\r
                 this.SelectedDetelecine = Detelecine.Off;\r
                 this.Grayscale = false;\r
                 this.DeblockValue = 0;\r
@@ -548,6 +581,11 @@ namespace HandBrakeWPF.ViewModels
             this.NotifyOfPropertyChange(() => this.CustomDeinterlace);\r
             this.NotifyOfPropertyChange(() => this.CustomDetelecine);\r
             this.NotifyOfPropertyChange(() => this.CustomDenoise);\r
+\r
+            this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);\r
+            this.NotifyOfPropertyChange(() => this.IsDecombMode);\r
+            this.NotifyOfPropertyChange(() => this.IsDeinterlaceDecomb);\r
+\r
         }\r
 \r
         /// <summary>\r
index 471d4104977a47876e8e82d220b5688f5a59d372..edacca2050226ba7d2e1bcabce12536b5c69abbc 100644 (file)
@@ -45,6 +45,7 @@
                     <ColumnDefinition Width="Auto" />\r
                 </Grid.ColumnDefinitions>\r
 \r
+                <!-- Detelecine -->\r
                 <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Detelecine}" Grid.Row="0" Grid.Column="0" Margin="0,0,0,10" />\r
                 <ComboBox Width="120" Grid.Row="0" ItemsSource="{Binding DetelecineOptions, Converter={StaticResource boolComboConverter}}" \r
                           SelectedItem="{Binding SelectedDetelecine, Converter={StaticResource boolComboConverter}}" Grid.Column="1" Margin="0,0,0,10"\r
                 <TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left"\r
                          Visibility="{Binding ShowDetelecineCustom, Converter={StaticResource boolToVisConverter}}"/>\r
 \r
-                <TextBlock Text="{Binding DeinterlaceControlText}" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10" VerticalAlignment="Top"/>\r
+                <!-- Deinterlace -->\r
+                <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Deinterlace}" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10" />\r
                 <StackPanel Grid.Row="1" Grid.Column="1" >\r
-                    <StackPanel Orientation="Horizontal">\r
-                        <RadioButton GroupName="Interlace" Content="{x:Static Properties:ResourcesUI.FiltersView_Deinterlace}" IsChecked="{Binding IsDeinterlaceMode}" \r
-                                     ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DecombDeinterlace}" />\r
-                        <RadioButton GroupName="Interlace" Content="{x:Static Properties:ResourcesUI.FiltersView_Decomb}" Margin="10,0,0,0" IsChecked="{Binding IsDeinterlaceMode, Converter={StaticResource inverseBooleanConverter}}"\r
-                                     ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DecombDeinterlace}"/>\r
-                    </StackPanel>\r
-\r
-                    <ComboBox Width="120" ItemsSource="{Binding DecombOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left"\r
-                          SelectedItem="{Binding SelectedDecomb, Converter={StaticResource boolComboConverter}}" Margin="0,0,0,10"\r
-                          Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}, ConverterParameter=True}"    />\r
 \r
-                    <ComboBox Width="120" ItemsSource="{Binding DeInterlaceOptions, Converter={StaticResource boolComboConverter}}"  HorizontalAlignment="Left"\r
-                          SelectedItem="{Binding SelectedDeInterlace, Converter={StaticResource boolComboConverter}}" Margin="0,0,0,10"\r
-                              Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}}" />\r
+                    <ComboBox Width="120" ItemsSource="{Binding DeinterlaceFilterOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left"\r
+                          SelectedItem="{Binding SelectedDeinterlaceFilter, Converter={StaticResource boolComboConverter}}" Margin="0,0,0,10"  />\r
+                    \r
                 </StackPanel>\r
 \r
-                <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDecomb, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" HorizontalAlignment="Left"\r
-                         Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" />\r
+                <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="2">\r
+                    <TextBlock Text="Preset:" VerticalAlignment="Center" Margin="0,0,5,10" Visibility="{Binding IsDeinterlaceDecomb, Converter={StaticResource boolToVisConverter}}"  />\r
+                    <ComboBox Width="120" ItemsSource="{Binding DecombOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"\r
+                              SelectedItem="{Binding SelectedDecomb, Converter={StaticResource boolComboConverter}}"\r
+                              Visibility="{Binding IsDecombMode, Converter={StaticResource boolToVisConverter}}" Margin="0,0,0,10"     />\r
+\r
+                    <ComboBox Width="120" ItemsSource="{Binding DeInterlaceOptions, Converter={StaticResource boolComboConverter}}"  HorizontalAlignment="Left" VerticalAlignment="Center"\r
+                              SelectedItem="{Binding SelectedDeInterlace, Converter={StaticResource boolComboConverter}}"\r
+                              Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}}" Margin="0,0,0,10"   />\r
+\r
+                    <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="5,0,5,10" Visibility="{Binding ShowDeinterlaceDecombCustom, Converter={StaticResource boolToVisConverter}}" />\r
+                    <TextBox Width="120" Text="{Binding CustomDecomb, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"\r
+                             Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" Margin="0,0,0,10"  />\r
+\r
+                    <TextBox Width="120" Text="{Binding CustomDeinterlace, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"\r
+                             Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" Margin="0,0,0,10"  />\r
+                </StackPanel>\r
 \r
-                <TextBox Width="120" Grid.Row="1" Grid.Column="2" Text="{Binding CustomDeinterlace, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Top" HorizontalAlignment="Left"\r
-                         Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" />\r
+              \r
 \r
+                \r
+                <!-- Denoise -->\r
                 <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Denoise}" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>\r
                 <ComboBox Width="120" Grid.Row="3" ItemsSource="{Binding DenoiseOptions, Converter={StaticResource boolComboConverter}}" \r
                           SelectedItem="{Binding SelectedDenoise, Converter={StaticResource boolComboConverter}}" Grid.Column="1"\r
@@ -84,7 +92,7 @@
 \r
                 <StackPanel Orientation="Horizontal" VerticalAlignment="Center" Grid.Row="3" Grid.Column="2" Margin="0,0,0,10" \r
                             Visibility="{Binding ShowDenoiseOptions, Converter={StaticResource boolToVisConverter}}">\r
-                    <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Preset}" Margin="5,0,5,0" />\r
+                    <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Preset}" Margin="0,0,5,0" />\r
                     <ComboBox SelectedItem="{Binding SelectedDenoisePreset}" \r
                               MinWidth="100"  HorizontalAlignment="Center" VerticalAlignment="Center">\r
                         <ComboBox.ItemsSource>\r