summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2014-07-01 19:02:15 -0700
committerJames Zern <jzern@google.com>2014-07-01 19:05:23 -0700
commit95853db8e2445fec5eaf8cc2de90924167425f54 (patch)
treef665702b98e6df332d3a070c3cb64920236ffadc
parentbd756699b9785eeca5e6ed9d4a0985e41f88cbea (diff)
downloadlibvpx-95853db8e2445fec5eaf8cc2de90924167425f54.tar.gz
libvpx-95853db8e2445fec5eaf8cc2de90924167425f54.tar.bz2
libvpx-95853db8e2445fec5eaf8cc2de90924167425f54.zip
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
-rw-r--r--vpxdec.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/vpxdec.c b/vpxdec.c
index 127e65f89..a3a1da55a 100644
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -77,6 +77,8 @@ static const arg_def_t error_concealment = ARG_DEF(NULL, "error-concealment", 0,
"Enable decoder error-concealment");
static const arg_def_t scalearg = ARG_DEF("S", "scale", 0,
"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 =
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,
&progressarg, &limitarg, &skiparg, &postprocarg, &summaryarg, &outputfile,
&threadsarg, &verbosearg, &scalearg, &fb_arg,
- &md5arg,
- &error_concealment,
+ &md5arg, &error_concealment, &continuearg,
NULL
};
@@ -497,6 +498,7 @@ int main_loop(int argc, const char **argv_) {
int stop_after = 0, postproc = 0, summary = 0, quiet = 1;
int arg_skip = 0;
int ec_enabled = 0;
+ int keep_going = 0;
const VpxInterface *interface = NULL;
const VpxInterface *fourcc_interface = NULL;
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)) {
ec_enabled = 1;
+ } else if (arg_match(&arg, &continuearg, argi)) {
+ keep_going = 1;
}
#endif
@@ -814,7 +818,8 @@ int main_loop(int argc, const char **argv_) {
if (detail)
warn("Additional information: %s", detail);
- goto fail;
+ if (!keep_going)
+ goto fail;
}
vpx_usec_timer_mark(&timer);