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>
New reference frame config interface will be added.
Change-Id: I5766cefde12237561bbc20c905e47ed2d3e90011
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
gcc 10 uses '-fno-common' by default[1]. It means that global
variables must be declared with the 'extern' keyword, otherwise
a link error will occur.
References
----------
[1] https://gcc.gnu.org/gcc-10/porting_to.html#common
Author: Daniel Bermond <danielbermond@gmail.com>
Date: Mon May 25 16:04:32 2020 +0000
Change-Id: I9a326388588679722a33d62986ba2ff056524d7c
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
When MppPacket is inited from MppBuffer the length should be clear to
zero.
Change-Id: I7b588fe426dba0e29ec683f057231569866986a6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. hw_length should be only updated by hardware real stream length.
2. hw_length can be updated multi-times by slice encoding.
3. When reenc found the hw_length should be subtracted from total task
stream length.
Change-Id: I1c3f6affcc5dc90ad548a42efed0237c60b98f08
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Hardware output stream length includes the 64-bit header aligned length.
So we need to subtract aligned length to get the real hardware length.
Change-Id: I78f16afa02bc4428613cafcca9b8bde9241ba997
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
The error from mpp_device should be returned to caller.
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
Change-Id: I0ae505477c1afdfc306e1d4d1dd804f842e246ce
When mpp_device has error the error return value should be record.
Signed-off-by: Zhou Jing <tracy.zhou@rock-chips.com>
Change-Id: I8fcb34bbfc9335bbd2393e4f4f7a26f53b7c856a
Remove all mpp object from vpu.so
NOTE: link_directories should be before add_library or add_executable.
Change-Id: Idee25e1ccc2c3182f7b8c26c277d396e28654f3e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
1. Remove prefix before some args.
2. Add node count / info count calculation.
NOTE: the info count is correct but node count may have error.
Change-Id: I3a7d1005f440105eaf4b6d6326e92aa77d7d7e2a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Use whole-archive option to include all function in mpp_base.
2. Reduce mpp_enc_cfg table size.
Change-Id: If8358b13a788d6b81c4f84d2a183e9ec8d080cc5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Change interface for adding color range to MppPrepCfg.
2. Add option in MppEncCfg.
3. Add H.264 / H.265 sps support on full / limit range.
IMPORTANT: the binary backward compatibility is broken since this commit.
Change-Id: Ib68f29bab5c6d364fe8b612bd4dff2ecd5bc59cd
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When max_reenc_cnt is zero the reencode flow is disabled.
Change-Id: Iba600b37bb5ab6e4f720b652d59abfae36f9e52f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>