diff options
author | sr55 <[email protected]> | 2016-03-05 22:17:58 +0000 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-03-09 13:10:10 -0700 |
commit | 1079f3d744676847075845ff945900f195a87d08 (patch) | |
tree | cf7e399adde86cb30f4c88d063c1c9c868b7d324 /win | |
parent | 0205f13f2d3226343b3d27eb06170679fd292593 (diff) |
WinGui: Update deinterlace method to Yadif and update presets. Will look into using the new preset/tune methods at a later point.
Diffstat (limited to 'win')
5 files changed, 31 insertions, 36 deletions
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs index e8da93043..162400b5d 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/Deinterlace.cs @@ -16,19 +16,16 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding /// </summary>
public enum Deinterlace
{
- [ShortName("fast")]
- Fast,
+ [ShortName("custom")]
+ Custom,
- [ShortName("slow")]
- Slow,
+ [ShortName("default")]
+ Default,
- [ShortName("slower")]
- Slower,
+ [ShortName("skip-spatial")]
+ SkipSpatialCheck,
[ShortName("bob")]
- Bob,
-
- [ShortName("custom")]
- Custom
+ Bob
}
}
diff --git a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs index 21b423660..03d7bce60 100644 --- a/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs +++ b/win/CS/HandBrake.ApplicationServices/Interop/Model/Encoding/DeinterlaceFilter.cs @@ -19,8 +19,8 @@ namespace HandBrake.ApplicationServices.Interop.Model.Encoding [ShortName("off")] Off = 0, - [ShortName("Deinterlace")] - Deinterlace = 1, + [ShortName("Yadif")] + Yadif = 1, [ShortName("Decomb")] Decomb = 2 diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs index 6c02ffd08..bc3418e5f 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeFactory.cs @@ -414,7 +414,7 @@ namespace HandBrakeWPF.Services.Encode.Factories } // Deinterlace - if (job.DeinterlaceFilter == DeinterlaceFilter.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); string unparsedJson = Marshal.PtrToStringAnsi(settingsPtr); diff --git a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs index 4a464a68b..a92a67adb 100644 --- a/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Presets/Factories/JsonPresetFactory.cs @@ -104,17 +104,17 @@ namespace HandBrakeWPF.Services.Presets.Factories {
case "decomb":
preset.Task.Decomb = Decomb.Default;
- preset.Task.Deinterlace = Deinterlace.Fast;
+ preset.Task.Deinterlace = Deinterlace.Default;
preset.Task.DeinterlaceFilter = DeinterlaceFilter.Decomb;
break;
case "deinterlace":
preset.Task.Decomb = Decomb.Default;
- preset.Task.Deinterlace = Deinterlace.Fast;
- preset.Task.DeinterlaceFilter = DeinterlaceFilter.Deinterlace;
+ preset.Task.Deinterlace = Deinterlace.Default;
+ preset.Task.DeinterlaceFilter = DeinterlaceFilter.Yadif;
break;
default:
preset.Task.Decomb = Decomb.Default;
- preset.Task.Deinterlace = Deinterlace.Fast;
+ preset.Task.Deinterlace = Deinterlace.Default;
preset.Task.DeinterlaceFilter = DeinterlaceFilter.Off;
break;
}
@@ -146,7 +146,7 @@ namespace HandBrakeWPF.Services.Presets.Factories }
}
- if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace)
+ if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif)
{
switch (importedPreset.PictureDeinterlaceFilter)
{
@@ -156,17 +156,14 @@ namespace HandBrakeWPF.Services.Presets.Factories case "bob":
preset.Task.Deinterlace = Deinterlace.Bob;
break;
- case "fast":
- preset.Task.Deinterlace = Deinterlace.Fast;
- break;
- case "slow":
- preset.Task.Deinterlace = Deinterlace.Slow;
+ case "skip-spatial":
+ preset.Task.Deinterlace = Deinterlace.SkipSpatialCheck;
break;
- case "slower":
- preset.Task.Deinterlace = Deinterlace.Slower;
+ case "default":
+ preset.Task.Deinterlace = Deinterlace.Default;
break;
default:
- preset.Task.Deinterlace = Deinterlace.Fast;
+ preset.Task.Deinterlace = Deinterlace.Default;
break;
}
@@ -568,13 +565,13 @@ namespace HandBrakeWPF.Services.Presets.Factories preset.PictureDeblock = export.Task.Deblock;
preset.PictureDeinterlaceFilter = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb
? "decomb"
- : export.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace ? "deinterlace" : "off";
+ : export.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif ? "yadif" : "off";
preset.PictureDeinterlacePreset = export.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb
? EnumHelper<Decomb>.GetShortName(export.Task.Decomb)
- : export.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace ? EnumHelper<Deinterlace>.GetShortName(export.Task.Deinterlace) : string.Empty;
+ : 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.Deinterlace ? export.Task.CustomDeinterlace : string.Empty;
+ : export.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif ? export.Task.CustomDeinterlace : string.Empty;
preset.PictureDeinterlaceCustom = export.Task.CustomDeinterlace;
preset.PictureDenoiseCustom = export.Task.CustomDenoise;
preset.PictureDenoiseFilter = EnumHelper<Denoise>.GetShortName(export.Task.Denoise);
diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index 79718e2f2..4dd88f6be 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -15,6 +15,8 @@ namespace HandBrakeWPF.ViewModels using Caliburn.Micro;
+ using HandBrake.ApplicationServices.Interop;
+ using HandBrake.ApplicationServices.Interop.HbLib;
using HandBrake.ApplicationServices.Interop.Model.Encoding;
using HandBrakeWPF.Services.Interfaces;
@@ -334,12 +336,12 @@ namespace HandBrakeWPF.ViewModels /// <summary>
/// Gets or sets a value indicating whether ShowDeinterlaceDecombCustom.
/// </summary>
- public bool ShowDeinterlaceDecombCustom => (this.SelectedDeinterlaceFilter == DeinterlaceFilter.Decomb && this.SelectedDecomb == Decomb.Custom) || (this.SelectedDeinterlaceFilter == DeinterlaceFilter.Deinterlace && this.SelectedDeInterlace == Deinterlace.Custom);
+ 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.Deinterlace && this.SelectedDeInterlace == Deinterlace.Custom;
+ public bool ShowDeinterlaceCustom => this.SelectedDeinterlaceFilter == DeinterlaceFilter.Yadif && this.SelectedDeInterlace == Deinterlace.Custom;
/// <summary>
/// Gets or sets a value indicating whether ShowDenoiseCustom.
@@ -370,7 +372,7 @@ namespace HandBrakeWPF.ViewModels this.deinterlaceFilter = value;
this.CurrentTask.DeinterlaceFilter = value;
- if (this.deinterlaceFilter == DeinterlaceFilter.Deinterlace)
+ if (this.deinterlaceFilter == DeinterlaceFilter.Yadif)
{
this.IsDeinterlaceMode = true;
this.IsDecombMode = false;
@@ -559,9 +561,9 @@ namespace HandBrakeWPF.ViewModels this.SelectedDecomb = preset.Task.Decomb;
this.SelectedDeInterlace = preset.Task.Deinterlace;
- if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Deinterlace)
+ if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Yadif)
{
- this.SelectedDeinterlaceFilter = DeinterlaceFilter.Deinterlace;
+ this.SelectedDeinterlaceFilter = DeinterlaceFilter.Yadif;
}
else if (preset.Task.DeinterlaceFilter == DeinterlaceFilter.Decomb)
{
@@ -572,7 +574,6 @@ namespace HandBrakeWPF.ViewModels this.SelectedDeinterlaceFilter = DeinterlaceFilter.Off;
}
-
this.Grayscale = preset.Task.Grayscale;
this.DeblockValue = preset.Task.Deblock == 0 ? 4 : preset.Task.Deblock;
this.SelectedDenoisePreset = preset.Task.DenoisePreset;
@@ -593,7 +594,7 @@ namespace HandBrakeWPF.ViewModels // Default everything to off
this.SelectedDenoise = Denoise.Off;
this.SelectedDecomb = Decomb.Default;
- this.SelectedDeInterlace = Deinterlace.Fast;
+ this.SelectedDeInterlace = Deinterlace.Default;
this.SelectedDetelecine = Detelecine.Off;
this.Grayscale = false;
this.DeblockValue = 0;
|