summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (from parent 1: 6647d1f)
raw | patch | inline | side by side (from parent 1: 6647d1f)
author | Saurabh Bipin Chandra <a0131926@ti.com> | |
Fri, 10 May 2013 13:21:48 +0000 (15:21 +0200) | ||
committer | Saurabh Bipin Chandra <a0131926@ti.com> | |
Fri, 10 May 2013 13:21:48 +0000 (15:21 +0200) |
This patch lets dce_test app users mention the number
of frames of the output raw data to be written to the
output file as an extra input command line argument.
To invoke dce_test app:
dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler
Change-Id: I311b5afbe56aedc93263777bc1891d71cdd73c9a
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
of frames of the output raw data to be written to the
output file as an extra input command line argument.
To invoke dce_test app:
dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler
Change-Id: I311b5afbe56aedc93263777bc1891d71cdd73c9a
Signed-off-by: Saurabh Bipin Chandra <a0131926@ti.com>
test_qnx/dce_test.c | patch | blob | history | |
test_qnx/dce_test.use | patch | blob | history |
diff --git a/test_qnx/dce_test.c b/test_qnx/dce_test.c
index 805b240577136fc789d9610d53539b22692f1d88..6a6d6a196b4ffb3b53eff6fe67d3aa35b7fd335b 100644 (file)
--- a/test_qnx/dce_test.c
+++ b/test_qnx/dce_test.c
* and write out raw (unstrided) nv12 frames (one per file).
*/
* and write out raw (unstrided) nv12 frames (one per file).
*/
-int width, height, padded_width, padded_height, num_buffers, tiler;
+int width, height, frames_to_write, padded_width, padded_height, num_buffers, tiler;
Engine_Handle engine = NULL;
VIDDEC3_Handle codec = NULL;
VIDDEC3_Params *params = NULL;
Engine_Handle engine = NULL;
VIDDEC3_Handle codec = NULL;
VIDDEC3_Params *params = NULL;
oned = FALSE;
}
oned = FALSE;
}
- if( argc != 8 ) {
- printf("usage: %s width height framefile inpattern outpattern codec tilerbuffer\n", argv[0]);
- printf("example: %s 320 240 frame.txt in.h264 out.yuv h264 tiler\n", argv[0]);
- printf("example: %s 640 480 frame.txt in.m4v out.yuv mpeg4 nontiler\n", argv[0]);
- printf("example: %s 720 480 frame.txt in.vc1 out.yuv vc1ap tiler\n", argv[0]);
- printf("example: %s 320 240 frame.txt in.vc1 out.yuv vc1smp nontiler\n", argv[0]);
- printf("example: %s 1280 720 frame.txt in.bin out.yuv mjpeg tiler\n", argv[0]);
- printf("example: %s 1920 1088 frame.txt in.bin out.yuv mpeg2 nontiler\n", argv[0]);
+ if( argc != 9 ) {
+ printf("usage: %s width height frames_to_write framefile inpattern outpattern codec tilerbuffer\n", argv[0]);
+ printf("example: %s 320 240 30 frame.txt in.h264 out.yuv h264 tiler\n", argv[0]);
+ printf("example: %s 640 480 30 frame.txt in.m4v out.yuv mpeg4 nontiler\n", argv[0]);
+ printf("example: %s 720 480 30 frame.txt in.vc1 out.yuv vc1ap tiler\n", argv[0]);
+ printf("example: %s 320 240 30 frame.txt in.vc1 out.yuv vc1smp nontiler\n", argv[0]);
+ printf("example: %s 1280 720 30 frame.txt in.bin out.yuv mjpeg tiler\n", argv[0]);
+ printf("example: %s 1920 1088 30 frame.txt in.bin out.yuv mpeg2 nontiler\n", argv[0]);
printf("Currently supported codecs: h264, mpeg4, vc1ap, vc1smp, mjpeg, mpeg2\n");
return (1);
}
printf("Currently supported codecs: h264, mpeg4, vc1ap, vc1smp, mjpeg, mpeg2\n");
return (1);
}
/* error checking? */
width = atoi(argv[1]);
height = atoi(argv[2]);
/* error checking? */
width = atoi(argv[1]);
height = atoi(argv[2]);
- frameData = argv[3];
- in_pattern = argv[4];
- out_pattern = argv[5];
- strcpy(vid_codec, argv[6]);
- strcpy(tilerbuffer, argv[7]);
+ frames_to_write = atoi(argv[3]);
+ frameData = argv[4];
+ in_pattern = argv[5];
+ out_pattern = argv[6];
+ strcpy(vid_codec, argv[7]);
+ strcpy(tilerbuffer, argv[8]);
printf("Selected codec: %s\n", vid_codec);
printf("Selected buffer: %s\n", tilerbuffer);
printf("Selected codec: %s\n", vid_codec);
printf("Selected buffer: %s\n", tilerbuffer);
+ if( frames_to_write == -1 ) {
+ /* Default : 30 frames to write into output file */
+ frames_to_write = 30;
+ }
+
enum {
DCE_TEST_H264 = 1,
DCE_TEST_MPEG4 = 2,
enum {
DCE_TEST_H264 = 1,
DCE_TEST_MPEG4 = 2,
buf = (OutputBuffer *)outArgs->outputID[i];
DEBUG("pop: %d (%p)", out_cnt, buf);
buf = (OutputBuffer *)outArgs->outputID[i];
DEBUG("pop: %d (%p)", out_cnt, buf);
- if( out_cnt < 30 ) { // write first 30 frames to output file out_cnt < 300
+ if( out_cnt < frames_to_write ) { // write first 30 frames to output file out_cnt < 300
write_output(out_pattern, out_cnt++, buf->buf + yoff,
buf->buf + uvoff, stride);
} else {
write_output(out_pattern, out_cnt++, buf->buf + yoff,
buf->buf + uvoff, stride);
} else {
diff --git a/test_qnx/dce_test.use b/test_qnx/dce_test.use
index 413d849d851fb81f74aed66b419587962b5cafbe..9e511a1299cf8e01590d183b21d6c698a2d890ca 100644 (file)
--- a/test_qnx/dce_test.use
+++ b/test_qnx/dce_test.use
\r
Examples:\r
1. decoding h.264\r
\r
Examples:\r
1. decoding h.264\r
- dce_test width height framesize inpattern outpattern codec tiler/nontiler\r
- dce_test 320 240 framesize.txt inputfile.h264 outputfile.yuv h264 tiler\r
+ dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler\r
+ dce_test 320 240 30 framesize.txt inputfile.h264 outputfile.yuv h264 tiler\r
\r
2. decoding mpeg4\r
\r
2. decoding mpeg4\r
- dce_test width height framesize inpattern outpattern codec tiler/nontiler\r
- dce_test 640 480 framesize.txt inputfile.m4v outputfile.yuv mpeg4 nontiler\r
+ dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler\r
+ dce_test 640 480 30 framesize.txt inputfile.m4v outputfile.yuv mpeg4 nontiler\r
\r
3. decoding vc1ap\r
\r
3. decoding vc1ap\r
- dce_test width height framesize inpattern outpattern codec tiler/nontiler\r
- dce_test 720 480 framesize.txt inputfile.vc1 outputfile.yuv vc1ap tiler\r
+ dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler\r
+ dce_test 720 480 30 framesize.txt inputfile.vc1 outputfile.yuv vc1ap tiler\r
\r
4. decoding vc1smp\r
\r
4. decoding vc1smp\r
- dce_test width height framesize inpattern outpattern codec tiler/nontiler\r
- dce_test 320 240 framesize.txt inputfile.vc1 outputfile.yuv vc1smp nontiler\r
+ dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler\r
+ dce_test 320 240 30 framesize.txt inputfile.vc1 outputfile.yuv vc1smp nontiler\r
\r
5. decoding mjpeg\r
\r
5. decoding mjpeg\r
- dce_test width height framesize inpattern outpattern codec tiler/nontiler\r
- dce_test 1280 720 framesize.txt inputfile.bin outputfile.yuv mjpeg tiler\r
+ dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler\r
+ dce_test 1280 720 30 framesize.txt inputfile.bin outputfile.yuv mjpeg tiler\r
\r
6. decoding mpeg2\r
\r
6. decoding mpeg2\r
- dce_test width height framesize inpattern outpattern codec tiler/nontiler\r
- dce_test 1920 1088 framesize.txt inputfile.bin outputfile.yuv mpeg2 nontiler\r
+ dce_test width height frames_to_write framesize inpattern outpattern codec tiler/nontiler\r
+ dce_test 1920 1088 30 framesize.txt inputfile.bin outputfile.yuv mpeg2 nontiler\r
\r
Currently supported codecs: h264, mpeg4, vc1ap, vc1smp, mjpeg, mpeg2\r
\r
Currently supported codecs: h264, mpeg4, vc1ap, vc1smp, mjpeg, mpeg2\r