summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-12-01 11:01:51 +0100
committerMatthias Vogelgesang <matthias.vogelgesang@kit.edu>2011-12-01 11:01:51 +0100
commit845a638d4c7183ed91b223fbd5047a9cc27b47c8 (patch)
treea485127fbe01f0b407c96670565a1546a7e8a5c3 /test
parentff3390720f5f3d37995986665e38f189a49d514e (diff)
downloadlibufodecode-845a638d4c7183ed91b223fbd5047a9cc27b47c8.tar.gz
libufodecode-845a638d4c7183ed91b223fbd5047a9cc27b47c8.tar.bz2
libufodecode-845a638d4c7183ed91b223fbd5047a9cc27b47c8.tar.xz
libufodecode-845a638d4c7183ed91b223fbd5047a9cc27b47c8.zip
Set frame number/timestamp and write results
Diffstat (limited to 'test')
-rw-r--r--test/ipedec.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/test/ipedec.c b/test/ipedec.c
index 1aef1d6..2b44ddd 100644
--- a/test/ipedec.c
+++ b/test/ipedec.c
@@ -55,7 +55,7 @@ int main(int argc, char const* argv[])
struct timeval start, end;
long seconds = 0L, useconds = 0L;
- /* FILE *fp = fopen("test.raw", "wb"); */
+ FILE *fp = fopen("test.raw", "wb");
while (!err) {
gettimeofday(&start, NULL);
@@ -66,10 +66,10 @@ 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 * 1088, fp); */
+ fwrite(pixels, sizeof(uint16_t), 2048 * 1088, fp);
}
}
- /* fclose(fp); */
+ fclose(fp);
float mtime = seconds * 1000.0 + useconds / 1000.0;
printf("Decoded %i frames in %.5fms\n", num_frames, mtime);