summaryrefslogtreecommitdiff
authorPeng Yixin <yixin.peng@amlogic.com>2019-12-30 16:24:00 (GMT)
committer Hui Zhang <hui.zhang@amlogic.com>2020-01-07 10:47:13 (GMT)
commit6933cd86d1d664d20e8a26069f29f9642bb41b2a (patch)
tree3835d9b0789336335c503aa5c19169c752bb2106
parent7cf525309950089d56b208e6467a1e0af9337238 (diff)
downloadmedia_modules-6933cd86d1d664d20e8a26069f29f9642bb41b2a.zip
media_modules-6933cd86d1d664d20e8a26069f29f9642bb41b2a.tar.gz
media_modules-6933cd86d1d664d20e8a26069f29f9642bb41b2a.tar.bz2
media_module: h264 Update the ref queue correctly [1/1]
PD#OTT-7782 Problem: When there is some error data in the stream, the error ref frame is forced to be released. Since the list of ref frames is not updated, decoder driver thinks that the DPB buffer is incorrect and the entire DPB queue to be cleared, result frame drop. Solution: This problem is resolved by updating the list of refs when the incorrect ref frames are removed to dpb queue. Verify: u212 Change-Id: I754434ae1daaaf8df56e9efc10233ca7725df86e Signed-off-by: Peng Yixin <yixin.peng@amlogic.com>
Diffstat
-rw-r--r--drivers/frame_provider/decoder/h264_multi/h264_dpb.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/drivers/frame_provider/decoder/h264_multi/h264_dpb.c b/drivers/frame_provider/decoder/h264_multi/h264_dpb.c
index bbf30a3..71560fa 100644
--- a/drivers/frame_provider/decoder/h264_multi/h264_dpb.c
+++ b/drivers/frame_provider/decoder/h264_multi/h264_dpb.c
@@ -94,6 +94,8 @@ static struct StorablePicture *get_new_pic(
struct h264_dpb_stru *p_H264_Dpb,
enum PictureStructure structure, unsigned char is_output);
+static void update_ref_list(struct DecodedPictureBuffer *p_Dpb);
+
static void init_dummy_fs(void)
{
dummy_fs.frame = &dummy_pic;
@@ -2120,6 +2122,7 @@ static int unmark_one_error_out_frame(struct h264_dpb_stru *p_H264_Dpb)
unmark_for_reference(p_Dpb, p_Dpb->fs[i]);
ret = 1;
+ break;
}
}
return ret;
@@ -2165,6 +2168,7 @@ void bufmgr_h264_remove_unused_frame(struct h264_dpb_stru *p_H264_Dpb,
dpb_print(p_H264_Dpb->decoder_index,
0, "%s, Warnning, force unmark one frame\r\n",
__func__);
+ update_ref_list(p_Dpb);
remove_unused_frame_from_dpb(p_H264_Dpb);
dump_dpb(p_Dpb, 0);
}
@@ -2173,6 +2177,7 @@ void bufmgr_h264_remove_unused_frame(struct h264_dpb_stru *p_H264_Dpb,
dpb_print(p_H264_Dpb->decoder_index,
0, "%s, unmark error frame\r\n",
__func__);
+ update_ref_list(p_Dpb);
remove_unused_frame_from_dpb(p_H264_Dpb);
dump_dpb(p_Dpb, 0);
}