From ebb7dffa97ed7fdae42c9a981d5e9bba914a9c57 Mon Sep 17 00:00:00 2001 From: Michael Niedermayer Date: Wed, 14 Feb 2024 22:43:07 +0100 Subject: [PATCH] swscale/tests/swscale: Add help text Signed-off-by: Michael Niedermayer --- libswscale/tests/swscale.c | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/libswscale/tests/swscale.c b/libswscale/tests/swscale.c index 32e1f96be2..cf8d04de89 100644 --- a/libswscale/tests/swscale.c +++ b/libswscale/tests/swscale.c @@ -437,6 +437,25 @@ int main(int argc, char **argv) return -1; for (i = 1; i < argc; i += 2) { + if (!strcmp(argv[i], "-help") || !strcmp(argv[i], "--help")) { + fprintf(stderr, + "swscale [options...]\n" + " -help\n" + " This text\n" + " -ref \n" + " Uses file as reference to compae tests againsts. Tests that have become worse will contain the string worse or WORSE\n" + " -p \n" + " The percentage of tests or comparissions to perform. Doing all tests will take long and generate over a hundread MB text output\n" + " It is often convenient to perform a random subset\n" + " -dst \n" + " Only test the specified destination pixel format\n" + " -src \n" + " Only test the specified source pixel format\n" + " -cpuflags \n" + " Uses the specified cpuflags in teh tests\n" + ); + goto error; + } if (argv[i][0] != '-' || i + 1 == argc) goto bad_option; if (!strcmp(argv[i], "-ref")) { @@ -469,7 +488,7 @@ int main(int argc, char **argv) prob = atof(argv[i + 1]); } else { bad_option: - fprintf(stderr, "bad option or argument missing (%s)\n", argv[i]); + fprintf(stderr, "bad option or argument missing (%s) see -help\n", argv[i]); goto error; } }