Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2019-11-17 17:32:09 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2022-01-08 01:04:24 +0300
commit068697556fc784e088b351f56df26fab04d503c2 (patch)
tree1eedf215ada4965bef7649a64f3061a245725599 /tools
parent36beb8185dd9de5450c9a4cbcd0d969901a6b0cc (diff)
Add interface to output invisible (alt-ref) frames
Addresses part of #310.
Diffstat (limited to 'tools')
-rw-r--r--tools/dav1d_cli_parse.c53
1 files changed, 30 insertions, 23 deletions
diff --git a/tools/dav1d_cli_parse.c b/tools/dav1d_cli_parse.c
index 533bb26..b32e83e 100644
--- a/tools/dav1d_cli_parse.c
+++ b/tools/dav1d_cli_parse.c
@@ -60,31 +60,33 @@ enum {
ARG_STRICT_STD_COMPLIANCE,
ARG_CPU_MASK,
ARG_NEG_STRIDE,
+ ARG_OUTPUT_INVISIBLE,
};
static const struct option long_opts[] = {
- { "input", 1, NULL, 'i' },
- { "output", 1, NULL, 'o' },
- { "quiet", 0, NULL, 'q' },
- { "demuxer", 1, NULL, ARG_DEMUXER },
- { "muxer", 1, NULL, ARG_MUXER },
- { "version", 0, NULL, 'v' },
- { "frametimes", 1, NULL, ARG_FRAME_TIMES },
- { "limit", 1, NULL, 'l' },
- { "skip", 1, NULL, 's' },
- { "realtime", 2, NULL, ARG_REALTIME },
- { "realtimecache", 1, NULL, ARG_REALTIME_CACHE },
- { "threads", 1, NULL, ARG_THREADS },
- { "framedelay", 1, NULL, ARG_FRAME_DELAY },
- { "verify", 1, NULL, ARG_VERIFY },
- { "filmgrain", 1, NULL, ARG_FILM_GRAIN },
- { "oppoint", 1, NULL, ARG_OPPOINT },
- { "alllayers", 1, NULL, ARG_ALL_LAYERS },
- { "sizelimit", 1, NULL, ARG_SIZE_LIMIT },
- { "strict", 1, NULL, ARG_STRICT_STD_COMPLIANCE },
- { "cpumask", 1, NULL, ARG_CPU_MASK },
- { "negstride", 0, NULL, ARG_NEG_STRIDE },
- { NULL, 0, NULL, 0 },
+ { "input", 1, NULL, 'i' },
+ { "output", 1, NULL, 'o' },
+ { "quiet", 0, NULL, 'q' },
+ { "demuxer", 1, NULL, ARG_DEMUXER },
+ { "muxer", 1, NULL, ARG_MUXER },
+ { "version", 0, NULL, 'v' },
+ { "frametimes", 1, NULL, ARG_FRAME_TIMES },
+ { "limit", 1, NULL, 'l' },
+ { "skip", 1, NULL, 's' },
+ { "realtime", 2, NULL, ARG_REALTIME },
+ { "realtimecache", 1, NULL, ARG_REALTIME_CACHE },
+ { "threads", 1, NULL, ARG_THREADS },
+ { "framedelay", 1, NULL, ARG_FRAME_DELAY },
+ { "verify", 1, NULL, ARG_VERIFY },
+ { "filmgrain", 1, NULL, ARG_FILM_GRAIN },
+ { "oppoint", 1, NULL, ARG_OPPOINT },
+ { "alllayers", 1, NULL, ARG_ALL_LAYERS },
+ { "sizelimit", 1, NULL, ARG_SIZE_LIMIT },
+ { "strict", 1, NULL, ARG_STRICT_STD_COMPLIANCE },
+ { "cpumask", 1, NULL, ARG_CPU_MASK },
+ { "negstride", 0, NULL, ARG_NEG_STRIDE },
+ { "outputinvisible", 1, NULL, ARG_OUTPUT_INVISIBLE },
+ { NULL, 0, NULL, 0 },
};
#if HAVE_XXHASH_H
@@ -138,7 +140,8 @@ static void usage(const char *const app, const char *const reason, ...) {
" --verify $md5: verify decoded md5. implies --muxer md5, no output\n"
" --cpumask $mask: restrict permitted CPU instruction sets (0" ALLOWED_CPU_MASKS "; default: -1)\n"
" --negstride: use negative picture strides\n"
- " this is mostly meant as a developer option\n");
+ " this is mostly meant as a developer option\n"
+ " --outputinvisible $num: whether to output invisible (alt-ref) frames (default: 0)\n");
exit(1);
}
@@ -353,6 +356,10 @@ void parse(const int argc, char *const *const argv,
break;
case ARG_NEG_STRIDE:
cli_settings->neg_stride = 1;
+ break;
+ case ARG_OUTPUT_INVISIBLE:
+ lib_settings->output_invisible_frames =
+ !!parse_unsigned(optarg, ARG_OUTPUT_INVISIBLE, argv[0]);
break;
default:
usage(argv[0], NULL);