diff options
author | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-07-26 10:47:02 +0200 |
---|---|---|
committer | Matthias Vogelgesang <matthias.vogelgesang@kit.edu> | 2012-07-26 10:47:02 +0200 |
commit | 90ecb35a99a136467ab5ae9e090434cb88833743 (patch) | |
tree | 5de4b63ead61cf92b9d847110ea522e466c33ea9 /test | |
parent | 6b320d6ad6943c14cf8685a49e36963adce0ddeb (diff) | |
download | libufodecode-90ecb35a99a136467ab5ae9e090434cb88833743.tar.gz libufodecode-90ecb35a99a136467ab5ae9e090434cb88833743.tar.bz2 libufodecode-90ecb35a99a136467ab5ae9e090434cb88833743.tar.xz libufodecode-90ecb35a99a136467ab5ae9e090434cb88833743.zip |
Add --print-num-rows and fix debug output
Diffstat (limited to 'test')
-rw-r--r-- | test/ipedec.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/test/ipedec.c b/test/ipedec.c index 63ff648..3b70156 100644 --- a/test/ipedec.c +++ b/test/ipedec.c @@ -187,23 +187,26 @@ process_file(const char *filename, Options *opts) timer_stop (timer); if (!error) { + n_frames++; + if (opts->verbose) { printf("Status for frame %i\n", n_frames); print_meta_data (&meta); } - if (opts->print_frame_rate && old_time_stamp != 0) { + if (opts->print_frame_rate) { uint32_t diff = 80 * (meta.time_stamp - old_time_stamp); - printf("%d", 1000000000 / diff); + printf("%-6d", 1000000000 / diff); old_time_stamp = meta.time_stamp; } + if (opts->print_num_rows) + printf("%d", meta.n_rows); + if (opts->print_frame_rate || opts->print_num_rows) printf("\n"); - n_frames++; - if (!opts->dry_run) fwrite(pixels, sizeof(uint16_t), 2048 * 1088, fp); } |