fix[h265d_vdpu383]: Fix CABAC error detection issue.

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
This commit is contained in:
Hongjin Li
2025-04-11 09:48:39 +08:00
committed by 李洪进
parent ff3ae5c010
commit 6dbce1daf3

View File

@@ -1097,7 +1097,7 @@ static MPP_RET hal_h265d_vdpu383_gen_regs(void *hal, HalTaskInfo *syn)
hw_regs->ctrl_regs.reg16.roi_error_ctu_cal_en = 0;
hw_regs->ctrl_regs.reg20_cabac_error_en_lowbits = 0xffffffff;
hw_regs->ctrl_regs.reg21_cabac_error_en_highbits = 0x3ff3ffff;
hw_regs->ctrl_regs.reg21_cabac_error_en_highbits = 0x3ff3f9ff;
hw_regs->ctrl_regs.reg13_core_timeout_threshold = 0xffff;