Commit graph

4051 commits

Author SHA1 Message Date
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
Herman Chen
20d045ae2c chore[kmpp_obj]: Update macros
1. Remove init / deinit function in kmpp_obj_func.h
2. Add extern "C" in kmpp_obj_func.h
3. Set register / unregister function in kmpp_obj_helper.h to be static

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic7210c8114f4a3fc9fc94f69f350c586d6bdd3d2
2025-09-11 06:27:25 +00:00
Herman Chen
a30fe2262b feat[kmpp_obj]: Add more functions
1. Add objdef find function.
2. Add preset function.
3. Add priv size on objdef init.
4. Add obj to flags / flags_size function.
5. Add pool size debug log macro.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I22a5c160d3d14bac98044a90558ef610cc89270c
2025-09-11 10:45:39 +08: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
xiaoxu.chen
ef396e9333 test[osd]: Add osd3 test for RV1126B
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I177dc995ff3480b43ee9e2e75368d382ea53088d
2025-09-10 17:47:39 +08: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
4ed4f77864 docs: Update 1.0.11 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ia04f68f2cbbb973b4e97b0ef97937e6ad48c6c5c
2025-09-10 17:02:04 +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
b313e9c018 chore[dec_test]: Remove unused code
https://github.com/rockchip-linux/mpp/issues/901

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I7cf65a6f277caced12960ca50885c2bab5ed1e72
2025-09-10 16:59:06 +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
fb23f69ca7 chore[mpp_singleton]: Update name print
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I24c4ce23032a8b264837040425123e0027f90578
2025-09-03 12:03:49 +08: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
ced006c2a8 refactor[test]: Refactor C++ test file to C
1. Refactor test cpp files to c.
2. Update test license to Apache-2.0 OR MIT.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I02f3e23ddae8435ca851a5f0164f04ef5f51ccc2
2025-09-03 11:15:38 +08:00
Herman Chen
ca061993ef refactor[osal]: Refactor C++ osal file to C
1. Refactor osal cpp files to c.
2. Update osal license to Apache-2.0 OR MIT.
3. Remove windows support.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ic5545d861676880f7a6247515404d585cd4fcef5
2025-09-02 17:49:14 +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
Yanjun Liao
9a6bf0e0b0 fix[kmpp_obj]: Fix obj ioctl typo
Use "flags" instead of "flag" for KmppIoc entry

Change-Id: I87b0557a09cfad87d825836de1c6be72478957e5
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-08-28 14:52:11 +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
Alexander
07805f336b fix[script]: Prepend bash with /usr/bin/env
Reported by https://github.com/rockchip-linux/mpp/pull/890

Change-Id: I066dad0e3cef66546994406394daf29df4a67849
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-08-22 09:10:30 +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
Yandong Lin
0ce028aaa9 fix[kmpp_buffer]: Close fd when deinit
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie12c20ecaa6d2b090d257e8fe1ba8f578da4a054
2025-08-12 09:27:30 +00: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
xiaoxu.chen
bb2f5bba51 refactor[kmpp]: Fix kmpp obj compilation warning
Change-Id: I081c631b1e921b67324e81dc193732b338aefe17
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-12 10:39:52 +08:00
wangbin
9751e7ac96 fix[mpp_thread]: Fix thread name is not set
https://github.com/rockchip-linux/mpp/pull/887

Change-Id: I96937a2fb42cb40f60d432ead3c826b6d89bee23
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-08-12 02:30:40 +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
xiaoxu.chen
45246e9c89 fix[kmpp_obj]: Fix kmpp obj get by sptr
Change-Id: I2db2823448351200ac25ae5496319e80fee2985e
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-11 10:07:23 +08: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
c70028a976 test[mpi_enc_test]: Add jpeg roi test
Change-Id: Ie76605bca67c39ca47b2200418190ee4af22e0df
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-06 14:39:34 +08: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
xiaoxu.chen
7043132d0c feat[kmpp]: Add jpeg roi function for kmpp
Sync with kmpp-develop commit:
feat[kmpp]: Add jpeg roi function for RV1126B

Change-Id: Ifeb5ce7b75af6fc3fc0e66fbe727dfd30a325a0e
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-08-06 14:39:22 +08:00
Yanjun Liao
225418ca78 fix[kmpp_obj]: Rename kmpp_obj_impl_put func
Change-Id: I08313a43e68fe93ecf141505a2be4439a5b507f8
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-08-04 01:51:03 +00:00
Yanjun Liao
7fbdfbe3c1 fix[kmpp_obj]: Fix kmpp frm/pkt self meta erro
Change-Id: Ibfb4409962e4f35fdcc73cf239253b44a86a52ce
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-08-03 14:05:33 +08:00
Yandong Lin
8dcf903d9e feat[kmpp]: Set chan_fd to init cfg
Depend on the commit:
270375: feat[kmpp_venc_objs]: Add chan_fd to init cfg | https://10.10.10.29/c/rk/mpp/+/270375

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I5d174695f023cf306e7f4df59243d21f255c2bc3
2025-07-31 17:02:05 +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
47cfaf2497 fix[kmpp_frame]: Remove unnecessary logs
Change-Id: I7c0a80540f2f80113fd70fec15e148dcec90325c
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-07-30 18:55:59 +08: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