From 6dbce1daf3255f94f44e9887f8a16f64a515c0b2 Mon Sep 17 00:00:00 2001 From: Hongjin Li Date: Fri, 11 Apr 2025 09:48:39 +0800 Subject: [PATCH] fix[h265d_vdpu383]: Fix CABAC error detection issue. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Change-Id: I9f0b6c744bbc56ad721d45461a18f8124956ffc7 --- mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c b/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c index 4a32c795..0ab4466a 100644 --- a/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c +++ b/mpp/hal/rkdec/h265d/hal_h265d_vdpu383.c @@ -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;