From 0794bf083b5a9b09d63dc2693d3977e90a8cfb36 Mon Sep 17 00:00:00 2001 From: Yandong Lin Date: Thu, 19 May 2022 10:53:59 +0800 Subject: [PATCH] [h264d]: fix fmt assignment for yuv400 souce err Signed-off-by: Yandong Lin Change-Id: I24e4cd2a7edbb4161a3f7b323482343e2275df67 --- mpp/codec/dec/h264/h264d_init.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/mpp/codec/dec/h264/h264d_init.c b/mpp/codec/dec/h264/h264d_init.c index 7a3df97f..c020e176 100755 --- a/mpp/codec/dec/h264/h264d_init.c +++ b/mpp/codec/dec/h264/h264d_init.c @@ -420,7 +420,9 @@ static MPP_RET dpb_mark_malloc(H264dVideoCtx_t *p_Vid, H264_StorePic_t *dec_pic) MppFrameFormat out_fmt = p_Dec->cfg->base.out_fmt; MppFrameImpl *impl = (MppFrameImpl *)p_Dec->curframe; - if ((H264_CHROMA_420 == p_Vid->yuv_format) && (8 == p_Vid->bit_depth_luma)) { + if ((H264_CHROMA_400 == p_Vid->yuv_format) && (8 == p_Vid->bit_depth_luma)) { + fmt = MPP_FMT_YUV400; + } else if ((H264_CHROMA_420 == p_Vid->yuv_format) && (8 == p_Vid->bit_depth_luma)) { fmt = MPP_FMT_YUV420SP; } else if ((H264_CHROMA_420 == p_Vid->yuv_format) && (10 == p_Vid->bit_depth_luma)) { fmt = MPP_FMT_YUV420SP_10BIT;