Commit Graph

352 Commits

Author SHA1 Message Date
Yandong Lin
453e80380c [mpp_frame]: add api about scale down info
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0aee35b0cec0dd85bd6b49c66a12e31fb48eb483
2022-12-06 11:23:21 +08:00
Grey Li
78b6db4a4a [vpu_api_legacy] suport avs2
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Change-Id: I8ade3067a9de148ee27f3c6b92962b95b688e77a
2022-11-28 10:25:40 +08:00
Yandong Lin
06672e4aee [mpp_meta]: add new key for scale down dec info
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I421e24d5d3727a3f828f1a2407e6702e12d9afb7
2022-11-25 18:11:13 +08:00
Yandong Lin
bcb0187d3a [hdr_meta_com]: add hdr_meta_com module
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I35df93d91408d9dbde0d2bdfe78e25540c9e4452
2022-11-24 21:33:51 +08:00
Yandong Lin
77e8a96f05 [mpp_frame]: add hdr dynamic meta info
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iea7585709bcd3e17d11c28f7e87093fe9f15f77a
2022-11-24 14:22:58 +08:00
Yandong Lin
15ab8f73be [mpp_meta]: add new key for hdr meta info
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib9e69f1c8c110e204468284b96322d3de297de29
2022-11-24 14:19:24 +08:00
sayon.chen
cf5b3571e7 [h265e_cfg]: Add lpf across slice or tile cfg
Change-Id: Ib5afc2d9b95e85d523e545e580ccd0fcd7b8e416
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-11-16 15:26:02 +08:00
sayon.chen
9405c48f97 [hal_h264e]: Support poc_type 2 & add tsvc prefix
Change-Id: Ibbb0ee179974fdade590b97c9b3b38bcf822dffc
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-11-04 17:05:12 +08:00
Herman Chen
8828359534 [misc]: chmod all code file to 644
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2225d7508a7f8bf5693077d20f48065e8324b318
2022-11-02 11:10:49 +08:00
Hery Xu
618cee428c [vpu_api_legacy] add cmd to use mpi config
Signed-off-by: Hery Xu <hery.xu@rock-chips.com>
Change-Id: I205e2f7e9015f09a59613850e828d72b85e59370
2022-11-01 15:09:49 +08:00
Rimon Xu
1cc1af1b08 [osal]: reorder dma heap type select priority
Change-Id: Ifd2286ecf97fb4477693c24cdaec10c1df15eacf
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-10-28 10:06:22 +08:00
Yandong Lin
3adde926e2 [avs]: Add avs module
NOTE: I frame header decoding should check stream version.

Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: I1c8276f4499d73e3b60d582890037dec376e136f
2022-10-13 15:16:13 +08:00
xueman.ruan
09de35e9b5 [enc_cfg]: Update mirror transformation.
1. constraint the range of input argument.
2. add flip config, equal to vertical mirror transformation.
3. add mirroring_ext and rotation_ext to config set, for supporting
GET_CFG control.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I01c0b9187a18851354e81b5f08afc6dcaaba8365
2022-09-21 15:21:40 +08:00
sayon.chen
273d2bdd92 [h265e_ps]: Add auto tile split cfg
Auto tile cfg will let encoder auto split picture into tiles
according to platform encoder core number.

When enabled on RK3588 all picture will be splited into two tiles.

Encoder cfg string: h265:auto_tile

Change-Id: I3bd91a7781fc2c7e0b43bf2e3be775a5b8098d78
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-09-01 10:56:23 +08:00
xueman.ruan
82ae30f031 [h264e_sps]: Add parameters config for encoder
Encorder parameters: constraint_set0~5

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I7f90ff97881f875ffad77cf4125ee6623d179563
2022-08-16 12:16:57 +08:00
Herman Chen
61fbfb82cd [mpp_enc_cfg]: Add hw config for block mode
NOTE: Only for vepu580

Change-Id: Ic186ad014b734b5df01ae3218ed3d7219729c1ee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-07-05 11:45:03 +08:00
Herman Chen
8ce07dbfba [hal_vepu580]: Add slice segment info output
Change-Id: I79a036b6ed5c75b587564a91f392ac81f305e505
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-01 15:14:35 +08:00
Zhihua Wang
ecbf315ac3 [inc]: Update rk_mpi_cmd compatible for rockit
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: I0658e15a085217f0feee4177f7fd6731487ae7ee
2022-07-01 11:08:50 +08:00
Herman Chen
60f5fc234a [allocator]: Add dma_heap allocator
The dma_heap is introduced in kernel 5.10.

Change-Id: Id3c116d996da461467fe380a79434ba5ea875033
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-24 15:52:06 +08:00
sayon.chen
b05ba20d75 [mpp_frame]: Add fbc hdr stride set & get function
Change-Id: I9414f484451722228fa460dc33586851da1a0ec2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-16 09:27:47 +08:00
Herman Chen
2b35cee0ce [mpp_log]: Add more log helper function
1. Move mpp_log.h to inc for external user.
2. Add mpp_debug.h for mpp internal logging.
3. Fix some warning.
4. Add log level setup function.
5. Check env log_level value in mpp_get_log_level call.

NOTE:
1. mpp internal module should use mpp_debug.h and mpp external user
should use mpp_log.h
2. Use mpp_get_log_level to update mpp_log_level when the env changed.

Change-Id: I90a55a02a72db177533013280dfe111ca3479229
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-20 11:42:10 +08:00
Herman Chen
12858d56d1 [mpp_packet]: Add segment info and segment nb
Change-Id: I26cb5bba11393ccfb3a73b0d682b67f219034c13
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-11 16:49:30 +08:00
Herman Chen
6ddafd0bfa [mpp_enc]: Add split output flag
Split output flag is for low delay packet output mode.

Change-Id: I2f743f14b89864625406ebf94687f4f838f0df15
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-10 11:19:23 +08:00
Herman Chen
230837e41e [mpp_frame]: Add task for internal flow
1. Remove next entry in MppFrame.
2. Add MppTask in MppFrame

Change-Id: Icdf4f451e54a30977c5725848c5f4357ae54e6d8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-04-29 16:56:50 +08:00
Hongjin Li
4f4c73a7ae [h264d_dpb]:Fast play is disabled by default
Flip disable_fast_play to enable_fast_play,
Fast play is disabled by default.

Change-Id: I168e02a9d84590c3b2b92fe75b2b37c655c8c63e
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-04-22 09:59:18 +08:00
Herman Chen
f1324e29a2 [mpp_compat]: Add mpp compatible spec module
This module is for backward / forward compatiblity with external users.
1. Support compatible feature query.
2. Support update user program compatible feature update.

Change-Id: I7661f17c442eca0a0d0d57d2a35efdb5fd88be72
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-04-19 08:29:41 +08:00
Herman Chen
f903701f44 [rk_mpi]: Add encoder query function
Change-Id: I869d30bf11b26feee02f5ba307d98f6bbdcf7058
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-04-13 17:34:36 +08:00
Herman Chen
7a5544b8ec [rc]: Fix rc issue in async mode
1. Add async rc preset function.
2. Update rc_task pointer on async_wait task.
3. Save frame type in rc task info rather than in rc ctx.

Change-Id: I956b5f14a01e5c2cdc8b4c5f9c26660274a7f0e4
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-04-01 18:07:30 +08:00
Herman Chen
f0079f49d2 [h264e_vepu580]: Add dpb hal func and more buffer
Change-Id: I1e458732b821571d25079aebe19831948bd591ee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-26 16:04:22 +08:00
Herman Chen
72a6118b99 [mpp_meta]: Add mpp_meta_get with default value
Change-Id: I2285ace50341792b1979130d19a3ec642346e4bc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-09 11:18:23 +08:00
Hongjin Li
98ac9b259b [h264d_dpb]: Fix h264 video flicker issue
When the poc of the idr frame is 0, the subsequent frames with poc<0 are
discarded, which will cause the screen to flicker.
Add parameters in mpp as switches for immediate output of idr frames.

Change-Id: I522334dd1e81fc6aeeb60e71404f3a7071a5ecae
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-03-09 10:22:16 +08:00
Herman Chen
2eb15d5918 [mpp_enc_cfg]: Add tuning scene mode check
Change-Id: I0d90589c6e57be6e348f6510a79d4a7ecc83ce9c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-08 10:48:25 +08:00
Herman Chen
ff40ff4325 [mpp_enc_cfg]: Add fine tuning paramter define
Change-Id: I832f6706c837aac9ef7885761a6ebbb830a08d4b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-07 18:07:28 +08:00
sayon.chen
783abcfc7a [vepu580]: Support intra frame twopass deflicker
NOTE: Only vepu580 support this feature.

Change-Id: I05768a5ca5f6d32eab3d0d9eccab0c471882cd0e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-17 15:26:17 +08:00
sayon.chen
55b425c97b [av1d]: Add av1 parser api
Change-Id: Iff3c205d34cd8d8c2074de42eadc8418f5144a42
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-01-21 11:20:02 +08:00
Herman Chen
f94ae6d0a0 [vepu580]: Add YUV444 support for vepu580
Change-Id: I58859e59094fcecc13011b16f33b3810abbc7882
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-12-30 10:52:02 +08:00
sayon.chen
8c04e0d562 [mpp_enc_roi]: Add roi generation function
vepu58x roi cfg generation is depended on vepu54x roi cfg.

1. Use roi_enable to enable roi test.
2. Use roi_type to test different roi config mode.

Old region mode is set to legacy now for future roi cfg will be more and
more complicated.

Change-Id: Ib9e8976b732f05625e7589b64752d38fbd83584b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-11-30 17:11:11 +08:00
Herman Chen
254a708f8e [mpp_enc]: Increase bps max limit to 200M
Single core has 100Mbps limit and rk3588 has two cores.
Increase mjpeg max_bps to 800M

Change-Id: I2a3bd830d97085bb9a875063ae9aac8df891969c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-11-22 17:14:51 +08:00
sayon.chen
1fb20bb450 [mpp_enc]: Add new roi buffer config mode
The roi structure on vepu580 is too complex.

So we provide provide a buffer tunnel for externl user to config encoder
hardware directly.

External user should generate roi data structure according to datasheet.
Then config the base_addr, qp_addr, amv_addr, pmv_addr by metadata.

Change-Id: Iae50bf3ca36c1ff789140055d4d36a79afeb2e58
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-11-20 18:34:30 +08:00
Herman Chen
5e396e03d5 [mpp_soc]: Add AVS2 type
1. Add AVS2 coding type.
2. Add AVS2 support on rk3588.

Change-Id: Ifa677830d3f8c1625a4c351a6e008c09098f5122
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-11-20 18:34:30 +08:00
Yandong Lin
ac6f8b1384 [h264e_vepu]: add cfg to disable mb rc
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I71e72164756b23f181a67a8b8799b9867a0854fb
2021-11-09 18:26:25 +08:00
sayon.chen
09d2bca7e7 [h265e]: Add sao disable cfg
Change-Id: I446178d5d2aefa26750382f126fac582ae93e16c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-10-25 10:21:49 +08:00
Herman Chen
02320fb506 [meta]: Add qpmap for encoder roi direct config
Change-Id: Ic64fa548f60f723e971c5574b6b290ddaf454809
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-20 14:55:46 +08:00
Herman Chen
0589fb5bd3 [mpp_dec_cfg]: Add external notification callback
Add callback on two events:
1. packet ready and wait for new packet input.
2. frame ready and wait for output frame poll.e

NOTE:
Add callback command param for version compatible sync between user
and mpp library.

Change-Id: Ic41d495a06cf653acb6b5100699f1b7f5f735f2e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-13 15:42:11 +08:00
Herman Chen
c5cd650fdd [mpi]: Add start / stop / pause / resume ctrl cmd
1. Move mpp_start / mpp_stop function to control command.
2. Add pause / resume control command.

Change-Id: I525668a2831eb8f23e12fbd7c1cb29c11fdcc868
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-17 11:11:43 +08:00
sayon.chen
37397d6376 [rc_v2]: Rename stat_times to stats_time
Change-Id: I3cfd444b2d26d5bb2ce2a806efc1a74f4cce05b2
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-06-28 16:17:50 +08:00
sayon.chen
f53dfac47c [rc_v2]: Support hierarchical QP cfg
Change-Id: I0827689ee27a7007cb157b2990089e3c34c6ad50
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-06-02 15:24:24 +08:00
Yandong Lin
33784aca30 [rkv_enc_cmd]: Fix check info err when enc_cfg_set
Fix issue frome github:
https://github.com/rockchip-linux/mpp/issues/201
Err message:
mpp_cfg: cfg h264:max_tid expect RK_S32 input NOT RK_S32
mpp_cfg: cfg h264:max_ltr expect RK_S32 input NOT RK_S32
mpp_cfg: cfg h264:prefix_mode expect RK_S32 input NOT RK_S32
mpp_cfg: cfg h264:base_layer_pid expect RK_S32 input NOT RK_S32

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I9dbd49a6ce04807455d1a7dc090cad96ae0f2c83
2021-05-21 15:41:11 +08:00
Yandong Lin
a0ec1ba235 [rkv_enc_cmd]: Fix check info err when mpp_enc_cfg_set
Err message:
mpp[16915]: mpp_cfg: cfg h264:poc_type expect RK_U32 input NOT RK_U32
mpp[16915]: mpp_cfg: cfg h264:log2_max_poc_lsb expect RK_U32 input NOT
RK_U32
mpp[16915]: mpp_cfg: cfg h264:log2_max_frm_num expect RK_U32 input NOT
RK_U32

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ide77867beed2ee4e94df1179882713e600d3448b
2021-05-21 11:39:00 +08:00
Herman Chen
dbd2e2a77b [mpi]: Add mpp_start and mpp_stop
The purpose of mpp_start and mpp_stop is to break mpp_init_into two
stage.

Original mpp_init conbine the init and start for example mpp_dec_init
and mpp_dec_start then the global (or static) config which dominate the
fundamental working way can be only be set before mpp_init. That is
unreasonable. Another example is the encode memory prealloc flow.

The mpp_start is added to end global param receiving and do real
preparation of current operation in mpp_init.
The mpp_stop is the opposite of mpp_start.

Change-Id: I2bdcc29a9ff75777acc5c39c7e7f01477e597bb0
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-05-20 10:24:25 +08:00