4092 Commits

Author SHA1 Message Date
nyanmisaka
437bfbeb95 fix[cmake]: Add dependent libs to pkgconfig
fixes d1855e020d

/usr/lib/gcc-cross/aarch64-linux-gnu/14/../../../../aarch64-linux-gnu/bin/ld: .../lib/librockchip_mpp.so: undefined reference to `log2'
/usr/lib/gcc-cross/aarch64-linux-gnu/14/../../../../aarch64-linux-gnu/bin/ld: .../lib/librockchip_mpp.so: undefined reference to `sincos'
/usr/lib/gcc-cross/aarch64-linux-gnu/14/../../../../aarch64-linux-gnu/bin/ld: .../lib/librockchip_mpp.so: undefined reference to `log'
/usr/lib/gcc-cross/aarch64-linux-gnu/14/../../../../aarch64-linux-gnu/bin/ld: .../lib/librockchip_mpp.so: undefined reference to `pow'

Signed-off-by: nyanmisaka <nst799610810@gmail.com>
Change-Id: I3bda683c4a468b66bc2d7cd84765a89c86e0d9e0
2025-11-10 10:23:49 +08:00
Yanjun Liao
9233e3bd4d fix[mpp_enc_impl]: Fix ref_cfg setup error
Change-Id: Ifa84dda229711e9af31967b1a57936079da3bb3a
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-11-07 17:42:37 +08:00
Johnson Ding
acd5537923 fix[avs2d]: fix parser segment fault
If packet is splited outside of mpp and video_sequence_start_code is not
guaranteed, there will not be valid NALS. Thus segment fault will
happen.

Change-Id: Idb5e51772384c6663260d382b94845a8e1ac7c35
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-11-07 10:54:12 +08:00
Herman Chen
3b338216a4 fix[vproc]: Fix missing hdr_info on vproc flow
When vproc create new output buffer with hdr_info the original hdr_info
in old buffer must be copy to the new one with hdr_offset and hdr_size.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7cbfec07adf2de8147f2918332e391074291e4c5
2025-11-06 16:42:28 +08:00
Herman Chen
2771f34e76 feat[mpp_meta]: Add frame / meta dup function
Add dup function for mpp_frame and mpp_meta.
NOTE: The buffer in MppFrame is not dup.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4965bc6016c8ffca4b72bbd49e2653eab06c7591
2025-11-06 16:32:37 +08:00
Yanjun Liao
52f005f2df fix[mpp_singleton]: Fix 64-bit mask overflow
Use 64-bit literals in bit operations to prevent overflow
when singleton module ID >= 32.

Change-Id: Ib08190bbcbb1a0b46559ea3c2ae57d801b5efadf
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-11-05 09:08:10 +08:00
xiaoxu.chen
425552cb3d feat[mpp]: Use macro to create mpp_cfg
1. Create mpp_cfg when define KMPP_OBJ_HIERARCHY_ENABLE
2. Add kmpp_objdef_get_cfg_root function
3. Fix mpp_cfg update flag judgment logic
4. Add mpp_enc_cfg extract and apply interface from configure file

Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I3a02e7bbddd20a78c3284589fc9513a1c49cac18
2025-11-03 15:35:53 +08:00
xiaoxu.chen
647da8e0d1 chore[mpp]: Rename some enum and macro
1. Rename enum MppCfgType_e
2. Rename enum CfgType_e
3. Rename macro MPP_CFG_SET_xxx and MPP_CFG_GET_xxx

Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I2056ac6bd17f480eff9cb6442bc0de85e0a0e0a9
2025-11-03 15:35:39 +08:00
xiaoxu.chen
47f66b60a3 fix[inc]: Reserve split variable for compatibility
Change-Id: I15684e92ea4fe2e2addc206504613272bb787943
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-11-03 15:26:43 +08:00
xiaoxu.chen
ec5606557e chore[mpp]: Delete mpp_enc_cfg_impl.h
Change-Id: Iee8dcf523d0d3018dd73b2b5da21b0a58736214f
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-10-29 05:57:13 +00:00
Yanjun Liao
3d047de1d4 fix[mpp]: Fix c89 build error
Change-Id: I648e78e4b271e914225f848309290e749fdd5176
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-29 10:30:16 +08:00
Herman Chen
33f65bd809 fix[mpp_singleton]: Fix cluster sgln id conflict
1. Add MPP_SGLN_CLUSTER.
2. Add sgln init timing log.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id6d6a103f441cbf6a8acc9b00a0d54c788a939d8
2025-10-24 17:50:07 +08:00
Herman Chen
b40657a3c7 feat[kmpp_vdec]: Add kmpp_vdec module
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I9467fa122fa0c5f3d755714ea63e089a4d86eca9
2025-10-24 17:34:33 +08:00
Herman Chen
a0c6f81f7b feat[kmpp_venc]: Add kmpp_venc module
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I06f071055caa1c4bab2341258c69398d46671ed3
2025-10-24 09:04:26 +00:00
Herman Chen
067de5647a feat[mpp_enc_cfg]: Change to object implement
Modification Point:
1. Use enc configure object macro.
2. Use kmpp_obj_update to sync user cfg setup.
3. Distinguish between user mode and kernel mode for enc obj.
4. EncImpl only check codec related SET_CFG result.
5. Refactor SET_CFG flow.
6. Adapter jpeg q_mode feature.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I2856acdf863189fdaa29121ad8bc007fe90b5ab5
2025-10-24 11:18:37 +08:00
Herman Chen
17a370d2d0 chore[astyle]: Format code by new astyle config
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iafdb694219ad9d0407e622ba13fd729b935a2dad
2025-10-23 07:57:46 +00:00
xiaoxu.chen
ef11356680 fix[osal]: Align MppMemPoolNode to 8-byte
Aligning MppMemPoolNode to 8-byte is aimed at avoiding alignment traps caused by compiler optimizations.

Log:
[   41.929204] Alignment trap: not handling instruction f44c6adf at [<a6f0aec4>]
[   41.929236] Unhandled fault: alignment exception (0x801) at 0xa6205cbc

Change-Id: Ia9867225eabfc0e8ab37754a7161814bb596e645
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-10-23 07:13:23 +00:00
Herman Chen
376fe2346b fix[tools]: Remove invalid window path
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If22212b7184b2b93f41f6894ed63277283fba4ec
2025-10-23 06:50:07 +00:00
Herman Chen
ee4eb725e0 chore[kmpp_obj]: Add ioctl return output object
1. The output object is the KmppObj directly get from obj ioctl operation.
2. Allow NULL sptr to return NULL object without error log.
3. Fix typo in kmpp_obj_helper.h

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I6d29ab4b304902710dba0d7a58f4728b22c90f62
2025-10-23 06:39:22 +00:00
Herman Chen
41b1626bd5 chore[kmpp_obj]: Add ioctl return value to KmppIoc
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5c4beaabe8cd0b8cca90fb2ece1e4cd49b96fdbb
2025-10-22 10:07:21 +00:00
xiaoxu.chen
6fc87d071a fix[utils]: Fix osd test compilation warning
Change-Id: I9b3cf8c3646db28a9dd3b1410ae15f4ef2199b4a
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-10-22 10:48:30 +08:00
Herman Chen
d1855e020d fix[cmake]: Fix libm / libmvec compile error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I431aa784db20494a4df89fae366ccd428dafa7d5
2025-10-22 02:19:06 +00:00
Herman Chen
2ee4a5518b chore[kmpp_ioc]: Use kernel ioctl define only
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I25039633491e53bcda3a1dd04cad6408f3aff675
2025-10-15 09:29:23 +00:00
Herman Chen
270883c37f fix[cmake]: Fix debug option on high ndk
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I3bd8761d99e4a79ac289dd666f355f010d198a62
2025-10-15 15:57:43 +08:00
Yandong Lin
f1c3168fc8 fix[kmpp_obj]: Fix a typo
Change-Id: Ifd5cde980a3e756d7bbbc57fc25d87f48fb80823
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-10-14 18:00:24 +08:00
Herman Chen
62213bbac7 feat[kmpp_obj_helper]: Support no IMPL_TYPE objdef
1. Support pure kernel objdef without IMPL_TYPE.
2. Fix ioctl ARG0 macro for no specified ioctl index.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I33c9629f5df638edb22906a57c489a9516645111
2025-10-13 17:37:55 +08:00
Herman Chen
fe17ce18d8 fix[kmpp_obj]: Fix objdef index error for ioctl
The type index is for global objdef index same in kernel and userspace.
The objdefset index is the index for those defs shared to kernel.
The objdef ioctl needs to use the second index.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5e1d76094a2f95984e7798042964b2278b37a51b
2025-10-13 17:35:24 +08:00
Herman Chen
838a8a566b fix[kmpp_obj_macro]: Fix GET_ARG0 macro
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I31d48a2e41ac492b19d325154bebc3dbb71a3aff
2025-10-13 16:52:25 +08:00
Herman Chen
15b2d77bfa fix[kmpp_obj]: Fix log format
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic91534701d1542d73005c2f62fbbdabef18adbf6
2025-10-13 14:43:08 +08:00
Herman Chen
df294a0036 fix[kmpp_buffer_test]: Fix sptr setup error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I15a6b49540d7dd52379105b05d2dbda912caf36b
2025-10-11 18:12:25 +08:00
xiaoxu.chen
e45c5c2dbb fix[mpp]: Fix compilation warnings
Change-Id: Id26f40770cf48ff20edde91f33c8a05760eb0740
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-10-11 17:22:40 +08:00
Yanjun Liao
60dfbcaace refactor[mpp]: Refactor C++ mpp to C
Change-Id: Icfe26b36d066b32355bda919e605e165399c0781
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yanjun Liao
9a079f8c6f refactor[mpp]: Rename file type from C++ to C
Change-Id: I657ec099b95ee745a6963c0768dc97308c2c6735
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yanjun Liao
f14c8a1e4a refactor[mpp_cluster]: Refactor C++ mpp_cluster to C
Change-Id: Icf17b9d8abf9fd23df96ea176dd61343488a6837
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-10-11 09:10:42 +00:00
Yandong Lin
d21fa529a7 fix[mpp_soc]: Add mpp_debug env reading when init
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I647ffc2df2c485d7cafb0a5b6f47a08dcbfa4601
2025-10-10 16:47:32 +08:00
Herman Chen
c3b2b9e231 chore[kmpp_buffer]: Use new ioctl cmd macro
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7be09f0b5f454c0040e772ae9405db6cef52052a
2025-09-30 15:08:10 +08:00
Herman Chen
d0d65fb27c feat[kmpp_obj]: Add kmpp ioctl trie query
1. Add kernel ioctl cmd trie query.
   It causes kernel log:
   kmpp_ioc: kmpp_ioc_ioctl: invalid ioc count 0
   Just ignore the log or update to new kmpp-develop version.
   The log will gone after kmpp-develop commit
   feat[kmpp_obj]: Add ioctl trie

2. Add objdef cmd query function.
3. Update kmpp_ioctl to support parameter "ctx".

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia3c31a7e92681fe671456f19612a199857b362a5
2025-09-30 15:07:54 +08:00
Herman Chen
23acde467b fix[test]: Fix shm test crash on old kernel
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iec5f2ffd6f39b877f8b97abe29751543b67a6aa5
2025-09-30 15:07:43 +08:00
Herman Chen
d1f9fdc0fb chore[kmpp_ioc]: Disable ioc entry mismatch log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id9d0ae7d6ab968e37e6fdc8afb36750155d42d1d
2025-09-30 15:07:31 +08:00
Herman Chen
4db2167ff4 feat[kmpp_ioc]: Add kmpp_ioc module
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I766b0ec68f8ae572a44d96dd6ff059240ebfb698
2025-09-30 15:07:12 +08:00
Herman Chen
1c3881cbac feat[kmpp_obj]: Add ioctl related macro
1. Add ioctl ctx / in / out / in_out macro.
2. Add get objdef function.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I350a673a2302341388a68e3019299b04cce39203
2025-09-30 15:06:55 +08:00
Hongjin Li
eed8ec347f fix[hal_av1d_vdpu383]: Fix Roku player crash after seeking.
Platform: RK3576(vdpu383)
Spec: av1

Error case:
When using the Roku player, it crashes after seeking.
Because dxva->frame_refs[mapped_idx].Index == -1, cdf_buf
becomes NULL, which leads to a crash.
The deeper cause is that after seeking, playback doesn’t
start from an I-frame, so the reference frame info isn’t
ready.

Err log:
Null pointer crash stack.

Solution:
Check frame_refs index validity to avoid crashes.

Source:
test_av1_1920x1080.mp4 (Likely reproducible with other AV1 sources.)

Reported-by: Liming Xu <rimon.xu@rock-chips.com>

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Id55c2b00aa4c42eec2ccd780974e933a052864de
2025-09-30 15:06:42 +08:00
Herman Chen
29521e7f4a chore[kmpp_obj]: Change kmpp_shm get / put input
1. Use KmppShm to replace KmppShmPtr as input.
2. Add kmpp_shm_to_entry to get valid access address.
3. Add more test case.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id554e4e60f8e11e08578c91a9c30c7b173f10ab9
2025-09-30 15:06:14 +08:00
Rimon Xu
7e060500df fix[parser]: Ensure the DTS is transmitted to the frame
Support Codec list:
  - [x] H.264
  - [x] H.265
  - [x] m2vd
  - [x] m4vd
  - [x] H.263
  - [x] AV1
  - [x] AVS
  - [x] AVS2
  - [x] JPEG
  - [x] VP8
  - [x] VP9

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Ieff2ef14482256031fcc699e6894a546c9b29502
2025-09-30 15:05:52 +08:00
Yandong Lin
c1f1c12dcf fix[h265d]: Fix rps data update issue
1. Add rps_update_flag to indicate whether to update rps.
2. Fix global cfg data len for vdpu384a.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1c664c99f34f6dea940368496175273042b48b18
2025-09-30 15:05:34 +08:00
Herman Chen
060aa30091 fix[kmpp_obj]: Add ptr / st compatibility handling
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I114fabf181de898200f40f73a392fd8a7615a0c4
2025-09-17 17:39:58 +08:00
Hongjin Li
c49dc36799 fix[buf_slot]: Clean up invalid logs
Platform: General
Spec: jpeg

Error case:
During JPEG decoding, the buf slot does not record
frame information, so after performing frame
information comparison in the buf slot, it will
always dump mismatch information.

Err log:
sys_cfg/legacy mismatch info

Solution:
Toggle to suppress mismatch dump messages

Reported-by: Lukaß Zhang <lekco_1320@qq.com> (github: #876)

Change-Id: Id7bc34b7876a9bf415b217eba1b55dcf7a2df208
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-09-15 20:07:08 +08:00
Herman Chen
8596bbb7aa feat[kmpp_obj]: Add KmppShm allocate function
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I15cbc70c9df81586fe4f9002dcaed1f52ffcaf3a
2025-09-15 17:40:36 +08:00
Herman Chen
b0c69ecb46 fix[mpp]: Fix some typos
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ie21c286c5884139d631845162da458a7ac1803a6
2025-09-11 10:09:07 +00:00
Herman Chen
b68672dbb2 fix[kmpp_obj]: Fix obj update flag update issue
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7bee6599ac9e7328af28a4f096fe9b84eb7c1bf7
2025-09-11 10:00:44 +00:00