Modification Point:
1. Use enc configure object macro.
2. Use kmpp_obj_update to sync user cfg setup.
3. Distinguish between user mode and kernel mode for enc obj.
4. EncImpl only check codec related SET_CFG result.
5. Refactor SET_CFG flow.
6. Adapter jpeg q_mode feature.
Signed-off-by: Herman Chen <herman.chen@rock-chips.com>
Signed-off-by: xiaoxu.chen <xiaoxu.chen@rock-chips.com>
Change-Id: I2856acdf863189fdaa29121ad8bc007fe90b5ab5
Platform: RK3576(vdpu383)
Spec: av1
Error case:
When using the Roku player, it crashes after seeking.
Because dxva->frame_refs[mapped_idx].Index == -1, cdf_buf
becomes NULL, which leads to a crash.
The deeper cause is that after seeking, playback doesn’t
start from an I-frame, so the reference frame info isn’t
ready.
Err log:
Null pointer crash stack.
Solution:
Check frame_refs index validity to avoid crashes.
Source:
test_av1_1920x1080.mp4 (Likely reproducible with other AV1 sources.)
Reported-by: Liming Xu <rimon.xu@rock-chips.com>
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Id55c2b00aa4c42eec2ccd780974e933a052864de
1. Add rps_update_flag to indicate whether to update rps.
2. Fix global cfg data len for vdpu384a.
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
Change-Id: I1c664c99f34f6dea940368496175273042b48b18
Platform: RK3588
Spec: av1
Error case:
Decode the AV1 bitstream from Bilibili that includes
background frames.
Err log:
Correct: mpp_av1dec: irq_status: 00001100
Error: mpp_av1dec: irq_status: 00040100 // hw timeout
Solution:
The swreg8.sw_idr_pic_e shall be set to 1 when current frame
is an intra frame.
Source: Bilibili AV1 videos
ex: https://www.bilibili.com/video/BV11ibPzLEhe
Reported-by: redmine #575039
Change-Id: I9f83fe7025f2c7ed70c8121798f9db0bfc4b0a24
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Platform: vepu_580/540/510
Spec: h265e
In tsvc mode, top p-frames not used as reference frames.
Change-Id: I0b285e5ed753e73321fd728389195f0e5b118874
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
min_bg_fqp: min frame qp for background region
max_bg_fqp: max frame qp for background region
min_fg_fqp: min frame qp for foreground region
max_fg_fqp: max frame qp for foreground region
Change-Id: Idc10767d545dd83e4157f839a621e4801c98201e
Signed-off-by: timkingh.huang <timkingh.huang@rock-chips.com>
Need to sync cache after cut slice segment header extension datas.
Change-Id: Id89ef895ac6df47ff593407a18e0246138dffb9f
Signed-off-by: Yandong Lin <yandong.lin@rock-chips.com>
If hardware failed at decoding the first field of frame, stream consumed
length will not be update to vlc_stream_base register. To avoid reading
stream base address as stream length after irq, just abort decoding when
hardware reporting error.
Change-Id: I7ca80aefebb0700612a20d7e35c49dc736a31b6f
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
Platform: RV1126B
Spec: h265
Error case:
When decoding a video sequence, the interrupt reports
a bitstream error.
The value of num_negative_pics shall be in the range of
0 to sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ]
For frame5 (starting from 0)
sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ] = 4
num_negative_pics = 5
Solution:
Mask out undefined bits in cabac error detection, this error is
allowed to be ignored.
Source: H265-019-Movie_Trailer_复仇者联盟.720P预告片.h265.mp4
Reported-by: Caesar Wang <caesar.wang@rock-chips.com>
Change-Id: I22915d3e6b04cf270bd2075e1606e5d35142f2cd
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Platform: RK3576
Spec: av1
Error case:
When the resolution is switched and the width and height
are enlarged, the segid space is insufficient
Solution:
Determine whether the cdf/segid space is sufficient and
recalculate if insufficient
Reported-by: Jinsen Chen <kevin.chen@rock-chips.com> KTC
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Signed-off-by: Chandler Chen <chandler.chen@rock-chips.com>
Change-Id: I8df6773337e093f0767d18d552895b3ec7601efa
Platform: RK3576
Spec: h265
Error case:
When decoding a video sequence, the interrupt reports
a bitstream error, but the video sequence is actually
normal.
The value of num_negative_pics shall be in the range of
0 to sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ]
For frame5 (starting from 0)
sps_max_dec_pic_buffering_minus1[ sps_max_sub_layers_minus1 ] = 4
num_negative_pics = 5
Solution:
Mask out undefined bits in cabac error detection
Reported-by: redmine #540704
Source: H.265 HEVC_1280x720_Movie Trailer_复仇者联盟.预告片.h265.mp4.mp4
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: I9f0b6c744bbc56ad721d45461a18f8124956ffc7
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>
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
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>
Encoded width and height should align with MCU size.
Change-Id: If62629f9ca7275bafaa156b55af001b10b0e836b
Signed-off-by: Johnson Ding <johnson.ding@rock-chips.com>
1. Add rc model in when force skip frm
2. Fix ref frm error when force pskip
3. Disable pskip when cfg force idr
4. Support pskip frm as ref frm
5. Support force skip frm as is_ref or non_ref
Change-Id: Ib138ab75a9df2c4521cb376e3a3d7fd30565ecd9
Signed-off-by: Yanjun Liao <yanjun.liao@rock-chips.com>
Platform: rk3575/vdpu383
Error case:
The idr frame (frm0) does not update the cdf, and then frm1,
when using the cdf, mistakenly uses the cdf of the previous
gop instead of the default cdf
Solution:
At the beginning of GOP, reset all validity flags
Reported-by: Detlev Casanova <detlev.casanova@collabora.com>
Source: av1.video.es
Change-Id: I72152664d1c4275cb39f657c94ed4ba89a076465
Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>