From 9c67f3d723abbd7ccffda116d7e2c82a5a116567 Mon Sep 17 00:00:00 2001 From: Ruijing Dong Date: Thu, 22 Oct 2020 14:15:28 -0400 Subject: [PATCH] frontends/omx/enc: fix omx h264 encoding force-keyframe-period issue. poc was not set to 0 in IDR frames except the first one. Signed-off-by: Ruijing Dong Reviewed-by: Leo Liu Part-of: --- src/gallium/frontends/omx/bellagio/vid_enc.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/gallium/frontends/omx/bellagio/vid_enc.c b/src/gallium/frontends/omx/bellagio/vid_enc.c index 7ace68052e3..ff9efb0e6a9 100644 --- a/src/gallium/frontends/omx/bellagio/vid_enc.c +++ b/src/gallium/frontends/omx/bellagio/vid_enc.c @@ -887,6 +887,7 @@ static OMX_ERRORTYPE vid_enc_EncodeFrame(omx_base_PortType *port, OMX_BUFFERHEAD picture_type = PIPE_H264_ENC_PICTURE_TYPE_IDR; priv->force_pic_type.IntraRefreshVOP = OMX_FALSE; priv->frame_num = 0; + priv->pic_order_cnt = 0; } else if (priv->codec->profile == PIPE_VIDEO_PROFILE_MPEG4_AVC_BASELINE || !(priv->pic_order_cnt % OMX_VID_ENC_P_PERIOD_DEFAULT) || (buf->nFlags & OMX_BUFFERFLAG_EOS)) {