summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-13 17:30:15 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2012-03-13 17:30:15 +0100
commit38cbee34f765867ec6d59c414a4a9f6de23f0e55 (patch)
treeefb6670ad58d6c25795fb45bb01e25b88cecc295
parent7d908a588dbb471b19ac57d2ef3b7806314d16c4 (diff)
downloadufodecode-38cbee34f765867ec6d59c414a4a9f6de23f0e55.tar.gz
ufodecode-38cbee34f765867ec6d59c414a4a9f6de23f0e55.tar.bz2
ufodecode-38cbee34f765867ec6d59c414a4a9f6de23f0e55.tar.xz
ufodecode-38cbee34f765867ec6d59c414a4a9f6de23f0e55.zip
Output full frame
-rw-r--r--test/ipedec.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/test/ipedec.c b/test/ipedec.c
index 4346bce..895e5f5 100644
--- a/test/ipedec.c
+++ b/test/ipedec.c
@@ -8,6 +8,8 @@
#include <ufodecode.h>
+static const int CLEAR_FRAME = 1;
+
int read_raw_file(const char *filename, char **buffer, size_t *length)
{
FILE *fp = fopen(filename, "rb");
@@ -72,7 +74,8 @@ int main(int argc, char const* argv[])
while (!err) {
gettimeofday(&start, NULL);
- memset(pixels, 0, 2048 * 1088 * sizeof(uint16_t));
+ if (CLEAR_FRAME)
+ memset(pixels, 0, 2048 * 1088 * sizeof(uint16_t));
err = ufo_decoder_get_next_frame(decoder, &pixels, &num_rows, &frame_number, &time_stamp, NULL);
gettimeofday(&end, NULL);
@@ -80,7 +83,7 @@ int main(int argc, char const* argv[])
num_frames++;
seconds += end.tv_sec - start.tv_sec;
useconds += end.tv_usec - start.tv_usec;
- fwrite(pixels, sizeof(uint16_t), 2048 * num_rows, fp);
+ fwrite(pixels, sizeof(uint16_t), 2048 * 1088, fp);
}
}
fclose(fp);