From: Gwenole Beauchesne Date: Thu, 7 Aug 2014 12:57:26 +0000 (+0200) Subject: vaapipostproc: fix heuristic for detecting discontinuity. X-Git-Tag: 1.19.3~503^2~2019 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=197001768b96cfb382cfd4ab52ee200986c6a31d;p=platform%2Fupstream%2Fgstreamer.git vaapipostproc: fix heuristic for detecting discontinuity. In order to make the discontinuity detection code useful, we need to detect the lost frames in the history as early as the previous frame. This is because some VA implementations only support one reference frame for advanced deinterlacing. In practice, turn the condition for detecting new frame that is beyond the previous frame from field_duration*2 to field_duration*3, i.e. nothing received for the past frame and a half because of possible rounding errors when calculating the field-duration either in this element (vaapipostproc), or from the upstream element (parser element). This is a regression introduced with commit faefd62. https://bugzilla.gnome.org/show_bug.cgi?id=734135 --- diff --git a/gst/vaapi/gstvaapipostproc.c b/gst/vaapi/gstvaapipostproc.c index e692f54a34..56646b057e 100644 --- a/gst/vaapi/gstvaapipostproc.c +++ b/gst/vaapi/gstvaapipostproc.c @@ -525,7 +525,7 @@ gst_vaapipostproc_process_vpp(GstBaseTransform *trans, GstBuffer *inbuf, if (prev_buf && (prev_pts = GST_BUFFER_TIMESTAMP(prev_buf)) != pts) { const GstClockTimeDiff pts_diff = GST_CLOCK_DIFF(prev_pts, pts); if (pts_diff < 0 || (postproc->field_duration > 0 && - pts_diff > postproc->field_duration * 2)) + pts_diff >= postproc->field_duration * 3 - 1)) ds_reset(ds); } }