Commit graph

3909 commits

Author SHA1 Message Date
Herman Chen
359b5c075c chore: A fix for company release requirement
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id24b2448a0fe1cbda19c1d1421f8ddb7c21c40dd
2025-05-08 03:31:54 +00:00
Herman Chen
38ee436830 feat[kmpp_obj]: Add userspace objdef functions
1. Add mpp_internal.h for simplifing mpp_trie, mpp_cfg, mpp_cfg_io,
kmpp_obj relationship.
2. Add objdef userspace interface: register / unregister, add init,
deinit, dump function registration.
3. Fix vdpp/CMakeLists.txt lack of kmpp_base issue.
4. Adjust utils order to fix compile error.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I50304a84c4baf5b49ee2658713ac171c91983209
2025-05-07 16:56:48 +08:00
Herman Chen
3c5080bb1f refactor[base]: Refactor mpp_trie from C++ to C
Sync to kmpp_trie version.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5846fe3c22e50f49ae3c3fa50f56fb053451b70f
2025-05-07 11:18:17 +08:00
Herman Chen
c4732853fa refactor[mpp_cfg_io]: Change cfg to trie interface
1. Change the trie setup function name.
2. Fix trie leak issue.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I417973c1d9c15639ec044cf0e95a07f8593a1762
2025-05-07 11:01:17 +08:00
Hongjin Li
095fdce624 feat[osal]: Add mpp_singleton module
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>
Change-Id: Idfff4d03e1c98e4ad1ddf1553133ba4b0194f7b8
2025-05-06 18:07:33 +08:00
Herman Chen
f2eb2a2b59 feat[mpp_cfg_io]: Add mpp cfg io module
1. Add mpp_cfg output to log.
2. Add mpp_cfg input from json.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I21fa491a9531918c1b05083ec2f1853ae69f3005
2025-04-29 09:49:01 +00:00
Hongjin Li
6275e90171 test[resolution]: Add resolution test tool
usaeg:
<exe> <-s|--spec> <|h264|h265|avs2|vp9|av1|jpeg|all> [-q]
    -h|--help:  help info
    -s|--spec:  spec, |h264|h265|avs2|vp9|av1|jpeg|all
    -sv|--save: save test file
    -l|--log:   exec mpp demo with log
    -d|--debug: dump debug info

Change-Id: I5c69570d0a2834c0114c75ed3f64c734e238d4b6
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-04-29 06:26:57 +00:00
Hongjin Li
26252d3872 fix[h265d_ps]: Suppress YUV444 unsupported warning logs
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: If8026b502f04b334e5858f640c58e8e515232cef
2025-04-27 17:22:23 +08:00
Herman Chen
817a5434da fix[mpp_cfg]: Fix function define on C++ field
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Id66c928e5e7393fe289457326ca83490255db152
2025-04-27 07:20:39 +00:00
Yanjun Liao
54d72a64c5 fix[h264e_dpb]: fix walk_len when refs_dryrun
Platform:All
Spec:encoder

Error case:
h264e_dpb: find_cpb_frame can not find match frm 0.

Solution:
Since info->st_gop = st_cfg_cnt - 1 cannot accurately represent
the number of st_cfg, st_cfg_cnt is used to replace info->st_gop.

Change-Id: I3a2f494de5dcec0182d0431fb2c1b653cbe3bf84
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-04-25 06:52:10 +00:00
Hongjin Li
81c4696937 fix[av1d_vdpu383]: fix segid page fault issue
Platform: RK3576
Spec: av1

Error case:
When the resolution is switched and the width and height
are enlarged, the segid space is insufficient

Solution:
Determine whether the cdf/segid space is sufficient and
recalculate if insufficient

Reported-by: Jinsen Chen <kevin.chen@rock-chips.com> KTC

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I8df6773337e093f0767d18d552895b3ec7601efa
2025-04-18 17:25:05 +08:00
Herman Chen
ecbbb721aa fix[allocator]: Fix misc buffer group flag issue
The default misc buffer group do not have the flag. We need to seperate
the default misc group with different flag.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I14941eedfe9c06ec978a12061ba33e12495aa038
2025-04-18 01:54:32 +00:00
Chandler Chen
e69e2f88c7 fix[h265d_parser]: fix startcode finder for 00 00 00 xx case
Platform: All
Spec: h265

Error case:
nalu payloads with byte sequence 00 00 00 xx data used to be incorrectly detected as start code.

Solution:
Modify the start code detection logic by replacing
condition src[i+2] < 2 with src[i+2] == 1

Reported by: redmine #545594

Source: kiloview-p3.hevc

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I7e544e127f324df42418765adc5a7a51e082736e
2025-04-17 01:24:28 +00:00
Yandong Lin
4999c7762f fix[kmpp]: Fix eos frame with NULL buffer issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I9e05767b1750733c2c972bc78467bb4f8a2da255
2025-04-16 03:51:09 +00:00
xueman.ruan
a034b888c2 [mpi_enc_utils]: Add step config for slt test.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I95720c7ec22f952b318e6997a63a383b2542a018
2025-04-15 16:14:45 +08:00
Xiaobo Liu
e168077ff5 fix[utils]: Remove duplicate assignments
Signed-off-by: Xiaobo Liu <cppcoffee@gmail.com>
Change-Id: Ie3ecc53dee73b694af345796d9b5462674582ee9
2025-04-15 11:03:40 +08:00
xueman.ruan
e386d8a16b fix[mpi_enc_test]: Sync mdc config of RV1126B
Change-Id: I53a11f03a3bc050d37df6ff32e4f1b33b6f60e3a
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2025-04-14 10:31:48 +00:00
Hongjin Li
995ca60a69 fix[sys_cfg]: Avoid frequent environment variable access.
Platform: General
Spec: all

Reported-by: Jinsen Chen <kevin.chen@rock-chips.com>

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ib5a9ac80f36d9e3211882a74cc1acd4727b4c477
2025-04-14 16:51:07 +08:00
Yandong Lin
1036cd5ebe chore[kmpp]: Remove get packet failed log
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie2a85a245f199f4de31d4260f2a0ac3a3d4cadf7
2025-04-14 02:06:56 +00:00
toby.zhang
98e09223b3 fix[mpp_enc]: Add avc rc parameter set
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: If929b0151b33edde631089c59188109e15ac0721
2025-04-14 09:27:48 +08:00
Hongjin Li
6dbce1daf3 fix[h265d_vdpu383]: Fix CABAC error detection issue.
Platform: RK3576
Spec: h265

Error case:
When decoding a video sequence, the interrupt reports
a bitstream error, but the video sequence is actually
normal.

The value of num_negative_pics shall be in the range of
0 to sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ]

For frame5 (starting from 0)
sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ] = 4
num_negative_pics = 5

Solution:
Mask out undefined bits in cabac error detection

Reported-by: redmine #540704

Source: H.265 HEVC_1280x720_Movie Trailer_复仇者联盟.预告片.h265.mp4.mp4

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I9f0b6c744bbc56ad721d45461a18f8124956ffc7
2025-04-11 03:39:17 +00:00
Xiaobo Liu
ff3ae5c010 fix[mpi]: Fix typo
Reported by cppcoffee@gmail.com
https://github.com/rockchip-linux/mpp/pull/824

Change-Id: I9df340bf14296cc70275c248494d1cc3249942d3
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-04-11 09:44:47 +08:00
Hongjin Li
257ee8ab51 fix[h264_vdpu384a]: Fix error proc issue
Platform: RV1126B
Spec: h265/h264/avs2/vp9/av1

Change-Id: If82b2595160a739a3c9275382e754d7931ace45b
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-04-11 01:29:32 +00:00
Johnson Ding
c5190676f4 fix[h265e]: Correct tile syntax elements at PPS
Change-Id: Iad1bf9ab7defa9eddad582a2667893dac134ca8b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-04-11 01:28:44 +00:00
toby.zhang
1981815f77 fix[mpp]: Add atf set, atf value 0~3
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: I5c92e73b4e79d63871290f84460a882d5741d35c
2025-04-09 02:34:50 +00:00
toby.zhang
cea5507d3f fix[mpp_enc_cfg]: Add lambda_idx_i and lambda_idx_p
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Id83274ae46250fb6287bdf8c8a8bf0d6f3d2fda5
2025-04-08 11:20:40 +08:00
toby.zhang
dceef49597 fix[mpp_enc]: Add encoder speed mode setup
The encoder speed mode is in range of 0 ~ 3.
0 - normal mode with all mode decision path enabled.
1 - fast mode
2 - faster mode
3 - fastest mode

Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: I0c607adbc1e4cea4025fa8a3816dc3a1ec1f13a1
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
2025-04-08 11:06:26 +08:00
toby.zhang
f4be565fa9 fix[test]: Add qbias_arr and aq_rnge_arr init
NOTE: avc and hevc use diff bias value

Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Iba95d6b1efe4289453adfb7e442b3d4cdd631c6b
2025-04-08 02:33:11 +00:00
xiaoxu.chen
c13c56305d fix[packet]: fix packet partition and eoi logic
Change-Id: I73782a3bfe989fbc35cdbeff60067e6971b41681
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
2025-04-07 01:14:15 +00:00
toby.zhang
154b3e2853 fix[mpp]: add qpmap_en and enc_spd
Signed-off-by: toby.zhang <toby.zhang@rock-chips.com>
Change-Id: Iac272bd2a134fd132ac7321717f19fb51389560c
2025-04-04 09:30:39 +00:00
Herman Chen
b01bd3346a fix[cmake]: Fix double object include issue
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I6cf264917d6091154408dfc327c45d4f66ed8c18
2025-04-04 03:54:28 +00:00
Hongjin Li
adf21e18ba fix[sys_cfg]: Align to CTU64 to avoid info change.
Platform: General
Spec: avs2

Error case:
In AVS2, CTU supports both 64 and 32 alignment. The
sys_cfg defaults to 64 alignment. However, if the
parsed CTU size is 32, it may cause additional info
changes.

This is because, initially, when calculating the
stride, there is no external stride configuration,
so it defaults to 64 alignment. After parsing the
video sequence, the stride is configured, and
calculations should then follow the configured
stride.

Solution:
During the parsing process, the stride is not set
and is entirely calculated by sys_cfg.

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

Source: test_avs2_160x90.av1

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I0fed8b86391a03651f22ef859ec2ff1c02647b12
2025-04-03 10:29:48 +00:00
Herman Chen
6b51725df4 feat[kmpp]: Add kmpp_frame_test
1. Add kmpp frame / buffer / packet / meta define in rk_type.h
2. Move KmppObj, KmppObjDef and KmppShmPtr to rk_type.h
3. Add kmpp_frame_test
4. Add kmpp_objdef_get_offset function in kmpp_obj.c

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib4aecfc26f60521288b6e33b8c4e0af5afd3213b
2025-04-03 17:18:34 +08:00
Yandong Lin
ea8b5af151 fix[mpp]: Fix compile warning with ipc sdk toolchain
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I206b473b904e69d10644897e47ba1933ada8204d
2025-04-03 14:43:14 +08:00
Herman Chen
6cd2495d46 docs: Update 1.0.9 CHANGELOG.md
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I73d26f48d140fe093a40ae59ad49269f701af624
2025-04-03 10:12:02 +08:00
Hongjin Li
070d8692c2 fix[sys_cfg]: Add debug info
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ibae71cb8f8734fc6b07788d20aa93cf971a52d3c
2025-04-03 02:10:07 +00:00
Hongjin Li
b1802897f3 fix[sys_cfg]: fix fbc ver stride calc issue
Source: test_h265_1920x1080_10bit.mp4

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

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I432c20cdc6d9d1308e21143692d61cf990895b31
2025-04-03 02:10:07 +00:00
Hongjin Li
35202a323c fix[sys_cfg]: Fix external configuration stride issue
Platform: General

Solution:
To resolve GPU compatibility issues, horizontal pixel
alignment relies on processing in the parser to avoid
incompatibility issues caused by byte alignment intro
-duced by pixel alignment.

Reported-by: Jinsen Chen <kevin.chen@rock-chips.com>

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Id17abf9e39a6b9bc5bd468ff50eadaf45b9d6520
2025-04-03 02:10:07 +00:00
Hongjin Li
2de22d9acc fix[sys_cfg]: Support alignment for mpeg2/mpeg4/h263/vp8.
Change-Id: Icb88db2548e9fae61e73f9a8e7a3760534c6b6fa
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-04-03 02:10:07 +00:00
Hongjin Li
a94caf83a9 fix[sys_cfg]: AVC is aligned to ctu to avoid info change
Platform: General

Error case:
1. Image height is 1080
2. Use SLOTS_FRAME_INFO command to set frame information
3. Use SLOT_FRAME command to set info change
4. info change: ver_stride 1080 -> 1088
5. Generates an avoidable info change, re-applies for buffer,
    affects fast play

Solution:
For avc, in sys_cfg, align directly according to ctu

Reported-by: Jinsen Chen <kevin.chen@rock-chips.com>

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I87e396ae8ac8ea55d6bd8ad314d52e2b6f796e98
2025-04-03 02:10:07 +00:00
Hongjin Li
1e9b9c74c9 fix[sys_cfg]: Fix RK3399 hor/ver stride calculation issue.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I9b238d91ba19ab4b41deb12bf846be7080ebc852
2025-04-03 02:10:07 +00:00
Hongjin Li
f23096522b fix[sys_cfg]: Fix HAL layer buffer alignment issue
Platform:
RK3399, vp9/h265
RK3562/RK3576/RK3588, vp9

Error case:
The stride result calculated by sys_cfg is not
synchronized with the HAL layer.

Change-Id: I98f4e18fcb9af19850ca7dbd201bded8137e7861
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-04-03 02:10:07 +00:00
Rimon Xu
91812a40ba fix[h264d]: Recovery only takes effect when no IDR frames present
Change-Id: Ia915bec25590cd273d2c456a5234c82f778db793
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
2025-04-02 06:45:21 +00:00
Yanjun Liao
2dcc5f6c12 fix[hal_jpege_api]: Fix jpege api path judgment
Avoid incorrect hal jpege api return.

Change-Id: I19f7f7cf9336115243db2d091d3f0eeeb6929863
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-04-02 06:44:59 +00:00
akira.wang
f18ff4b254 fix[vdpp]: Fix vdpp blk_size calculation.
update hsd_mode/vsd_mode before blk_size calculation, fix the mismatch
between hsd_mode/vsd_mode registers and blk_size registers.

Change-Id: I49215f99430382ec8f59adad3cd81b9f9ab736d8
Signed-off-by: akira.wang <akira.wang@rock-chips.com>
2025-04-02 06:02:22 +00:00
Herman Chen
a091f3ae02 fix[mpp_venc_kcfg]: Revert to mpp interface
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I546667e2647e5d5cdb0adb14e448577b1d0b7a0b
2025-04-01 18:22:41 +08:00
Herman Chen
7706b5129d fix[cmake]: Fix kmpp_base symbol missing
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib122d653d804a6bdbf1ccdc9e930cd9e043a649d
2025-04-01 18:01:50 +08:00
Herman Chen
ca334adda0 feat[kmpp_frame]: Add KmppFrame module
1. Sync kmpp_obj_func.h and kmpp_obj_helper.h from kernel.
2. Add more kmpp_obj function from kernel.
3. Add KmppFrame module.
4. Fix kmpp_obj_check failure.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib333370eb36c7b63ef50d3e52cf7fd753c9e5af1
2025-04-01 17:41:41 +08:00
Hongjin Li
fa7f83351d fix[av1_syntax]: Fix array out-of-bounds issue.
Platform: General
Spec: av1

Reported-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I338545eb1fdb7e726c8c6f81c103061fd0dc9c9d
2025-04-01 15:04:54 +08:00
Herman Chen
84c7d337bf refactor:[kmpp]: Move kmpp to seperate directory
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I85eb166a3ebb1ae64a44c7127808fc469c6415a8
2025-04-01 14:51:32 +08:00