Commit Graph

46 Commits

Author SHA1 Message Date
Herman Chen
4aa5b4a046 [mpp_enc]: Restore max_qp_step
1. Restore max_qp_step which limit the qp change between two frames.
2. Set default H.265 ip_qp_delta to 5.

Change-Id: Iacd795da7f2df46e60ab3f5c45bc8b0f30aff5a5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-31 18:03:17 +08:00
Yandong Lin
2111a438c5 [mpp_enc]: Update osd data cfg
1. Add new structure: MppEncOSDData2
2. Different osd layer use separate buffer

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3be533eb602f23192086f56e06a1439dbb19c35c
2020-12-31 10:00:13 +08:00
Herman Chen
de8ace6622 [mpp_enc]: Separate qp change flag
Separate H.264 QP limit change flag into 3 flags

Change-Id: I658ab337569f8f715bde7633dce02b631a7d4239
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-17 14:33:17 +08:00
Herman Chen
96a7affc2b [mpp_enc_cfg]: Add low delay to MppEncCfgSet
Change-Id: I5f9e595b44cc39cc255c69a875618ea36de5e878
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-12-12 09:47:09 +08:00
Herman Chen
7ae2f73bca [mpp_enc_cfg]: Add super frame config
Change-Id: I0df2db8fd7c5e10412584ded557da3962b77f882
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-30 09:46:27 +08:00
sayon.chen
5012336bc2 [enc_v2]: Suppport user data set
User data set is for multiple user data with uuid.

Change-Id: Iad952961ab6242ff3a14f554410144bebd3801ba
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-16 09:46:53 +08:00
yandong.lin
e54234a11b [vp8e]: Fix vp8e reencode and ivf problems
1. Not do reencode in vp8 enc
2. Add api to control whether need to add ivf header
   (default: have ivf header)

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I59a3a7193abead6c73e6e1eed593a115add77888
2020-10-23 10:07:10 +08:00
timkingh.huang
0f8aeda99d [comment]: add comments in the format of Doxygen
Change-Id: I1df49ed78b5b5cf88ff253c35c59cb0b061b4ea9
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2020-10-23 09:27:53 +08:00
Herman Chen
85ada595ee [mpp_enc_cfg]: Add encoder I frame tuning config
Add max_i_prop, min_i_prop and init_ip_ration for I frame tuning config.

max_i_prop:
The max percentage of intra frame size in one gop.

min_i_prop:
The min percentage of intra frame size in one gop.

init_ip_ration:
Define the first I frame size is how many times of one P frame size.
Set to 16 mean I frame size is equal to P frame size.
Set to 160 mean I frame size is 10 times of P frame size.

These three parameters are for tuning Intra frame quality.

Change-Id: Iac1e700fe2a51fb3a6ad94753784cd54ee789176
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-09-23 10:28:43 +08:00
Herman Chen
e3278d7655 [vepu541]: Fix OSD AYUV bit order definition error
Change-Id: I89ddd7b626873ea1d4ba22569f79d8706b216b55
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-09-23 10:28:43 +08:00
Herman Chen
95670aa475 [mpi]: Add rk_venc_rc.h
1. Add rk_venc_rc.h for rate control definitions.
2. Add drop parameter to set_rc_cfg.

Change-Id: Iab27a1505ba187f512815f7ab00cd0ea7f863cb8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-09-11 16:32:38 +08:00
sayon.chen
74cc83f69e [rc_v2]: Support avbr ratecontrol
when select avbr must set target_bps max_bps min_bps,in still scene
will used min_bps for enc, in the moving scene will max_bps for enc.
and final avg bit will get close to target_bps

Change-Id: I84b2878c7e76b18a593ca2a0d99c0c8f26a2d557
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-09-11 11:15:55 +08:00
Herman Chen
e8a428ea04 [mpi]: Cleanup unused definition
Change-Id: Ib8490abf7241f432164f647165b1c67c618c1168
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-09-10 14:59:03 +08:00
yandong.lin
5ea05d986e [vp8e_v2] add vp8e v2 implement
1. add vp8e_api_v2 module
2. add hal_vp8e_vepu1_v2 and hal_vp8e_vepu2_v2 module
3. add default rc for vp8e

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I6c0e9b0a0a7654b92905ac50431ba3f4b023c2e2
2020-09-09 16:09:31 +08:00
Herman Chen
b56cfdb688 [mpp_enc_cfg]: Add frame drop paramters
Add frame drop parameters for frame drop behavior on bitrate overflow.

Change-Id: Id90fbd0c63b1a0909e426a2c9f09c8b371bec0b7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-09-09 15:21:54 +08:00
sayon.chen
74f2f76fd7 [mpp_enc]: Support vui colour_description set
Change-Id: If84d8b04ce6ea430ed38d39c339eb9da783c6510
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-09-08 14:32:45 +08:00
Ding Wei
ea095cc3ae [jpege]: add rc for jpege
usage:
    q_factor - init factor
    qf_max   - max q_factor
    qf_min   - min q_factor

Change-Id: Idea1dea50f1f9c5e7e9ae41e1da228d5fb1a806b
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-09-08 09:05:59 +08:00
Herman Chen
ff9283dff7 [rk_venc_cmd]: Fix enum defintion error
Change-Id: I88426dc75362ef86c0a21109d295ce8bd983de4d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-31 11:33:05 +08:00
Herman Chen
21c21209c8 [h264e]: Add qp_delta_ip
The qp_delta_ip for H.264 is 3.

Change-Id: I33c052489011e93e8b496a284a84db1450ef5981
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-08-05 18:13:59 +08:00
Herman Chen
e638362114 [mpp_enc]: Add max/min intra qp for H.264
NOTE: may change the behavior of get cfg

Change-Id: I1b3cd4cbbe7dc0f03e4cc38f1e831e429d4911c2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-07-29 10:26:30 +08:00
Herman Chen
df0a7f0203 [h264e]: Add poc type / poc_lsb / frm_num setup
1. Add poc type / poc_lsb / frm_num default device value.
2. Add force update path.
3. Sps will use codec cfg directly.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5f23b74f0453213c89c7238a36570484b91b48ce
2020-07-28 11:29:49 +08:00
yandong.lin
0f91ba604c [jpege:] Add q_factor and qtable
Add q_factor and qtalbe interface

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I6b59d0b2e740e4b2815e7c83ad9a3641fe700e2f
2020-07-27 17:37:38 +08:00
Herman Chen
f654f1a0ad [rk_venc_cmd]: Change h264 codec cfg
1. Remove slice mode/arg in H.264 codec cfg.
2. Add max long-term reference number / max temporal layer id / prefix
mode / base layer priority id.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If34166e4658edba65f4c6c095412a6fadd941320
2020-07-08 16:32:33 +08:00
Herman Chen
33e7e4c52a [mpi]: Remove unused H.264 mpi cfg structure
Remove sei / ref cfg in MppEncH264Cfg.

Change-Id: Iaef6a8a845b691dc21d0a6a6eca62e27bc5cf5a4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-06-10 17:37:49 +08:00
Herman Chen
6a6521ed13 [gop_ref]: Remove gop_ref
New reference frame config interface will be added.

Change-Id: I5766cefde12237561bbc20c905e47ed2d3e90011
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-26 16:29:40 +08:00
Herman Chen
d638ef1bb7 [rk_venc_cmd]: Restore skip_cnt for compatibility
Change-Id: Ib542ace59e199752d6316c422ae11b4e57a0990b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-05-20 18:12:24 +08:00
Herman Chen
d95306a63b [mpp_enc]: Add color range support
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>
2020-05-15 15:48:06 +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
8e00c203d7 [mpp_enc_cfg]: Add h265e default cfg
Change-Id: I7f4b05be7bcfdbb93cf3b40f74941e14190ce3b4
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-05-15 15:48:06 +08:00
sayon.chen
49f610442a [h265e_ps]: Support vui set
Change-Id: I5fa20430eb3cd8dd5f66d367db19463b0973e0df
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-05-13 15:33:29 +08:00
Herman Chen
d42f4ed028 [mpi]: Support relative qp in ROI region
New vepu541 encoder support relative qp delta config in ROI region.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iac57469c30ea09ca03368cc3e02372a326c525ec
2020-04-20 10:34:42 +08:00
Herman Chen
fe4b86b025 [mpp_enc]: Update OSD API
1. Update OSD palette config API. User must specify palette is default
or user defined.
2. OSD palette config will go through control and OSD data (region)
config will go through meta data in each frame.
3. Remove unused code.
4. Add mpi_enc_utils for mpi_enc_test cases

Change-Id: Ib4aeb60789a3e999446212841508e604533efb3c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-04-02 18:21:20 +08:00
Herman Chen
0a2d4e341c [mpp_enc_v2]: Add encoder header output mode
1. Default output mode is output header only on config changed.
2. Add new mode to output header on each intra frame.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iea8dd1e6bb377318b88300d6a013f2c736b15afc
2020-03-30 17:16:11 +08:00
Herman Chen
512de40ff0 [h264e]: Add scaling list mode configuration
Change-Id: Icb4435060c76bc03472d22d6a13909ad4c60e88b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-11 17:27:46 +08:00
Herman Chen
6cee8bb11a [h264e]: Add slice split function
Slice split has two modes: split by byte and split by CTU number.

Change-Id: Id5a07f8a8cae612b6b913e9cb747dacec5b8e5a2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-03-07 15:32:29 +08:00
sayon.chen
d39238c871 [h265e]: Add row_dealt_qp set for rkvenc mbrc
Change-Id: Ib0cd342f7b2c2060871d5f540f08b37574c89e31
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-07 09:55:20 +08:00
sayon.chen
72606f13fa [h265e]: rename fivm_max_mrg_cnd to max_mrg_cnd
Change-Id: I7e1b4fb37a8af9812c393e095006f4af9f625bea
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-01-03 15:24:48 +08:00
sayon.chen
fd862c2884 [mpp_enc]: enc supprot user data set
1. add user data struct define
    2. meta supprot user data set

Change-Id: I1ac4bf179ce15fce61b3ad326de9fb0f8c821cad
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2019-12-30 08:49:29 +08:00
sayon.chen
d5a97b5c2f [h265e]: Add h265e codec config definition
Change-Id: I6b8816ce94830df2d2a8e4139a7aa8ef6242225d
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2019-12-20 17:45:36 +08:00
Herman Chen
7453d6a9da [mpi]: Add change flag for MppEncGopRef
MppEncGopRef change flag contains enable, long-term reference loop,
short-term gop loop and layer rate control flags.

Change-Id: I98b84cf13e18da769af6867af96a3257824e5c63
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-12-10 20:35:01 +08:00
Herman Chen
cdadaa9bba [h264e_pps]: Add h264e pps function
NOTE: Add scaling list mode flag to rk_venc_cmd.h

Change-Id: Idd3b33c577ce5ffd79dabc850f7c98a98c1ac19a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-11-18 19:45:10 +08:00
Herman Chen
a961ef5534 [venc_cmd]: Change gop ref cmd definition
1. Remove Hisilicon interface.
2. Add LTR configure.
3. Add temporal layer rate control interface.

Change-Id: I5172e69e828bdbe8e7f0cfc8ab0ca5a6b00d022a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-10-22 20:36:32 +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
7782c8ea11 [enc_impl]: Add new interface for work flow change
Change-Id: Ic110aaf53964f532b59bbb0fbd6347c95accf324
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-09-20 16:59:15 +08:00
Herman Chen
66a26a7cf2 [rk_venc_cmd]: Change encoder interface
Add encoder misc config for later extension.

Change-Id: Ie67b2d5e74227e5089b16752d8088a9502142ddd
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-06-27 10:37:01 +08:00
Herman Chen
d17861b67b [rk_mpi.h]: Separate rk_mpi_cmd.h into two headers
1. rk_mpi_cmd.h will contain cmd value only.
2. rk_venc_cmd.h will contain all the encoder command structure.
3. Move MppCtxType and MppCodingType to rk_type.h for better include
dependency.
4. Add MppEncRefCfg to MppEncCfgSet.
5. Remove rk_mpi.h dependency inside mpp.

Change-Id: I6b972738100fb60c0a6a9b7cfe0a012abf4205b7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2019-06-26 10:09:23 +08:00