Commit Graph

15 Commits

Author SHA1 Message Date
Hongjin Li
8c13cd93b0 [mpi_enc_test]: add slt testcase
slt verify file:
mpi_enc_test -w 4096 -h 2304 -t 7  -slt enc_xxx.verify -n 5
mpi_dec_test -i <inputfile>  -t 7  -slt dec_xxx.verify -n 5

Change-Id: I528fcd8d1adf8821c1555790cd8482108f219fdc
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-01-26 17:29:02 +08:00
Herman Chen
96d1664cd1 [test]: Use new option module
1. Use new option module in dec/enc test
2. Delete mpi_enc_multi_test and mpi_rc_test

Change-Id: Ib00020247386ee06cca2f560ae41aee8e88f47cc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-01-11 08:37:41 +08:00
Yandong Lin
0c3ddf2703 [mpi_dec_utils]: Fix ivf reader problems
Change-Id: I377a88838202080e143c44577bd4e5d01e57f392
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-12-24 14:51:14 +08:00
Yandong Lin
d19c408ec7 [mpi_dec_utils]: Fix read ivf file err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id13ef0ac2a43c78b09d2e3df2a8c84e88061f7f3
2021-11-12 17:13:49 +08:00
Herman Chen
f0c57cde02 [mpp_lock]: Add gcc atomic macro define
Change-Id: I3e94cc7be9a51f5d674a132c0a2e6f7afba61d34
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-11-03 11:27:35 +08:00
Herman Chen
fd20cf4740 [test]: cleanup test code
Change-Id: I6bf234c25b2d6709aaf095ce641812d58ad0ab68
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 18:19:54 +08:00
Herman Chen
180dd8136a [test]: Improve decoder tests
1. All cases use reader to improve performance.
2. Rename cmd parser and create share data on cmd parsing.
3. Add reader_size function to get file size.
4. Change test log flag to -v options.
5. Fix FileBufSlot release MppBuffer issue.
6. Use index_read in multi test to improve performance.

Usage:

mpi_dec_test -i xxx.h264
Decode to the end of input stream.

mpi_dec_test -i xxx.h264 -n 10
Decode to the first 10 frame of input stream. If the xxx.h264 has only 5
frames then loop decoding from the beginning.

mpi_dec_test -i xxx.h264 -n -1 -v qf
Infinitely loop decoding xxx.h264.
It is usefull for performance test.

mpi_dec_multi_test -i xxx.h264 -n -1 -v qf -s 8
Parallelly infinitely loop run 8 decoders with same xxx.h264 input.
It is usefull for performance test.

-v q  will disable each frame output log.
-v f  will enable fps print per second.
-n -1 will enter infinite decode mode. Press <enter> will quit the loop.

Change-Id: I3d54123f0e9b9a85cb35e4fea71ebf665889750a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 15:17:48 +08:00
Herman Chen
d56760acd2 [test]: Improve decoder reader usage
1. Change to new reader slot interface.
2. Use reader slot in all decoder test case.
3. Do not async reset on eos to avoid eos stream issue.

Change-Id: If296f6555fd0e57f6931085f02b0378e41a5f2ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-20 09:38:37 +08:00
Herman Chen
7b86c1abe4 [mpi_dec_utils]: Add decoder frame rate print
Change-Id: I46006cb51205ea98204c803f4753039409e8171d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-19 14:29:34 +08:00
Herman Chen
ee2b8bb7c2 [dec_utils]: Improve reader performance
Use a new thread to read the whole file. Then all decoder instance can
share one single reader and read input file only once.

Change-Id: Iddc3322286bf61e449074143bbfb90fd1ff6b70a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-14 14:49:31 +08:00
Herman Chen
6da83e59c3 [mpi_dec_utils]: Fix -f option check issue
Change-Id: I5495e37f7cebd397b1cf86408702a621c661aeba
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-23 14:05:21 +08:00
Herman Chen
841022f529 [mpi_dec_multi_test]: Add quiet flag to disable log
Change-Id: Iea28d4377212e4c18a91f30762ae8ec135702c16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Yandong Lin
025275ab26 [mpi_dec_utils]: Fix build warning under 64-bit
Note:
    warning: ignoring return value of 'fread', declared with attribute
    warn_unused_result [-Wunused-result]
         fread(ivf_data, 1, IVF_FRAME_HEADER_LENGTH, reader->fp_input);

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic2ec8c0a46d56f584be048f933fa17532a77ce20
2021-04-30 18:43:16 +08:00
Yandong Lin
5f748ee931 [mpi_dec_test]: Add FileReader for mpi_dec_utils
Support different format files as input:
1. Normal file, e.g. h264/h265 raw stream
2. Ivf file , e.g vp8/vp9 stream with ivf header

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I034693ae3e23bdde57c90ded7dd7248c50728122
2021-01-11 16:26:49 +08:00
Yandong Lin
eaf1e8f76b [mpi_dec_test]: Organize the common func of each dec test
1. Set these func into mpi_dec_utils
2. Note: num of threads: -n -> -s

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: If733fb0fdd7110313d2e140d3c50aad37260b6d2
2020-12-31 10:59:43 +08:00