Commit Graph

3806 Commits

Author SHA1 Message Date
Yandong Lin
2f1eac63f9 feat[kmpp]: Add kmpp module
Change-Id: Ia9c414edf625885fd551ad14f72dd1f7bc34172d
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-16 15:29:16 +08:00
Yandong Lin
fad0868986 feat[rk_mpi_cmd]: Merge cmds from mpp_interface
Change-Id: I6550486d6efbac43d6f30cdb6dfefa75a93a437d
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-16 15:04:18 +08:00
Yandong Lin
fc2a997a58 fix[mpp_enc_cfg]: Remove a redundant atr_str
Change-Id: I7553fcf8a7014ce3c2a13b1fd923ac91d78fb9d3
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-16 06:19:31 +00:00
Hongjin Li
686d5a60d9 fix[]: Fix abnormal FBC info issue in Info Change
Platform: RK3576

From: Product Department 2 czl

Change-Id: I058e36b426b2d4b894086547d5cf240e2f8f2cca
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-01-15 15:14:18 +08:00
Yandong Lin
c04a24f0e1 feat[build]: Add --toolchain to config toolchain for linux
for example
./make-Makefiles.bash --toolchain gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-

Change-Id: I4804b1e1759aab04f715d826fbe412087298cb89
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-14 10:36:28 +00:00
Johnson Ding
0b1c78701f fix[h264d]: Fix segment fault problem
Field buffer may be reset when encountering error at parsing.

signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x50
Cause: null pointer dereference
    r0  00000001  r1  00000000  r2  aefe63a7  r3  00000003
    r4  00000001  r5  00000001  r6  00000000  r7  0000001c
    r8  0000000f  r9  00000000  r10 0000001a  r11 ee1b2650
    ip  ee1b1fb8  sp  ee1b2648  lr  f5db5c5b  pc  f0547bfc

backtrace:
     #00 pc 000c5bfc  /vendor/lib/libmpp.so (mpp_frame_set_errinfo+44)
     #01 pc 0010aa54  /vendor/lib/libmpp.so (get_field_dpb_combine_flag+796)
     #02 pc 00113990  /vendor/lib/libmpp.so (alloc_decpic+1456)
     #03 pc 00112da8  /vendor/lib/libmpp.so (init_picture+340)
     #04 pc 000fc128  /vendor/lib/libmpp.so (parse_loop+1092)
     #05 pc 000f7d10  /vendor/lib/libmpp.so (h264d_parse+212)
     #06 pc 0009b7f8  /vendor/lib/libmpp.so (mpp_parser_parse+164)

Change-Id: Iff4b628b7f807d6da448ea8553c5af613e63d328
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-01-14 11:18:10 +08:00
Herman Chen
f0ff240b87 feat[mpp_meta]: Use trie to index the meta key
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I634d447223e6e9d268642798a4fb0d11ad32cfb0
2025-01-13 17:41:51 +08:00
Johnson Ding
5b0f01d582 fix[vproc]: Fix error info missed problem
Change-Id: Ic9049ddec01ceaa1c160a7b3c2eada87133c140e
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-01-13 10:00:04 +08:00
Johnson Ding
5e26aa37e0 fix[vproc]: Fix output blank buffer problem
Change-Id: I3934186aa075880283ab1501da15db496a16c600
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-01-13 01:51:51 +00:00
Yandong Lin
26bfd05275 feat[mpp_packet]: Add realease callback info
Change-Id: I3334455e08ceb05a0a396949344785e0504ee536
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-10 07:11:57 +00:00
Hongjin Li
80d7377a0b fix[fbc]: Fix RK3588 av1 FBC usage issue
Platform: RK3588

Error case:
1. After setting FBC, the current platform was not checked for FBC support.
2. The RK3588 AV1 supports FBC.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I0696c4469d514291547ed21a80089812c7e6b585
2025-01-10 06:51:18 +00:00
nyanmisaka
4b6c587af8 fix[sys_cfg/buf_slot]: support yuv422sp 10bit
Platform: General

Reported-by: nyanmisaka <nst799610810@gmail.com>
github: https://github.com/rockchip-linux/mpp/issues/761

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Change-Id: Id06f3762425150799f2be7c0019af2f7b60afc3d
2025-01-10 14:14:54 +08:00
Herman Chen
ddaacf63e4 feat[kmpp_obj]: Update to new objdef query mode
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id8e32fc9440133e3d2a036fed484e62e4a1b96ed
2025-01-10 11:20:26 +08:00
Herman Chen
4af79f761a refactor[mpp_trie]: Replace root import
Replace root import with init_by_root.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I3aae1b0a8a9e04894740221a814631787e148b58
2025-01-10 11:20:22 +08:00
Herman Chen
8d32e19a76 feat[mpp_trie]: Allow empty name trie for import
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I01cee3039329fae7817e2ab7234739a8751ca09c
2025-01-10 01:07:45 +00:00
Yandong Lin
7939be1246 refactor[mpp_enc_cfg]: Adjust cu_qp_delta_depth
sync from mpp_interface

Change-Id: I2dfabef3acf01566df289396678a433ac84f3a15
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-09 06:17:45 +00:00
Yandong Lin
2cb69a2860 fix[mpp_enc_cfg]: Add sao_bit_ratio from mpp_interface
Change-Id: Iba92fdd0052e661b74d747f921dfe25d5a408cd1
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-09 03:32:10 +00:00
Hongjin Li
86b846c0a0 fix[buf_slot]: Correct coding mistakes.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Iac8cc16ea4c79d14c887ce5ff7102f28f89fb725
2025-01-09 10:43:16 +08:00
Johnson Ding
5afd495920 feat[enc]: Support setting temporal_id
Using meta key KEY_TEMPORAL_ID to specify temporal_id for frames.
NOTE:IDR and LTR frames are not allowed to change their temporal_id.

Change-Id: I301974ac1e5eee316c494221d9236067c401dc4e
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-01-09 01:26:41 +00:00
Yandong Lin
e447e0763e feat[mpp_enc_cfg]: Merge enc cfgs from mpp_interface
Change-Id: Ie08d9a26129096634b61fe60a10517efe0807180
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-07 17:04:12 +08:00
Yandong Lin
e1621412d0 fix[mpp_venc_kcfg]: Get objdef at runtime
To prevent the err log when loading so:
[346105.177235] kmpp_shm: get_shm_grp_by_arg: by KMPP_SHM_IOC_QUERY_INFO can not found valid obj KmppVencDeinitCfg
[346105.177640] kmpp_shm: get_shm_grp_by_arg: by KMPP_SHM_IOC_QUERY_INFO can not found valid obj KmppVencResetCfg
[346105.177675] kmpp_shm: get_shm_grp_by_arg: by KMPP_SHM_IOC_QUERY_INFO can not found valid obj KmppVencStartCfg
[346105.177705] kmpp_shm: get_shm_grp_by_arg: by KMPP_SHM_IOC_QUERY_INFO can not found valid obj KmppVencStopCfg

Change-Id: Ia724e1cf4e4af04d5da66183f9f0030e95304d23
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-07 08:12:34 +00:00
Rimon Xu
7132f62e47 fix[jpegd]: Avoid buffer overrun
Add address check to prevent find eoi exception

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I1e569941db1dd6cb942606c6ff732dfd0641cc7e
2025-01-07 07:49:42 +00:00
Hongjin Li
330dc3d48d fix[sys_cfg/buf_slot]: fix fbc yuv444sp buf calculation issue
Platform: General

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I784242476234898a836ea838a232264f7f5081c1
2025-01-07 14:24:42 +08:00
Hongjin Li
07bef12867 feat[mpp_sys_cfg_st]: Provide packaging for use on products
Change-Id: I41bbd28f4aabce5ba3735a47e65ccb71997262a2
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-01-03 08:42:22 +00:00
Hongjin Li
5931c416d8 feat[mpp_sys_cfg]: Add raster/tile/fbc buffer alignment
Change-Id: Ic5e8deb59c50e2089ef278426e0850629d10e653
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-01-03 16:29:59 +08:00
Hongjin Li
e52ec5e1e8 feat[mpp_sys_cfg]: Support sys_cfg buffer alignment
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I0533eb135d16b6eda4941e79aa8584e4d032d38d
2025-01-03 08:27:44 +00:00
Yandong Lin
fa095373e1 feat[kmpp_obj]: Add kmpp_obj_get_hnd func
1. Add kmpp_obj_get_hnd for kernel ioctl.
2. Add kmpp_obj_get_hnd_size for share handle copy size.

Change-Id: I1acac5ebb4a89e97c547f1ba3f57bf3add5b4e14
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-03 07:07:05 +00:00
Yandong Lin
47fbbe7436 feat[mpp_venc_kcfg]: Add mpp_venc_kcfg module
Change-Id: I67acff6efbfa9ec1c35c3bdc8252b4047e5c9f75
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-03 14:08:00 +08:00
Yandong Lin
885c5f63bd fix[kmpp_obj]: Add extern C
Change-Id: I9943e1c48f74bb0fc2ec91db0faab83efb437524
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-01-02 18:09:02 +08:00
Herman Chen
9560f259b9 feat[kmpp_obj]: Add kmpp_objs support
1. The kernel object is provide by /dev/kmpp_objs
2. Use kobj interface name to query its info from kernel.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I638890b39a62b7a992896e8047d4bed33400f912
2024-12-31 08:54:27 +00:00
Yandong Lin
e0286d07b3 fix[h264d]: Fix extra data lost issue
The extra data(sps/pps) will be lost when the following flow occur:
push extra data -> reset -> push idr data.

Change-Id: I5f371291d5e7bcc27aad18ce6ae180b00fd76bd7
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-12-31 10:15:26 +08:00
Herman Chen
ab79656052 docs: Update 1.0.8 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4ed2c4985d66107ef5a2c1a06fcd0cc0b9d349d2
2024-12-30 10:18:22 +08:00
Hongjin Li
8763144523 refactor[hal]: Update the reg offset setting method.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: If63cbfdae4150280b4d24698543990a454ed5f6f
2024-12-27 11:54:55 +08:00
Johnson Ding
8f8707fbb7 fix[enc]: Fix CPB size not enough problem
In TSVC with multiple LTR frames case, there may be more than two base
layer frames between two LTR frames with different index. Replaceing
LTR frames into 1st short-term reference when calculating cpb size will
not get a correct result.

Change-Id: Ib68e8c4e733cef2192d70d03c02d29ff814cf011
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-12-26 10:14:00 +08:00
Hongjin Li
15bcad26db fix[m4v_parser]: Fix split_parse setting failure issue
Platform: Linux,General

Error case:
When decoding an MPEG4 source, it is unable to properly
configure split_parse. need_split is only initialized
during init.

Solution:
Use the split_parse parameter in the dec_cfg.

From: redmine #526753

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I89eb4dc8fcc2a1b00d73d359979770f7afefe0d3
2024-12-25 19:26:24 +08:00
Yandong Lin
07b4bca5f3 refactor[mpi]: Add ops name when assign for reading friendly
Change-Id: I563d593ea566ba3bd572a8cf5b85b7e7dce28afd
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-12-25 15:52:10 +08:00
Yandong Lin
caeb30c917 fix[mpp_trie]: Remove a redundant variables from log
Change-Id: I8989806f8ecc5e6ca015302e3641090bb47fbca0
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-12-25 14:22:44 +08:00
Yanjun Liao
0a3e8ad4eb fix[mpp_enc]: Set frm type in pkt meta
Frame type can be configured in all encoding fmt.

Change-Id: I9cd0c4417514376dcce29924f8456f36d525ef6b
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2024-12-25 14:20:00 +08:00
Johnson Ding
b4efbdf9b7 feat[enc]: Add switch for disable IDR encoding when FPS changed.
1. No need to encode IDR when fps_in is changed. So remove it from
`check_resend_hdr`
2. If application do not want any IDR encoded when only fps is changed,
    call `mpp_enc_cfg_s32(cfg, "rc:fps_chg_no_idr", 0);` when
    initializing.
3. Keeping CPB when only SPS, PPS are updated without IDR encoded for
H.264 encoder.

Change-Id: I034dd789a3f24318004d942624eb10240f7db2e9
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-12-25 09:41:11 +08:00
Yandong Lin
1d40b8eb04 fix[mpp_sys_cfg]: Fix compile warning
Compile linux/aarch64 with toolchain:
gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-gcc
gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu-g++

Compile message:
mpp/base/mpp_sys_cfg.cpp: In constructor ‘MppSysCfgService::MppSysCfgService()’:
mpp/base/mpp_sys_cfg.cpp:88:61: warning: enum constant in boolean context [-Wint-in-bool-context]
   88 |     ENTRY(dec_buf_chk, type,        U32, MppCodingType,     MPP_SYS_DEC_BUF_CHK_CFG_CHANGE_TYPE,            dec_buf_chk, type) \
      |                                                             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
mpp/base/mpp_sys_cfg.cpp:77:13: note: in definition of macro ‘EXPAND_AS_TRIE’
   77 |             flag ? 1 : 0, \
      |             ^~~~
mpp/base/mpp_sys_cfg.cpp:123:5: note: in expansion of macro ‘ENTRY_TABLE’
  123 |     ENTRY_TABLE(EXPAND_AS_TRIE)

Change-Id: Id60d66fdf0fd7be75d577ca8fc9b45eee3eeb2dd
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-12-24 15:53:35 +08:00
Johnson Ding
16ab9b0d4d feat[test]: Add PSNR info for video encoder
Note that the PSNR derived from SSE may not equals to PSNR from video
analyser. Because SSE returned from hardware is consist of both luma and
chroma samples. And SSE of chroma samples multiplied by some weight.
But the difference is within 1db, usually no more than 0.5db.

Change-Id: I294d473c656f39ce98dd0768cd6945ee38e89b14
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2024-12-23 09:28:04 +08:00
timkingh.huang
52699a26ab fix[rc_smt]: Fix the variable overflow issue
eg: fps = 30000 / 1001

Change-Id: I29b44fa4f6beeaa27d3ffd248323767ba21c34d4
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2024-12-21 14:34:32 +08:00
Yandong Lin
729dd76195 fix[h264e_sps]: fix constraint_set3_flag flag issue
When the profile idc is high profile and constraint_set3_flag=1,it must
obey some rules of high 10 intra profile, such as contain only IDR pictures.

Reference the h264 clause A.2.8 introduction.

Change-Id: I9f886925a3810bc4ad9c7e70ebdc2194354c6eb5
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2024-12-19 17:00:16 +08:00
Hongjin Li
87f23da2e6 feat[mpp_buf_slots]: Add coding attribute to buf slots
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I3c197e5e7ef533141e27f5728d1abcfa0fe61472
2024-12-18 16:46:14 +08:00
Herman Chen
78ad332e7e feat[mpp_sys_cfg]: Add mpp_sys_cfg function
MppSysCfg is used to config and query mpp gloabl parameters.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I132746e07b55040b582878adaef209ce73147da1
2024-12-18 15:54:03 +08:00
Hongjin Li
277bc5b9d5 refactor[av1d_vdpu383]: Regs definition sync with other protocols.
Platform: RK3576

Change-Id: I766b00d2463cab3f786c26f5cf793a504ff5fcba
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-12-13 15:59:58 +08:00
Hongjin Li
4db00f4c80 fix[vpu_legacy]: Fix vpu fbc configuration issue
Platform: General

Error case:
When info changing, setting the output format to fbc
causes buffer usage exceptions.

Solution:
Add the MPP_DEC_SET_FRAME_INFO command.

From: Product Department 2 czl

Change-Id: I779ca93b461bf220d64e3d4846128ce2f67ffc89
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2024-12-13 11:27:26 +08:00
Herman Chen
a426f4078e feat[dec_nt_test]: Support jpeg decoding on decode
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I36196906fe5a5cf4f0a1ebd1aa1fa69dd94f88bc
2024-12-12 14:38:34 +08:00
Herman Chen
51eb00cc4c fix[mpp_buffer]: Fix buffer put log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If303b5de7e6b0b9d685b4f700d91a32e716210fb
2024-12-12 14:37:22 +08:00
Herman Chen
c7cf58b5c7 fix[mpp_mem_pool]: Record pool buffer allocator caller
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I21650f2af92e73f965a73f1748082556ae0ba516
2024-12-12 14:36:21 +08:00