Commit Graph

15 Commits

Author SHA1 Message Date
Xinhuang Li
aa5c13d3a8 [test]: init encoder output packet length to zero
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: Iae1bdf28104ea7d7dc9929c267556fe6bf36299b
2020-07-24 14:59:18 +08:00
Herman Chen
0b4532c6d5 [rk_mpi_cmd]: Add max_reenc_cnt for reencode flow
When max_reenc_cnt is zero the reencode flow is disabled.

Change-Id: Iba600b37bb5ab6e4f720b652d59abfae36f9e52f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-15 15:48:06 +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
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
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
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
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
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
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