Commit Graph

2964 Commits

Author SHA1 Message Date
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
sayon.chen
0ea1fe692f [hal_vepu_h265e]: Fix chrome qp offset set issue
Change-Id: I9f1a23872990b7f4c72b7a321ee5d9d4719845c9
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-07-01 09:50:15 +08:00
Yandong Lin
d1fbc475fa [allocator_dma_heap]: fix compile err for linux/aarch64
Err notes:
    mpp/osal/allocator/allocator_dma_heap.c:26:27: fatal error:linux/dma-buf.h: No such file or directory

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib5f0aa77f36adfd3bea98ff16de8000a82f49720
2022-07-01 08:57:18 +08:00
xueman.ruan
5e96daffb2 [h265d_parser]: avoid segment fault
pps_id out of range result in segment fault.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I0281eb83584d265d5a016fd157c24f3f8917dee9
2022-06-30 18:31:09 +08:00
sayon.chen
fee2bdb0e8 [vepu580]: Add range reg set
Change-Id: I3d54a6fd013fdbca613d98680e5580de965c696b
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-30 18:15:01 +08:00
xueman.ruan
c967fba6cf [vp9d_vdpu34x]: reallocate buffer
Simplifying the process of buffer_get/put

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I875958c9ff1b51ad1389beacd494d5b80181c03c
2022-06-30 14:20:56 +08:00
xueman.ruan
9093217206 [mpp_service]: Remove extra ";"
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I63bdaccd5e3b6318a69373e89f32da98acf1f331
2022-06-30 14:09:36 +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
Yandong Lin
8e15a4a492 [mpp]: Fix get_packet_async return value err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I2fd6bbe303e57aaeac64621648e7d8203be753f7
2022-06-24 08:59:04 +08:00
Herman Chen
d1da307afc [mpp_packet]: Add segment info copy function
Change-Id: I8349fe487cfc3e795d43d374469863db48a55a33
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-23 16:16:02 +08:00
sayon.chen
58a4c06ab5 [vepu580_hevc]: Add frame crop set to reg
Change-Id: If93a55c5570c80b555cad9d65be5c4bf6655139a
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-23 11:41:48 +08:00
Herman Chen
e2072abcb8 [drm]: Remove drm_fd_to_handle on import
Remove drm handle to reduce iova usage.

Change-Id: Ie5000cb594806c9c7cc97f8ff7e25a4ba61f721a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-23 09:25:16 +08:00
Herman Chen
cf32c96d42 [mpp_enc]: Encoder async IO mode add 10ms timeout
Change-Id: I7477a32080c19bb05c1a9d9d7596925ed9ffbbaa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-22 11:03:30 +08:00
Herman Chen
188dfb5d20 [mpp_enc]: Add intra flag on slice output mode
Change-Id: Ib717b7df596ab6ffb35ba0c2f4274dc9ef79850d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-17 18:19:30 +08:00
sayon.chen
2da4ad7b1e [vepu580]: Support fbc_hdr_stride from frame info
Change-Id: I6d5a3ff60b7d251f5d2b2605f7e25b6d67a74222
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-16 09:36:03 +08:00
sayon.chen
6304f44f65 [rkv_dec]: Add fbc_hdr_stride to output frame
Change-Id: Ia5ab37c86f396848e0cc28a0c824c040835e7977
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-16 09:29:47 +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
sayon.chen
3e6ff53bf3 [mpp_enc]: Update force IDR if cur frame is skip
Change-Id: I4ad6cda67b2b14cb703d43f16e130047b1b27b13
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-15 18:50:11 +08:00
Hongjin Li
7c340c8885 [mpp_dec]: update base cfg to decImpl
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I6a05657ff921f6652a7641053fdaf2facd1bfd3c
2022-06-15 17:25:30 +08:00
sayon.chen
a053db7241 [h265e]: Fix fractional frame rate issue
Change-Id: If26781a4e16592eb0c350f1e6f2ddeeac28bbd86
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-15 16:04:22 +08:00
xueman.ruan
ec1f93f181 [h265d_parser]: avoid segment fault
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I6d1e6b4407c56e96657beb731b8a3432e881142c
2022-06-15 09:37:50 +08:00
Herman Chen
dd284cc827 [cmake]: Set VISIBILITY_PRESET to default
Change-Id: I3f2266904b8ee83b7c1fe3a419cd4ed931d0036b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-14 14:56:17 +08:00
Herman Chen
675363214a [test]: Add split_out cfg to mpi_enc_test
NOTE: Due to limitation of output task number the split output mode with
block input flow should only have less than 8 slices. Otherwise the
put_frame call will be blocked due to lack of output task slot.

Change-Id: Iab351be04196fa2b3ac3a116bd7c999f570e25eb
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-14 08:58:21 +08:00
Herman Chen
69a46f67e0 [hal_h264e]: Support slice split output callback
Change-Id: I6f0b1c3f0c570426c8693f74687832b06ae10c94
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-14 08:58:21 +08:00
Herman Chen
33308d0a3c [hal_h265e]: Support slice split output callback
Change-Id: Iddd4a0d9e9daf1751838deb01db239e73e2c4abc
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-06-14 08:58:21 +08:00
Herman Chen
326dd264b8 [mpp_enc]: Prepareation for slice output mode
1. Add mpp_enc_callback for hal module.
2. Add low delay output check.

Change-Id: Ibda81043e3760defc0c2fd41166197a57abbbbe3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-06-14 08:58:21 +08:00
Hongjin Li
3cd4fecca5 [h264d_dpb]: Fix h264 dpb full issue
When the poc interval is 1, if there is frame loss,
it will cause dpb to accumulate to the maximum.
Update the poc interval in real time for accidental
frame loss to avoid dpb accumulation.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ie1dd39605529bdc9239d4cd27424b4ad2c5bd930
2022-06-09 13:54:36 +08:00
Rimon Xu
4de5c47106 [cmake] fix CMAKE_BUILD_TYPE judge error
Change-Id: Ia58609aec3a01374218af9f48b13e72b6883bbbf
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-06-09 12:41:33 +08:00
Grey Li
2edb2d91e8 [jpegd]: unsupport yuv400 upsampling
Signed-off-by: Grey Li <grey.li@rock-chips.com>
Change-Id: I4a7488e83a336517ed5dd6b5783b574e43953dd7
2022-06-09 09:18:51 +08:00
Yandong Lin
a33f11fbfd [mpp_buf_slot]: fix field source display err on fast mode
In fast mode, there is a situation:
The current frame is output, when the top field decoding is completed
and the bot field decoding is not completed, because of the top and bot
field share one MppFrame.

Solution: modify the hal_output of SlotStatus frome ont bit to two bits
counter. Using hal_output indicates whether a whole frame completed.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I18429399e9188c848385c40f847333f1b46fd6bb
2022-06-09 09:01:43 +08:00