Commit Graph

125 Commits

Author SHA1 Message Date
Chandler Chen
a524df5361 feat[h265d]: Add vdpu383 hevc yuv444_10bit support
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I14d7a8fac9f14283ecc364142ea93d80eda43fcd
2025-01-20 06:56:35 +00:00
Herman Chen
dfc7564693 feat[mpp_trie]: Add functions for import / export
1. Change MppTrieInfo internal structure.
2. Allow to export / import root, node_count and info_count.
3. Add trie check in import functon.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id10edbc92db14d045b5bbd15d13ef2472e695037
2024-12-04 14:49:16 +08:00
Herman Chen
e9abaab950 refactor[mpp_cfg]: Refactor MppTrie and string cfg
1. Reduce MppTrie memory usage.
2. Add info context and string temp storage.
3. Refactor memory layout on mpp_trie last info.
4. Use ENTRY_TABLE to setup mpp_enc/dec_cfg trie info.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I3e554ca6ef97bf77406ced00a116c5783570baba
2024-08-30 17:22:31 +08:00
Tingjin Huang
01dee1b7d4 feat[vepu580]: Optimization to improve VMAF
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
Change-Id: Idaecf9a402aa9b87802d76911abb816e0dc557ec
2024-08-29 10:04:03 +08:00
Tingjin Huang
e03714e193 feat[vepu580]: Add qpmap and rc container interface
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
Change-Id: I9fb0683008880a2e025664052a64d290730e6b49
2024-08-29 10:04:03 +08:00
liming.lou
1bb6ff8993 feat[vepu510]: Sync code from enc_tune branch
1. Design 8 mode for smear
2. Adjust atf_e and atr_e switch
3. Adjust aq thd and aq qp delta
4. Modify appropriate parameters for smear
5. Add sao atr atl configure interface

Change-Id: I0afb7e3d920dddfd33ea8d81fcbda5dd0d6801d3
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-27 10:23:33 +08:00
toby.zhang
03696728e1 feat[vepu510]: Sync code from enc_tune branch
1. Add anti-line tuning
2. Adjust AQ assignment
3. Add smart encoding
4. Add deblur/qpmap routine
5. Add atf & four level intensity control atf
6. Add atr anti_blur function
7. Add real time bitrate output
8. Add smear buffer for vepu510

Change-Id: Iae661686f6adacd0b5ec57c102c184e2537dfc7d
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-27 10:23:23 +08:00
toby.zhang
02095f66d3 feat[vepu510]: Sync code from enc_tune branch
1. Add cu_qp_delta_depth cfg
2. Configure AQ regs for H.265
3. Configure regs according to scene mode
4. Support fixed frame level QP
5. Add RDO lambda table index
6. Update stat info for HEVC
7. Add tuning code for H.264 encoder

Change-Id: Id7dae4ed55e1b94622aee72cfce8f24c833d00e1
Signed-off-by: Tingjin Huang <timkingh.huang@rock-chips.com>
2024-08-27 10:08:49 +08:00
Yanjun Liao
12cf338dff fix[enc_roi]: Fix cu_map init in vepu_54x_roi
Change-Id: Icdc9c44778ce3ecbf9234ffe4294aff8ffd4165d
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-08-23 15:56:29 +08:00
Herman Chen
c367dd1609 feat[mpp_trie]: Add trie context filling feature
1. Add context space reserving on trie shrink.
2. Remove MppTrieNode on trie interface.
3. Fix MppTrie usage on tests.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie2f568785a78499b394d298c3833dd04c6f9a9bd
2024-08-16 15:24:36 +08:00
Yanjun Liao
7f6ea0ad8c fix[enc_roi]: Use cache buf to reduce CPU usage
Change-Id: Ib7a90a8c1900bf3397ac320ab9b61c835ce77ee6
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-06-20 20:50:18 +08:00
Yanjun Liao
01a86a21ca fix[enc_utils]: Support read odd resolution image
Change-Id: Ib6b9d9ebc9d552ee0fda0f3a14c77b2ae37881d8
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-04-26 16:44:23 +08:00
Johnson Ding
3f737ef5c3 fix[utils]: fix read and write some YUV format
Change-Id: I96d2b49539b7547df6786b3495fcbc375d4f4fc3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-03-01 15:11:48 +08:00
Yanjun Liao
303a26ddad fix[mpp_dump]: add YUV420SP_10BIT format dump
Change-Id: I1e89dbfefb394b4e8b2fbaf4fb0516be3528dd24
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-01-29 09:35:28 +08:00
Yanjun Liao
ed77dd7988 feat[mpi_enc_test]: add YUV400 fmt support
Change-Id: I05d149d176e1e692e9706dac07e6d843446309f9
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-01-11 18:02:23 +08:00
Herman Chen
8db63d761a fix[common]: Add mpp_dup function
mpp_dup function use fnctl F_DUPFD_CLOEXEC for fd dup with CLOEXEC flag.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Idd82eb935b06d2885685aeb696b95e910981539d
2024-01-10 18:15:45 +08:00
Yandong Lin
261037a8d3 chore[mpp_enc_roi_utils]: change file format dos to unix
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I816ec6f8a9771b814ea7ac4a313f97ad72abe3a1
2024-01-02 18:05:48 +08:00
Herman Chen
eb14ae5032 [enc_utils]: Remove extra option log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic9c54399bee41eab69c8a109e7d03eb6ee04d1a0
2023-12-19 18:16:39 +08:00
Yanjun Liao
ce39aff31f feat[dec_test]: Add buffer mode option
Add an option in dec_test to demo zero-copy external buffers mode.

use -bufmode to config the buffer mode option
hl - half internal mode
i  - pure internal mode
e  - pure external mode

Change-Id: Ib92c30acd8c370843becb286c935de056b09bcbd
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2023-11-29 09:54:36 +08:00
Herman Chen
0d773814cf chore[mpp_enc]: Encoder changes to cacheable buffer
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8df399ff708e354f8e3017da41e1424cba4999ee
2023-11-29 09:54:36 +08:00
xueman.ruan
22100022d7 fix[utils]: adjust format range constraint
Change-Id: I12d57955d6ad84e063784e46893b1deec90785b6
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-10-26 10:29:34 +08:00
Yanjun Liao
a17bcc0c5e fix[camera_source]: Fix memory double-free issue
Fix duplicate memory release issue in camera_source_init

Change-Id: If52ef19c7af247e45501e7e3ab8faf4a4c187246
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2023-10-20 09:06:11 +08:00
xueman.ruan
e61fb720f4 fix[camera_source]: enumerate device and format
Change-Id: Id4ce3986109f57039cf6716c9252dcc45caebb4e
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-09-28 16:25:47 +08:00
xueman.ruan
7017dbd1b6 fix[utils]: fix hor_stride 24 aligned error
Change-Id: Ife950bd3ae5fac5faffffa4275222fcc7fb9bbe0
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-09-28 16:24:22 +08:00
hdl
68177e2268 feat[vepu580]: Add frm min/max qp and scene_mode cmd param
Signed-off-by: hdl <hdl@rock-chips.com>
Change-Id: I27c3f3cfb599b8d05e58aceb1967bec4230d386e
2023-09-25 17:46:32 +08:00
Johnson Ding
65eea468b0 fix: fix redundant prefix NALU amended problem
1. For normal Smart-P mode, if TSVC is not enabled, temporal_id can be
   zero, and no need to add prefix NAL.
2. For RK3588 H.264 dual core encoders working concurrently, redundant
   prefix_nal should also be removed, if prefix NALU is empty.

Change-Id: I89aca4f0cf418afb48e39a141107c5f4491a1ce1
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-08-17 15:41:26 +08:00
xueman.ruan
c83da7de68 fix[utils]: fix convert format error
Change-Id: I9994ab4671dbf9c0f7b0b0476c9fd2710294805d
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-08-16 16:02:11 +08:00
xueman.ruan
9bde70e868 [camera_source]: fix camera reinit failed.
Issue: https://github.com/rockchip-linux/mpp/issues/408

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Icc0b34ab28c618acdea38914300a3537c604a389
2023-07-24 09:37:19 +08:00
xueman.ruan
fbe861d86b [jpege]: set default rc_mode to fix_qp.
Change-Id: Icd0e0148865b96ddb78657296479a965eed5de9b
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-05-26 11:44:11 +08:00
Yandong Lin
b04033f8c2 [mpi_enc_test]: fix some cmd config issue
1. Fix qc param config issue.
2. Fix some param help description issue.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I47b88c6f1c0c2db67139cae55957019572b5cd20
2023-05-08 17:12:47 +08:00
xueman.ruan
ef67776801 [mpp_dec]: fix hdr stream dump yuv error.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Ibf13d81dfec194bb607a1fe881227951bb1509e0
2023-03-29 15:17:31 +08:00
Herman Chen
fcd4750e3c [dec_utils]: Fix jpeg reader error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I04ef9e4f6ae3bb9ccd683a0c0e439b5ff4c7d4f5
2022-12-14 16:36:36 +08:00
Xinhuang Li
54c4458233 [utils]: close export fd when deinit
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: I5a94685d4b1f93c5f56664a8c4a4e63e17757182
2022-12-09 11:41:08 +08:00
Zhihua Wang
2de930d33c [utils]: read_image support YUV444SP, YUV444P
Signed-off-by: Zhihua Wang <hogan.wang@rock-chips.com>
Change-Id: I20f9b200134dac343c7e3e5da894689937afe2ca
2022-11-11 14:19:35 +08:00
sayon.chen
536010f378 [roi_utils]: Fix cu_size set error
Change-Id: I47c2ec6ee17a37071c33468b52d306c193f6c6e8
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-09-20 15:25:24 +08:00
sayon.chen
d1111e74ba [utils]: Support yuv420sp_tight_10bit to 16bit dump
Change-Id: Ic1143a7fe022d38ba8f6300b7e9e017a44bf802c
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-09-16 15:38:40 +08:00
sayon.chen
9cfb3df153 [roi_utils]: Optimize the roi set
Change-Id: Ia9085caeecf421c426e31c6d669f7f402cbac41d
Signed-off-by: sayon.chen <sayon.chen@rock-chips.com>
2022-09-02 09:34:40 +08:00
Jeffy Chen
0f0d28c2ec Fix compile errors with musl
Tested on RK3588 EVB with musl-1.2.2 and gcc-10.2.

Change-Id: I10574446f46964bad5e67ab45c76060a193b8335
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2022-05-26 11:19:59 +08:00
Herman Chen
5dccad43d4 [mpi_enc_test]: Add AFBC_V2 source support
Change-Id: I089c41137edf39211f33faf234b68295256bcfc1
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-24 14:34:41 +08:00
Herman Chen
0d85aab268 [utils]: Add more YUV422 YUYV format support
Change-Id: Ic8e2061c01bf6a9603c2291a17eabe0f978ef4f2
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-24 14:21:28 +08:00
Herman Chen
2b35cee0ce [mpp_log]: Add more log helper function
1. Move mpp_log.h to inc for external user.
2. Add mpp_debug.h for mpp internal logging.
3. Fix some warning.
4. Add log level setup function.
5. Check env log_level value in mpp_get_log_level call.

NOTE:
1. mpp internal module should use mpp_debug.h and mpp external user
should use mpp_log.h
2. Use mpp_get_log_level to update mpp_log_level when the env changed.

Change-Id: I90a55a02a72db177533013280dfe111ca3479229
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2022-05-20 11:42:10 +08:00
Hongjin Li
7bcf0d45dd [mpp_opt]: Modify the initialization number of opt
Change-Id: I3fef98f0feab2004b5c78dabcc4d792121bd7f1a
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2022-04-15 10:59:00 +08:00
Jeffy Chen
c07169d533 [misc]: Fix a few compile warnings and errors
Reported by llvm-clang.

Change-Id: I62f22fe5754d3e8d77405d213c81fda5d9f5e27d
Signed-off-by: Jeffy Chen <jeffy.chen@rock-chips.com>
2022-03-11 17:45:10 +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
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
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
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
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
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
33269e39e7 [mpp_dec]: Fix the problem of read data error
For data with sizes of 5120x7160 and 8000x8000, the required buffer size
was calculated incorrectly during the encoding process, which caused the
requested buffer to be too large, resulting in drm exceptions.
Therefore, the method of calculating data has been modified.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I519a76687118d568cf57e7d3d54a150e9019285c
2022-01-17 20:41:06 +08:00