summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorsr55 <[email protected]>2018-07-08 18:23:50 +0100
committersr55 <[email protected]>2018-07-08 18:23:50 +0100
commite3a2f723adc662f1ba5707cdeeea62449c70fd7d (patch)
tree4441e761ff13613831d0fafb93dc75747d239852
parente8c7818b83befe3a3e2fad73c61041b16d8d0055 (diff)
WinGui: Simplify the Deinterlace / Decomb / Interlace Detection Tab and associated code. Tweak the layout of the deinterlace controls to match the Mac/Linux UI's. Pull Presets from libhb.
-rw-r--r--win/CS/HandBrake.Interop/HandBrake.Interop.csproj6
-rw-r--r--win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs34
-rw-r--r--win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs31
-rw-r--r--win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs46
-rw-r--r--win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs24
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs4
-rw-r--r--win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs20
-rw-r--r--win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs71
-rw-r--r--win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs362
-rw-r--r--win/CS/HandBrakeWPF/Views/FiltersView.xaml73
10 files changed, 179 insertions, 492 deletions
diff --git a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
index f7e9aa9b6..f279c9123 100644
--- a/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
+++ b/win/CS/HandBrake.Interop/HandBrake.Interop.csproj
@@ -114,6 +114,8 @@
<Compile Include="Interop\Json\State\TaskState.cs" />
<Compile Include="Interop\Model\Encoding\CombDetect.cs" />
<Compile Include="Interop\Model\Encoding\DeinterlaceFilter.cs" />
+ <Compile Include="Interop\Model\Encoding\Denoise.cs" />
+ <Compile Include="Interop\Model\Encoding\Detelecine.cs" />
<Compile Include="Interop\Model\Encoding\HBPresetTune.cs" />
<Compile Include="Interop\Model\Encoding\Sharpen.cs" />
<Compile Include="Interop\Model\Preview\RawPreviewData.cs" />
@@ -136,10 +138,6 @@
<Compile Include="Interop\Model\Cropping.cs" />
<Compile Include="Interop\Model\Encoding\Anamorphic.cs" />
<Compile Include="Interop\Model\Encoding\Container.cs" />
- <Compile Include="Interop\Model\Encoding\Decomb.cs" />
- <Compile Include="Interop\Model\Encoding\Deinterlace.cs" />
- <Compile Include="Interop\Model\Encoding\Denoise.cs" />
- <Compile Include="Interop\Model\Encoding\Detelecine.cs" />
<Compile Include="Interop\Model\Encoding\HBAudioEncoder.cs" />
<Compile Include="Interop\Model\Encoding\HBContainer.cs" />
<Compile Include="Interop\Model\Encoding\HBMixdown.cs" />
diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs
deleted file mode 100644
index 1fe70b421..000000000
--- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Decomb.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <copyright file="Decomb.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 Decomb type.
-// </summary>
-// --------------------------------------------------------------------------------------------------------------------
-
-namespace HandBrake.Interop.Interop.Model.Encoding
-{
- using HandBrake.Interop.Attributes;
-
- /// <summary>
- /// The decomb.
- /// </summary>
- public enum Decomb
- {
- [ShortName("default")]
- Default,
-
- [ShortName("bob")]
- Bob,
-
- [ShortName("custom")]
- Custom,
-
- [ShortName("eedi2")]
- EEDI2,
-
- [ShortName("eedi2bob")]
- EEDI2Bob
- }
-}
diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs
deleted file mode 100644
index 07c519a35..000000000
--- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/Deinterlace.cs
+++ /dev/null
@@ -1,31 +0,0 @@
-// --------------------------------------------------------------------------------------------------------------------
-// <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.Interop.Interop.Model.Encoding
-{
- using HandBrake.Interop.Attributes;
-
- /// <summary>
- /// The deinterlace.
- /// </summary>
- public enum Deinterlace
- {
- [ShortName("custom")]
- Custom,
-
- [ShortName("default")]
- Default,
-
- [ShortName("skip-spatial")]
- SkipSpatialCheck,
-
- [ShortName("bob")]
- Bob
- }
-}
diff --git a/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs b/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs
index 2954128d7..8f62b30ac 100644
--- a/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs
+++ b/win/CS/HandBrake.Interop/Interop/Model/Encoding/HBPresetTune.cs
@@ -3,40 +3,44 @@
// 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 HBPresetTune type.
+// An object represetning the key and name of a Filter Preset or Tune option.
// </summary>
// --------------------------------------------------------------------------------------------------------------------
namespace HandBrake.Interop.Interop.Model.Encoding
{
- /// <summary>
- /// The hb preset tune.
- /// </summary>
public class HBPresetTune
{
- /// <summary>
- /// Initializes a new instance of the <see cref="HBPresetTune"/> class.
- /// </summary>
- /// <param name="name">
- /// The name.
- /// </param>
- /// <param name="shortName">
- /// The short Name.
- /// </param>
+ public HBPresetTune()
+ {
+ }
+
public HBPresetTune(string name, string shortName)
{
this.Name = name;
this.ShortName = shortName;
}
- /// <summary>
- /// Gets the name.
- /// </summary>
- public string Name { get; private set; }
+ public string Name { get; set; }
+
+ public string ShortName { get; set; }
+
+ public override bool Equals(object obj)
+ {
+ if (ReferenceEquals(null, obj)) return false;
+ if (ReferenceEquals(this, obj)) return true;
+ if (obj.GetType() != this.GetType()) return false;
+ return this.Equals((HBPresetTune)obj);
+ }
+
+ public override int GetHashCode()
+ {
+ return this.ShortName != null ? this.ShortName.GetHashCode() : 0;
+ }
- /// <summary>
- /// Gets the short name.
- /// </summary>
- public string ShortName { get; private set; }
+ protected bool Equals(HBPresetTune other)
+ {
+ return string.Equals(this.ShortName, other.ShortName);
+ }
}
}
diff --git a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
index ff6f71156..644417b26 100644
--- a/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
+++ b/win/CS/HandBrakeWPF/Converters/EnumComboConverter.cs
@@ -59,14 +59,6 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<PresetPictureSettingsMode>.GetEnumDisplayValues(typeof(PresetPictureSettingsMode));
}
- if (value is IEnumerable<Decomb>)
- {
- return EnumHelper<Decomb>.GetEnumDisplayValues(typeof(Decomb));
- }
- if (value is IEnumerable<Deinterlace>)
- {
- return EnumHelper<Deinterlace>.GetEnumDisplayValues(typeof(Deinterlace));
- }
if (value is IEnumerable<Detelecine>)
{
return EnumHelper<Detelecine>.GetEnumDisplayValues(typeof(Detelecine));
@@ -105,18 +97,10 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<PresetPictureSettingsMode>.GetDisplay((PresetPictureSettingsMode)value);
}
- if (targetType == typeof(Deinterlace) || value.GetType() == typeof(Deinterlace))
- {
- return EnumHelper<Deinterlace>.GetDisplay((Deinterlace)value);
- }
if (targetType == typeof(Detelecine) || value.GetType() == typeof(Detelecine))
{
return EnumHelper<Detelecine>.GetDisplay((Detelecine)value);
}
- if (targetType == typeof(Decomb) || value.GetType() == typeof(Decomb))
- {
- return EnumHelper<Decomb>.GetDisplay((Decomb)value);
- }
if (targetType == typeof(Denoise) || value.GetType() == typeof(Denoise))
{
return EnumHelper<Denoise>.GetDisplay((Denoise)value);
@@ -187,14 +171,6 @@ namespace HandBrakeWPF.Converters
{
return EnumHelper<Denoise>.GetValue(value.ToString());
}
- if (targetType == typeof(Decomb) || value.GetType() == typeof(Decomb))
- {
- return EnumHelper<Decomb>.GetValue(value.ToString());
- }
- if (targetType == typeof(Deinterlace) || value.GetType() == typeof(Deinterlace))
- {
- return EnumHelper<Deinterlace>.GetValue(value.ToString());
- }
if (targetType == typeof(Detelecine) || value.GetType() == typeof(Detelecine))
{
return EnumHelper<Detelecine>.GetValue(value.ToString());
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs
index cd21d7b47..e938f8b5a 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs
@@ -426,7 +426,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
// Deinterlace
if (job.DeinterlaceFilter == DeinterlaceFilter.Yadif)
{
- IntPtr settingsPtr = HBFunctions.hb_generate_filter_settings_json((int)hb_filter_ids.HB_FILTER_DEINTERLACE, EnumHelper<Deinterlace>.GetShortName(job.Deinterlace), null, job.CustomDeinterlace);
+ IntPtr settingsPtr = HBFunctions.hb_generate_filter_settings_json((int)hb_filter_ids.HB_FILTER_DEINTERLACE, job.DeinterlacePreset?.ShortName, null, job.CustomDeinterlaceSettings);
string unparsedJson = Marshal.PtrToStringAnsi(settingsPtr);
if (!string.IsNullOrEmpty(unparsedJson))
{
@@ -440,7 +440,7 @@ namespace HandBrakeWPF.Services.Encode.Factories
// Decomb
if (job.DeinterlaceFilter == DeinterlaceFilter.Decomb)
{
- IntPtr settingsPtr = HBFunctions.hb_generate_filter_settings_json((int)hb_filter_ids.HB_FILTER_DECOMB, EnumHelper<Decomb>.GetShortName(job.Decomb), null, job.CustomDecomb);
+ IntPtr settingsPtr = HBFunctions.hb_generate_filter_settings_json((int)hb_filter_ids.HB_FILTER_DECOMB, job.DeinterlacePreset?.ShortName, null, job.CustomDeinterlaceSettings);
string unparsedJson = Marshal.PtrToStringAnsi(settingsPtr);
if (!string.IsNullOrEmpty(unparsedJson))
{
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
index c40c6c0b9..a57b2e43b 100644
--- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
+++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs
@@ -90,15 +90,13 @@ namespace HandBrakeWPF.Services.Encode.Model
this.AlignAVStart = task.AlignAVStart;
this.ChapterMarkersFilePath = task.ChapterMarkersFilePath;
this.Cropping = new Cropping(task.Cropping);
- this.CustomDecomb = task.CustomDecomb;
- this.CustomDeinterlace = task.CustomDeinterlace;
+ this.CustomDeinterlaceSettings = task.CustomDeinterlaceSettings;
this.CustomDenoise = task.CustomDenoise;
this.CustomDetelecine = task.CustomDetelecine;
this.CustomCombDetect = task.CustomCombDetect;
this.CombDetect = task.CombDetect;
this.Deblock = task.Deblock;
- this.Decomb = task.Decomb;
- this.Deinterlace = task.Deinterlace;
+ this.DeinterlacePreset = task.DeinterlacePreset;
this.DeinterlaceFilter = task.DeinterlaceFilter;
this.Denoise = task.Denoise;
this.DenoisePreset = task.DenoisePreset;
@@ -297,17 +295,7 @@ namespace HandBrakeWPF.Services.Encode.Model
/// <summary>
/// Gets or sets Deinterlace.
/// </summary>
- public Deinterlace Deinterlace { get; set; }
-
- /// <summary>
- /// Gets or sets CustomDeinterlace.
- /// </summary>
- public string CustomDeinterlace { get; set; }
-
- /// <summary>
- /// Gets or sets Decomb.
- /// </summary>
- public Decomb Decomb { get; set; }
+ public HBPresetTune DeinterlacePreset { get; set; }
/// <summary>
/// Gets or sets the comb detect.
@@ -317,7 +305,7 @@ namespace HandBrakeWPF.Services.Encode.Model
/// <summary>
/// Gets or sets CustomDecomb.
/// </summary>
- public string CustomDecomb { get; set; }
+ public string CustomDeinterlaceSettings { get; set; }
/// <summary>
/// Gets or sets the custom comb detect.
diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
index cdb815d32..3f86e1aa5 100644
--- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
+++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs
@@ -136,77 +136,30 @@ namespace HandBrakeWPF.Services.Presets.Factories
switch (importedPreset.PictureDeinterlaceFilter)
{
case "decomb":
- preset.Task.Decomb = Decomb.Default;
- preset.Task.Deinterlace = Deinterlace.Default;
preset.Task.DeinterlaceFilter = DeinterlaceFilter.Decomb;
break;
case "yadif":
- preset.Task.Decomb = Decomb.Default;
- preset.Task.Deinterlace = Deinterlace.Default;
preset.Task.DeinterlaceFilter = DeinterlaceFilter.Yadif;
break;
default:
- preset.Task.Decomb = Decomb.Default;
- preset.Task.Deinterlace = Deinterlace.Default;
preset.Task.DeinterlaceFilter = DeinterlaceFilter.Off;
break;
}
if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb)
{
- switch (importedPreset.PictureDeinterlacePreset)
- {
- case "custom":
- preset.Task.Decomb = Decomb.Custom;
- break;
- case "default":
- preset.Task.Decomb = Decomb.Default;
- break;
- case "bob":
- preset.Task.Decomb = Decomb.Bob;
- break;
- case "eedi2":
- preset.Task.Decomb = Decomb.EEDI2;
- break;
- case "eedi2bob":
- preset.Task.Decomb = Decomb.EEDI2Bob;
- break;
- default:
- preset.Task.Decomb = Decomb.Default;
- break;
- }
-
- if (preset.Task.Decomb == Decomb.Custom)
- {
- preset.Task.CustomDecomb = importedPreset.PictureDeinterlaceCustom;
- }
+ List<HBPresetTune> filterPresets = HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DECOMB);
+ HBPresetTune presetTune = filterPresets.FirstOrDefault(f => f.ShortName == importedPreset.PictureDeinterlacePreset);
+ preset.Task.DeinterlacePreset = presetTune ?? new HBPresetTune("Default", "default");
+ preset.Task.CustomDeinterlaceSettings = importedPreset.PictureDeinterlaceCustom;
}
if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif)
{
- switch (importedPreset.PictureDeinterlacePreset)
- {
- case "custom":
- preset.Task.Deinterlace = Deinterlace.Custom;
- break;
- case "bob":
- preset.Task.Deinterlace = Deinterlace.Bob;
- break;
- case "skip-spatial":
- preset.Task.Deinterlace = Deinterlace.SkipSpatialCheck;
- break;
- case "default":
- preset.Task.Deinterlace = Deinterlace.Default;
- break;
- default:
- preset.Task.Deinterlace = Deinterlace.Default;
- break;
- }
-
- if (preset.Task.Deinterlace == Deinterlace.Custom)
- {
- preset.Task.CustomDeinterlace = importedPreset.PictureDeinterlaceCustom;
- }
+ List<HBPresetTune> filterPresets = HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DEINTERLACE);
+ HBPresetTune presetTune = filterPresets.FirstOrDefault(f => f.ShortName == importedPreset.PictureDeinterlacePreset);
+ preset.Task.DeinterlacePreset = presetTune ?? new HBPresetTune("Default", "default");
+ preset.Task.CustomDeinterlaceSettings = importedPreset.PictureDeinterlaceCustom;
}
if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif || preset.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb)
@@ -650,12 +603,8 @@ namespace HandBrakeWPF.Services.Presets.Factories
preset.PictureDeinterlaceFilter = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb
? "decomb"
: export.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif ? "yadif" : "off";
- preset.PictureDeinterlacePreset = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb
- ? EnumHelper<Decomb>.GetShortName(export.Task.Decomb)
- : export.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif ? EnumHelper<Deinterlace>.GetShortName(export.Task.Deinterlace) : string.Empty;
- preset.PictureDeinterlaceCustom = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb
- ? export.Task.CustomDecomb
- : export.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif ? export.Task.CustomDeinterlace : string.Empty;
+ preset.PictureDeinterlacePreset = export.Task.DeinterlacePreset?.ShortName;
+ preset.PictureDeinterlaceCustom = export.Task.CustomDeinterlaceSettings;
preset.PictureCombDetectPreset = EnumHelper<CombDetect>.GetShortName(export.Task.CombDetect);
preset.PictureCombDetectCustom = export.Task.CustomCombDetect;
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
index 86df91094..8d2c47e87 100644
--- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
+++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs
@@ -70,42 +70,6 @@ namespace HandBrakeWPF.ViewModels
public EncodeTask CurrentTask { get; private set; }
/// <summary>
- /// Gets or sets CustomDecomb.
- /// </summary>
- public string CustomDecomb
- {
- get
- {
- return this.CurrentTask.CustomDecomb;
- }
-
- set
- {
- this.CurrentTask.CustomDecomb = value;
- this.NotifyOfPropertyChange(() => this.CustomDecomb);
- this.OnTabStatusChanged(null);
- }
- }
-
- /// <summary>
- /// Gets or sets CustomDeinterlace.
- /// </summary>
- public string CustomDeinterlace
- {
- get
- {
- return this.CurrentTask.CustomDeinterlace;
- }
-
- set
- {
- this.CurrentTask.CustomDeinterlace = value;
- this.NotifyOfPropertyChange(() => this.CustomDeinterlace);
- this.OnTabStatusChanged(null);
- }
- }
-
- /// <summary>
/// Gets or sets CustomDenoise.
/// </summary>
public string CustomDenoise
@@ -142,17 +106,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets DeInterlaceOptions.
- /// </summary>
- public IEnumerable<Deinterlace> DeInterlaceOptions
- {
- get
- {
- return EnumHelper<Deinterlace>.GetEnumList();
- }
- }
-
- /// <summary>
/// Gets DeblockText.
/// </summary>
public string DeblockText
@@ -183,17 +136,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets DecombOptions.
- /// </summary>
- public IEnumerable<Decomb> DecombOptions
- {
- get
- {
- return EnumHelper<Decomb>.GetEnumList();
- }
- }
-
- /// <summary>
/// Gets DenoiseOptions.
/// </summary>
public IEnumerable<Denoise> DenoiseOptions
@@ -216,28 +158,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets DeinterlaceFilterOptions.
- /// </summary>
- public IEnumerable<DeinterlaceFilter> DeinterlaceFilterOptions
- {
- get
- {
- return EnumHelper<DeinterlaceFilter>.GetEnumList();
- }
- }
-
- /// <summary>
- /// Comb Detection Presets
- /// </summary>
- public IEnumerable<CombDetect> CombDetectPresets
- {
- get
- {
- return EnumHelper<CombDetect>.GetEnumList();
- }
- }
-
- /// <summary>
/// Gets or sets a value indicating whether Grayscale.
/// </summary>
public bool Grayscale
@@ -255,32 +175,25 @@ namespace HandBrakeWPF.ViewModels
}
}
+ #region Interlace Detection
+
/// <summary>
- /// Gets or sets SelectedDeInterlace.
+ /// Comb Detection Presets
/// </summary>
- public Deinterlace SelectedDeInterlace
+ public IEnumerable<CombDetect> CombDetectPresets
{
get
{
- return this.CurrentTask.Deinterlace;
- }
-
- set
- {
- this.CurrentTask.Deinterlace = value;
- this.NotifyOfPropertyChange(() => this.SelectedDeInterlace);
-
- if (value != Deinterlace.Custom) this.CustomDeinterlace = string.Empty;
-
- // Show / Hide the Custom Control
- this.NotifyOfPropertyChange(() => this.ShowDecombCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);
- this.OnTabStatusChanged(null);
+ return EnumHelper<CombDetect>.GetEnumList();
}
}
/// <summary>
+ /// Show the CombDetect Custom Box.
+ /// </summary>
+ public bool ShowCombDetectCustom => this.SelectedCombDetectPreset == CombDetect.Custom;
+
+ /// <summary>
/// Gets or sets the selected comb detect preset.
/// </summary>
public CombDetect SelectedCombDetectPreset
@@ -304,11 +217,6 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Show the CombDetect Custom Box.
- /// </summary>
- public bool ShowCombDetectCustom => this.SelectedCombDetectPreset == CombDetect.Custom;
-
- /// <summary>
/// Gets or sets the custom comb detect.
/// </summary>
public string CustomCombDetect
@@ -326,57 +234,103 @@ namespace HandBrakeWPF.ViewModels
}
}
- /// <summary>
- /// Gets or sets SelectedDecomb.
- /// </summary>
- public Decomb SelectedDecomb
+ #endregion
+
+ #region Deinterlace and Decomb
+
+ public IEnumerable<DeinterlaceFilter> DeinterlaceFilterOptions => EnumHelper<DeinterlaceFilter>.GetEnumList();
+
+ public DeinterlaceFilter SelectedDeinterlaceFilter
{
get
{
- return this.CurrentTask.Decomb;
+ return this.deinterlaceFilter;
}
set
{
- this.CurrentTask.Decomb = value;
- this.NotifyOfPropertyChange(() => this.SelectedDecomb);
+ if (value == this.deinterlaceFilter)
+ {
+ return;
+ }
- if (value != Decomb.Custom) this.CustomDecomb = string.Empty;
+ this.deinterlaceFilter = value;
+ this.CurrentTask.DeinterlaceFilter = value;
- // Show / Hide the Custom Control
- this.NotifyOfPropertyChange(() => this.ShowDecombCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);
+ this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);
+ this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace);
+ this.NotifyOfPropertyChange(() => this.DeinterlacePresets);
+ this.NotifyOfPropertyChange(() => this.IsDeinterlaceEnabled);
+
+ if (!this.DeinterlacePresets.Contains(this.SelectedDeInterlacePreset))
+ {
+ this.SelectedDeInterlacePreset = this.DeinterlacePresets.FirstOrDefault(p => p.ShortName == "default");
+ }
+
this.OnTabStatusChanged(null);
}
}
- /// <summary>
- /// Gets or sets SelectedDenoise.
- /// </summary>
- public Denoise SelectedDenoise
+ public IEnumerable<HBPresetTune> DeinterlacePresets
{
get
{
- return this.CurrentTask.Denoise;
+ switch (this.SelectedDeinterlaceFilter)
+ {
+ case DeinterlaceFilter.Yadif:
+ return new BindingList<HBPresetTune>(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DEINTERLACE));
+ case DeinterlaceFilter.Decomb:
+ return new BindingList<HBPresetTune>(HandBrakeFilterHelpers.GetFilterPresets((int)hb_filter_ids.HB_FILTER_DECOMB));
+ default:
+ return new BindingList<HBPresetTune>();
+ }
+ }
+ }
+
+ public HBPresetTune SelectedDeInterlacePreset
+ {
+ get
+ {
+ return this.CurrentTask.DeinterlacePreset;
}
set
{
- this.CurrentTask.Denoise = value;
- this.NotifyOfPropertyChange(() => this.SelectedDenoise);
+ this.CurrentTask.DeinterlacePreset = value;
+ this.NotifyOfPropertyChange(() => this.SelectedDeInterlacePreset);
+
+ if (value?.ShortName == "custom") this.CustomDeinterlaceSettings = string.Empty;
// Show / Hide the Custom Control
- this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);
+ this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace);
+ this.OnTabStatusChanged(null);
+ }
+ }
+
+ public bool IsDeinterlaceEnabled => this.CurrentTask.DeinterlaceFilter != DeinterlaceFilter.Off;
- this.SelectedDenoisePreset = this.CurrentTask.Denoise == Denoise.hqdn3d ? DenoisePreset.Weak : DenoisePreset.Ultralight; // Default so we don't have an invalid preset.
+ public bool ShowCustomDeinterlace => this.IsDeinterlaceEnabled && this.CurrentTask.DeinterlacePreset?.ShortName == "custom";
- this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions);
- this.NotifyOfPropertyChange(() => this.ShowDenoiseTune);
+ /// <summary>
+ /// Gets or sets CustomDecomb.
+ /// </summary>
+ public string CustomDeinterlaceSettings
+ {
+ get
+ {
+ return this.CurrentTask.CustomDeinterlaceSettings;
+ }
+
+ set
+ {
+ this.CurrentTask.CustomDeinterlaceSettings = value;
+ this.NotifyOfPropertyChange(() => this.CustomDeinterlaceSettings);
this.OnTabStatusChanged(null);
}
}
+ #endregion
+
/// <summary>
/// Gets or sets SelectedDetelecine.
/// </summary>
@@ -400,76 +354,40 @@ namespace HandBrakeWPF.ViewModels
}
/// <summary>
- /// Gets or sets a value indicating whether ShowDecombCustom.
- /// </summary>
- public bool ShowDecombCustom => this.SelectedDeinterlaceFilter == DeinterlaceFilter.Decomb && this.SelectedDecomb == Decomb.Custom;
-
- /// <summary>
- /// Gets or sets a value indicating whether ShowDeinterlaceDecombCustom.
- /// </summary>
- public bool ShowDeinterlaceDecombCustom => (this.SelectedDeinterlaceFilter == DeinterlaceFilter.Decomb && this.SelectedDecomb == Decomb.Custom) || (this.SelectedDeinterlaceFilter == DeinterlaceFilter.Yadif && this.SelectedDeInterlace == Deinterlace.Custom);
-
- /// <summary>
- /// Gets or sets a value indicating whether ShowDelelecineCustom.
- /// </summary>
- public bool ShowDeinterlaceCustom => this.SelectedDeinterlaceFilter == DeinterlaceFilter.Yadif && this.SelectedDeInterlace == Deinterlace.Custom;
-
- /// <summary>
- /// Gets or sets a value indicating whether ShowDenoiseCustom.
- /// </summary>
- public bool ShowDenoiseCustom => this.CurrentTask.DenoisePreset == DenoisePreset.Custom;
-
- /// <summary>
/// Gets or sets a value indicating whether ShowDetelecineCustom.
/// </summary>
public bool ShowDetelecineCustom => this.CurrentTask.Detelecine == Detelecine.Custom;
+
+ #region Denoise
+
/// <summary>
- /// Gets or sets the selected deinterlace filter mode.
+ /// Gets or sets SelectedDenoise.
/// </summary>
- public DeinterlaceFilter SelectedDeinterlaceFilter
+ public Denoise SelectedDenoise
{
get
{
- return this.deinterlaceFilter;
+ return this.CurrentTask.Denoise;
}
+
set
{
- if (value == this.deinterlaceFilter)
- {
- return;
- }
+ this.CurrentTask.Denoise = value;
+ this.NotifyOfPropertyChange(() => this.SelectedDenoise);
- this.deinterlaceFilter = value;
- this.CurrentTask.DeinterlaceFilter = value;
+ // Show / Hide the Custom Control
+ this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);
- this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);
- this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);
- this.NotifyOfPropertyChange(() => this.IsDecombMode);
- this.NotifyOfPropertyChange(() => this.IsDeinterlaceDecomb);
- this.NotifyOfPropertyChange(() => this.ShowDecombCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);
+ this.SelectedDenoisePreset = this.CurrentTask.Denoise == Denoise.hqdn3d ? DenoisePreset.Weak : DenoisePreset.Ultralight; // Default so we don't have an invalid preset.
+
+ this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions);
+ this.NotifyOfPropertyChange(() => this.ShowDenoiseTune);
this.OnTabStatusChanged(null);
}
}
/// <summary>
- /// Gets or sets a value indicating whether is deinterlace mode.
- /// </summary>
- public bool IsDeinterlaceMode => this.deinterlaceFilter == DeinterlaceFilter.Yadif;
-
- /// <summary>
- /// Gets or sets a value indicating whether is decomb mode.
- /// </summary>
- public bool IsDecombMode => this.deinterlaceFilter == DeinterlaceFilter.Decomb;
-
- /// <summary>
- /// Gets or sets a value indicating whether is deinterlace or decomb mode.
- /// </summary>
- public bool IsDeinterlaceDecomb => this.SelectedDeinterlaceFilter != DeinterlaceFilter.Off;
-
- /// <summary>
/// Gets or sets the selected denoise tune.
/// </summary>
public DenoiseTune SelectedDenoiseTune
@@ -514,46 +432,20 @@ namespace HandBrakeWPF.ViewModels
/// <summary>
/// Gets the denoise presets.
/// </summary>
- public IEnumerable<DenoisePreset> DenoisePresets
- {
- get
- {
- return EnumHelper<DenoisePreset>.GetEnumList();
- }
- }
+ public IEnumerable<DenoisePreset> DenoisePresets => EnumHelper<DenoisePreset>.GetEnumList();
/// <summary>
/// Gets the denoise tunes.
/// </summary>
- public IEnumerable<DenoiseTune> DenoiseTunes
- {
- get
- {
- return EnumHelper<DenoiseTune>.GetEnumList();
- }
- }
+ public IEnumerable<DenoiseTune> DenoiseTunes => EnumHelper<DenoiseTune>.GetEnumList();
- /// <summary>
- /// Gets a value indicating whether show denoise options.
- /// </summary>
- public bool ShowDenoiseOptions
- {
- get
- {
- return this.SelectedDenoise != Denoise.Off;
- }
- }
+ public bool ShowDenoiseOptions => this.SelectedDenoise != Denoise.Off;
- /// <summary>
- /// Gets a value indicating whether show denoise tune.
- /// </summary>
- public bool ShowDenoiseTune
- {
- get
- {
- return this.SelectedDenoise == Denoise.NLMeans && this.SelectedDenoisePreset != DenoisePreset.Custom;
- }
- }
+ public bool ShowDenoiseTune => this.SelectedDenoise == Denoise.NLMeans && this.SelectedDenoisePreset != DenoisePreset.Custom;
+
+ public bool ShowDenoiseCustom => this.CurrentTask.DenoisePreset == DenoisePreset.Custom;
+
+ #endregion
/// <summary>
/// The rotation options.
@@ -727,20 +619,8 @@ namespace HandBrakeWPF.ViewModels
this.SelectedDenoise = preset.Task.Denoise;
this.SelectedDetelecine = preset.Task.Detelecine;
- this.SelectedDecomb = preset.Task.Decomb;
- this.SelectedDeInterlace = preset.Task.Deinterlace;
- if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif)
- {
- this.SelectedDeinterlaceFilter = DeinterlaceFilter.Yadif;
- }
- else if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb)
- {
- this.SelectedDeinterlaceFilter = DeinterlaceFilter.Decomb;
- }
- else
- {
- this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;
- }
+ this.SelectedDeinterlaceFilter = preset.Task.DeinterlaceFilter;
+ this.SelectedDeInterlacePreset = preset.Task.DeinterlacePreset;
this.SelectedCombDetectPreset = preset.Task.CombDetect;
@@ -756,9 +636,8 @@ namespace HandBrakeWPF.ViewModels
this.CustomSharpen = preset.Task.SharpenCustom;
// Custom Values
- this.CustomDecomb = preset.Task.CustomDecomb;
+ this.CustomDeinterlaceSettings = preset.Task.CustomDeinterlaceSettings;
this.CustomCombDetect = preset.Task.CustomCombDetect;
- this.CustomDeinterlace = preset.Task.CustomDeinterlace;
this.CustomDetelecine = preset.Task.CustomDetelecine;
this.CustomDenoise = preset.Task.CustomDenoise;
@@ -769,8 +648,7 @@ namespace HandBrakeWPF.ViewModels
{
// Default everything to off
this.SelectedDenoise = Denoise.Off;
- this.SelectedDecomb = Decomb.Default;
- this.SelectedDeInterlace = Deinterlace.Default;
+ this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;
this.SelectedDetelecine = Detelecine.Off;
this.Grayscale = false;
this.DeblockValue = 0;
@@ -791,8 +669,8 @@ namespace HandBrakeWPF.ViewModels
this.CurrentTask = task;
this.NotifyOfPropertyChange(() => this.SelectedDenoise);
- this.NotifyOfPropertyChange(() => this.SelectedDecomb);
- this.NotifyOfPropertyChange(() => this.SelectedDeInterlace);
+ this.NotifyOfPropertyChange(() => this.SelectedDeinterlaceFilter);
+ this.NotifyOfPropertyChange(() => this.SelectedDeInterlacePreset);
this.NotifyOfPropertyChange(() => this.SelectedDetelecine);
this.NotifyOfPropertyChange(() => this.Grayscale);
this.NotifyOfPropertyChange(() => this.DeblockValue);
@@ -805,24 +683,18 @@ namespace HandBrakeWPF.ViewModels
this.NotifyOfPropertyChange(() => this.FlipVideo);
this.NotifyOfPropertyChange(() => this.SelectedRotation);
- this.NotifyOfPropertyChange(() => this.CustomDecomb);
- this.NotifyOfPropertyChange(() => this.CustomDeinterlace);
+ this.NotifyOfPropertyChange(() => this.CustomDeinterlaceSettings);
this.NotifyOfPropertyChange(() => this.CustomDetelecine);
this.NotifyOfPropertyChange(() => this.CustomDenoise);
this.NotifyOfPropertyChange(() => this.CustomSharpen);
this.NotifyOfPropertyChange(() => this.CustomCombDetect);
- this.NotifyOfPropertyChange(() => this.IsDeinterlaceMode);
- this.NotifyOfPropertyChange(() => this.IsDecombMode);
- this.NotifyOfPropertyChange(() => this.IsDeinterlaceDecomb);
this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions);
this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom);
this.NotifyOfPropertyChange(() => this.ShowDenoiseTune);
- this.NotifyOfPropertyChange(() => this.ShowDecombCustom);
+ this.NotifyOfPropertyChange(() => this.ShowCustomDeinterlace);
this.NotifyOfPropertyChange(() => this.ShowCombDetectCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceDecombCustom);
- this.NotifyOfPropertyChange(() => this.ShowDeinterlaceCustom);
this.NotifyOfPropertyChange(() => this.ShowDetelecineCustom);
this.NotifyOfPropertyChange(() => this.ShowSharpenCustom);
this.NotifyOfPropertyChange(() => this.ShowSharpenOptions);
@@ -846,12 +718,12 @@ namespace HandBrakeWPF.ViewModels
return false;
}
- if (preset.Task.Deinterlace != this.SelectedDeInterlace)
+ if (preset.Task.DeinterlacePreset != this.SelectedDeInterlacePreset)
{
return false;
}
- if (preset.Task.Decomb != this.SelectedDecomb)
+ if (preset.Task.CustomDeinterlaceSettings != this.CustomDeinterlaceSettings)
{
return false;
}
@@ -861,16 +733,6 @@ namespace HandBrakeWPF.ViewModels
return false;
}
- if ((preset.Task.CustomDecomb ?? string.Empty) != (this.CustomDecomb ?? string.Empty))
- {
- return false;
- }
-
- if ((preset.Task.CustomDeinterlace ?? string.Empty) != (this.CustomDeinterlace ?? string.Empty))
- {
- return false;
- }
-
if ((preset.Task.CustomCombDetect ?? string.Empty) != (this.CustomCombDetect ?? string.Empty))
{
return false;
diff --git a/win/CS/HandBrakeWPF/Views/FiltersView.xaml b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
index 3dbc38ea5..7c323869f 100644
--- a/win/CS/HandBrakeWPF/Views/FiltersView.xaml
+++ b/win/CS/HandBrakeWPF/Views/FiltersView.xaml
@@ -40,6 +40,7 @@
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
<RowDefinition Height="Auto" />
+ <RowDefinition Height="Auto" />
</Grid.RowDefinitions>
<Grid.ColumnDefinitions>
@@ -57,63 +58,37 @@
<TextBox Width="120" Grid.Row="0" Grid.Column="2" Margin="0,0,0,10" Text="{Binding CustomDetelecine, UpdateSourceTrigger=PropertyChanged}" HorizontalAlignment="Left"
Visibility="{Binding ShowDetelecineCustom, Converter={StaticResource boolToVisConverter}}"/>
- <!-- Deinterlace -->
- <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Deinterlace}" VerticalAlignment="Center" Grid.Row="1" Grid.Column="0" Margin="0,0,0,10" />
- <StackPanel Grid.Row="1" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,10">
+ <!-- Interlace Detection -->
+ <TextBlock Text="Interlace Detection:" VerticalAlignment="Center" Margin="0,0,5,0" Grid.Row="1" />
+
+ <ComboBox Width="120" Grid.Row="1" Grid.Column="1" ItemsSource="{Binding CombDetectPresets, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"
+ SelectedItem="{Binding SelectedCombDetectPreset, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetection}"
+ VerticalContentAlignment="Center"/>
+
+ <StackPanel Orientation="Horizontal" Grid.Row="1" Grid.Column="2">
+ <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="0,0,5,0" Visibility="{Binding ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" />
+ <TextBox Width="120" Text="{Binding CustomCombDetect, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
+ Visibility="{Binding ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetectionCustom}" />
+ </StackPanel>
+ <!-- Deinterlace -->
+ <TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Deinterlace}" VerticalAlignment="Center" Grid.Row="2" Grid.Column="0" Margin="0,0,0,10" />
+ <StackPanel Grid.Row="2" Grid.Column="1" VerticalAlignment="Center" Margin="0,0,0,10">
<ComboBox Width="120" ItemsSource="{Binding DeinterlaceFilterOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left"
SelectedItem="{Binding SelectedDeinterlaceFilter, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_Deinterlace}" />
-
</StackPanel>
- <Grid Grid.Row="1" Grid.Column="2" Margin="0,0,0,10">
- <Grid.RowDefinitions>
- <RowDefinition />
- <RowDefinition />
- </Grid.RowDefinitions>
-
- <Grid.ColumnDefinitions>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- <ColumnDefinition Width="15"/>
- <ColumnDefinition Width="Auto" />
- <ColumnDefinition />
- </Grid.ColumnDefinitions>
-
-
- <TextBlock Text="Preset:" VerticalAlignment="Center" Margin="0,0,5,0" Grid.Column="0" Grid.Row="0" Visibility="{Binding IsDeinterlaceDecomb, Converter={StaticResource boolToVisConverter}}" />
- <StackPanel Grid.Row="0" Grid.Column="1" Orientation="Horizontal">
- <ComboBox Width="120" ItemsSource="{Binding DecombOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"
- SelectedItem="{Binding SelectedDecomb, Converter={StaticResource boolComboConverter}}"
- Visibility="{Binding IsDecombMode, Converter={StaticResource boolToVisConverter}}" />
-
- <ComboBox Width="120" ItemsSource="{Binding DeInterlaceOptions, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"
- SelectedItem="{Binding SelectedDeInterlace, Converter={StaticResource boolComboConverter}}"
- Visibility="{Binding IsDeinterlaceMode, Converter={StaticResource boolToVisConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DeinterlacePreset}" />
- </StackPanel>
-
- <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="0,0,5,0" Grid.Column="0" Grid.Row="1" Visibility="{Binding ShowDeinterlaceDecombCustom, Converter={StaticResource boolToVisConverter}}" />
- <StackPanel Grid.Row="1" Grid.Column="1" Orientation="Horizontal">
- <TextBox Width="120" Text="{Binding CustomDecomb, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
- Visibility="{Binding ShowDecombCustom, Converter={StaticResource boolToVisConverter}}" Margin="0,5,0,0" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DeinterlaceCustom}" />
-
- <TextBox Width="120" Text="{Binding CustomDeinterlace, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
- Visibility="{Binding ShowDeinterlaceCustom, Converter={StaticResource boolToVisConverter}}" Margin="0,5,0,0" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DeinterlaceCustom}" />
- </StackPanel>
+ <StackPanel Grid.Row="2" Grid.Column="2" Orientation="Horizontal" Margin="0,0,0,10">
+ <TextBlock Text="Preset:" VerticalAlignment="Center" Margin="0,0,5,0" Visibility="{Binding IsDeinterlaceEnabled, Converter={StaticResource boolToVisConverter}}" />
+ <ComboBox Width="120" ItemsSource="{Binding DeinterlacePresets}" HorizontalAlignment="Left" VerticalAlignment="Center"
+ SelectedItem="{Binding SelectedDeInterlacePreset}" DisplayMemberPath="Name" Visibility="{Binding IsDeinterlaceEnabled, Converter={StaticResource boolToVisConverter}}" />
- <TextBlock Text="Interlace Detection:" VerticalAlignment="Center" Margin="0,0,5,0" Grid.Column="3" Grid.Row="0" Visibility="{Binding IsDeinterlaceDecomb, Converter={StaticResource boolToVisConverter}}" />
- <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="0,0,5,0" Grid.Column="3" Grid.Row="1" Visibility="{Binding ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" />
-
- <ComboBox Width="120" Grid.Row="0" Grid.Column="4" ItemsSource="{Binding CombDetectPresets, Converter={StaticResource boolComboConverter}}" HorizontalAlignment="Left" VerticalAlignment="Center"
- SelectedItem="{Binding SelectedCombDetectPreset, Converter={StaticResource boolComboConverter}}" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetection}"
- Visibility="{Binding IsDeinterlaceDecomb, Converter={StaticResource boolToVisConverter}}"/>
- <TextBox Width="120" Grid.Row="1" Grid.Column="4" Text="{Binding CustomCombDetect, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
- Visibility="{Binding ShowCombDetectCustom, Converter={StaticResource boolToVisConverter}}" Margin="0,5,0,0" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_InterlaceDetectionCustom}" />
- </Grid>
+ <TextBlock Text="Custom:" VerticalAlignment="Center" Margin="5,0,5,0" Visibility="{Binding ShowCustomDeinterlace, Converter={StaticResource boolToVisConverter}}" />
+ <TextBox Width="120" Text="{Binding CustomDeinterlaceSettings, UpdateSourceTrigger=PropertyChanged}" VerticalAlignment="Center" HorizontalAlignment="Left"
+ Visibility="{Binding ShowCustomDeinterlace, Converter={StaticResource boolToVisConverter}}" MinHeight="22" ToolTip="{x:Static Properties:ResourcesTooltips.FilterView_DeinterlaceCustom}" />
+ </StackPanel>
-
-
<!-- Denoise -->
<TextBlock Text="{x:Static Properties:ResourcesUI.FiltersView_Denoise}" Grid.Row="3" Grid.Column="0" Margin="0,0,0,10"/>
<ComboBox Width="120" Grid.Row="3" ItemsSource="{Binding DenoiseOptions, Converter={StaticResource boolComboConverter}}"