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>
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>
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>
Move yuv read function and yuv create function to utils.
Change-Id: I79a861ce869c182a27ed51a976eeb08f1f230d6e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Add task enqueue and dequeue test for demo and performance evaluation.
Change-Id: Ib1c60f85f9776cde7e30ee62a3941921331a434f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>