Commit Graph

18 Commits

Author SHA1 Message Date
Yanjun Liao
ce39aff31f feat[dec_test]: Add buffer mode option
Add an option in dec_test to demo zero-copy external buffers mode.

use -bufmode to config the buffer mode option
hl - half internal mode
i  - pure internal mode
e  - pure external mode

Change-Id: Ib92c30acd8c370843becb286c935de056b09bcbd
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2023-11-29 09:54:36 +08:00
Herman Chen
5d89c2cc32 chore[mpp_dec]: Decoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I839cd04d14a38f4553785c44667758df69aa9929
2023-11-29 09:54:36 +08:00
Herman Chen
2b35cee0ce [mpp_log]: Add more log helper function
1. Move mpp_log.h to inc for external user.
2. Add mpp_debug.h for mpp internal logging.
3. Fix some warning.
4. Add log level setup function.
5. Check env log_level value in mpp_get_log_level call.

NOTE:
1. mpp internal module should use mpp_debug.h and mpp external user
should use mpp_log.h
2. Use mpp_get_log_level to update mpp_log_level when the env changed.

Change-Id: I90a55a02a72db177533013280dfe111ca3479229
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-20 11:42:10 +08:00
Jeffy Chen
c07169d533 [misc]: Fix a few compile warnings and errors
Reported by llvm-clang.

Change-Id: I62f22fe5754d3e8d77405d213c81fda5d9f5e27d
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2022-03-11 17:45:10 +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
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
1894648650 [test]: Rename data type in mpi_dec_mt_test
Change-Id: Ia060fea489f3e5b63f1098db64fd5e0ea3dbd463
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-13 15:45:53 +08:00
Herman Chen
dbda66de53 [test]: Add quiet flag to decoder test log
Change-Id: I9472760ede918a913957b336665d7e0367b661c5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-04-30 18:43:16 +08:00
Herman Chen
7dd312a457 [test]: Use different function name in dec tests
Change-Id: I672abbcc654f084b52d337c61d55218d7f342f7b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-03-05 14:11:06 +08:00
Yandong Lin
4d82e3e9ab [dec_test]: Optimizing mt/multi test
1. Add FileReader
2. Implement frame_num(-n) param setting

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I15c169e6d8a8ce74f838402d4360436ecd0a1829
2021-01-14 08:51:41 +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
Jeffy Chen
2de0509cbb [test]: Fix stringop-truncation warnings
Fix this warning when building with newer GCC:
warning: '__builtin_strncpy' specified bound 256 equals destination size [-Wstringop-truncation]
|   106 |   return __builtin___strncpy_chk (__dest, __src, __len, __bos (__dest));
|       |          ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| In function 'strncpy',

Change-Id: I6341fa4e507f644b143a8e266f3df267fbd9c566
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2020-09-08 09:05:59 +08:00
Herman Chen
37602b5bb9 [test]: Skip error opt on parsing parameter
Change-Id: Ia5935b55bf0a09158b4ebd40656de6e813e880c4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-10-10 16:29:43 +08:00
Herman Chen
0a78fb7102 [mpp]: Combine block control and timeout control
Use MppPollType as block control MPP_SET_INPUT_TIMEOUT and
MPP_SET_OUTPUT_TIMEOUT 's parameter.
Deprecate old block/block_timeout control.

Next step is to change MppPollType to RK_S64 for compatible in different
platform.

Change-Id: I02974f0b8eeb23ff43687448d6c3271ea7dd0a2c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-07-27 11:56:56 +08:00
Herman Chen
b403830430 [test]: Update decoder test function
1. Add buffer group clear when buffer group exists.
2. Add buf_size and limit to buffer group
3. Add max memory usage calc to mpi_dec_test
4. Set mpi_dec_multi_test default thread count to 1

Change-Id: Ia165c9a213b0aed9bc634121dd70776fd6c4801f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-05-28 09:51:22 +08:00
Herman Chen
25271e9ad0 [test]: Add mpi multi-thread decoder
Add new test case for multi-thread input / output.
This demo is for performance test and multi-thread decoding.

Change-Id: Iec979ba214dc189d26d2733e90e00ebd7d204f4a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-03-23 18:42:48 +08:00