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>
After realloc, the source pointer maybe invalid,
need assign the new pointer.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I324f379540cab2d6463a829470f11ff2d57b0b42
The hw ref used may not correct, cause mark frame err info incorrectly.
So if is err frame, set fd = 0, err for trigger pagefault if the cur frame
use the err ref. This makes it possible to correctly identify whether an
err ref frame is being used.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4e7f042731f22e3ab8f4c90e51120fb8d841142a
support hack for err ref check for decoder
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ib61336b50dde626d85f9f6bb25950ea70149ea49
It is wrong to using PTS of the next packet as PTS of current paring
frame.
Change-Id: I858d4bd2831e63eefc8815be3cabe460444528bd
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
The commit that cause the issue:
commit eaa250d1fc
Author: Yandong Lin <yandong.lin@rock-chips.com>
Date: Thu Apr 13 10:57:35 2023 +0800
[vp9d_parser]: fix frame mark errinfo issue
Key Frame or intra only frame do not reference other frame,
so need not check errinfo of ref frame.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4fbfca7ba7dedfef6d6a721528ba536dba50a8f3
err log:
mpp_buf_slot: Assertion slot->status.has_frame failed at mpp_buf_slot_get_prop:1085
hal_vp9d_vdpu34x: ref buff address is no valid used out as base slot index 0x2
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Ie280d732a48ae326f1c9bb6470ca452dc974d296
When a object is double put by mpp_mem_pool_put,
it will destroy the info of MppMemPoolImpl.
So set node->check = NULL when mpp_mem_pool_put, and it will check
failed adn return when double mpp_mem_pool_put.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I54be2eae3a1d7e81579f89d3e80304abface3049
The same poiner address may have different value in memory.
So we need to update pointer config at each time.
Issue is introduced by commit as followed.
Change-Id: Ia15a0128d03b1a2624410b6f2a13effe3a03c47c
Change-Id: Ia10fe1f3faff257d5276473cb7829ac1cb0f1795
Signed-off-by: xueman.ruan <xueman.ruan@rock-chips.com>
Key Frame or intra only frame do not reference other frame,
so need not check errinfo of ref frame.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I4fbfca7ba7dedfef6d6a721528ba536dba50a8f3
frame alloc failed cause by stream error, such as:
receive top field while top_field_first = 0,
or bottom filed while top_field_first = 1;
mark resetFlag to wait for another I frame
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I0bf6152db84459b06141ab0fa5232c0fffd51f92
SEI payload parsing should be aligned with bytes. So bits remaining at
tail should be skipped. In case of bits remained is more than 32,
skipping the whole payload directly from the beginning of the current
payload being parsed.
Change-Id: I003a51b8347011ad310b55452192b07ae63e7df3
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
For larger NALU header, eg: userdata or extradata, header buffer
initialized at first will not be enough. But previous data pointers that
point to header buffers are not valid after doing reallocation. So a
better way to recording buffer entry is to record offset.
Change-Id: I13f59e142af6d1a932279cb8eb43c28e72141af9
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
In 64-bit env, memcpy in the same buffer may cause err stream.
Use memmove replace memcpy to resolve the issue.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I55326e03c1af04ec617bd213c7dcd84d5d92406d
- Fixed min_still_percent overflow
- Fixed incorrect initialization value after dynamic
change of bit rate
Signed-off-by: Xinhuang Li <buluess.li@rock-chips.com>
Change-Id: I8a0cf501f5995731d1ad8173c3d8880b33c63f73