summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/ufodecode.c6
-rw-r--r--test/ipedec.c11
2 files changed, 8 insertions, 9 deletions
diff --git a/src/ufodecode.c b/src/ufodecode.c
index 58d2a68..31ac7a0 100644
--- a/src/ufodecode.c
+++ b/src/ufodecode.c
@@ -299,10 +299,6 @@ ufo_decode_frame_channels_v4(UfoDecoder *decoder,
int header = (info >> 30) & 0x03;
const int bpp = (info >> 16) & 0x0F;
CHECK_FLAG("raw header magick", header == 2, header);
-
- /* XXX: rows are numbered absolutely so this becomes unnecessary */
- /* CHECK_FLAG("row number, only %i rows requested", row < num_rows, row, num_rows); */
-
CHECK_FLAG("pixel size, only 10 bits are supported", bpp == 10, bpp);
CHECK_FLAG("channel, limited by %zu output channels", channel < channels_per_row, channel, channels_per_row);
#endif
@@ -581,7 +577,7 @@ size_t ufo_decoder_decode_frame(UfoDecoder *decoder,
if ((meta->output_mode != IPECAMERA_MODE_4_CHAN_IO) && (meta->output_mode != IPECAMERA_MODE_16_CHAN_IO)) {
#ifdef DEBUG
- fprintf(stderr, "Output mode 0x%lx is not supported\n", meta->output_mode);
+ fprintf(stderr, "Output mode 0x%x is not supported\n", meta->output_mode);
#endif
return EILSEQ;
}
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);
}