From d5597dc4094ddd9ab1ecb9762eb0d2f0600084f7 Mon Sep 17 00:00:00 2001 From: Hui Zhang Date: Wed, 21 Nov 2018 11:31:33 +0800 Subject: [PATCH] media_module: optimize buf_available check condition in mh264 [1/1] PD#SWPL-1617 Problem: On S805X, back end performance is not good. easy to cause bufmgr reset and cts failed. Solution: optimize buf_available checkcondition to avoid reset. Verify: Verified P241 Change-Id: I98c7e9ad8a8c31e0f97c26f5130952d4308756bb Signed-off-by: Hui Zhang --- .../media_modules/frame_provider/decoder/h264_multi/vmh264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c index 2bbc5aa40555..1ecefe5bb99a 100644 --- a/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c +++ b/drivers/amlogic/media_modules/frame_provider/decoder/h264_multi/vmh264.c @@ -4052,7 +4052,7 @@ static bool is_buffer_available(struct vdec_s *vdec) if ((kfifo_len(&hw->newframe_q) <= 0) || ((hw->config_bufmgr_done) && (!have_free_buf_spec(vdec))) || ((p_H264_Dpb->mDPB.init_done) && - (p_H264_Dpb->mDPB.used_size == p_H264_Dpb->mDPB.size) && + (p_H264_Dpb->mDPB.used_size >= (p_H264_Dpb->mDPB.size -1)) && (is_there_unused_frame_from_dpb(&p_H264_Dpb->mDPB) == 0))) { dpb_print(DECODE_ID(hw), PRINT_FLAG_VDEC_DETAIL, "%s, empty, newq(%d), free_spec(%d), initdon(%d), used_size(%d/%d), unused_fr_dpb(%d)\n",