Commit graph

4092 commits

Author SHA1 Message Date
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
Hongjin Li
c48894c134 Revert "fix[h264d_parser]: Fix pps parsing issue"
This reverts commit 1f8aafea1c.

Platform: General
Spec: h264

Solution:

The base line profile, Main profile, and Extended profile do not
support transform_8x8_mode_flag, pic_scaling_matrix_present_flag,
and second_chroma_qp_index_offset.

However, nonstandard sequences may incorrectly include certain
fields and some extensions or custom implementations may violate
the standard

Therefore, the processing here is strictly carried out according
to the sequence processing logic provided by the spec

Consider #516724, it has been confirmed that it is caused by
incomplete sequence reception. The revert patch here does not
affect the correctness of mpp processing

Reported-by: redmine #543598

Source:
base_line.h264
atomos_mainprofile.h264

Change-Id: I130216a3d7c1651076c3e8037b5079ea5f54e62c
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
2025-03-31 11:04:22 +08:00
Johnson Ding
5d7a5cb7c5 fix[build]: fix build failure with CMake 4.0
See:
https://cmake.org/cmake/help/latest/command/cmake_minimum_required.html

> Changed in version 4.0: Compatibility with versions of CMake older than
3.5 is removed. Calls to cmake_minimum_required(VERSION) or
cmake_policy(VERSION) that do not specify at least 3.5 as their policy
version (optionally via ...<max>) will produce an error in CMake 4.0 and
above.

Change-Id: I0f920e259e7bf2354e1b475df2cf6f60e41aa681
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-03-28 07:28:45 +00:00
Yanjun Liao
ae4d4378e8 fix[vepu_511]: Speed grade configuration of 0.67
Modified default speed preset configuration to 0.67 PPC,
delivering ~40 FPS for 4K resolution at 500MHz

Change-Id: If4b11f1d45871a377403afb8dd98f727124ce499
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-03-28 14:05:56 +08:00
Yanjun Liao
43a191ede7 feat[vepu_511]: Add rv1126b 265e/264e/jpge support
Change-Id: Ie6baf5a0820ecfe9adbb49dd4d267fc2c51d5c2a
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-03-26 03:52:57 +00:00
Yanjun Liao
27ab1e4abd fix[mpp_frame]: Add rk_fbc fmt for 1126b
Change-Id: I357efd122b1bdf3345ca887130d837ebf7cb5afa
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-03-26 03:52:12 +00:00
Yanjun Liao
2e74006879 feat[mpp_meta]: Add osd_data3 fmt for 1103b/1126b
Change-Id: I8ca02440c2239a4952900f22e5617d4b9ea8048c
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-03-26 03:52:12 +00:00
Hongjin Li
d57658ff6d fix[jpegd_rkv]: New JPEG IP supports tile 4x4 output by default.
Platform: RV1126B
Spec: jpegd

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I0c7c570d504808081ea894b62e04ae7bc562348a
2025-03-26 11:40:46 +08:00
Hongjin Li
648dd1befb fix[jpeg_rkv]: New JPEG IP defaults to no RGB support.
Platform: RV1126B
Spec: jpeg

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I9ac03fd51bdb0bc5c25e85e9743fd585a1cae50c
2025-03-26 11:13:02 +08:00
Hongjin Li
4ca7bace36 fix[hal_rcb]: Fix rcb buf size calc issue
Platform: RV1126B/RK3576
Spec: h265/h264/avs2/vp9/av1

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I29e673dc40813e13fe8028b0191aa29d704eb6d8
2025-03-26 02:09:46 +00:00
Herman Chen
ca28df6a4f fix[kmpp_obj]: Fix rockit compile error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Iad88632d5e353b3bb914926faa2e82e1f2effc69
2025-03-25 16:34:14 +08:00
Herman Chen
59e5bf69e8 feat[kmpp_obj]: Sync to new KmppEntry share object
NOTE: kernel should update to after commit:

feat[kmpp_obj]: Modify KmppLocTbl to KmppEntry

1. Change basic share info between kernel and userspace.
2. Add entry function to trie.
3. Update object init function to access object base address.
4. Fix kmpp_buffer crash on releasing buf after releasing group.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I5c82c3052229abdf1af85d2fd15284897b549ea0
2025-03-25 15:19:21 +08:00
Hongjin Li
3ac819df3b feat[err_proc]: Add a new command: DIS_ERR_CLR_MARK
Platform: General
Spec: h264/h265/avs2/avs2d/m2vd

MPP_DEC_SET_DISABLE_ERROR:
Comes with an error mark by default.

MPP_DEC_SET_DIS_ERR_CLR_MARK:
Takes effect when MPP_DEC_SET_DISABLE_ERROR is enabled and
is used to clear the error mark.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I82b00c737bb72bdc420267d36c28752a5e3ee9a6
2025-03-24 15:06:27 +08:00
Johnson Ding
83f4b5abd6 fix[avsd]: Skip redundant zeros between fields inside one picture
Hardware decoder may failed at decoding the last field of one picture
when there are too many zeros between first and the second field. So
we should tell hardware to read from the exact place of field stream.

Change-Id: Ia78f5d0a97136861ceb3ab198419fe51905c3b2f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2025-03-24 01:58:24 +00:00
Yandong Lin
5b940db958 feat[mpi_enc_test]: Support enc for kmpp flow
Add param -kmpp to enable kmpp.

Change-Id: Id0e0dd64cca8f4da29fa7048f22beb3918162bd6
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-03-20 18:38:33 +08:00
Hery Xu
6bcfb2c0f7 fix[av1]: parameter is 16 bits
Signed-off-by: Hery Xu <hery.xu@rock-chips.com>
Change-Id: I76bcac5896cee83ebfe6e872b4e161f9841c6d96
2025-03-20 09:54:13 +08:00
Herman Chen
a4326e2cbc feat[kmpp_obj]: Add more kmpp_obj functions
1. Add kmpp_obj_get_by_name for quick object creation.
2. Add kmpp_obj_get_by_sptr for quick shm import.
3. Add ioctl support and sample flow by KmppIoc.
4. Add KmppBuffer test to kmpp_obj_test.
5. Add kmpp_obj_set_shm_obj and kmpp_obj_get_shm_obj for obj access.
6. Rename obj handle to KmppShmPtr.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I996fe5e6dc882c8ed943f0d3bd2c5c8a69a29cd0
2025-03-18 16:08:36 +08:00
Herman Chen
729e57a6d7 fix[base]: Fix strncpy compile warning
Change-Id: I8c282e20251b2e3e7ea0f67bf0a89bb0dc0fb6a9
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2025-03-17 10:08:51 +00:00