After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 766862 - vaapipostproc: deinterlace produces video jerking
vaapipostproc: deinterlace produces video jerking
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
1.7.90
Other Linux
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-05-25 10:16 UTC by Lim Siew Hoon
Modified: 2018-11-03 15:47 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
test_video_h264_info.txt (3.28 KB, text/plain)
2016-05-25 10:16 UTC, Lim Siew Hoon
Details

Description Lim Siew Hoon 2016-05-25 10:16:13 UTC
Created attachment 328488 [details]
test_video_h264_info.txt

Gstreamer framework 1.7.90 version
Gstreamer-vaapi: 1.7.90 version.

command:
gst-launch-1.0 filesrc location=/home/root/H264_Main_Interlaced_Sound_ToTheLimit.mp4 ! qtdemux ! vaapidecode ! vaapipostproc deinterlace-mode=1 deinterlace-method=1 ! vaapisink fullscreen=true

Combination:
deinterlace-mode=1 and deinterlace-method=0
deinterlace-mode=1 and deinterlace-method=1
deinterlace-mode=1 and deinterlace-method=2

deinterlace-mode=0 and deinterlace-method=0
deinterlace-mode=0 and deinterlace-method=1
deinterlace-mode=0 and deinterlace-method=2


H264 interlace video with vaapipostproc with above combination will causing the video jerking. The issue also able to reproduce in 1.8.1 version too.


flags = 0x0 and ttf=0x1

Original version: gst_vaapipostproc_process function
  /* Second field */
  append_output_buffer_metadata (postproc, outbuf, inbuf, 0);

  meta = gst_buffer_get_vaapi_video_meta (outbuf);
  outbuf_flags = flags;
  outbuf_flags |= deint ? (tff ?
      GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD :
      GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD) :
      GST_VAAPI_PICTURE_STRUCTURE_FRAME;
  gst_vaapi_video_meta_set_render_flags (meta, outbuf_flags);


Modify version: 
  /* Second field */
  append_output_buffer_metadata (postproc, outbuf, inbuf, 0);

  meta = gst_buffer_get_vaapi_video_meta (outbuf);
  outbuf_flags = flags;
  outbuf_flags |= deint ? (tff ?
      GST_VAAPI_PICTURE_STRUCTURE_TOP_FIELD :
      GST_VAAPI_PICTURE_STRUCTURE_BOTTOM_FIELD) :
      GST_VAAPI_PICTURE_STRUCTURE_FRAME;
  gst_vaapi_video_meta_set_render_flags (meta, outbuf_flags);


After I make the arrangement in outbuf_flags same as the fieldbuf_flags logic checking, the video jerking issue go away.
Comment 1 Lim Siew Hoon 2016-05-25 10:40:06 UTC
Hi Sreerenj,

I already share the video clip location and send you a email.

Thanks.
Comment 2 sreerenj 2016-05-25 11:19:38 UTC
I haven't tested the clip, but the original code seems to be correct.
This code get executed when there is no advanced deinterlacing. We only need to attach the meta to the output buffer (fieldbuf and outbuf)
If the first field buffer has TFF set, then obviously the second field buffer(outbuf) should have BOTTOM field set.
Comment 3 GStreamer system administrator 2018-11-03 15:47:38 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/38.