Commit Graph

238 Commits

Author SHA1 Message Date
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
Lin Kesheng
c1665998c3 [h264e]: transform_8x8_mode is not limitted for smaller resolution
Change-Id: I5ba70b325580c0936d72bc553a95f1c208533271
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-28 14:51:33 +08:00
Lin Kesheng
422ecbc204 [mpi]: change rc mode and quality definition
Change-Id: I87008d7294acaa89d9206e5b1cd1ce74c40d4af4
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-14 15:50:06 +08:00
Lin Kesheng
3582a78e34 [hal_h264e_rkv]: implement mb rc configuration
1. add H264eRcCtx to control mb rc
2. define H264eRkvMbRcCfg to list cfgs on each level
3. merge from trunk
4. implement checpoint error_bits and delta_qp according the
   relativeness between qp and bits
5. correct qp_adjust
6. merge from trunk
7. correct traget_bit_error
8. VBR: adjust qp_min/qp_max according to quality configuration

Change-Id: I25eefc992c6e68842a675fd04286d0564bd5d2c2
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-10 11:03:39 +08:00
Lin Kesheng
73f2ee87a7 [h264e]: add SEI writing
1. write prep/codec/rc cfg to SEI
2. mpi_enc_test add SEI writting test
3. write SEI one sequence once defaultly

Change-Id: I7dd00a20afe101d7ddf17c875f0704d91a8fea2b
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-02-06 14:23:09 +08:00
Jung Zhao
a487b11725 [rc_test]: fix fps float exception
rc_test doesn't provide value to rc_cfg->fps_out_num, so fps is 0
inside mpp.

Change-Id: Ic92e86ecc45814087efb4b796a997ae51cb33799
Signed-off-by: Jung Zhao <jung.zhao@rock-chips.com>
2017-01-20 10:20:10 +08:00
Herman Chen
b1a5c18ef9 [mpi/mpp]: Remove MppEncConfig interface
Change-Id: Ie85b780076b22342bfc1837beef00036f5f40a04
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2017-01-06 18:00:36 +08:00
Lin Kesheng
5fca2c7645 [rc_test]: debug through demo under new framework
set and configure codec_cfg

Change-Id: I40f404c525f588f5555ca8d37ff9509483128d3d
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-01-06 16:45:26 +08:00
Herman Chen
4c1ae218e6 [mpi/mpp/enc]: New encoder framework
1. Interface change:
Separate normal config into three basic config and several runtime config:
Three basic config -
a. rate control config
b. preprocess config
c. video codec protocol config
More flexible rate control interfaces are provided.
More codec configure interfaces are provided.
Change flag with bitmap is provided for further optimization.

2. Remove old codec config from controller and left rate control module only
Encoder controller only handle user rate control requirement and bit allocation.
Hal hardware encoder only handle qp calculation according given target bit.
Remove all old codec code.

3. Move codec process to hal
Different hardware will share same codec process function in common protocol
directory. And different hardware api will register to same api set. Codec
header generation is moved to separate hal directory.

4. Encoder will return length by task
Encoder will NOT get stream information feedback from controller. All
information required by encoder will be all stored in Task.

5. Add mpp_rc for rate control
Move some common rate control utils to mpp_base.

6. Update mpi_enc_test and mpi_rc_test with new interface

Change-Id: Iebb5e276a48f547167e1bed4673f21cc2f0c8ad5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2017-01-05 10:58:27 +08:00
Herman Chen
d8ed1f4eb1 [mpi]: Add poll interface to mpi
1. Add poll with timeout. Support three mode: block/non-block/timeout.
2. Change control MPP_SET_INPUT_BLOCK and MPP_SET_OUTPUT_BLOCK.
3. Remove msleep in most mpp interface.

Change-Id: I39d9a261b6f1da66c6cb944abd71d1e7f4928d2d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2017-01-04 15:15:37 +08:00
Herman Chen
12a7c735e5 [test]: Add more comment to mpi_dec_test
1. Use half internal mode for demo
2. Add decoder memory mode description

Change-Id: I5b72063e55c2228050af7bafe743e0b9ad834721
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-12-09 16:46:28 +08:00
Herman Chen
bbe38e38a7 [test]: Add return value for test
Change-Id: I4f64b3ffebda6b966cd898ba317d088be967d5d6
2016-12-01 14:17:30 +08:00
Lin Kesheng
762f5fcedd [mpi_rc_test]: add ratecontrol test demo
1. encode one frame and decode it immediately
2. calculate ratecontrol stats and export
3. support enc_input fmt 420p/420sp

Change-Id: Iad751097de0ecea0d7afcef2bc12b9d92c5f9d05
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-30 16:11:56 +08:00
Herman Chen
5e5f667d68 [dec]: fix mpp_packet error usage in test
1. mpp_packet length is the valid data size, fix this in copy_init function
2. in mpp_dec_test setup pos and length only do not touch data and size

Change-Id: Ic1bb15126fa09e7da0869ea79ec85ad2869c3955
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-29 10:10:31 +08:00
Herman Chen
102453612b [test]: Set decode test packet size to 2K
Due to current decoder does not support multi-frame data in one packet we have
to limit packet size to a small size. So that one packet will not contain
multiple frame.
This is a modification for internal auto-test environment.

Change-Id: I3bb14c62874ed693b7b9125f21ca342abe54c732
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-28 15:00:15 +08:00
Lin Kesheng
723ffae18e [mpi_enc_test]: fix mpi_enc_test read src frame bug
1. read src frame with real width and height of picture,
   rather than virtual ones.
2. configure correct hor_stride & ver_stride for hardware
3. support yuv420/420sp for mpi_enc_test demo and video
   app, and is compatible for old interface

Change-Id: I1fc23dc2954577b28e25b80a4dcdd1536d45d622
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-24 17:52:44 +08:00
Lin Kesheng
1a9d6af7b9 [h264e_controller]: add set idr frame interface
Change-Id: I3fdaccd95b6570b2994d7a8ddb1db5d4cc066600
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-15 14:29:00 +08:00
Herman Chen
163ef0ecd9 [test]: add help for max frame number in enc test
1. add help log print for max frame number
2. change flag from -F to -n

Change-Id: Ie45681d2b0a6bdd90733b6a6e1c455325eca89b9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-11-07 20:25:08 +08:00
Lin Kesheng
4d2fa9ae4c [mpi_enc_test]: add option num_frame
1. add option num_frame
2. reduce osd region size

Change-Id: I560686178c902755b49422b9c7c89889338216bd
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-11-03 14:15:49 +08:00
Lin Kesheng
fad35922fc [h264e_rkv]: pack cfg into SEI and write to stream
1. add SEI writting interface
2. write extra_info_cfg and rc_cfg to SEI
3. stream_get_pos use s->buf_plus8 rather than s->p_start

Change-Id: I71de4d6f5dc31f21c0a32dc5ded275ced260d861
Signed-off-by: Lin Kesheng <lks@rock-chips.com>
2016-10-25 20:54:06 +08:00
Herman Chen
e9520d5cb0 [mpi_dec_test]: cleanup test case
separate simple and advanced process

Change-Id: Ie278357e69bb0748e9958952e3a7f5560c75d024
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 20:08:32 +08:00
Herman Chen
04b6a23ce2 [test]: modify mpi_dec_test for mjpeg decoding
1. clear input packet length when packet is copied
2. modify mjpeg advanced decoding path in mpi_dec_test
3. add numerator and denominator set prop function
4. remove extra log on first info change
5. fix eos process and buffer size check in advanced decoding flow
6. fix jpegd stream length config error

Change-Id: Id6c26ebda090eb4076f27deaad4d61b4221f2653
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2016-10-10 11:03:59 +08:00