fix[h265d_parser]: Fix fmt configuration issue

s->h265dctx->pix_fmt is not initialized before configuration,
so without recreating mpp, s->h265dctx->pix_fmt can only behave
normally in overlay state (ex: yuv->fbc), and abnormal in
reduction state (ex: fbc->yuv)

Signed-off-by: Hongjin Li <vic.hong@rock-chips.com>
Change-Id: Iee936b378c6de53a781fb67c5394738c74729242
This commit is contained in:
Hongjin Li
2024-07-05 15:02:09 +08:00
parent 550dd92849
commit 990f449515

View File

@@ -97,7 +97,7 @@ static HEVCFrame *alloc_frame(HEVCContext *s)
mpp_frame_set_hor_stride(frame->frame,
(MPP_ALIGN(s->h265dctx->coded_width, 64) * s->h265dctx->nBitDepth) >> 3);
mpp_frame_set_ver_stride(frame->frame, s->h265dctx->coded_height);
s->h265dctx->pix_fmt = 0;
s->h265dctx->pix_fmt &= MPP_FRAME_FMT_MASK;
if (s->is_hdr) {
s->h265dctx->pix_fmt |= MPP_FRAME_HDR;
}