Commit Graph

3026 Commits

Author SHA1 Message Date
Herman Chen
08ad54a013 [h264d_vdpu34x]: Fix colmv buffr address issue
Change-Id: If95a8630ff6e540af309f107c850d236a3983614
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:46:53 +08:00
Herman Chen
eb6811fec5 [mpp_service]: Enlarge max register offset count
Change-Id: I65ab110dcba5cf1d7c90c6996f12872c833b7c93
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:46:53 +08:00
Herman Chen
662d0c19a6 [mpi_enc_test]: Update osd test case
1. Update osd test in mpi_enc_test.
2. Remove osd test in mpi_multi_test.
3. Fix log info in vepu541.

Change-Id: I8056edf263df5571448782b3b8074f54956672ee
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:46:53 +08:00
sayon.chen
5012336bc2 [enc_v2]: Suppport user data set
User data set is for multiple user data with uuid.

Change-Id: Iad952961ab6242ff3a14f554410144bebd3801ba
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-16 09:46:53 +08:00
Herman Chen
af5b4eb509 [mpi_enc_test]: Remove legacy cfg function
NOTE: Use new string config function.

Change-Id: I69d96482dba15f69cd340d501372463e9b92d004
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:46:53 +08:00
Herman Chen
bbf671842e [misc]: Format coding style by astyle
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic5da1fe190e5f4d624f7e04a3519a6f8af951a75
2020-11-16 09:46:51 +08:00
Herman Chen
154ffeeb0c [hal_h264e_vepu541]: Add experimental 4K support
Support 4K on vepu540 need to split slice for each mb row.
NOTE: This feature is only for test.

Change-Id: Ia8e784bf87a6a4a73e34ab8ec6b2f2d3fbff0fe5
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:44:43 +08:00
Herman Chen
f4b67670eb [vdpu34x]: Update register offset definition
Change-Id: I6813b9cb1920b6a650faa8e2b54628b608e1950d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:44:43 +08:00
Herman Chen
a914b3c845 [hal_vp9d]: Add hal_vp9d_api module
1. Add hal_vp9d_api module for more vp9 decoder support.
2. Move hal_vp9d_reg to hal_vp9d_rkv module.
3. Separate context, debug, common header for hal_vp9d.

Change-Id: Ib1db70f4cbdc9b3f687ad21069b761d36f71f15c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-16 09:44:43 +08:00
Herman Chen
bcc45075d1 [h265e_api]: Replace h265e_api by h265e_api_v2
Change-Id: I38f12379c011fd49ffd8653e4dceca4f1948ebc8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 16:43:37 +08:00
Herman Chen
13e7915dd1 [hal_h265d]: Add vdpu34x to H.265 decoder api
Change-Id: Ie82d3f8782f091fd3d6c09e200aed2920f55bbad
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 15:35:27 +08:00
Herman Chen
40348b213b [hal_h265d_vdpu34x]: Add vdpu34x H.265 decoder
Change-Id: I00925c209017c4e73d2eff2fdbeaf7dc15645c4e
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 15:35:27 +08:00
Herman Chen
82959c59f9 [hal_h265d]: Add new hal_h265d_api module
1. Add hal_h265d_api module to separate different decoder.
2. Move some common definition to hal_h265d_com.
3. Add new api header and register header for rkvdec H.265 decoder.
4. Add unified debug header.

Change-Id: If528f9a444790ec95c604eaf5e5f2f8822896da4
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 15:14:00 +08:00
Herman Chen
88794d5677 [hal_h265d]: Remove unused function in header
Change-Id: I2963a37f6ee15fe277b3a0d9d6deb30f82ed0afe
Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 14:53:56 +08:00
Herman Chen
3faae6c3e5 [vdpu34x]: Add vdpu34x H.264 decoder
1. Add vdpu34x common definition.
2. Add hw_id detection on hal_h264d_init.
3. Add vdpu34x H.264 decoder module.

Change-Id: Icd8c8394ad75329c00f910c7903cc8951bb0777b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 14:48:56 +08:00
Herman Chen
776df2757a [mpp_service]: Add rk jpeg decoder name support
Change-Id: I9cbc693e7aedcfff635b9811f90d84e3a799923b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-11 11:14:36 +08:00
Herman Chen
855b45e041 [mpp_device]: Add mpp_device_debug env read
Change-Id: I691cc21a1316fbbe4b2c2a0d3ff50e96d7a5bed9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-10 21:33:46 +08:00
sayon.chen
495c4849da [h264e_vepu540]: Fix me_ram value calc
Change-Id: I75e92336e45d99e982f2e2687756ee67cc389ed4
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-10 21:24:21 +08:00
Herman Chen
b8a20f5b17 [h264e_vepu541]: Add vepu540 osd support
1. Add soc name query for vepu541 and vepu540.
2. Add vepu540 osd function.

Change-Id: Ic6084cfecec3f4cadbcd0c4bb8daf626956ce6f7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-10 21:23:07 +08:00
Herman Chen
60b6800287 [rc]: Remove unused rc code
Change-Id: I27a62c48b757ddc90924691522eb7aa881e94b62
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-10 16:00:38 +08:00
Herman Chen
7450a70efe [h264e_vepu540]: Add vepu540 register change
1. Add H.264 cross slice operation enable flag.
2. Add cime line buffer width flag and clear.
3. Add output Y400 support.

Change-Id: Ie6964fb1cdf913838adb26723020dae56ec9c867
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-10 15:57:25 +08:00
Herman Chen
5967c22284 [mpp_platform]: Add rk3566/rk3568 SOC definition
Change-Id: Ia1972cb95d5497cf95daab46504cfea9522b79e7
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-10 14:19:41 +08:00
sayon.chen
4fccb4aa80 [vp8e_hal]: Fix vp8e value set error
1.fix split_penalty reset issue
2.fix hw_ctx no clear at init

Change-Id: I3be8e75c642e57c5210a3626dc8d2dfcb4c581da
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-09 10:47:03 +08:00
sayon.chen
bc4a71c115 [rc_v2]: Fix qp set issue in fix_qp mode
Change-Id: Ie9c007b4f413f1217c7ca1e1e89603300b220e39
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-09 10:45:41 +08:00
Herman Chen
6013568d64 [mpp_enc]: Add fps calculation
Change-Id: I4a56a6560dcef1a373f27a22ae47762933f69b67
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-09 10:28:12 +08:00
Herman Chen
b0c1f86b32 [mpp_enc]: Add MppDev and HalInfo to mpp_enc
1. Add MppDev output for all encoder.
2. Update HalInfo to MppDev on each header update.

Change-Id: I8fce811dda7232740042917c9738bc11253ee672
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Ding Wei <leo.ding@rock-chips.com>
2020-11-09 10:28:12 +08:00
Herman Chen
49894453bb [hal_info]: Add hal_info module
This module is to collect infomation and send to mpp_service.

Change-Id: I26e01edf70d8c599e4ad4fc1f3120f09372d3a1c
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-09 10:28:12 +08:00
Herman Chen
ce7101f88c [mpp_device]: Add mpp_device_debug and set_info
1. Add mpp_device_debug.h
2. Add set_info handler in mpp_service.

Change-Id: I1ec83feadd4df79d5934182a35e0ed66f0f831ac
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 17:58:20 +08:00
Herman Chen
b60b40c62d [mpp_base]: Add more to_str function
Change-Id: Ic45acd7cb304fa16908e43ec497d9ead8ba477d6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 17:53:57 +08:00
Herman Chen
a75c5edcb7 [legacy]: Remove vpu dependence on mpp_service cmd
Change-Id: Ib447f1612f16cb9854fcee32c79eef5bcf26fe75
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
Herman Chen
af6938b235 [mpp_device]: Move mpp_device to osal
Change-Id: Ia196f01945d47c24e821da8935f3694834afa839
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
Herman Chen
3f8e880a39 [hal]: Use new mpp_device interface in hal
Switch all hal module to new api.

Change-Id: I066da7e06c999a01b80ee193365c5752e9bb19aa
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
toby.zhang
ad9ca64801 [hal_h264e_vepu541]: Update fine tuning parameter
Modify fine tuning parameters for balancing motion tailing and noise
dancing.

Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Ic1b93b0cfb419a2ae5b02ef9ec45dd46cb41fde9
2020-11-06 11:47:53 +08:00
Herman Chen
7adf857c50 [hal_vepu]: Fix vepu stride error
Add byte_stride to pixel_stride conversion function.
Both jpeg and H.264 encoder should use this function to get
pixel_stride.

Change-Id: I0c256d75b9b9f2c78da56504bc237220b1615bd8
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
sayon.chen
49eb2ca0d1 [vpu_legacy]: Add init qp cfg for vp8_enc
Change-Id: I53cb6c0e64f066faf5301d8406cc5f87da3aa48e
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
Herman Chen
5f256c5e50 [mpp_hal]: Add function pointer check
Add function pointer check for reset / flush / control.

Change-Id: I3c0cda2863a18bad708cb910344bf19426ed8416
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
sayon.chen
9f6bcbe851 [vepu_vp8e]: Enc frame_type decision by cpb
Change-Id: Id1ad236c785b162fa956ac4b19d8a2d04c09f796
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-06 11:47:53 +08:00
sayon.chen
e5764cc205 [hal_vp8e]: Fix refbuf issue cause kernel crash
Change-Id: Idfe169246633a0348081f0a98741aa7beb2e9ae0
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-11-04 10:29:57 +08:00
Herman Chen
44443dd7ee [mpp_device]: Add new mpp_device for kernel driver
1. Change mpp_device into a new layer for kernel drvier.
2. Separate mpp_service driver and vcodec_service driver.
3. Add mpp_service.c for /dev/mpp_service driver support.
4. Add global mpp_service info query interface.
5. Remove unused function in mpp_device.c

Change-Id: I3f53bba3aef525ad3b1f450bb55830d1eeaf29a6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-11-03 16:09:19 +08:00
Herman Chen
2e0b487683 [mpp_platform]: Detection code cleanup
Change-Id: I7c1d850b8fd9a2bbfcd870e0be27f381ed88421a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-30 17:10:44 +08:00
yandong.lin
857649cc98 [hal_vp8e]: Fix translate fd err and so on
1. Sometimes,there will occur random values in HalVp8eCtx and Vp8eHwCfg
   without initialization,so some fd assigned is invalid.
2. Some variables are incorrectly assigned.

Signed-off-by: yandong.lin <yandong.lin@rock-chips.com>
Change-Id: I41360e15f4e7ea3fc8d1131ec44e0bc1e10a8e80
2020-10-30 10:55:26 +08:00
Herman Chen
9ddb869ac1 [mpp_device]: Unify mpp_service request
Change-Id: I7ace66dbad2306c3ca28a86a03bb58239fb6ab04
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 16:09:36 +08:00
Herman Chen
b845d7740d [mpp_device]: Fix cmd_butt check error
Change-Id: I247bb3573812903c6bc478cdad17c9e21f515104
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:41:41 +08:00
Herman Chen
7fe7bf4f49 [mpp_device]: Fix 32bit mpp error on 64bit kernel
The MppReqV1.data_ptr and MppDevReqV1.data is fix to 64bit. And the
REQ_DATA_PTR should be used on each value assignment.

Change-Id: I43e91625a0da427b8a3962cfddfcf94330e83312
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:22:32 +08:00
sayon.chen
f2d52184cc [hevc_vepu541]: Close recon out when pic is no ref
Change-Id: Iab58b4aa44a7a66cfb14a5ec0eb27441d1301444
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2020-10-28 15:20:06 +08:00
Herman Chen
93bc0690d4 [mpp_enc_refs]: Add flag for recon frame writing
Change-Id: I8f68573a4156056b61a05c14d5eb7d2734958e0d
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:20:06 +08:00
Herman Chen
3be4151964 [mpp_enc_v2]: Avoid control async error
1. In some case cmd_send is increased but param is not write to memory
then the mpp_enc_proc_cfg function may read zero param.

Add extra sem_t to sync cmd / param value.

2. Move MppEncCfgSet to the bottom of encoder.

3. Add control return value path.

Change-Id: Iddc4e690d8e0e45d2922c6666dc5fd9c4d57fef2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:20:06 +08:00
Herman Chen
6d2128f9f7 [mpp_device]: Separate kernel interface define
Move vcodec_service and mpp_service kernel ioctl interface definition
into different headers.

Change-Id: I1aa77d1073e7c51b48d18cf8d16fd76644d23d38
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-28 15:20:06 +08:00
Herman Chen
977e01340f [hal_vepu541]: Reduce vepu541 recon buffer usage
Change-Id: I4ba34a28e528909c349aeddb672c1d64ecad971a
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-23 14:17:34 +08:00
Herman Chen
3c55b55e46 [mpp_dec]: Add query interface for debug
1. Add query interface.
2. Add query result in mpi_dec_test.

Change-Id: Ie0026f155331c0b0f8e1b5409aeb7d41b6a3ecc6
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2020-10-23 14:17:34 +08:00