When MPP_DEC_SET_FRAME_INFO configures fbc format with height not
16-aligned, vdpu_afbc_align_calc aligns height to 16 first. Then
mpp_sys_dec_buf_chk_proc adds 8 expand and aligns to 16 again,
causing ver_stride to be 24 larger than expected.
Use the existing ver_stride from frame if already set, to avoid
duplicate alignment.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I79b24b045768b4fbee3b394cbff546e8b1c09df8
Add ioc_list_used/unused to manage ioc obj for performance.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: Id23517ec3750d75b13906d2537d2fb7effb9c969
kmpp_venc_test is kmpp object implement test case.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I85d314a8430ee3d65d3b356173ed9169c443ad4a
During info change, only width/height/fmt were set via
MPP_DEC_SET_FRAME_INFO but hor_stride and ver_stride were left unset.
This caused incorrect sys_cfg calculation, triggering repeated info
changes and decoding errors.
Change-Id: I0d61a8d7d5f67e5099ce1a77ab0eb8ae949fc755
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
mpp_read_signbits() reads N+1 bits (N value + 1 sign), but AV1
su(N) format only has N bits with MSB as sign bit. Each call
caused 1-bit misalignment, corrupting all subsequent fields.
Change-Id: Ia5204a50d1a95d4dcda179c808e93858c0c46412
Signed-off-by: Chandler.Chen <chandler.chen@rock-chips.com>
ENTRY_TO_FLAG_PTR uses rk_ul* (8 bytes on arm64) to access the
flag bitmap, but the bitmap is organized as 32-bit words with
4-byte alignment. This causes a 4-byte read overflow when
accessing the last flag word.
Change rk_ul* to rk_u32* and 1ul to 1u to match the 32-bit
design intent indicated by ELEM_FLAG_U32_POS and ELEM_FLAG_START.
Change-Id: I5cde50148f0742313b719ea480f2786c974d5e63
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
1. Use kmpp_obj vla to replace MppEncRefCfgImpl.
2. Use mpp_enc_ref_cfg_setup to resize object.
3. Remove mpp_enc_ref_default by ref cfg reset.
4. Add more test case to mpp_enc_ref_test.
Change-Id: Ic72b78279b6432fbd363c2e05eef3af06986607b
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add flexible entry size support macro.
2. Add kmpp_obj_resize for vla resize.
3. Add more kmpp_obj test case.
Change-Id: I9f1a43b715cb207396276ae4f1bdaa5d22d565af
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
1. Add new KmppEntry.vla definition with elem size / count.
2. Add elems and raw buffer for different type storage.
3. Add set_vla, add_raw and add_elem functions.
4. Add VLA data dumping in mpp_cfg_to_log / to_json / to_toml.
5. Add fix / flex, raw / elem array test.
Change-Id: I5ea23f0caec21326c9906d12b43335ad0300d678
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Explicitly disable jpeg en during H.264/H.265 encoding setup to
prevent residual state from affecting video encoding mode.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I7953f28762c036d1310ab5b72352a8d32fa2ec71
Platform: RK3576/RK3538/RK3539/RK3572
Spec: All
Change-Id: I409d21884c8c2c426adc7ce0d8ff2073b0461b94
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
The bitstream output address supports wrap-around from bot to top, but the current
size configuration will cause page fault. Set size to -1 to fix this issue.
Error case:
The output buffer size is set to full buffer size which causes page fault
when hardware tries to wrap around to top address.
Solution:
Set output size register to buffer_size - 1 to enable proper wrap-around.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I2508dfba2007b3e0fb5c82bd5060fbf77ee66421
Platform: RV1126/RV1109
Spec: h264
Error case:
Core dump occurs while decoding the H.264 bitstream.
Solution:
The call to hal_h264d_explain_input_buffer was lost during the HAL
API registration refactor. Restore it to ensure input buffer
info is properly explained before generating registers.
Change-Id: Ic290c096d7b4b66692d7fc2680c9954330b42b3c
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
- Add failure check for mkdir & mmap
- Fix the error where the dump files were closed twice
Change-Id: I68bb6bebee94ac1ca012e6b39146b8c0a59b6e44
Signed-off-by: vance.wu <vance.wu@rock-chips.com>
- Add the result of pyr and bbd for slt
- Add mkdir before dump input/output data
Change-Id: I6cd6fe9e73ba666ebc893392fb58309ab5fded1a
Signed-off-by: hayla.he <hayla.he@rock-chips.com>