1. When insert long-term reference frame the tid refs should also be
updated.
2. When insert short-term reference frame the queue update direction has
error. It is fixed now.
3. Long-term reference frame delay_cnt update method is fixed.
4. Dump valid flag when dump cpb frame status.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8db6e71ee5366fefdd1d91018c500d3edc05c6aa
The check on short-term config should use short-term config count rather
than long-term config count.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0006fe9a30035f636411702290cd9dff4032296d
When encounting IPIPPPP... stream, the first IP will be kept in dpb
unflushed. This will lead to dpb used size keep growing and memory leak.
Change-Id: I7973c8b18d13a63d10b0d4f034aefb58a3805ab2
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
When qp limit in codec_cfg is changed the rc_cfg should be also updated.
Change-Id: Ia5da305c015e6bc11836b6c358ddee6be51e819a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Searching for star code prefix should not exceed buffer length.
Otherwise 00 outside source buffer will be take as picture start code
when there is 00 00 01 at the end of source buffer.
Change-Id: I04f62e2f638bd721815004b86cf3d75d256d03de
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. Fix bit calc when gop set 0 or 1
2. When gop set 0, will set 300 for bit calc
Change-Id: I8c6f8dfd634a5c5cee760de6226f156e897d91b0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Change interface of adding stream prefix which is adding sei packet in
H.264/H.265.
The sei will be added with certain type:
1. version info
2. rate control info (rc api name + rc cfg)
3. user data
Change-Id: Ic17efb6b9f75db774b7ad7e7cc78818170260def
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When only bps is updated the whole rc_usr_cfg should be updated.
Change-Id: I02ed8fa247b3b56ac286254c55251b594ff2fab2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
This function is for debugging usage.
Encoder will write mpp version info before each IDR frame.
Change-Id: I03e2f2a7d751e9ecc3122314c2b3de8aa31b910d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The codec will not handle IDR request directly. The force idr / force
LTR will be config to codec by cpb info.
Change-Id: I9aba12ea3080256451115b9fd77433b67e318cf3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Clear cpb on MppEncRefCfg updated in mpp_enc_refs_set_cfg.
2. Clear encoder header status on MPP_ENC_SET_RC_CFG control to
regenerate new header.
3. Update rc user cfg on enc_ref_cfg updated.
Change-Id: I0ababab44611be24e62d2c00e1f281834fcfbcee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When reencode is needed the slice write need to read reorder repeatly.
So the fifo structure is not suitable for this case.
The read / write / rewind access mode is better.
Change-Id: Ifdfce20a91b27f571825b74090d47a530e9e1132
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
tips: control cmd for immediate_out, can send both before and after mpp_init.
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: Ibe66878cfab1f592b952d01bee3adade7c9d31bc
Add simple tsvc4 config to mpi_enc_test for test.
Change-Id: Icdb5a91106351a00d3eb07dc233b9341084c5abe
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add MppEncRefs cpb info to H.264 encoder flow
Change-Id: I7ba26a7c7a2f0e860438af38283ec429128c7351
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add MppEncRef/MppEncRefs module
MppEncRefs is for mpp encoder coded picture buffer (CPB) management.
MppEncRefs will gnerate reference buffer status EncCpbStatus for each
encoder to implement its own process.
Change-Id: I5f85a0f46dc6bc40954b0393ba52ad4008565643
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Add MppEncRefCfg for reference frame relationship configure.
MppEncRefCfg is for user to setup its own gop reference hierarchy.
Setup flow:
mpp_enc_ref_cfg_get_preset (can be ommitted, helper for setup lt/st cfg)
mpp_enc_ref_cfg_init
mpp_enc_ref_cfg_set_cfg_cnt
mpp_enc_ref_cfg_add_lt_cfg (can be omitted)
mpp_enc_ref_cfg_add_st_cfg
mpp_enc_ref_cfg_check (IMPORTANT: need to check before contol to mpp)
control to mpp
mpp_enc_ref_cfg_deinit
Change-Id: Ia0f5c4c713a4b11d8e4e5581609f8501f36549cc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>