From 90ecb35a99a136467ab5ae9e090434cb88833743 Mon Sep 17 00:00:00 2001 From: Matthias Vogelgesang Date: Thu, 26 Jul 2012 10:47:02 +0200 Subject: Add --print-num-rows and fix debug output --- test/ipedec.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'test') 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); } -- cgit v1.2.3