summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 1a9b5c4)
raw | patch | inline | side by side (parent: 1a9b5c4)
author | Vincent Stehlé <v-stehle@ti.com> | |
Fri, 17 Aug 2012 13:44:53 +0000 (15:44 +0200) | ||
committer | Vincent Stehlé <v-stehle@ti.com> | |
Fri, 17 Aug 2012 15:00:09 +0000 (17:00 +0200) |
Allows to specify from command line that we do not actually want to call
VIDDEC3_process method. This is for benchmarking. Note that rate control will
still work.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
VIDDEC3_process method. This is for benchmarking. Note that rate control will
still work.
Signed-off-by: Vincent Stehlé <v-stehle@ti.com>
viddec3test.c | patch | blob | history |
diff --git a/viddec3test.c b/viddec3test.c
index 1355b02b1673e3f7c03c74593f6eeb64d1ddb9eb..890153036f8f1b42f66523f9e30f98d453329c21 100644 (file)
--- a/viddec3test.c
+++ b/viddec3test.c
};
+/* When true, do not actually call VIDDEC3_process. For benchmarking. */
+static int no_process = 0;
+
static void
usage(char *name)
{
MSG("");
MSG("viddec3test options:");
MSG("\t-h, --help: Print this help and exit.");
+ MSG("\t--no-process\tDo not actually call VIDDEC3_process method. For benchmarking.");
MSG("");
disp_usage();
}
XDM2_BufDesc *outBufs = decoder->outBufs;
VIDDEC3_InArgs *inArgs = decoder->inArgs;
VIDDEC3_OutArgs *outArgs = decoder->outArgs;
- XDAS_Int32 err;
struct buffer *buf;
int i, n;
- suseconds_t tproc;
buf = disp_get_vid_buffer(decoder->disp);
if (!buf) {
outBufs->descs[1].buf = (XDAS_Int8 *)omap_bo_handle(buf->bo[1]);
outBufs->descs[1].bufSize.bytes = omap_bo_size(buf->bo[1]);
- tproc = mark(NULL);
- err = VIDDEC3_process(decoder->codec, inBufs, outBufs, inArgs, outArgs);
- DBG("%p: processed returned in: %ldus", decoder, (long int)mark(&tproc));
- if (err) {
- ERROR("%p: process returned error: %d", decoder, err);
- ERROR("%p: extendedError: %08x", decoder, outArgs->extendedError);
- if (XDM_ISFATALERROR(outArgs->extendedError))
- return -1;
+ if (no_process) {
+ /* Do not process. This is for benchmarking. We need to "fake"
+ * the outArgs. */
+ outArgs->outputID[0] = buf;
+ outArgs->outputID[1] = NULL;
+ outArgs->freeBufID[0] = buf;
+ outArgs->freeBufID[1] = NULL;
+ outArgs->outBufsInUseFlag = 0;
+
+ } else {
+ XDAS_Int32 err;
+ suseconds_t tproc;
+ tproc = mark(NULL);
+ err = VIDDEC3_process(decoder->codec, inBufs, outBufs, inArgs, outArgs);
+ DBG("%p: processed returned in: %ldus", decoder, (long int)mark(&tproc));
+ if (err) {
+ ERROR("%p: process returned error: %d", decoder, err);
+ ERROR("%p: extendedError: %08x", decoder, outArgs->extendedError);
+ if (XDM_ISFATALERROR(outArgs->extendedError))
+ return -1;
+ }
}
for (i = 0; outArgs->outputID[i]; i++) {
usage(argv[0]);
exit(0);
+ } if (!strcmp(argv[i], "--no-process")) {
+ no_process = 1;
+ argv[i] = NULL;
+
} else if (!strcmp(argv[i], "--")) {
argv[first] = argv[0];
decoders[ndecoders++] = decoder_open(i - first, &argv[first]);