summaryrefslogtreecommitdiffstats
path: root/macosx
diff options
context:
space:
mode:
authorritsuka <[email protected]>2015-02-13 12:17:56 +0000
committerritsuka <[email protected]>2015-02-13 12:17:56 +0000
commit8e8337769c4ca887e820b3f99877814f273d8e2c (patch)
tree684311cb2397960923bb715d39a49afa4d2511b2 /macosx
parent02010d1f8eb14d196778131661f88d7cb2791ebe (diff)
MacGui: better validation for denoise settings.
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@6899 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'macosx')
-rw-r--r--macosx/HBFilters.m25
1 files changed, 21 insertions, 4 deletions
diff --git a/macosx/HBFilters.m b/macosx/HBFilters.m
index c94a87d36..8bd627d96 100644
--- a/macosx/HBFilters.m
+++ b/macosx/HBFilters.m
@@ -437,16 +437,33 @@ NSDictionary *_HandBrake_nlmeansTunesDict;
else
{
// New format, read the values directly
- self.denoise = preset[@"PictureDenoiseFilter"];
- if (![[_HandBrake_denoisePresetsDict allValues] containsObject:self.denoisePreset])
+ if ([[_HandBrake_denoiseTypesDict allValues] containsObject:preset[@"PictureDenoiseFilter"]])
{
- self.denoisePreset = @"light";
+ self.denoise = preset[@"PictureDenoiseFilter"];
}
else
{
+ self.denoise = [[_HandBrake_denoiseTypesDict allValues] firstObject];
+ }
+
+ if ([[_HandBrake_denoisePresetsDict allValues] containsObject:preset[@"PictureDenoisePreset"]])
+ {
self.denoisePreset = preset[@"PictureDenoisePreset"];
}
- self.denoiseTune = preset[@"PictureDenoiseTune"];
+ else
+ {
+ self.denoisePreset = [[_HandBrake_denoisePresetsDict allValues] firstObject];
+ }
+
+ if ([[_HandBrake_nlmeansTunesDict allValues] containsObject:preset[@"PictureDenoiseTune"]])
+ {
+ self.denoiseTune = preset[@"PictureDenoiseTune"];
+ }
+ else
+ {
+ self.denoiseTune = [[_HandBrake_nlmeansTunesDict allKeys] firstObject];
+ }
+
self.denoiseCustomString = preset[@"PictureDenoiseCustom"];
}