Commit Graph

3026 Commits

Author SHA1 Message Date
Herman Chen
fd20cf4740 [test]: cleanup test code
Change-Id: I6bf234c25b2d6709aaf095ce641812d58ad0ab68
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 18:19:54 +08:00
Herman Chen
8ae47457a0 [mpp_server]: Add device callback to mpp_server
Change-Id: I985d48e6625d3656e080614ab958e26dfc54a2c8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 15:30:56 +08:00
Herman Chen
180dd8136a [test]: Improve decoder tests
1. All cases use reader to improve performance.
2. Rename cmd parser and create share data on cmd parsing.
3. Add reader_size function to get file size.
4. Change test log flag to -v options.
5. Fix FileBufSlot release MppBuffer issue.
6. Use index_read in multi test to improve performance.

Usage:

mpi_dec_test -i xxx.h264
Decode to the end of input stream.

mpi_dec_test -i xxx.h264 -n 10
Decode to the first 10 frame of input stream. If the xxx.h264 has only 5
frames then loop decoding from the beginning.

mpi_dec_test -i xxx.h264 -n -1 -v qf
Infinitely loop decoding xxx.h264.
It is usefull for performance test.

mpi_dec_multi_test -i xxx.h264 -n -1 -v qf -s 8
Parallelly infinitely loop run 8 decoders with same xxx.h264 input.
It is usefull for performance test.

-v q  will disable each frame output log.
-v f  will enable fps print per second.
-n -1 will enter infinite decode mode. Press <enter> will quit the loop.

Change-Id: I3d54123f0e9b9a85cb35e4fea71ebf665889750a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-21 15:17:48 +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
d56760acd2 [test]: Improve decoder reader usage
1. Change to new reader slot interface.
2. Use reader slot in all decoder test case.
3. Do not async reset on eos to avoid eos stream issue.

Change-Id: If296f6555fd0e57f6931085f02b0378e41a5f2ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-20 09:38:37 +08:00
Herman Chen
7b86c1abe4 [mpi_dec_utils]: Add decoder frame rate print
Change-Id: I46006cb51205ea98204c803f4753039409e8171d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-19 14:29:34 +08:00
Herman Chen
31de64ae15 [utils]: Add fps calculation function
Change-Id: I577f168d448846addcc3be720b09aa832bb7fdd2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-19 14:05:40 +08:00
sayon.chen
72559f581d [mv2parser]: Fix split case last packet issue
Fix error on split case that last packet is not sent to parser.

Change-Id: I4f32644e4740f592cc5c6dfdf592a8bbc79d6599
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-10-19 10:28:20 +08:00
Herman Chen
0aeb6e46b6 [mpp_lock]: Fix compile error on bool type
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If856cebe92db7e982f9781dfbe12b978e88bfac3
2021-10-18 17:05:41 +08:00
Zhihua Wang
7b29b55281 [vepu541_common]: Fix roi error log
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: I3d25310cb0a3b25a6036d30f51ff01328dfd3202
2021-10-15 15:28:09 +08:00
Herman Chen
b47190aa36 [hal_vepu541]: Fix fbc input stride issue
AFBCV1 input should align stride to 16.

Change-Id: I1d89d551cb930fa0fd842482f35eafb087ded6fa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-15 12:18:30 +08:00
Herman Chen
c153fa71dd [mpp_cluster]: Fix compile warning
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9f20c382f59fd8eea9c924c7f62b6bd69d564856
2021-10-14 17:13:37 +08:00
Herman Chen
926e0b7c22 [mpp_lock]: Add nop on lock
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I6290a52939615310c344cafbf90daf28323528d5
2021-10-14 17:07:50 +08:00
Herman Chen
ee2b8bb7c2 [dec_utils]: Improve reader performance
Use a new thread to read the whole file. Then all decoder instance can
share one single reader and read input file only once.

Change-Id: Iddc3322286bf61e449074143bbfb90fd1ff6b70a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-14 14:49:31 +08:00
Herman Chen
a96e644da8 [osal]: Add spinlock implement
Change-Id: Ib520e6732d007370545508ae18d6c74fa4d9d80f
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-14 14:47:44 +08:00
Herman Chen
3aad89dee8 [mpp_dec]: Add mpp_dec_callback
NOTE: The MppCtx should be restored for external user.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I2a4241ddacb14196f43b29a59b46658131ebfcee
2021-10-13 17:17:56 +08:00
Herman Chen
1894648650 [test]: Rename data type in mpi_dec_mt_test
Change-Id: Ia060fea489f3e5b63f1098db64fd5e0ea3dbd463
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-13 15:45:53 +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
2cf866c7dc [test]: remove mpi_test
Change-Id: I95d526d9d81ab34895f8f095e2e497bebe5df33b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-12 10:44:33 +08:00
Herman Chen
7256403b49 [mpp_callback]: Optimize callback module
1. Move callback module to osal for later mpp_device callback.
2. Make callback command a pre-defined value to avoid include issue.
3. Separate callback cmd and param to separate header.

Change-Id: Ibd5cf11650a1cd2a326baddb82dc60fa1767ac87
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-09 17:14:44 +08:00
Herman Chen
8285f5cd94 [mpp_cluster]: Add mpp_cluster module
Change-Id: I33befe847b6215572b470b41afea2398019d568c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-09 16:33:06 +08:00
sayon.chen
44073b6035 [hal_hevc_vepu541]: Adjust I frame bias cfg
Change-Id: If215c15ee452f0853b359484a36893d83dfb8bb1
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-10-09 09:51:23 +08:00
Herman Chen
1732ff2549 [mpp_buffer]: Add caller when using mpp_mem_pool
Change-Id: I7275d68c08b15fb0413585e7e0d0fdf7af204162
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-10-08 09:09:28 +08:00
Herman Chen
5598a015a7 [mpp_mem_pool]: Add debug flag
Change-Id: I562ccfe062546c9f4a20711fa1d3553ab100c7ce
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-30 17:29:18 +08:00
Herman Chen
31814aea59 [vepu]: Add offset_x offset_y support for vepu
Change-Id: I672ac7f9518544fc08bdf8a887b7686f2f7b1abf
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-30 16:46:58 +08:00
Ding Wei
70d330b271 [vproc]: missing set mode, when 2 in 1 out case
Change-Id: I28241fed2347ad85204c82b8e84c350e49fc42a2
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2021-09-23 15:30:24 +08:00
Herman Chen
6cc2ef5f75 [mpp_list]: Add list_mode and list_move_tail
Change-Id: I7be6f69a073eeedef1b0d9ff7e9a47b48df8a8fa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-17 11:11:43 +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
Herman Chen
db487e5d7f [mpp_dec]: Add MPP_DEC_GET_CFG cmd implement
Add MPP_DEC_GET_CFG call before setup decoder config in mpi_dec_test.

Change-Id: I1ed8c2be44be9de0e4b1364a1401a81a9ecfd6e1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-17 11:11:43 +08:00
Yandong Lin
8aa7415f2b [hal_h264d]: Add h264d hw_type config implement
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib3e9afbd3f67308aef4791197a975256017a39fb
2021-09-17 11:07:21 +08:00
Johnson Ding
3364f77061 [vepu541]: Fix hfill and wfill config
Change-Id: Ic845495ac00ba1c429237bd9d3cad19f2254852b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-09-17 09:30:26 +08:00
Herman Chen
436209226b [mpp]: Add jpeg hw_type config implement
1. Add dec cfg update before mpp_init.
2. Add hw_type eheck and process on hal_jpegd init.
3. Disable soc cap error log.

Change-Id: Idb5929bf1eace77d4b09205b60d0c1f0e0eb50b5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-15 12:21:03 +08:00
Herman Chen
6eac8bf45c [mpp_dec_cfg]: Add type, coding and hw_type config
NOTE: type, coding and hw_type all inited to invalid value.

Change-Id: Ib34ac4601eb76d8dc00b8772c01589328f21e893
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-15 11:45:16 +08:00
Yandong Lin
baf1efa9f8 [mpp_dec_vproc]: fix err frame output issue
when src frame is err, dst should be set errinfo also.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I5d9f090abc3a9ffea8f7e921c1b523242ab1fc69
2021-09-14 16:24:37 +08:00
Herman Chen
57ff4c6b46 [cmake]: Enable HAVE_DRM by default
Change-Id: I30db9d3f283913809452d6050e45524fe615221d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-09-13 09:39:18 +08:00
sayon.chen
4166b08375 [h265e]: Fix deblocking_filter_disabled_flag set issue
Change-Id: Ia3f53fcd4d47d3bb3ea7954c1f56b84778314712
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-09-11 17:24:08 +08:00
Yandong Lin
b05b391e3c [hal_vdpu34x]: adjust hal stream info buffers
1. Remove errinfo buffer for h264.
2. Reduce redundant rps buf for h265.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0f13faaf7a473dc7bfbe169e951313aed10f22e3
2021-09-10 17:06:47 +08:00
Ding Wei
6dadc7e122 [hal_h265d]: Use MPP_OK default, avoid the api->control is NULL
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Change-Id: Id4966d0caadc82dc4a7a548558e0f2e1b194a1ef
2021-09-02 14:50:51 +08:00
Herman Chen
9036159c76 [jpegd_vdpu2]: Fix error on first jpegd vdpu2 task
The first jpegd vdpu2 will send codec info with normal register access
operation. But some old kernel will not support the codec info cmd 403.
Then kernel will discard the whole ioctl operation and let the first
decoding task failed.

So we separate codec info cmd from the normal register access cmd.

Change-Id: Ic364c90367a0493f132dc78e76fae3d4fd6011ca
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-30 16:39:42 +08:00
Herman Chen
264aca483e [utils]: Remove extra NULL option print
Change-Id: I48871d7af4fae0fdf3e6e405793e53a5e4768801
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-30 10:06:08 +08:00
Herman Chen
1263919d51 [vepu]: Fix error on encoding yuyv format
Fix error on encoding yuyv422 format with offset_x.

Change-Id: I3b1115e300d257cec096981d179da8111e31903d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-08-30 09:04:02 +08:00
Herman Chen
b394dcea6f [jpege]: Set default rc_mode to VBR
When quant or qtable is set change rc mode to fixqp.

Change-Id: Iacb1a1596b98c481b9ee7cbe61696a9c79445188
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2021-08-26 17:58:16 +08:00
Yandong Lin
0d11f480e3 [h264d_sei]: fix parse sei crash with invalid sps id
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I990e14fd8ff3b122577f63632d4632ab1723c78a
2021-08-26 09:26:39 +08:00
Yandong Lin
4f06d9dcb3 [mpp]: support dump pkt data for dec
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3a1cf3d8d36c090a1c4fc29f1ad6b4495e8703f7
2021-08-26 09:24:59 +08:00
sayon.chen
196b918d07 [h265e_dpb]: Mark unused ref which no show in dpb
Change-Id: Ie41740c8f85bd61ca590532501d7e89e6fd66fa5
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-08-25 10:32:08 +08:00
sayon.chen
fb3e07d963 [rc_v2]: Reorganize ins_ratio calc code
Change-Id: Ice56c636eb53eec7cb0bbfa1269565eede0aa129
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2021-08-25 10:31:46 +08:00
Yandong Lin
7340076465 [mpp_time]: fix the interval time calculate wrong
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iabfa5c0cd1f85cbb41e85ef49cd0dd96f4f2d7f9
2021-08-25 10:21:52 +08:00
Johnson Ding
0faeb9413f [hal_jpegd]: Check output format before decoding
Change-Id: I035297695a4ff027814507e829adba1a767f61e8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2021-08-23 14:30:31 +08:00
Chen Jinsen
516fd94a0b [jpegd]: Remove stream copy_flag on rk3568
Change-Id: I60a7d6384210aae5906d21d6286f1dd0f6203e32
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
2021-08-23 14:06:02 +08:00
Chen Jinsen
599300a8ce [hal_vdpu]: Support hw resolution capability check
Change-Id: I4737b00550f5d78baacec7656e46e73bcaa28fbf
Signed-off-by: Chen Jinsen <kevin.chen@rock-chips.com>
2021-08-23 14:05:58 +08:00