summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 2f5f5fe)
raw | patch | inline | side by side (parent: 2f5f5fe)
author | Rob Clark <rob@ti.com> | |
Tue, 31 Jan 2012 16:27:26 +0000 (10:27 -0600) | ||
committer | Rob Clark <rob@ti.com> | |
Tue, 31 Jan 2012 16:27:26 +0000 (10:27 -0600) |
util/util.h | patch | blob | history | |
viddec3test.c | patch | blob | history |
diff --git a/util/util.h b/util/util.h
index cba6234b73dd131228a2444e96bea0966bbfb08a..23e423391e1ba9849a972a909eb255000244136d 100644 (file)
--- a/util/util.h
+++ b/util/util.h
struct timeval t;
gettimeofday(&t, NULL);
if (last) {
- return t.tv_usec - *last;
+ long delta = t.tv_usec - *last;
+ *last = t.tv_usec;
+ return delta;
}
return t.tv_usec;
}
diff --git a/viddec3test.c b/viddec3test.c
index 6ee59fd700037cd95ef359abcf1597215f4dfe76..9e0fa0476e9368195039df81d0b58f1cb6f17098 100644 (file)
--- a/viddec3test.c
+++ b/viddec3test.c
XDM2_BufDesc *outBufs;
VIDDEC3_InArgs *inArgs;
VIDDEC3_OutArgs *outArgs;
+ suseconds_t tdisp;
MSG("Opening Display..");
disp = disp_open(argc, argv);
outArgs = dce_alloc(sizeof(IVIDDEC3_OutArgs));
outArgs->size = sizeof(IVIDDEC3_OutArgs);
+ tdisp = mark(NULL);
+
while (inBufs->numBufs && outBufs->numBufs) {
struct buffer *buf;
int n;
- suseconds_t t;
+ suseconds_t tproc;
buf = disp_get_vid_buffer(disp);
if (!buf) {
outBufs->descs[0].buf = (XDAS_Int8 *)omap_bo_handle(buf->bo[0]);
outBufs->descs[1].buf = (XDAS_Int8 *)omap_bo_handle(buf->bo[1]);
- t = mark(NULL);
+ tproc = mark(NULL);
err = VIDDEC3_process(codec, inBufs, outBufs, inArgs, outArgs);
- MSG("processed returned in: %ldus", (long int)mark(&t));
+ MSG("processed returned in: %ldus", (long int)mark(&tproc));
if (err) {
ERROR("process returned error: %d", err);
ERROR("extendedError: %08x", outArgs->extendedError);
disp_post_vid_buffer(disp, buf, r->topLeft.x, r->topLeft.y,
r->bottomRight.x - r->topLeft.x,
r->bottomRight.y - r->topLeft.y);
+ MSG("display in: %ldus", (long int)mark(&tdisp));
}
for (i = 0; outArgs->freeBufID[i]; i++) {