From d9e8df66d2af84358674229b8844bca13fcdd54b Mon Sep 17 00:00:00 2001 From: sr55 Date: Fri, 30 Jan 2015 21:41:23 +0000 Subject: 0.10.x Porting Nlmeans Custom Fix git-svn-id: svn://svn.handbrake.fr/HandBrake/branches/0.10.x@6834 b64f7644-9d1e-0410-96f1-a4d463321fa5 --- .../Utilities/QueryGeneratorUtility.cs | 38 +++++++++++++--------- win/CS/HandBrake10.sln.DotSettings | 3 ++ .../Converters/Filters/DenoisePresetConverter.cs | 2 +- win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs | 6 ++-- 4 files changed, 29 insertions(+), 20 deletions(-) (limited to 'win') diff --git a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs index 229eb7037..f76d5cad1 100644 --- a/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs +++ b/win/CS/HandBrake.ApplicationServices/Utilities/QueryGeneratorUtility.cs @@ -408,28 +408,34 @@ namespace HandBrake.ApplicationServices.Utilities case DenoisePreset.Strong: query += " --nlmeans=\"strong\""; break; + case DenoisePreset.Custom: + query += string.Format(" --denoise=\"{0}\"", task.CustomDenoise); + break; default: query += string.Empty; break; } - switch (task.DenoiseTune) + if (task.DenoisePreset != DenoisePreset.Custom) { - case DenoiseTune.Animation: - query += " --nlmeans-tune=\"animation\""; - break; - case DenoiseTune.Film: - query += " --nlmeans-tune=\"film\""; - break; - case DenoiseTune.Grain: - query += " --nlmeans-tune=\"grain\""; - break; - case DenoiseTune.HighMotion: - query += " --nlmeans-tune=\"highmotion\""; - break; - default: - query += string.Empty; - break; + switch (task.DenoiseTune) + { + case DenoiseTune.Animation: + query += " --nlmeans-tune=\"animation\""; + break; + case DenoiseTune.Film: + query += " --nlmeans-tune=\"film\""; + break; + case DenoiseTune.Grain: + query += " --nlmeans-tune=\"grain\""; + break; + case DenoiseTune.HighMotion: + query += " --nlmeans-tune=\"highmotion\""; + break; + default: + query += string.Empty; + break; + } } } diff --git a/win/CS/HandBrake10.sln.DotSettings b/win/CS/HandBrake10.sln.DotSettings index 0f6feff62..fff55d3ae 100644 --- a/win/CS/HandBrake10.sln.DotSettings +++ b/win/CS/HandBrake10.sln.DotSettings @@ -18,6 +18,7 @@ <?xml version="1.0" encoding="utf-16"?><Profile name="StyleCop"><CSArrangeThisQualifier>True</CSArrangeThisQualifier><CSOptimizeUsings><OptimizeUsings>True</OptimizeUsings><EmbraceInRegion>False</EmbraceInRegion><RegionName></RegionName></CSOptimizeUsings><CSReformatCode>True</CSReformatCode><CSReorderTypeMembers>True</CSReorderTypeMembers><StyleCop.Documentation><SA1600ElementsMustBeDocumented>True</SA1600ElementsMustBeDocumented><SA1604ElementDocumentationMustHaveSummary>True</SA1604ElementDocumentationMustHaveSummary><SA1609PropertyDocumentationMustHaveValueDocumented>True</SA1609PropertyDocumentationMustHaveValueDocumented><SA1611ElementParametersMustBeDocumented>True</SA1611ElementParametersMustBeDocumented><SA1615ElementReturnValueMustBeDocumented>True</SA1615ElementReturnValueMustBeDocumented><SA1617VoidReturnValueMustNotBeDocumented>True</SA1617VoidReturnValueMustNotBeDocumented><SA1618GenericTypeParametersMustBeDocumented>True</SA1618GenericTypeParametersMustBeDocumented><SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes>True</SA1626SingleLineCommentsMustNotUseDocumentationStyleSlashes><SA1628DocumentationTextMustBeginWithACapitalLetter>True</SA1628DocumentationTextMustBeginWithACapitalLetter><SA1629DocumentationTextMustEndWithAPeriod>True</SA1629DocumentationTextMustEndWithAPeriod><SA1633SA1641UpdateFileHeader>ReplaceCopyrightElement</SA1633SA1641UpdateFileHeader><SA1639FileHeaderMustHaveSummary>True</SA1639FileHeaderMustHaveSummary><SA1642ConstructorSummaryDocumentationMustBeginWithStandardText>True</SA1642ConstructorSummaryDocumentationMustBeginWithStandardText><SA1643DestructorSummaryDocumentationMustBeginWithStandardText>True</SA1643DestructorSummaryDocumentationMustBeginWithStandardText><SA1644DocumentationHeadersMustNotContainBlankLines>True</SA1644DocumentationHeadersMustNotContainBlankLines></StyleCop.Documentation><StyleCop.Layout><SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine>True</SA1500CurlyBracketsForMultiLineStatementsMustNotShareLine><SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine>True</SA1509OpeningCurlyBracketsMustNotBePrecededByBlankLine><SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine>True</SA1510ChainedStatementBlocksMustNotBePrecededByBlankLine><SA1511WhileDoFooterMustNotBePrecededByBlankLine>True</SA1511WhileDoFooterMustNotBePrecededByBlankLine><SA1512SingleLineCommentsMustNotBeFollowedByBlankLine>True</SA1512SingleLineCommentsMustNotBeFollowedByBlankLine><SA1513ClosingCurlyBracketMustBeFollowedByBlankLine>True</SA1513ClosingCurlyBracketMustBeFollowedByBlankLine><SA1514ElementDocumentationHeaderMustBePrecededByBlankLine>True</SA1514ElementDocumentationHeaderMustBePrecededByBlankLine><SA1515SingleLineCommentMustBeProceededByBlankLine>True</SA1515SingleLineCommentMustBeProceededByBlankLine></StyleCop.Layout><StyleCop.Maintainability><SA1119StatementMustNotUseUnnecessaryParenthesis>True</SA1119StatementMustNotUseUnnecessaryParenthesis></StyleCop.Maintainability><StyleCop.Ordering><AlphabeticalUsingDirectives>Alphabetical</AlphabeticalUsingDirectives><ExpandUsingDirectives>FullyQualify</ExpandUsingDirectives><SA1212PropertyAccessorsMustFollowOrder>True</SA1212PropertyAccessorsMustFollowOrder><SA1213EventAccessorsMustFollowOrder>True</SA1213EventAccessorsMustFollowOrder></StyleCop.Ordering><StyleCop.Readability><SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists>True</SA1100DoNotPrefixCallsWithBaseUnlessLocalImplementationExists><SA1106CodeMustNotContainEmptyStatements>True</SA1106CodeMustNotContainEmptyStatements><SA1108BlockStatementsMustNotContainEmbeddedComments>True</SA1108BlockStatementsMustNotContainEmbeddedComments><SA1109BlockStatementsMustNotContainEmbeddedRegions>True</SA1109BlockStatementsMustNotContainEmbeddedRegions><SA1120CommentsMustContainText>True</SA1120CommentsMustContainText><SA1121UseBuiltInTypeAlias>True</SA1121UseBuiltInTypeAlias><SA1122UseStringEmptyForEmptyStrings>True</SA1122UseStringEmptyForEmptyStrings><SA1123DoNotPlaceRegionsWithinElements>True</SA1123DoNotPlaceRegionsWithinElements><SA1124CodeMustNotContainEmptyRegions>True</SA1124CodeMustNotContainEmptyRegions></StyleCop.Readability><StyleCop.Spacing><SA1001CommasMustBeSpacedCorrectly>True</SA1001CommasMustBeSpacedCorrectly><SA1005SingleLineCommentsMustBeginWithSingleSpace>True</SA1005SingleLineCommentsMustBeginWithSingleSpace><SA1006PreprocessorKeywordsMustNotBePrecededBySpace>True</SA1006PreprocessorKeywordsMustNotBePrecededBySpace><SA1021NegativeSignsMustBeSpacedCorrectly>True</SA1021NegativeSignsMustBeSpacedCorrectly><SA1022PositiveSignsMustBeSpacedCorrectly>True</SA1022PositiveSignsMustBeSpacedCorrectly><SA1025CodeMustNotContainMultipleWhitespaceInARow>True</SA1025CodeMustNotContainMultipleWhitespaceInARow></StyleCop.Spacing></Profile> Default: Full Cleanup StyleCop + All False True 1 @@ -488,7 +489,9 @@ True True True + True True + True True False VS diff --git a/win/CS/HandBrakeWPF/Converters/Filters/DenoisePresetConverter.cs b/win/CS/HandBrakeWPF/Converters/Filters/DenoisePresetConverter.cs index 52e280722..3adf92b42 100644 --- a/win/CS/HandBrakeWPF/Converters/Filters/DenoisePresetConverter.cs +++ b/win/CS/HandBrakeWPF/Converters/Filters/DenoisePresetConverter.cs @@ -54,7 +54,7 @@ namespace HandBrakeWPF.Converters.Filters if (denoiseChoice == Denoise.NLMeans) { - return new List { DenoisePreset.Ultralight, DenoisePreset.Light, DenoisePreset.Medium, DenoisePreset.Strong }; + return new List { DenoisePreset.Ultralight, DenoisePreset.Light, DenoisePreset.Medium, DenoisePreset.Strong, DenoisePreset.Custom }; } } diff --git a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs index 019bf0418..8dd00b062 100644 --- a/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs +++ b/win/CS/HandBrakeWPF/ViewModels/FiltersViewModel.cs @@ -296,7 +296,7 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.SelectedDenoise); // Show / Hide the Custom Control - this.ShowDenoiseCustom = this.CurrentTask.Denoise == Denoise.hqdn3d && this.CurrentTask.DenoisePreset == DenoisePreset.Custom; + this.ShowDenoiseCustom = this.CurrentTask.DenoisePreset == DenoisePreset.Custom; this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom); this.SelectedDenoisePreset = this.CurrentTask.Denoise == Denoise.hqdn3d ? DenoisePreset.Weak : DenoisePreset.Ultralight; // Default so we don't have an invalid preset. @@ -417,7 +417,7 @@ namespace HandBrakeWPF.ViewModels this.NotifyOfPropertyChange(() => this.SelectedDenoisePreset); // Show / Hide the Custom Control - this.ShowDenoiseCustom = this.CurrentTask.Denoise == Denoise.hqdn3d && this.CurrentTask.DenoisePreset == DenoisePreset.Custom; + this.ShowDenoiseCustom = this.CurrentTask.DenoisePreset == DenoisePreset.Custom; this.NotifyOfPropertyChange(() => this.ShowDenoiseCustom); this.NotifyOfPropertyChange(() => this.ShowDenoiseOptions); this.NotifyOfPropertyChange(() => this.ShowDenoiseTune); @@ -464,7 +464,7 @@ namespace HandBrakeWPF.ViewModels { get { - return this.SelectedDenoise == Denoise.NLMeans; + return this.SelectedDenoise == Denoise.NLMeans && this.SelectedDenoisePreset != DenoisePreset.Custom; } } -- cgit v1.2.3