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>
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>
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>
When SEI payload has prevention code, paser should skip it.
Change-Id: I426bcb415199cc78b2f7211860b9a339e15d5122
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
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
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
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
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
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
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
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>
If SEI NALU is disabled, recovery point should not be generated.
Change-Id: I8359385a8c048a635661016f50a6bf1b5da38946
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Check enc status and force idr when enc failed.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I23a2dabc1e56ca7904b541f834fee5535cfd4f53
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
Issue is introduced by commit as follows.
Change-Id: I7aedef0096d606ff91e1ed30d7e228a75359931d
Change-Id: I2162791bcc4d19d8fd3f110f252d74503cc6415b
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
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
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>