frontends/omx/enc: fix omx h264 encoding force-keyframe-period issue.
authorRuijing Dong <Ruijing.Dong@amd.com>
Thu, 22 Oct 2020 18:15:28 +0000 (14:15 -0400)
committerMarge Bot <eric+marge@anholt.net>
Sat, 24 Oct 2020 14:16:28 +0000 (14:16 +0000)
poc was not set to 0 in IDR frames except the first one.

Signed-off-by: Ruijing Dong <Ruijing.Dong@amd.com>
Reviewed-by: Leo Liu <leo.liu@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7293>

src/gallium/frontends/omx/bellagio/vid_enc.c

index 7ace680..ff9efb0 100644 (file)
@@ -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)) {