Commit Graph

3026 Commits

Author SHA1 Message Date
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
zj
3dea9cc46f [mpp_soc]: rk3368 has h264 decoder with vdpu1_2160p
Signed-off-by: zj <zj@rock-chips.com>
Change-Id: I915e9afad67e1de092aae288cb3a141daf0457fa
2022-03-07 10:32:07 +08:00
Herman Chen
df30589e30 [mpp_buffer]: Dump buffer group when size mismatch
Change-Id: Ic2306122b7f7cf45a683970ec047cedd42984b69
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-04 11:20:36 +08:00
toby.zhang
dbcb9c701d [hal_vepu580]: add motion and still judgement
Change-Id: I376578b5771ffbad21b9fd3bd1a45b961e7eede5
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
2022-03-03 20:22:27 +08:00
toby.zhang
b3edf0d22c [mpp_enc]: Add motion dection output path
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Ie0ee26af50cef7f883cb3cd2c50f9121e4f87079
2022-03-03 17:39:00 +08:00
Herman Chen
881f05c7cf [mpp_soc]: Add avs+ decoder to rk3588
Change-Id: Ia93c70a16c17d1202ae4b133f157c140d8c8668c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-03 16:38:49 +08:00
Herman Chen
6b24ea59d6 [mpp_enc_roi_utils]: Fix roi generation error
Change-Id: I8e89e6826bf405573bba3190a026f7b4f6ca9b79
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-03 14:59:05 +08:00
Herman Chen
e2fa6e0232 [test]: Add mpi_enc_mt_test
Add encoder multi-thread test case for non-block input / output mode.

Change-Id: I2a06f47574e760d1400914eb62420b047c60ceaf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-03 11:43:54 +08:00
Herman Chen
578cb5d599 [mpp_enc]: Fix h265e async issue
1. Disable frame parallel on h265e_vepu580.
2. Output KEY_INPUT_FRAME on normal path.

Change-Id: Ic25628b4d44b23cd425740ea7cc72693997bca40
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-02 16:34:31 +08:00
Herman Chen
2e25db1a7d [mpp/mpp_enc]: Add async encoder flow
Change-Id: I0e040b8e9b1cdb40be996afc818a7ffb16802d09
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-02 15:20:57 +08:00
Herman Chen
603b117d91 [h264e_vepu580]: Add dual core handshake config
Change-Id: Ia28b14d54816ec992660dab59fc0657a3c4b225d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-02 14:44:32 +08:00
Herman Chen
76cd30cc67 [h264e_vepu580]: Add more resource for multi-task
1. The register file should be increased.
2. The external line buffer should be increased.
3. Add register index to task flag.

Change-Id: I6e753db6452641ca9715b065ffd846ac74f3251b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-02 14:44:20 +08:00
Herman Chen
fb73f3e32d [mpp_enc]: Add task count to encoder init flow
Change-Id: I0bc871ec80cee70bfa83fdcfdbea42e6019089af
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-03-01 15:14:48 +08:00
Herman Chen
22400055e1 [mpi_enc_utils]: Fix opt node count error
Change-Id: Ic41d86f9bc63ae1c62b2cc7a8637c652a3ad99fa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-24 16:16:22 +08:00
sayon.chen
94d1e01037 [h265d]: Keep Ps_need_upate flag on task invalid
Change-Id: I29998d0ca372134a04af9b349cee20ba04ad79f9
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-02-21 09:52:33 +08:00
Herman Chen
d156706ea9 [mpp_enc]: Fix block issue on multi ctrl
When finishing a control process encoder should clear all wait flag and
loop from beginning.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib2d208a5b453ba4bd987856a02bba99db9e1c5bc
2022-02-19 18:25:30 +08:00
Herman Chen
fc8c86154e [hal_task]: Change hal_task to info with status
1. Split encoder and decoder hal_task defs and infos.
2. Change hal_task to a general info list with status.

Change-Id: I6f26035eeee4772d1ef99a21d85716e9c33eb9a6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-18 15:35:56 +08:00
Rimon Xu
a7d198da66 [h264d]: correctly limit mopn to MAX_REORDER_TIMES
Change-Id: I645d6b89e970c929c2d8f095b006d68c7c428efc
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-02-18 14:58:52 +08:00
Rimon Xu
4abd806a95 [h264d]: correctly limit sps/pps id to the max value
Error backtrace:
  0: cur_sps = (cur_sps && cur_sps->Valid) ? cur_sps : NULL;
  1: set_slice_user_parmeters() at h264d_slice.c:350
  2: process_slice()            at h264d_slice.c:442
  3: parser_one_nalu()          at h264d_parse.c:233
  4: parse_loop()               at h264d_parse.c:908
  5: h264d_parse()              at h264d_api.c:610

Change-Id: Iae5f5d553c9e75b1a01e88f7080277b3f9409c50
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-02-18 14:58:52 +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
Rimon Xu
2bf758c988 [h264d]: dec ref pic marking mmco can't exceed MAX_MARKING_TIMES
Error backtrace:
  0: dec_ref_pic_marking() at h264d_slice.c:187
  1: process_slice()       at h264d_slice.c:551
  2: parser_one_nalu()     at h264d_parse.c:233
  3: parse_loop()          at h264d_parse.c:909
  4: h264d_parse()         at h264d_api.c:596

Change-Id: If61a79ad92de3671276ee2cdbd70cdeeb8933b10
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2022-02-16 19:35:14 +08:00
Yandong Lin
fa29f8151d [h264d_slice]: fix parse err that video of h > max_h
The limitation is mainly the line buf, so just filter
video that width > max width.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iba1f0df893513949863bc20bcc1748eec8352133
2022-02-16 19:32:01 +08:00
Herman Chen
6e316ddc10 [hal_h265e_vepu580]: Fix tile osd offset error
Use new multi register offset config function to setup all offset for
vepu580 and vepu541.

Change-Id: I78e77ddd818b7875c028b660aa06a16b527a8409
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-16 10:28:28 +08:00
Herman Chen
502bb4543e [hal_h265e_vepu580]: Use MppDev delimit
Use MppDev delimit function to send two tile ioctl at once.

Change-Id: I80c1e17ff609cfa1a70bc95c747db9a1d995229e
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-16 09:52:26 +08:00
toby.zhang
407fce1272 [mpi_enc_test]: Add fix qp encoder mode
Change-Id: Ia749c9eb5d2a25b87e64215aa184301baf9fa6b5
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-15 16:35:37 +08:00
shine.liu
481763d6a1 [h264d_slice]: Do not goto failed when subsps is null
Change-Id: I86ef288371d90a8cdfa687e7ffd162ba7561fbdd
Signed-off-by: shine.liu <shine.liu@rock-chips.com>
2022-02-15 14:48:26 +08:00
Caesar Wang
5c0859c468 [mpp_service]: Fix error on reg offset setup
Fix error in commit fb3390cbdd
Error log:

[   60.923201] rk_vcodec: reg[-2080222496] + offset 127
[   60.923216] Unable to handle kernel paging request at virtual address ffffff83263859f4
[   61.004607] Mem abort info:
[   61.004877]   ESR = 0x96000005
[   61.005154]   EC = 0x25: DABT (current EL), IL = 32 bits
[   61.005623]   SET = 0, FnV = 0
[   61.005898]   EA = 0, S1PTW = 0
[   61.006172] Data abort info:
[   61.006425]   ISV = 0, ISS = 0x00000005
[   61.006764]   CM = 0, WnR = 0
[   61.007031] swapper pgtable: 4k pages, 39-bit VAs, pgdp=00000000017e5000
[   61.007621] [ffffff83263859f4] pgd=0000000000000000, p4d=0000000000000000, pud=0000000000000000
[   61.008407] Internal error: Oops: 96000005 [#1] SMP
[   61.008835] Modules linked in: rk_vcodec
[   61.009194] CPU: 1 PID: 1537 Comm: mpp_dec_parser Not tainted 5.10.66 #10
[   61.009793] Hardware name: Rockchip RK3588 EVB3 LP5 V10 Board (DT)
[   61.010340] pstate: 60400009 (nZCv daif +PAN -UAO -TCO BTYPE=--)
[   61.010900] pc : mpp_translate_reg_offset_info+0xec/0xfc [rk_vcodec]
[   61.011469] lr : mpp_translate_reg_offset_info+0xdc/0xfc [rk_vcodec]
[   61.012025] sp : ffffffc013f33a90

Signed-off-by: Caesar Wang <wxt@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I023db0c7c930ec54bfbc1141bef3543a295b165a
2022-02-15 09:46:01 +08:00
toby.zhang
9ffb11ca0a [hal_h265e_vepu580]: configure default matrix
Change-Id: If25baea50660287c0e151a7c254611e5f9784619
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
2022-02-15 08:41:19 +08:00
sayon.chen
8f19742b81 [h265e_hal]: Fix reenc path last_frame_type update issue
Reencoder frame last_frame_type should not be update ,if update
inter frame after intra will set used tmvp, this will cause stream
dec error

Change-Id: I00329708b1cf7173c44a8809243e6101e9e8db80
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-02-11 14:36:58 +08:00
Herman Chen
fe11f99415 [osal]: Add multi register offset config function
Add new multi config mode function.

Change-Id: I37c9c319e93e96fbd3d2bb5d598aef8d1b8fe2c8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-10 16:42:05 +08:00
Herman Chen
c4c6a540e2 [mpp]: Remove encoder non-block input failure log
Change-Id: I658a6693d8b9c0cdd931a08f724803ec73a2abb7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-02-08 19:27:16 +08:00
Hongjin Li
578bb80ee7 [mpi_enc_test]: add iep2 slt testcase
slt verify file:
iep2_test -w <w> -h <h> -i <input> -o <output> -v iep2.verfy -f TFF

Change-Id: I9924b827d6c30abf9124cdab89dcac2e6fb96591
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-01-28 08:49:58 +08:00
Hongjin Li
f7954e9545 [mpi_enc_test]: optimize slt code
1. Optimize help log about slt
2. Optimize slt file opening

Change-Id: Ib315e46d7fbb5f3ffa576c24f5e47c42a19cb09d
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-01-28 08:47:54 +08:00
Herman Chen
fb3390cbdd [osal]: Use SET_SESSION_FD to implement batch cmd
1. Add SET_SESSION_FD cmd.
2. Support new delimit interface to send multi request in one ioctl.

Change-Id: I07980cc9c70b5e31585254d1ffde7bc56a3007e2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-01-27 18:01:47 +08:00
Herman Chen
c224ea968c [hal_h265e_vepu580]: Add tile parallel support
The tile width is fixed to 4096. Picture width larger than 4K is divided
into several tiles (max 2).
So the max resolution is 8192 for vepu580.

Change-Id: I943082f1e73fc37a48d8782e1a20587715b5ef7c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
2022-01-27 17:05:00 +08:00
Hongjin Li
8c13cd93b0 [mpi_enc_test]: add slt testcase
slt verify file:
mpi_enc_test -w 4096 -h 2304 -t 7  -slt enc_xxx.verify -n 5
mpi_dec_test -i <inputfile>  -t 7  -slt dec_xxx.verify -n 5

Change-Id: I528fcd8d1adf8821c1555790cd8482108f219fdc
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-01-26 17:29:02 +08:00
Hongjin Li
986219e2d1 [mpp_trie]: Fix demo parameters are not recognized issue
Since realloc will cause memory address change, it is necessary to
relocate the current node position after applying for a new dictionary
tree node.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: If124f18efdd81aad748185d477cb31059ed8f292
2022-01-26 15:23:34 +08:00
Chen Jinsen
b817d9f1cb [m2vd]: No need to reset split mode when flush called
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I195b1c7c405bbf01f62dcdd75fd0d7ea9f541aa8
2022-01-26 14:18:52 +08:00
Ding Wei
34e6d1ac42 [hal_vdpu34x]: set timeout_threshold=0x3ffff
this register means the timeout for hardware read/write ddr.

Change-Id: Iee08e63760aa7d0220ebca54908016662118b204
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-26 14:12:19 +08:00
Ding Wei
3287711803 [hal_h264d][hal_h265d]: ccu mode, add flag to differ refers and decout
Change-Id: I7ab95d719776c91f8facf9864bd27a641c38d56f
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-26 10:13:55 +08:00
Ding Wei
6633db7888 [vdpu34x]: add bit define for register12
Change-Id: I518f9c7b879d60d053b167d6f79bb5dbe8de5fe9
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-26 10:13:55 +08:00
Ding Wei
9c997879c6 [hal_h264d][hal_vp9d]: for vdpu34x, disable hardware auto reset
hardware auto reset default.

Change-Id: I3d5c249058b32801a0185999fbe36231bc697c33
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2022-01-26 10:13:55 +08:00
Chen Jinsen
a7dd44baa9 [h265d]: Add few more checks for invalid parameters in sps
Following elements didn't have a bound check in SPS as spec doesn't list
the bounds on these explicitly.

log2_min_cb_size, log2_diff_max_min_coding_block_size,
log2_min_tb_size and log2_diff_max_min_transform_block_size

Added appopriate error checks on these fields

Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
Change-Id: I4762f543726650855e5cd333c48a7c41cf0fee0f
2022-01-25 09:54:10 +08:00
Herman Chen
cf1c38ca0c [mpp_service]: Fix client type and fd setup error
Change-Id: I9631bb65fbc40ea3baec29fc591d9ee8d7972983
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-01-24 18:14:19 +08:00
Yandong Lin
462d5c9249 [hal_av1d_vdpu]: Fix 480x270_10bit video dec err
the luma size calculate err.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I09cd2455fb0b6a8687d58b110b243c47f8b1f80f
2022-01-21 15:22:38 +08:00
Jeffy Chen
6ecd6bd6cb [mpp_dec]: Use pixel stride as width to calc FBC buffer size
Using pixel stride instead of byte stride.

Change-Id: Ic461f30ffb10b99560524a4d3a0dd6f039740f78
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2022-01-21 11:20:02 +08:00
Herman Chen
6e03da594a [test]: Fix mpi_rc2_test crash on help
Change-Id: I1a6568b03ca27e7795ae4e994fd497ad49f50c02
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-01-21 11:20:02 +08:00
Yandong Lin
a4ece5df05 [hal_av1d]: Implement av1 decoder hal module
Change-Id: I9dc410b55cc614e7a4a6353d52a70c806e467b2e
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2022-01-21 11:20:02 +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
sayon.chen
3d0f65b356 [mpp_bitread]: Add more status interface
Change-Id: I46843112a9059e5d36141d73c541ca3fb5ceae78
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-01-21 11:20:02 +08:00