Commit Graph

2993 Commits

Author SHA1 Message Date
Johnson Ding
1baddd13d9 [mpp_dec_cfg]: configuration process modification
1. Use flatten MppDecCfgInfo to replace MppCfgApi
2. Flatten the trie nodes and info nodes with string name together.
3. Refactor the decoder config setup process.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ia9f24abde4e37f0a1ac4e7ec237b876a54e4aef7
2022-08-03 10:37:58 +08:00
Yandong Lin
f478ba7cdf [h265d_vdpu34x]: optimize irq status checking
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Icf42b2951d9519e0d26a3c1b6a79c2d03bc2224b
2022-08-02 12:16:18 +08:00
Yandong Lin
fe759f2719 [jpege_api]: fix jpege set fmt failed issue
If an unsupported fmt is configured first and fails,
reconfiguring the correct fmt will not take affect.

rootcause: the value of fmt used for checking is wrong.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ied1e7fa99589fbe1631c4d5f022ea44dcba2883e
2022-08-01 15:49:24 +08:00
Yandong Lin
5132a49414 [mpi_enc_test]: add sei_mode env to control sei mode
setprop sei_mode 0 to disable sei.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I35a175be32f1a49dd0f36e60b1d72534fb3742e7
2022-07-29 14:20:11 +08:00
Herman Chen
aff02553d5 [hal_jpegd]: Fix kernel register size check log
Fix error on rk3399:
rk_vcodec: mpp_check_req:1796: error: req_off 0, req_size 2e0, max_size 27c

Change-Id: I82807e02b3ba5128a2e00d4b19c98e1105e3cdd8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-07-29 11:46:34 +08:00
ywj
94bbb5c3ab [jpegd]: fix frame buffer size is zero
Signed-off-by: ywj <ywj@rock-chips.com>
Change-Id: Ie1b18eb74536242d20827145ce7983f4c280952c
2022-07-28 14:30:18 +08:00
Xinhuang Li
7d5c29a580 [mpp]: Fix missing header on encoder stream dump
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: I8b062158f3de3ff1ef10a257f08314005414b4fe
2022-07-27 16:45:06 +08:00
Hongjin Li
693946666c [h264d_parse]: Ignore the pps/sps exception of 264
Change-Id: I7950e4d9f8415cfb0aa908865b5685ef2b6df362
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-07-26 17:55:04 +08:00
Herman Chen
5a3665081a [mpp_enc_cfg]: Fix error on enlarge node count
When buffer is realloced then enlarged new memory is not initialized.
Extra memset is required.

Change-Id: Iad395b56125eb5c67ce8aed50bc1c4bed2a6826e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Wenjie Yang <ywj@rock-chips.com>
2022-07-26 17:40:33 +08:00
Herman Chen
0e2260a834 [mpp_meta_test]: Add average time calc
Change-Id: Ic96f95131acebb0aba6f31e0dab4ca717d06bd06
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-07-26 10:01:09 +08:00
sayon.chen
7c917b8721 [h26x_enc_api]: Fix 3588 fbc rotation cfg fail
Change-Id: Ie842829d86f7cc7d71429f8af502c0a122cf3248
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-26 09:07:25 +08:00
Hongjin Li
786836156d [mpp_dec]: Fix a specific 264-frame source is stuck issue
For a specific video source, it is stuck at the last position.
Turning on fast play or closing iep can avoid the stuck.

The reason for the stuck is that the idle task cannot be obtained when
processing eos, resulting in the failure of the eos frame to return.

Change-Id: Id78d968dc8f526f9fd195dac7bdbd97fafc1f569
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-07-25 08:45:56 +08:00
sayon.chen
58cec3b594 [jpege_vpu2]: Add real qfactor return
Change-Id: I7ba95d0cd714538723184ca05e5e6663295dd65b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-22 13:56:26 +08:00
Herman Chen
813e3c553e [mpp_enc_cfg]: Enlarge node size to 1604
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If120e4c41c0152b842a5ab8aecfc96d28ad0d4ae
2022-07-20 09:30:38 +08:00
Johnson Ding
bdb3361020 [hal_avs2d]: Fix compiler warning
Change-Id: If0c091b531fabcb0109d38543db700db2bea2e37
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-20 09:30:31 +08:00
Johnson Ding
8bc6dcff68 [hal_avs2d]: Fix compiler warning
Change-Id: I67a12748d28c73a62d9f5824730439ba4d76ce85
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 16:30:51 +08:00
Johnson Ding
14b60acde4 [h265d]: fix read bits error
Change-Id: Ic111f94c80cfa9b480ad333f6196167b10d0ea4b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:55:56 +08:00
Johnson Ding
2e56de31cb [avs2]: dispose pseudo start code
"00 00 02" at bistream should have the last 2 bits skipped according to
AVS2 Specification.

Change-Id: Ic9c95a325baec5508dd1a28e16e4e32689da9a98
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
bd5aa46c51 [avs2d]: Optimise dec result when player seeking
Change-Id: I92565bb05956276f0f626f9293d70e8b38211209
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
d5061c90aa [hal]: Add ref using mark at Hal task
Change-Id: Ic4a71c7fdffdfa3da7129a8b641f311442cb1325
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
d98fbcfe2a [mpp]: Activate AVS2 decoder
Change-Id: I7fb596b050c1791b046f6c2179e8775a8b3df068
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
20866b909d [hal_avs2d]: Add AVS2d hal module
Change-Id: I8c16a843a7440281cd85dbdab9fc6de8222fa5f5
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
2022-07-19 15:24:34 +08:00
Johnson Ding
0f11ae4580 [avs2d]: Add AVS2 parser api
Change-Id: I18b890698b236d47189b5e2545ea251deeabf6fd
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Signed-off-by: Xingwen Fang <fxw@rock-chips.com>
2022-07-19 15:24:34 +08:00
Herman Chen
e520b00c94 [mpp_enc]: Fix segment number error on reenc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8b2d4bc086b19cc51717b7251551e97c3a688f38
2022-07-19 15:19:08 +08:00
Herman Chen
e64b30720c [mpp_packet]: Add set segment_nb function
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I1aa75c6811e148bbca0d366a33e8823e7764a72e
2022-07-19 15:18:47 +08:00
sayon.chen
1fa5d10ee9 [vepu_580]: When slice num < 32 disable slice irq
Change-Id: I9aeb445ea4da2d778046f1e740f0e45b8c6f5141
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-19 15:14:07 +08:00
sayon.chen
193018982c [hal_jpeg2_v2]: Fix multi core rotation cfg issue
Change-Id: I312cf6952483c39ce65f8dad1e9dff7d0c26ea65
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-18 11:46:03 +08:00
Johnson Ding
20cee9cdd4 [vdpu34x]: add more bits and registers definition
Change-Id: Ie9a84e998e6524fe94a783b6998db1b90013ac07
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2022-07-13 14:45:27 +08:00
Herman Chen
466ae8cf1c [hal_jpege_vepu2]: Fix multi-core jpege error
When 4 cores paralled jpeg encoding enabled the restart_ri should round
up to 4 times of rows.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Change-Id: I7f72b776f09c60323f8730cc63b1d28cb6db56c9
2022-07-13 14:26:51 +08:00
Herman Chen
36e83a4e2a [hal_h264e_vepu580]: Fix async segment type error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7fa9354b5f906a3485e9102b2592600dda91bf56
2022-07-13 14:26:38 +08:00
Herman Chen
6ac0175b19 [hal_jpeg2_vepu2]: Remove extra delimit ioctl
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I93cb9e2dd3563b196c8881ce8783b439f30290d5
2022-07-12 11:26:40 +08:00
Xinhuang Li
ee624b0041 [mpp_cfg]: fix mpp_enc_cfg_set_ptr segmentation fault
The err stack dumped as follows:
  0x0000007f9d8f7618 in jpege_proc_jpeg_cfg.isra ()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9d8f78a8 in jpege_proc_cfg ()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9d8a2244 in mpp_enc_proc_cfg(MppEncImpl_t*, MpiCmd, void*)()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9d8a2f5c in mpp_enc_thread ()
  from /usr/lib64/librockchip_mpp.so.1
  0x0000007f9e5b1df8 in start_thread () from /lib64/libpthread.so.0
  0x0000007f9dab851c in ?? () from /lib64/libc.so.6

Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: Ibe7f0d43dee06dcb480cc5295705c4a2f339d067
2022-07-12 11:10:13 +08:00
shine.liu
797536f816 [mpeg4d]: Fix crash of stack overflow
bug: tmp[i] = 0 --> tmp[256] = 0

Change-Id: Iff3a6f5b78413358d0793ea48eaa9142e8781143
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
2022-07-12 10:23:33 +08:00
Herman Chen
3d282d8200 [hal_vepu580]: Disable split on pass1 process
The pass1 work flow MUST NOT output in slice lowdelay mode.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I26a6b7b90cec88829997ccee061cada6068bc462
2022-07-12 08:52:40 +08:00
Herman Chen
47cac796fe [hal_jpegd]: Fix kernel register size check log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I85cd1e83ab6612a849f95a27f7954b2404ecf9c1
2022-07-12 08:51:50 +08:00
Herman Chen
c409759389 [hal_jpege]: Fix client type check error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Icf083adbe58502f6d576efa83817c1fad38ac219
2022-07-11 15:46:37 +08:00
Herman Chen
cb5a139696 [mpp_enc_cfg]: Set rc:max_reenc_times default to 1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7fd0ca5c6e8cbe3f0e557acee560b00fb2b59a48
2022-07-08 16:31:36 +08:00
Rimon Xu
25cbe2ce2e [mpp_dec] Calc FBC buffer size on SET_FRAME_INFO
Determine FBC alignment when set frame info control

Change-Id: Ibc0c6c455029a58875b820c17b7d94cc4e64cdda
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-07-08 15:50:41 +08:00
sayon.chen
d0a89e5c75 [hal_jpege_vepu2]: Support parall enc for rk3588
Change-Id: I1fa21ba811c8ad59ab326348288672fdefe979c0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-07 11:44:22 +08:00
Yandong Lin
512fe021ee [mpp_enc]: bypass dts from frame to packet
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib51a106adedefc7af9f375ed59dd78aa5a3f26b8
2022-07-06 11:01:19 +08:00
Yandong Lin
eed29f8184 [hal_vp9d_api]: hal_vp9d_rkv do not support fast mode
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I73a2118a044e90e941fcb57d14e99fe086255c53
2022-07-06 11:00:36 +08:00
Yandong Lin
9ddf4fa53c [hal_av1d]: fix av1 dec err
Av1 dec do not support fast mode.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4da00e82068ead52b0881436e1f4eb7c6e8d2eb6
2022-07-06 11:00:10 +08:00
sayon.chen
eee9b87c30 [vepu541]: Support fbc_hdr_stride from frame info
Change-Id: Ibe7644dd7bb3ae334821af70fee5c006a6b46549
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-05 15:31:47 +08:00
toby.zhang
8fd9a478ba [hal_vepu580]: Add hw config implemnet
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: I40f9d781fb2fe88a35329141d788e2d6fa38ab9b
2022-07-05 14:57:09 +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
xueman.ruan
652e18fcf0 [allocator]: fix dma_heap allocator
segment fault happened in mpp_allocator_put.
 #00 pc 00102e14  /vendor/lib/libmpp.so (mpp_allocator_put+272)
 #01 pc 0004705c  /vendor/lib/libmpp.so (MppBufferService::~MppBufferService()+536)

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ia4f9a3b4823bf6a5d8f3fdfd85055630222c0b43
2022-07-04 17:05:59 +08:00
Yandong Lin
def09cb3c2 [jpege]: add new client type for vepu2 jpeg only
Add VPU_CLIENT_VEPU2_JPEG to distinguish vepu2 jpege only device.
And check whether kernel support the client type or not.

rk3588 has 4 jpeg encoder core and we will use VPU_CLIENT_VEPU2_JPEG as
its client type in kernel.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib1c45781ac9c8f504ba7b46f2f0c7aad5d16fa68
2022-07-01 16:43:19 +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
sayon.chen
5fc54796c8 [vepu_580_hevc]: Fix set one slice output issue
Change-Id: I5393ed8a7cdb4b8cbd9178a25422d8f5f3e0ef02
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-01 15:13:48 +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