diff options
author | sr55 <[email protected]> | 2019-04-25 18:11:06 +0100 |
---|---|---|
committer | sr55 <[email protected]> | 2019-05-02 18:53:52 +0100 |
commit | feb363eba5e4e914893c4b096402d7d7f9a4a747 (patch) | |
tree | 31d485d790e58868c3ed19838e14fae3c6c9e41f /win/CS/HandBrakeWPF/Services/Encode | |
parent | 851c732ad36525175db37ad9f59b31361ba8f876 (diff) |
WinGui: Update the UI for the new deblock filter. #2028
Diffstat (limited to 'win/CS/HandBrakeWPF/Services/Encode')
3 files changed, 10 insertions, 10 deletions
diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs index 3c6e4d35c..72948a332 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskFactory.cs @@ -503,9 +503,9 @@ namespace HandBrakeWPF.Services.Encode.Factories } // Deblock - if (job.Deblock >= 5) + if (job.DeblockPreset != null && job.DeblockPreset.Key != "off") { - IntPtr settingsPtr = HBFunctions.hb_generate_filter_settings_json((int)hb_filter_ids.HB_FILTER_DEBLOCK, null, null, string.Format("qp={0}", job.Deblock)); + IntPtr settingsPtr = HBFunctions.hb_generate_filter_settings_json((int)hb_filter_ids.HB_FILTER_DEBLOCK, job.DeblockPreset.Key, job.DeblockTune.Key, job.CustomDeblock); string unparsedJson = Marshal.PtrToStringAnsi(settingsPtr); if (!string.IsNullOrEmpty(unparsedJson)) { diff --git a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs index 3daf6b353..8cc635017 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Factories/EncodeTaskImportFactory.cs @@ -271,7 +271,6 @@ namespace HandBrakeWPF.Services.Encode.Factories } task.SubtitleTracks.Add(null); - } } @@ -318,7 +317,7 @@ namespace HandBrakeWPF.Services.Encode.Factories if (deblockFilter != null) { var filterSettings = deblockFilter.Settings; - task.Deblock = filterSettings.Value<string>("qp").ToInt(); + task.DeblockPreset = null; // TODO Support Preset / Tune } // Sharpen diff --git a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs index aec7219c2..5272810cd 100644 --- a/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs +++ b/win/CS/HandBrakeWPF/Services/Encode/Model/EncodeTask.cs @@ -81,7 +81,9 @@ namespace HandBrakeWPF.Services.Encode.Model this.CustomDetelecine = task.CustomDetelecine; this.CustomCombDetect = task.CustomCombDetect; this.CombDetect = task.CombDetect; - this.Deblock = task.Deblock; + this.DeblockPreset = task.DeblockPreset; + this.DeblockTune = task.DeblockTune; + this.CustomDeblock = task.CustomDeblock; this.DeinterlacePreset = task.DeinterlacePreset; this.DeinterlaceFilter = task.DeinterlaceFilter; this.Denoise = task.Denoise; @@ -327,11 +329,6 @@ namespace HandBrakeWPF.Services.Encode.Model public string CustomDenoise { get; set; } /// <summary> - /// Gets or sets Deblock. - /// </summary> - public int Deblock { get; set; } - - /// <summary> /// Gets or sets a value indicating whether Grayscale. /// </summary> public bool Grayscale { get; set; } @@ -350,6 +347,10 @@ namespace HandBrakeWPF.Services.Encode.Model public FilterPreset SharpenPreset { get; set; } public FilterTune SharpenTune { get; set; } public string SharpenCustom { get; set; } + + public FilterPreset DeblockPreset { get; set; } + public FilterTune DeblockTune { get; set; } + public string CustomDeblock { get; set; } #endregion #region Video |