diff options
Diffstat (limited to 'chromium/third_party/dav1d/libdav1d/tools/dav1d_cli_parse.c')
-rw-r--r-- | chromium/third_party/dav1d/libdav1d/tools/dav1d_cli_parse.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/chromium/third_party/dav1d/libdav1d/tools/dav1d_cli_parse.c b/chromium/third_party/dav1d/libdav1d/tools/dav1d_cli_parse.c index 3f68c4ccc85..4d747c03271 100644 --- a/chromium/third_party/dav1d/libdav1d/tools/dav1d_cli_parse.c +++ b/chromium/third_party/dav1d/libdav1d/tools/dav1d_cli_parse.c @@ -62,6 +62,7 @@ enum { ARG_NEG_STRIDE, ARG_OUTPUT_INVISIBLE, ARG_INLOOP_FILTERS, + ARG_DECODE_FRAME_TYPE, }; static const struct option long_opts[] = { @@ -88,6 +89,7 @@ static const struct option long_opts[] = { { "negstride", 0, NULL, ARG_NEG_STRIDE }, { "outputinvisible", 1, NULL, ARG_OUTPUT_INVISIBLE }, { "inloopfilters", 1, NULL, ARG_INLOOP_FILTERS }, + { "decodeframetype", 1, NULL, ARG_DECODE_FRAME_TYPE }, { NULL, 0, NULL, 0 }, }; @@ -145,7 +147,9 @@ static void usage(const char *const app, const char *const reason, ...) { " --negstride: use negative picture strides\n" " this is mostly meant as a developer option\n" " --outputinvisible $num: whether to output invisible (alt-ref) frames (default: 0)\n" - " --inloopfilters $str: which in-loop filters to enable (none, (no)deblock, (no)cdef, (no)restoration or all; default: all)\n"); + " --inloopfilters $str: which in-loop filters to enable (none, (no)deblock, (no)cdef, (no)restoration or all; default: all)\n" + " --decodeframetype $str: which frame types to decode (reference, intra, key or all; default: all)\n" + ); exit(1); } @@ -233,7 +237,13 @@ static const EnumParseTable inloop_filters_tbl[] = { { "restoration", DAV1D_INLOOPFILTER_RESTORATION }, { "norestoration", DAV1D_INLOOPFILTER_ALL - DAV1D_INLOOPFILTER_RESTORATION }, { "all", DAV1D_INLOOPFILTER_ALL }, - { 0 }, +}; + +static const EnumParseTable decode_frame_type_tbl[] = { + { "all", DAV1D_DECODEFRAMETYPE_ALL }, + { "reference", DAV1D_DECODEFRAMETYPE_REFERENCE }, + { "intra", DAV1D_DECODEFRAMETYPE_INTRA }, + { "key", DAV1D_DECODEFRAMETYPE_KEY }, }; #define ARRAY_SIZE(n) (sizeof(n)/sizeof(*(n))) @@ -382,6 +392,11 @@ void parse(const int argc, char *const *const argv, parse_enum(optarg, inloop_filters_tbl, ARRAY_SIZE(inloop_filters_tbl),ARG_INLOOP_FILTERS, argv[0]); break; + case ARG_DECODE_FRAME_TYPE: + lib_settings->decode_frame_type = + parse_enum(optarg, decode_frame_type_tbl, + ARRAY_SIZE(decode_frame_type_tbl), ARG_DECODE_FRAME_TYPE, argv[0]); + break; default: usage(argv[0], NULL); } |