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>
1. Add jpege_api_v2 module.
2. Move all control process to jpege_api_v2
3. Add hal_jpege_vepu1_v2 and hal_jpege_vepu2_v2 modules.
3. Add default rc for jpege.
Change-Id: I08c8adeb2d6613cbc074ee4978b9533739c21bb1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Set default node to 800 and info to 80.
2. Fix mpp_trie_test compile warning.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie63ce123e18fefc3108d3be7cbdc50e08c21f846
On FIXQP mode all qp will be set to init_quality.
Change-Id: Ic614c583e5dba0e5e4e129f46437adc87cd13fa0
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
For better binary comaptibility users should use this method to
configure encoders.
NOTE: api only init once.
Change-Id: I5ced15b504e4933560895e6e11f62613ae89e350
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
MppTrie will use the location of the input stream pointer as its
indexing pointer.
Change-Id: I2cb0b7d9cc2452db5698a971d08a24b98e5bc587
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
We are going to use new configure method for all encoders.
Change-Id: Id478d2567714ee9c6ddee3d410a4a855825f1c42
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
H.264 qp_sum is calculated by summon up 16x16 macroblock qp.
H.265 qp_sum is calcultaed by summon up 8x8 block qp.
Change-Id: I08d483d9cb997b25b9b6258259cb3b2290da3e4a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Fix h.264 encoder roi buffer leak error.
2. Set all qparea to [1, 51] range.
Change-Id: I8434fc5fc60071ec533aba68fc2fe3be5a087bcd
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
When gop / fps / rc_mode in RcCfg is changed the header should be
resend.
Change-Id: Id055cfe2f752dc741dc05012f954198c00077caa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>