Commit Graph

3555 Commits

Author SHA1 Message Date
Yandong Lin
2f6b3738f3 fix[h264e_slice]: fix pic_order_cnt_lsb wrap issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib85cea4f1b1424a555f0737323cb44214716a628
2023-08-23 16:54:52 +08:00
Yandong Lin
9980d70256 fix[hal_avs2d]: fix some issue
1. fix timeout threshold
2. fix: fill ref info err adn failed return, still send error regs to
hw.
3. fix support_fast_mode config

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I5a58fdcef88880089c549e56b3a3de9ddd80caef
2023-08-22 17:42:40 +08:00
Johnson Ding
65eea468b0 fix: fix redundant prefix NALU amended problem
1. For normal Smart-P mode, if TSVC is not enabled, temporal_id can be
   zero, and no need to add prefix NAL.
2. For RK3588 H.264 dual core encoders working concurrently, redundant
   prefix_nal should also be removed, if prefix NALU is empty.

Change-Id: I89aca4f0cf418afb48e39a141107c5f4491a1ce1
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-08-17 15:41:26 +08:00
xueman.ruan
5ae03a4bdb fix[hal_jpegd]: fix rgb out_fmt mismatch error
Issue occurs in socs after RK3588.

Change-Id: Ieedd45c7d3234fc19ab5372a0a35f4fa08570abb
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-08-16 16:16:52 +08:00
xueman.ruan
c83da7de68 fix[utils]: fix convert format error
Change-Id: I9994ab4671dbf9c0f7b0b0476c9fd2710294805d
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-08-16 16:02:11 +08:00
xueman.ruan
5d00860530 fix[h265e]: check input profile_idc
Change-Id: Ic8a433ecec697148b053ba9989c98fd1a76fa2fc
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-08-16 15:42:12 +08:00
Johnson Ding
2c3988d6b4 fix[hal_h264e_vepu580]: fix SEGV on GDR setting
Change-Id: I05f87ed190abf4911d7e9788ce745c1017c81e21
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-08-15 15:17:09 +08:00
xueman.ruan
0af9b5becc fix[h264d]: fix TSVC decode assert error.
The first prefix NAL of new frame is stored in the end of current
frame in mpp split, which introduces loss of prefix NAL.

There are some methods to debug:
1. mark the position of the first prefix NAL of new frame as the
start position of next frame.
2. store the first prefix NAL of new frame, and copy prefix to the
next frame.
3. store all the headers of NALs between last slice of current frame
and first slice of next frame.

Method 1 is invalid when the prefix NAL cross two packets.
Method 2 is complex to expand to store NAL of other type.
Method 3 is applied in this patch.

Change-Id: I76d962268d28c2d796845cb2bc136b73f26b5ea6
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-08-11 15:38:17 +08:00
Yandong Lin
47cf731245 fix[hal_vepu580]: fix comiple issue
mpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c:3207:
error: undefined reference to 'madp_num_map'
mpp/mpp/hal/rkenc/h265e/hal_h265e_vepu580.c:3207:
error: undefined reference to 'ctu_madp_cnt_thd'

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I2ff6fd18401a89c7eff8e03a29a527c274f649cd
2023-08-11 10:17:56 +08:00
Johnson Ding
31e612e508 fix[h264d]: fix MVC DPB allocation
For MVC bitstream, the DPB size of base view may not be equal to the
higher layer view. So DPB of the smaller one needs to be enlarged.

Change-Id: Iebaf9d49824e41e393329334df1f6a9518a876db
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-08-11 10:11:49 +08:00
Johnson Ding
18d77c194b fix[h264d]: fix SEI packet parsing
When SEI payload has prevention code, paser should skip it.

Change-Id: I426bcb415199cc78b2f7211860b9a339e15d5122
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-08-11 10:06:44 +08:00
Yandong Lin
6c1ebff34b fix[hal_vp8e]: fix entropy init
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4488fe2ecdeefa160bde019c1a3632c963dfdca1
2023-08-11 10:01:53 +08:00
xueman.ruan
e743a1ddf1 feat[hal_vepu5xx]: Expand color transform for 540c
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I327cfdcd36a25e4ef51f08888afa67e4c6eb0e21
2023-08-08 11:15:32 +08:00
Chandler Chen
755bc8fd9d docs: update readme.txt
add RK3528, RK3528A, RK3562 support

Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Id34bef13033e6fccc85770a29790fc4c9b26b84c
2023-08-07 16:58:06 +08:00
Yandong Lin
6ac268dfea fix[mpp_soc]: fix rk356x vepu2 capability
Not support vp8 enc

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I6080b5377a0c3615d922bb6ddcc677a736cb2b10
2023-08-03 10:29:14 +08:00
Chandler Chen
4fe51a6c29 feat: Add rk3528a support
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: Iff9f9f11bcda78476f8753c5f7c922953c243b25
2023-07-28 17:31:09 +08:00
Herman Chen
712812b5bd docs: Add 1.0.0 CHANGELOG.md
1. Add 1.0.0 CHANGELOG.md
2. Add changelog.sh for git message parsing
3. Add commit message rule to readme.txt

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I8e13594c165b9c4c36312b272e04c1a2d647cfc3
2023-07-26 16:16:13 +08:00
Herman Chen
44996a76ce [cmake]: Fix ndk r10d compile error
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I64fcf77e7adf13702f98d5d7735338846faff843
2023-07-25 14:59:11 +08:00
hdl
f69176591d [VEPU541]: Add scene_mode for fine tuning.
Signed-off-by: hdl <hdl@rock-chips.com>
Change-Id: I0cf2864667a15079fafb9690d2ac23152910e30d
2023-07-25 10:53:01 +08:00
xueman.ruan
9bde70e868 [camera_source]: fix camera reinit failed.
Issue: https://github.com/rockchip-linux/mpp/issues/408

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Icc0b34ab28c618acdea38914300a3537c604a389
2023-07-24 09:37:19 +08:00
Rimon Xu
6a6a71cd5b [h264d]: Update pts when a new frame is generated.
In split mode, it is only possible to determine whether the
previous frame's segmentation for decoding and PTS update is
completed when the second packet is received. However, in
cases where the second packet starts with SPS (Sequence
Parameter Set) and PPS (Picture Parameter Set), we only
terminate the segmentation for decoding of the previous frame
without updating the PTS. This results in two consecutive
frames with duplicate PTS values.

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I1e55a8fee9e18b62e538f4e5a263c6b8ffc2f087
2023-07-24 09:36:57 +08:00
Herman Chen
e34f0dd152 [hal_vp8e]: Fix crash on unsupport input format
FIXUP: https://github.com/rockchip-linux/mpp/issues/417

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: Ib9a01bd8257ac416dd875dbd9930dcf976a709e4
2023-07-17 16:20:29 +08:00
Johnson Ding
b2455c7b6b [h264d][h265d]: Support decoding GDR stream
Change-Id: Ia5fea950e8d07a49ae751be54bffd79051b0e00f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-07-14 11:10:36 +08:00
Johnson Ding
dfcdb60707 [tools]: Fix astyle not working problem
Change-Id: I74fdd1da3aaaf5a1c2d854c0c565587f9a878336
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-07-14 10:39:23 +08:00
Yandong Lin
28b645f22f [h265d_parse]: do not fill syntax when parse err
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4dc5df09aec0a13c116493e7e380033eecafba20
2023-07-12 18:27:59 +08:00
Yandong Lin
2531b4ed19 [h265d_sei]: fix parse hdr vivid dynamic data issue
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I0c3020e7f6885f9b36f18044ffabf4d88bd75c56
2023-07-12 16:00:00 +08:00
Yandong Lin
897e7fd6c1 [h265d_sei]: fix sei parse cause by prevention bytes
Fix sei parse issue case by the prevention bytes not being removed.

Note:
The quantity of emulation prevention bytes is not
included in the size payloadSize of an SEI payload.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id03d7d4c7874e2a1b33c4963bb410680fffa8e73
2023-07-12 15:59:24 +08:00
Yandong Lin
d180aebb6b [mpp_bitread]: add new type for sei payload parse
The quantity of emulation prevention bytes is not
included in the size payloadSize of an SEI payload.
So add PSEUDO_CODE_H264_H265_SEI type for sei payload parse.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I92554de98ffca2f81785aa81b2f652099dbe6ae9
2023-07-12 15:58:50 +08:00
Rimon Xu
cb8fa73dbd [vpu_api_legacy]: Support input timeout control
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I960d28a75f1ae9425bb0db54dc2e017102b7e6cb
2023-07-11 15:29:20 +08:00
Rimon Xu
dcedc39754 [vpu_api_legacy]: Support frame ready callback control
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I7de1fcab204cdf7216d8f761763337da14923e59
2023-07-11 14:44:43 +08:00
Rimon Xu
62922f3cc1 [m2vd_parser] change frame period to 27MHZ
The system clock frequency specified by MPEG2 is 27MHz, so the
values calculated using this frequency are the most accurate.
Therefore, all frame periods should be changed to be based on
the 27MHz calculation.

Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: Id878ce83a453e5a332912cac0bb393c436bfa5de
2023-07-10 16:42:36 +08:00
Rimon Xu
53846ffaa4 [dec_no_thread] Fix invail mpp_pkt_in after reset
Signed-off-by: Rimon Xu <rimon.xu@rock-chips.com>
Change-Id: I3cf3e8e5342a5bd88c8b079d5ee7ca43ab0cdf25
2023-06-30 16:31:08 +08:00
Herman Chen
ae444a6cb5 Revert "[m2v_parser]: fix pts calculate error"
This reverts commit b5f6decb49.

Change-Id: Iedffa5079e39bf9fec043d4248f41d5cd1b02116
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
2023-06-29 18:29:21 +08:00
Christina Brien
58d1164b43 MPEG-2: correct PTS calculations OS-15301
b5f6decb49 is a commit which changed PTS
calculation, in an attempt to fix dimension mismatch.

PTS is measured according to the 90kHz MPEG clock (derived from the 27MHz system
clock). The frame_period value in m2vd_parser.c comes from the
frame_period_Table indexed by frame_rate_code from the sequence_header; this is
a fixed-point q8 value of milliseconds - i.e. according to a 256kHz clock.  The
90kHz and 256kHz timestamps are not dimensionally compatible. Treating them as
such is wrong.

This change cprrects the PTS calculation by providing appropriate conversions
between 90kHz and 256kHz clocks.

Change-Id: I21fe84bd79b0b5762f641b886b491f4e548a2629
2023-06-29 08:56:27 +08:00
Herman Chen
78a6ca648e [cmake]: Adapt to Android 14 requirement
1. Android 14 required to use libc++ instead of libstdc++
2. Add ndk search path and options for ndk switch.

Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I07595fc0290daaaf6518eca18d7b318be89fc6ae
2023-06-25 10:08:43 +08:00
Johnson Ding
56e006e046 [hal_jpege_vepu2]: fix wrong rstm assigning issue
For multi-core case, the first restart marker for each core should be
correct. Otherwise JPEG decoder may fail to decode the following ECS.

Change-Id: Ic5e1c4c175cc88a7946bd0c07c09709ad066a4d8
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-06-21 16:58:06 +08:00
Johnson Ding
9b06c3e92f [enc]: remove recovery point SEI when needed
If SEI NALU is disabled, recovery point should not be generated.

Change-Id: I8359385a8c048a635661016f50a6bf1b5da38946
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-06-21 16:57:55 +08:00
Yandong Lin
93e6aa1631 [vepu_580]: fix the handling for enc failed
Check enc status and force idr when enc failed.

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I23a2dabc1e56ca7904b541f834fee5535cfd4f53
2023-06-21 09:11:16 +08:00
Yandong Lin
3ba3f59baa [h264e_dpb]: fix dpb info print alignment
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I2fec62a1558dfed3ad7c2ad702ca85aeccf1d7ea
2023-06-20 17:19:19 +08:00
xueman.ruan
8a54ab8d7d [h264d]: fix the derivation of mbaff.
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: I3a119e2d9eb90158d837bd35b03d0d436425764e
2023-06-16 11:21:14 +08:00
Yandong Lin
f1734a1737 [mpp_service]: remove get disable_rcb_info env runtime
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3886482cd10ac8cc02d35d7b89c8cc8f88c1a600
2023-06-08 18:27:13 +08:00
Yandong Lin
8335e44c25 [vdpu_com]: remove get rcb_mode env runtime
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I8bc4d06339d1e663b8a4cea9ad3c167dd861779e
2023-06-08 18:24:47 +08:00
Herman Chen
feab136f1a [allocator_dma_heap]: Add error log
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Change-Id: I06af727713e1c096eada8a40795f42668fdaff6d
2023-06-06 15:48:43 +08:00
Yandong Lin
a76ad475db [hal_h265d]: modify reg_cxt to reg_ctx
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ic182b046054e84f88695136b40c9b6c9243cc434
2023-06-02 15:05:43 +08:00
Yandong Lin
e4554e2b84 [mpp_frame]: fix MPP_FRAME_XXX bit mask conflict
fix MPP_FRAME_HDR bit mask conflicts with MPP_FRAME_FMT_LE_MASK

Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I3a0df734f8cbc36da625d4b1a70658069809774f
2023-06-02 15:05:17 +08:00
xueman.ruan
b36f6854c3 [h264e]: fix mlvec test error.
Issue is introduced by commit as follows.
Change-Id: I7aedef0096d606ff91e1ed30d7e228a75359931d

Change-Id: I2162791bcc4d19d8fd3f110f252d74503cc6415b
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-05-31 17:17:03 +08:00
xueman.ruan
f91f152a1a [hal_h264e]: fix log2_max_frm_num config error.
Issue is introduced when user configs log2_max_frm_num.

1. use MppEncH264HwCfg instead of hw_poc_type.
2. slice_write can only use corresponding hardware config.

Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Change-Id: Id5f3622512075eedc1e9dc99636c3f0dff43d6f1
2023-05-30 14:04:31 +08:00
xueman.ruan
fbe861d86b [jpege]: set default rc_mode to fix_qp.
Change-Id: Icd0e0148865b96ddb78657296479a965eed5de9b
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
2023-05-26 11:44:11 +08:00
Johnson Ding
e025b079a2 [hal_jpege1]: Fix spliting ECS not work problem
Change-Id: I1d1674ef9f8b27ff92db3c9cc8f1af9135f1c637
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-05-18 14:14:14 +08:00
Johnson Ding
e214fe36dd [hal_jpege2]: Add multi-core encoding for spliting
If Picture is splited by MCU numbers that configured by user, add
multi-core encoding support for RK3588.

Change-Id: I11984aba1bc99eda8642bb7acec6e2354a5dfac5
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
2023-05-18 14:13:36 +08:00