Commit Graph

259 Commits

Author SHA1 Message Date
Herman Chen
681599f97f [test]: Update utils for encoder test
1. Move command parsing to util files.
2. Support frame format and coding type detection.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id1df67ba61943bb7aa1f02ccccaa932fb5ae9842
2020-04-07 15:25:56 +08:00
Herman Chen
fe4b86b025 [mpp_enc]: Update OSD API
1. Update OSD palette config API. User must specify palette is default
or user defined.
2. OSD palette config will go through control and OSD data (region)
config will go through meta data in each frame.
3. Remove unused code.
4. Add mpi_enc_utils for mpi_enc_test cases

Change-Id: Ib4aeb60789a3e999446212841508e604533efb3c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-04-02 18:21:20 +08:00
sayon.chen
28bc434e72 [mpi_enc_test]: update mpi_enc test case
1. Support video stride and bitrate config
2. Support mpp_enc_v2 h265 codec config
3. Support roi & osd config used meta path
4. Support tsvc config set
5. Support file format check according to file extension

Change-Id: Ib0cedf83867e3cda67159dc7ae5717a67495575c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-28 15:00:42 +08:00
Herman Chen
f941d184be [test]: Add header extraction for H.265 encoder
Change-Id: Idc6760c5fe95c90adeddf42afb3948e35c839af6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-26 14:52:13 +08:00
Francis Fan
d4cae78524 [mpp]: cancel release mpp_frame in put_frame api
NOTE: This change may effect some existed program.
MPP caller should always follow the rule that the resouce creator must
be the resource destoryer. So caller of encode_put_frame should release
the input MppFrame structure and MPP should not release the input frame.

Change-Id: I36897dbbf1697002ae64868f2385961472eeb7c5
Signed-off-by: Francis Fan <francis.fan@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-20 17:43:39 +08:00
Herman Chen
6cee8bb11a [h264e]: Add slice split function
Slice split has two modes: split by byte and split by CTU number.

Change-Id: Id5a07f8a8cae612b6b913e9cb747dacec5b8e5a2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-07 15:32:29 +08:00
Herman Chen
54b047e396 [cmake]: Add history log
1. Remove SVN version record.
2. CMakeLists will record max 10 git version.
3. Use mpp_show_history to control the history display.
4. Use strings libmpp.so | grep author to get history log from binary.

Change-Id: I5231ced4031d868fe1329488c914730dc91a3531
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-04 11:05:50 +08:00
sayon.chen
caee16c968 [h265e]: Add fixqp flow
Move fixqp mode from VBR+CQP to rc_mode FIXQP.

Change-Id: Ia29471ecd81bb1a4759f6e6f1d7e37515341eb8c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-02-27 15:37:42 +08:00
Herman Chen
459eace205 [mpp_frame]: Add color format print
1. Add color format print for all supported format.
2. Add RGB color fill function.

Change-Id: I79fb3f40402b6fb6e36883c99945e709723aee7d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-12-31 10:53:33 +08:00
Herman Chen
7b47085c19 [test]: Add output block for mpi_enc_test
Set encoder output to block mode in mpi_enc_test.

In some case the demo will get NULL return packet. Use block mode to
avoid this error.

Change-Id: I8e7438b07f024a30f62bbb92382e210b06e47a61
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-11-21 10:19:09 +08:00
Herman Chen
ea476ad4d1 [misc]: Change internal API interface
1. Change internal api RK_S32 cmd to MpiCmd.
2. Remove external MppEncCfgSet in MPI and move it internal data.

Change-Id: I0b93429f3b9f92712a57d0df54a1c76b3e08bf9d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-10-14 20:21:41 +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
cd9a1cca3f [misc]: Change interface header file dependency
Move MppCtx, MppParam, MppFrame, MppPacket, MppBuffer, MppBufferGroup,
MppTask and MppMeta to rk_type.h.

Later development need to bring in cross reference between these
objects. So we choose to move these declaration together.

Change-Id: I7ea39138ca87d6ca4cb86556464a5de89d172846
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-06-14 10:15:12 +08:00
Johnson Ding
90b2a3838c [vpu]: Fix encoder's improper operation with eos
When encoder receives an empty frame with eos flag set, encoder will
encode an unreasonable extra frame.

Change-Id: I3bd1a2c84780f1b6212171117b67319b2f613b9f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2019-04-12 09:52:02 +08:00
Ding Wei
3e5ad4fed3 [h265e]: add h265 encoder code
Change-Id: I08350dc76d3040bc1a16a3d8234f836f5fbf69d0
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2018-11-21 09:59:31 +08:00
Herman Chen
4553fac11e [test]: Add read packet config function
When mpp output packet binary file with size config file test case
should be enable to parser the corresponding config file.
This patch implement the config file option with "-c" prefix.

Command line sample:
mpi_dec_test -t 7 -i /sdcard/in.bin -i /sdcard/ops.bin
Then the test case will read in.bin file with size division specified
in ops.bin.

Change-Id: I8b18a6475d77f0303f12614a063888dcd9505f16
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-11-21 09:57:32 +08:00
Herman Chen
203ff537c3 [test]: Fix not enough buffer on YUV444 jpeg decode
When decoding YUV444 jpeg image the buffer size should be larger.
Also we add user specified output format support for jpeg decoding.

Change-Id: If8defbc23162dac111aafee6d96d2726c366b7da
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-12 16:03:08 +08:00
Herman Chen
3f22788c07 [test]: Add infinite loop decoding mode
When max frame count is set to negtive value mpi_dec_test will always
loop input file.
This is usefull for longterm pressure test.

Change-Id: I64336d5ec6411ee3712b951ef0b0c02bd5f453cf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-10-10 10:52:31 +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
741cf4a920 [test]: Improve mjpeg decode file output
Change-Id: Ib0f58417acfa9daa2de1e5db9bdc11d16e7ef693
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-06-28 16:29:31 +08:00
Herman Chen
89a1fd39ba [test]: Fix NULL buffer group input for usage
When decoder frame buffer group does not exist do not call usage
function.

Change-Id: I677d9bf1cd116886b94959c90161a4500795eacc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-06-07 17:31:13 +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
e38a5ad357 [test]: Add frame count limit to mpi_dec_test
Add max frame number parameter with "-n" option to mpi_dec_test.

Change-Id: I21c00baee4d94cab69a95060ac5a694cd9f28945
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-05-23 10:49:49 +08:00
Herman Chen
866b6bd170 [test]: Simplify mpi_enc_test
Remove motion detection / ROI / OSD setup from mpi_enc_test. These
complicated funciton will be move to a new test case later.

Change-Id: I8b212a191f4e1ba6a4ec21a23fd2f4cc51dc4c5d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-05-10 08:34:21 +08:00
Ding Wei
4863d54ff3 [mpp/test]: remove some module test file
Change-Id: I482f55c6120d706ff123b116b5ace4f30776f7a6
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2018-05-04 10:00:28 +08:00
Herman Chen
4e030fa170 [test]: Move some function to utils
Move yuv read function and yuv create function to utils.

Change-Id: I79a861ce869c182a27ed51a976eeb08f1f230d6e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-04-27 17:20:24 +08:00
Herman Chen
77f33cbcb4 [test]: Add delay calculation on performance test
Change-Id: Idc058e900c46ebce406ff0739d6e73e4e78b3cd8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-04-03 15:25:18 +08:00
Herman Chen
87da5bef82 [test]: Add yuyv422 and uyvy422 test case
Add yuyv422 and uyvy422 support to encoder test case: mpi_enc_test.
Note: on these two case the hor_stride should be twice of width.
With this modification test case can output correct stream now.

Change-Id: I463d3c158369d831e4558199c917023773300ac1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-03-29 12:01:55 +08:00
Herman Chen
5d6b20385e [legacy]: Fix vpu_api_test memory leak issue
Data in DecoderOut_t is malloc from vpu_api_legacy. And Android OMX
component is following this rule for historical reason. We have to
change test case to support it.

Change-Id: I202525eecc461bd9507cfa2c376de11e2fc6fc9b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-03-27 16:17:59 +08:00
sliver.chen
0a73f9f75a [test]: bench mark unit test
Add multi-instance test case with multi-thread decoding.
This test case is mainly for platform performance evaluation.

Change-Id: I79d86a01778c2e7af00e13d1d3c3d2937bcbbcce
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2018-03-26 15:49:40 +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
sliver.chen
bf702db051 [test]: add argb fmt support for unit test
modify read yuv image method and buffer size.

Change-Id: I5a5dd63fd98831a744801d5504f4ac6d2e0fcebc
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2018-02-23 11:38:49 +08:00
sliver.chen
1c7586932c [test]: remove roi control cfg except avc type
ROI cmd just avaiable in rkvenc,but also we need to 
ignore it in vpu. or will leads to warning about
unknow vpu cmd.

Change-Id: I9a630171df5698ae5d39bb2e5c38f06b2f988893
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2018-01-23 08:36:25 +08:00
timkingh.huang
1acefd6207 [h264e]: add configuration of ROI
Change-Id: Ieba60baedc8fabd248112636f5ea59a107775403
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2018-01-15 18:34:28 +08:00
Jacob Chen
81759e832a [build]: correct install directory and generate pkgconfig for linux
Change-Id: Id4f6b2278ee0fe50ffc9806fffc5b01267f723db
Signed-off-by: Jacob Chen <jacob2.chen@rock-chips.com>
2017-12-19 10:51:24 +08:00
Ding Wei
785b0f220d [cmake]: Partly merged Android and Linux branch
Use libmpp.so / libvpu.so on Android.
Use librockchip_mpp.so / librockchip_vpu.so

In early stage we use libmpp.so / libvpu.so on Android. later we found
it is better to use vendor name as library prefix. So we fix the name
rule on Linux platform.

But due to historical reason we can not change all sdk to use the same
name. So we choose to use this ugly method to define the name according
to different target platform.

Also we add version to library but Android has binary name issue so we
have to disable version on Android platform.

Change-Id: I785c3bc740f345e473f2d81c5cd2a4e32a1bf0bc
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-12-18 15:15:07 +08:00
sliver.chen
3f6fc99b81 [test]: modify sleep time to improve the decoding effciency
it is obvious.

Change-Id: I9ce91996ff6cebad01297281a6a0f3e5632680e5
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-12-12 20:46:48 +08:00
sliver.chen
b625ced0af [test]: add err info check when decode
mpp will output error yuv data when process error input stream.
We should check it and discard those error frame to avoid display error.

Change-Id: I04423b5fad13e727594b06c217f491227e465fce
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-11-08 11:22:01 +08:00
sliver.chen
033694705b [test]: modify to avoid encode dead loop
modify ret val of read_yuv_img to avoid test_mpp_run
dead loop in mpi->poll.

Change-Id: If1b907584d0a79f9a5def168eec9358440e38aee
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-09-08 16:21:14 +08:00
sliver.chen
e31f34a749 [test]: add README.md for mpi unit test
Change-Id: Ia540cd26cf33f3205cbf3629b3fc2ac3a080cc7d
Signed-off-by: sliver.chen <sliver.chen@rock-chips.com>
2017-09-07 17:43:27 +08:00
ayaka
e710c126ad [test]: add timeout poll type sample code
You could enable the output timeout with a new opinion
"-x" the unit is the millisecond.

Change-Id: Ibfc85729d867a08d1984c8e7b2d63b197159a42b
Signed-off-by: ayaka <ayaka@soulik.info>
Signed-off-by: Randy Li <randy.li@rock-chips.com>
2017-08-03 17:43:43 +08:00
Herman Chen
137dc9d5fb [base]: Add mpp/base/test for task en/dequeue demo
Add task enqueue and dequeue test for demo and performance evaluation.

Change-Id: Ib1c60f85f9776cde7e30ee62a3941921331a434f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-07-05 11:35:40 +08:00
Herman Chen
e2a45eed9d [test]: Fix rc2 test rc_mode error
Change-Id: Ie4feb07cbe1d3c23e0e78f4e87404f4751a08e00
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-06-22 16:36:05 +08:00
alpha lin
078f6aba84 [test]: add new rc test
Change-Id: I1d076b8454d2de6fb5a6e9bf9c8ab9aed96eeca3
Signed-off-by: alpha lin <alpha.lin@rock-chips.com>
2017-06-09 08:56:59 +08:00
Alpha Lin
acba8f17d3 [test]: add auto test modules
Change-Id: I51e1d0d192bb8d673380e5f1dde97929f15473a4
Signed-off-by: Alpha Lin <alpha.lin@rock-chips.com>
2017-06-09 08:56:50 +08:00
Herman Chen
61fb2802d0 [legacy]: Fix for windows simulation compile
Change-Id: I1f3ea32878b194ecaf380f1af5cca33179aa8300
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-04-07 10:13:44 +08:00
Randy Li
4cb24ef6a6 [test]: mpi demo won't link with mpp legacy library
In the future, the legacy vpu api won't be supported and the wrapper library is
not offered anymore.

Change-Id: I4019d689693e193d66fc222cc3e5662d7d6cc58d
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-03-29 16:27:28 +08:00
Lin Kesheng
cad4b4b886 [h264e]: add rotation configuration
Change-Id: I148814a644264b341d6db1d7af767dd485942829
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-03-28 14:08:41 +08:00
Randy Li
04e3ffb69c [test]: fix the align problem in decode_advanced()
The old Video IP like VDPU1 only supports align with 16 bytes,
it would causing a numbers of memory problem without that.

Change-Id: I7570808824ab2e32602c8cae7f97c9b6b2947db9
Signed-off-by: Randy Li <randy.li@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-03-24 15:54:59 +08:00
Lin Kesheng
a9840b7dfb [h264e]: implement SEI writting
Change-Id: I7e4960983fd20e924752b143dc368af4ebc44eb5
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-03-22 15:45:53 +08:00