From cce925058af4d1c95f726ef9f4a7f521a47e8b60 Mon Sep 17 00:00:00 2001 From: Johnson Ding Date: Tue, 27 Dec 2022 11:43:56 +0800 Subject: [PATCH] [h264d]: Fix MVC decoding error Layer id and view id information setting to hardware SPS, RPS should be cleaned for each frame, otherwise the base layer will encountered error for some MVC bistream. Change-Id: I830768ad65fba1be6ab6bf4092d938c6134a288d Signed-off-by: Johnson Ding --- mpp/codec/dec/h264/h264d_fill.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mpp/codec/dec/h264/h264d_fill.c b/mpp/codec/dec/h264/h264d_fill.c index c87c6400..992ac2b6 100644 --- a/mpp/codec/dec/h264/h264d_fill.c +++ b/mpp/codec/dec/h264/h264d_fill.c @@ -263,7 +263,14 @@ void fill_picparams(H264dVideoCtx_t *p_Vid, DXVA_PicParams_H264_MVC *pp) } pp->RefPicLayerIdList[i] = dpb_info[i].voidx; } + } else { + pp->num_views_minus1 = 0; + pp->curr_layer_id = dec_pic->layer_id; + memset(pp->view_id, 0, sizeof(pp->view_id)); + memset(pp->ViewIDList, 0, sizeof(pp->ViewIDList)); + memset(pp->RefPicLayerIdList, 0, sizeof(pp->RefPicLayerIdList)); } + p_Vid->spspps_update = 0; }