3979 Commits

Author SHA1 Message Date
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
Yanjun Liao
1b0aef1de8 fix[hal_h265e_vepu580]: Fix overflow status check
Encoder should continue when indicates stream overflow hw_status.

Change-Id: I5a04ca6016bb0c0050ae291832b467e3b7e53cc5
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
2025-03-11 18:10:06 +08:00
Yandong Lin
2f2e5f5c3e fix[kmpp]: Fix channel dup issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I20ab644d04156987881ce9c8d384de004b2f4c61
2025-03-10 07:56:00 +00:00
Yandong Lin
4ed4105a3c fix[os_log]: Modify default log option for linux
LOG_PERROR: Directs output to stderr stream.
LOG_CONS: Fallback to /dev/console only when syslogd is unavailable.

The syslogd maybe unavailable in linux os.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Iae95f7df9e6ed3f7e8ce15accce6fae5a65f2fef
2025-03-05 10:05:43 +00:00
Hongjin Li
ad26e20d69 feat[vdpu384a]: Support RV1126B new features
Platform: 1126B, Support h265/h264

1. H264/H265 CABAC Table Hardware Implementation
2. update h265/h264 global Parameters
3. h265/h264 update rcb buffer size
4. update fbc/pp/sal chn control

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ia22d30272f7c20c6ab33850881b6a0135a4264b2
2025-03-04 14:13:18 +08:00
Herman Chen
ae356b52a0 fix[kmpp_obj]: Fix warning on arm32
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I233a6f12b50f02680630605831615c23f4810e0e
2025-02-28 18:06:12 +08:00
Yandong Lin
3895ee0651 fix[kmpp]: Set KEY_OUTPUT_INTRA meta to packet
Change-Id: Ib4122d323eaa15ca793fdf5fc82fdcc0d7fc86a3
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-02-24 20:41:48 +08:00
Hongjin Li
0b030ca753 fix[sys_cfg]: Align rk3399 h_stride to an odd multiple of 265.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I4d46910836614b8c13d7b67172bc2f559f162492
2025-02-24 01:22:49 +00:00
Hongjin Li
f3bb502cd9 fix[mpp_sys]: Fix old IP vertical alignment to 16 issue
Platform: RK3399/RK3588

Error case:
When aligned to 8, decoding with the old IP results in green bars.

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I8e23a4b80b4c99c98e9b765a876918ed10a503e1
2025-02-24 01:22:36 +00:00
Herman Chen
d93f209af9 fix[kmpp_obj]: Disable /dev/kmpp_objs not found log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I74e94ef7b2d21ca4bb9a79a457fcd393a91f5c14
2025-02-21 04:48:13 +00:00
Yandong Lin
c29aedf224 fix[mpp_soc]: Fix cap_fbc for rv1126b
rv1126b only support raster output.

Change-Id: I05fcf331fd872602a26912cf21781512df348353
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
2025-02-21 01:24:47 +00:00
Hongjin Li
466f21392a fix[sys_cfg]: Optimize comparison information printing.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I5220abdff93957f769de1eca9e527085976487be
2025-02-20 18:01:15 +08:00
Hongjin Li
2baa6949ca fix[sys_cfg]: Print comparison information only once.
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Ic2b44719e075b7a4d66368ba8010eae25cae5491
2025-02-20 08:26:41 +00:00
Rimon Xu
42ad9666ae fix[mpp_meta]: Fix compile error
Compile android/arm32 with toolchain:
    android-ndk-r10e

Compile message:
mpp/base/mpp_meta.cpp:45:59: error: statement-expressions are not
allowed outside functions nor in template-argument lists
define META_KEY_TO_U64(key, type) ((RK_U64)((RK_U32)htobe32(key)) |
 ((RK_U64)type << 32))

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I3783ea0ab63dc1c63373662f5ec0dcf10369b6e2
2025-02-20 07:02:29 +00:00