GNOME Bugzilla – Bug 766862
vaapipostproc: deinterlace produces video jerking
Last modified: 2018-11-03 15:47:38 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.
Hi Sreerenj, I already share the video clip location and send you a email. Thanks.
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.
-- 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.