Commit graph

3248 commits

Author SHA1 Message Date
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
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
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
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
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
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
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
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
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
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
Hongjin Li
8202197857 fix[hal_av1d]: Fix AV1 background frame decoding failure.
Platform: RK3588
Spec: av1

Error case:
Decode the AV1 bitstream from Bilibili that includes
background frames.

Err log:
Correct: mpp_av1dec: irq_status: 00001100
Error:   mpp_av1dec: irq_status: 00040100 // hw timeout

Solution:
The swreg8.sw_idr_pic_e shall be set to 1 when current frame
is an intra frame.

Source: Bilibili AV1 videos
ex: https://www.bilibili.com/video/BV11ibPzLEhe

Reported-by: redmine #575039

Change-Id: I9f83fe7025f2c7ed70c8121798f9db0bfc4b0a24
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-09-11 01:29:27 +00:00
Herman Chen
f507421f8b chore[mpp_enc_cfg]: Remove MppEncCodecCfg
1. Revert codec cfg to separate h264/h265/jpeg/vp8 cfg.
2. Update enc/dec/sys cfg_test print.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ida5da8a6b738fbf710e1ab590bc6b6f3438319c4
2025-09-10 17:39:55 +08:00
Herman Chen
ddb95f5a4f feat[mpp_trie]: Add info name max length record
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0a784d6938e9a19632c20e6e92597b77c12604d9
2025-09-10 17:01:22 +08:00
Herman Chen
5d9da6f29e feat[mpp_enc_cfg]: Separate init function
Add mpp_enc_cfg_init_k for kernel encoder config init.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I4ebdc179b27115d72a2efa213405cbb4dca564d0
2025-09-10 16:57:08 +08:00
Yandong Lin
fdba12d3fa fix[h265e]: Remove unused buffer
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ief949dd9a1f00252e0268007f9dac1449578d997
2025-09-03 09:38:17 +00:00
Herman Chen
aa15b9b5bd refactor[sys_cfg]: Refactor C++ sys_cfg to C
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I59f4e3b13ba5e49ae34bb1b4886f37bd3341ce56
2025-09-03 11:48:55 +08:00
Herman Chen
6666925dab refactor[rc]: Refactor C++ rc/rc_base to C
Change-Id: Iae123d5bc76e74b06a09655829de3ef0508ebd30
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-09-02 15:04:56 +08:00
Yandong Lin
8beb56a735 fix[mpp]: Add null check for sync pkt buffer
Change-Id: I5e17ce26ee3af2232d97a414f52820122e2402f9
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-09-02 03:26:29 +00:00
Yanjun Liao
d135040c83 fix[mpp_meta]: Add user data deep copy support
Platform: all
Spec: all

Deep copy user data/datas in meta to ensure async safety
and avoid use-after-free

Change-Id: Iebc42563b7700a1f3ca24a535a446cc1f6a7c451
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-09-02 10:55:34 +08:00
timkingh.huang
6588b71f2b fix[mpp_meta]: Add KEY_NPU_UOBJ_FLAG and KEY_NPU_SOBJ_FLAG
UOBJ: deliver userspace buffer for rk3588 and rk3576
SOBJ: deliver shared memory buffer for rv1126b

Sync to kmpp-develop patch with the same log:
If596371639eaedb01d6900c737d1f7fec49bf8d4

Change-Id: I8927f6341b5d3f94bf52af32c02b75cd24ad0681
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
2025-09-01 17:35:25 +08:00
Herman Chen
63343c7761 fix[mpp_trie]: Fix get err node issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia4db61137545f55be0ef08acf06f8d6a439297e2
2025-08-28 09:46:10 +08:00
Alexander Koval
90c205ca47 fix[vdpp] Fix building tests against musl libc
Reported by https://github.com/rockchip-linux/mpp/pull/893

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I76c362823337f6dba5fcffe4aac43e2798fbfce1
2025-08-25 09:20:56 +08:00
xiaoxu.chen
54bdc5ddbc refactor[enc]: Use KmppShmPtr to represent osd buffer
Change-Id: I2211b806d4b4a065faf1f0fa5a240e104bbb30ab
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-13 14:55:14 +08:00
xiaoxu.chen
317fce0bee chore[hal]: Organize the relevant processes for vepu fmt
1. Move Vepu fmt from vepu541_common to vepu5xx_common
2. Create vepu580_common
3. Add vepu ARGB4444, ARGB1555, AYUV1BPP, AYUV2BPP

Change-Id: I372e35d9ccf93ecf082d4a279c03841bef3bc581
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-12 03:40:29 +00:00
Herman Chen
32767f39fb fix: Rename FFmpeg to FF for sdk release request
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia78a214cd5544e6d7ad14c19201d5cb53138c6d5
2025-08-11 15:04:24 +08:00
Herman Chen
a91e70bd23 chore: Rename Dolby for sdk release requirement
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia5293f7963937ce57c123590abc32d208d181602
2025-08-11 07:01:16 +00:00
Rimon Xu
3e54310f7f fix[h265d]: Ensure the DTS is transmitted to the frame
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Ic950a1c4f9ab8d7c54d699773f7a0629fe04fb3d
2025-08-08 02:44:03 +00:00
xiaoxu.chen
8808b16d7a feat[mpp]: Add jpeg roi function for RV1126B
Change-Id: I41bb66fbe1abf4adfa32162630e00d4050adb516
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-06 14:39:34 +08:00
Yanjun Liao
ac16b2c63e fix[h264e_api_v2]: Fix bit_real calc in skip mode
Platform: all
Spec: h264e

The hw_length is in bytes, but bit_real is in bits.

Change-Id: I53428c6347c3f33ad63d2f6dd78daa72b910055f
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-07-31 00:55:45 +00:00
Hongjin Li
cca218ca73 fix[h264d]: Fix fast play mode not working in shell environment.
Platform: General
Spec: h264

Error case:
Forced fast play mode does not take effect.

Reported-by: redmine #567023
Change-Id: Ia167a9c59feb0d3b276588bcade691518984fca9
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-07-30 13:34:00 +00:00
Yanjun Liao
a899106f89 feat[kmpp]: Replace frame_infos with kmpp_frame
kernel patch:
fix[mpp_vcodec]: Replace frame_infos with kmpp_frame

Change-Id: Ie3b0358a7b79ad9755608f20b5b29175263b4dbb
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-07-30 18:39:07 +08:00
Herman Chen
b851fdc379 chore[mpp_enc_cfg]: Add base:smart_en option
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: If3799589a8a65a2181b117d70014af87957afe72
2025-07-25 14:44:46 +08:00
Herman Chen
fef2e2af06 feat[mpp_meta]: Add more frame buffer key to meta
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8873dff77c85ddcacf0845ca81f6c0f3dd30e88e
2025-07-25 11:24:54 +08:00
Yanjun Liao
05f59be432 fix[hal_h265e]: Fix nal type in tsvc mode
Platform: vepu_580/540/510
Spec: h265e

In tsvc mode, top p-frames not used as reference frames.

Change-Id: I0b285e5ed753e73321fd728389195f0e5b118874
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-07-25 11:02:42 +08:00
Herman Chen
1893dede1c refactor[rc_api]: Refactor C++ rc_api to C
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I0130766b1f5817e4581454e72d478e112e6e836d
2025-07-23 18:01:09 +08:00
Hongjin Li
cc3194d336 fix[h265d]: Fix log issue
Reported-by: https://github.com/rockchip-linux/mpp/issues/874

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ic2b60decee850f15db9e5145b62dbc5a05f4c03a
2025-07-23 01:45:08 +00:00
xiaoxu.chen
2f5e6399c3 feat[base]: Add toml function
1. add cfg to toml
2. add toml to cfg

Change-Id: Iab5cb8f498f8bb769a0bc90a5beca85365bc960f
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-07-23 01:32:05 +00:00
Herman Chen
9aef0ff7a7 feat[base]: Use enc cfg obj
Sync with kmpp-develop commit:
feat[kmpp]: Use enc cfg obj

Add MppEncCfgImpl to compatible with MppEncCfgSet and kmpp_obj path.

Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id4e262d1053c03cd93d620828405f060f0f8517c
2025-07-18 15:48:19 +08:00
xiaoxu.chen
be7fc93fc2 fix[vepu511]: Add tune stat update
Change-Id: I813fbf37735673660bde2266a25939690d15e98d
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-07-14 17:51:16 +08:00