summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/test.c19
1 files changed, 14 insertions, 5 deletions
diff --git a/test/test.c b/test/test.c
index a7299736c..bfc9294ff 100644
--- a/test/test.c
+++ b/test/test.c
@@ -4356,11 +4356,6 @@ static int ParseOptions( int argc, char ** argv )
if (nlmeans)
{
- if (nlmeans_opt == NULL && nlmeans_tune_opt != NULL)
- {
- fprintf(stdout, "Default nlmeans parameters specified; ignoring nlmeans tune (%s).\n", nlmeans_tune_opt);
- }
-
char *opt = hb_generate_filter_settings(HB_FILTER_NLMEANS,
nlmeans_opt, nlmeans_tune_opt);
if (opt != NULL)
@@ -4368,6 +4363,15 @@ static int ParseOptions( int argc, char ** argv )
free(nlmeans_opt);
nlmeans_opt = opt;
}
+ else if (nlmeans_opt != NULL)
+ {
+ fprintf(stderr, "Invalid parameters for nlmeans (%s).", nlmeans_opt);
+ return -1;
+ }
+ else if (nlmeans_tune_opt != NULL)
+ {
+ fprintf(stdout, "Default nlmeans parameters specified; ignoring nlmeans tune (%s).\n", nlmeans_tune_opt);
+ }
}
if (denoise)
{
@@ -4378,6 +4382,11 @@ static int ParseOptions( int argc, char ** argv )
free(denoise_opt);
denoise_opt = opt;
}
+ else if (denoise_opt != NULL)
+ {
+ fprintf(stderr, "Invalid parameters for hqdn3d (%s).", denoise_opt);
+ return -1;
+ }
}
return 0;