vpxdec: add --keep-going option
for debugging purposes. continues decoding after receiving a decode error. will still exit with an error after the current loop, ignoring remaining --loops Change-Id: I011a71b866ff493a3f3bbb59e9bff998d19daee3
This commit is contained in:
parent
bd756699b9
commit
95853db8e2
9
vpxdec.c
9
vpxdec.c
@ -77,6 +77,8 @@ static const arg_def_t error_concealment = ARG_DEF(NULL, "error-concealment", 0,
|
|||||||
"Enable decoder error-concealment");
|
"Enable decoder error-concealment");
|
||||||
static const arg_def_t scalearg = ARG_DEF("S", "scale", 0,
|
static const arg_def_t scalearg = ARG_DEF("S", "scale", 0,
|
||||||
"Scale output frames uniformly");
|
"Scale output frames uniformly");
|
||||||
|
static const arg_def_t continuearg =
|
||||||
|
ARG_DEF("k", "keep-going", 0, "(debug) Continue decoding after error");
|
||||||
|
|
||||||
static const arg_def_t fb_arg =
|
static const arg_def_t fb_arg =
|
||||||
ARG_DEF(NULL, "frame-buffers", 1, "Number of frame buffers to use");
|
ARG_DEF(NULL, "frame-buffers", 1, "Number of frame buffers to use");
|
||||||
@ -88,8 +90,7 @@ static const arg_def_t *all_args[] = {
|
|||||||
&codecarg, &use_yv12, &use_i420, &flipuvarg, &noblitarg,
|
&codecarg, &use_yv12, &use_i420, &flipuvarg, &noblitarg,
|
||||||
&progressarg, &limitarg, &skiparg, &postprocarg, &summaryarg, &outputfile,
|
&progressarg, &limitarg, &skiparg, &postprocarg, &summaryarg, &outputfile,
|
||||||
&threadsarg, &verbosearg, &scalearg, &fb_arg,
|
&threadsarg, &verbosearg, &scalearg, &fb_arg,
|
||||||
&md5arg,
|
&md5arg, &error_concealment, &continuearg,
|
||||||
&error_concealment,
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -497,6 +498,7 @@ int main_loop(int argc, const char **argv_) {
|
|||||||
int stop_after = 0, postproc = 0, summary = 0, quiet = 1;
|
int stop_after = 0, postproc = 0, summary = 0, quiet = 1;
|
||||||
int arg_skip = 0;
|
int arg_skip = 0;
|
||||||
int ec_enabled = 0;
|
int ec_enabled = 0;
|
||||||
|
int keep_going = 0;
|
||||||
const VpxInterface *interface = NULL;
|
const VpxInterface *interface = NULL;
|
||||||
const VpxInterface *fourcc_interface = NULL;
|
const VpxInterface *fourcc_interface = NULL;
|
||||||
uint64_t dx_time = 0;
|
uint64_t dx_time = 0;
|
||||||
@ -632,6 +634,8 @@ int main_loop(int argc, const char **argv_) {
|
|||||||
}
|
}
|
||||||
} else if (arg_match(&arg, &error_concealment, argi)) {
|
} else if (arg_match(&arg, &error_concealment, argi)) {
|
||||||
ec_enabled = 1;
|
ec_enabled = 1;
|
||||||
|
} else if (arg_match(&arg, &continuearg, argi)) {
|
||||||
|
keep_going = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
@ -814,6 +818,7 @@ int main_loop(int argc, const char **argv_) {
|
|||||||
|
|
||||||
if (detail)
|
if (detail)
|
||||||
warn("Additional information: %s", detail);
|
warn("Additional information: %s", detail);
|
||||||
|
if (!keep_going)
|
||||||
goto fail;
|
goto fail;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user