Bug 97212 - Bob Deinterlacing Not Implemented, need to implement it asap.
Summary: Bob Deinterlacing Not Implemented, need to implement it asap.
Status: RESOLVED NOTABUG
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium major
Assignee: haihao
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-05 09:39 UTC by yutong.pan
Modified: 2016-08-10 03:57 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments

Description yutong.pan 2016-08-05 09:39:53 UTC
Gstreamer VAAPI Advance Deinterlace video jerking

The current driver only support Motion Adaptive and Motion Estimation deinterlacing.

When apply bob or weave deinterlacing, the post processing will not deinterlace.


So the following command will make the displayed video jerking:

gst-launch-1.0 filesrc location=/H264_Main@L2.2_0720x0576_03.9Mbps_10.0fps_Interlaced_Sound_ToTheLimit@.mp4 ! qtdemux ! vaapidecode ! vaapipostproc deinterlace-mode=1 deinterlace-method=2 ! vaapisink


The ways to reproduce the problem:
1. Boot up Yocto image on Single DP. 
2. Start X with Matchbox compositor. 
3. export display=:0 
4. executed the deinterlace mode test command: gst-launch-1.0 filesrc location=/H264_Main@L2.2_0720x0576_03.9Mbps_10.0fps_Interlaced_Sound_ToTheLimit@.mp4 ! qtdemux ! vaapidecode ! vaapipostproc deinterlace-mode=0 ! vaapisink fullscreen=1
5. observed the video deinterlace are jerking during playback.
6. further testing by apply different deinterlace method to use: gst-launch-1.0 filesrc location=/H264_Main@L2.2_0720x0576_03.9Mbps_10.0fps_Interlaced_Sound_ToTheLimit@.mp4 ! qtdemux ! vaapidecode ! vaapipostproc deinterlace-mode=1 deinterlace-method=2 ! vaapisink
7. Observed the video still rendering with jerking.

Note that deinterlace-method=2(Bob Deinterlacing) is the default choice of gstreamer.

The video used in the test is in the attachment.
Comment 1 yutong.pan 2016-08-05 09:59:24 UTC
The video is to large to upload.

You can download it from:
\\pglvm2008-v03.png.intel.com\automation\video\shared\H264

Video Name:
H264_Main@L2.2_0720x0576_03.9Mbps_10.0fps_Interlaced_Sound_ToTheLimit@.mp4
Comment 2 Focus.Luo 2016-08-08 03:26:14 UTC
Tried the latest commit as below of libva driver, no this issue 
found.
  libva-intel:
  commit fb7d6f56ad3000734390279a55b5c7f54ed9e3a3
Comment 3 yutong.pan 2016-08-08 04:42:13 UTC
(In reply to Focus.Luo from comment #2)
> Tried the latest commit as below of libva driver, no this issue 
> found.
>   libva-intel:
>   commit fb7d6f56ad3000734390279a55b5c7f54ed9e3a3

The problem still exists on the latest commit.
commit fb7d6f56ad3000734390279a55b5c7f54ed9e3a3

Note that the problem occurs when playing the video mentioned above. But not occurs in every video. So you must use that video to reproduce the problem.

And I found that the Bob Deinterlacing is still not implemented in this commit.
Comment 4 Focus.Luo 2016-08-08 06:26:45 UTC
Still no issue found by using H264_Main@L2.2_0720x0576_03.9Mbps_10.0fps_Interlaced_Sound_ToTheLimit@.mp4 clip.

Can you help to try the command line as below?:
gst-launch-1.0 filesrc location=a.mp4 ! qtdemux  ! vaapih264dec ! vaapipostproc deinterlace-mode=2 ! vaapisink

thanks
Focus
Comment 5 yutong.pan 2016-08-08 07:30:31 UTC
(In reply to Focus.Luo from comment #4)
> Still no issue found by using
> H264_Main@L2.2_0720x0576_03.9Mbps_10.0fps_Interlaced_Sound_ToTheLimit@.mp4
> clip.
> 
> Can you help to try the command line as below?:
> gst-launch-1.0 filesrc location=a.mp4 ! qtdemux  ! vaapih264dec !
> vaapipostproc deinterlace-mode=2 ! vaapisink
> 
> thanks
> Focus

Hi Focus,

deinterlace-mode=2 means disable deinterlacing.

You should set deinterlace-mode=0 or 1 to enable deinterlacing, and then set deinterlace-method=2 to reproduce the problem(or not set deinterlace-method, because the default value of deinterlace-method is 2).

BRs,
Yutong
Comment 6 haihao 2016-08-08 08:26:28 UTC
I think Focus is asking you to compare the difference between deinterlace-mode=1 deinterlace-method=2 and deinterlace-mode=2 deinterlace-method=2. You can check the shadow of the people in the image.
Comment 7 Focus.Luo 2016-08-08 08:49:23 UTC
Haihao is right.

Yutong,
when you try to use "deinterlace-mode=2", you will find the obviously interlace display image. But when you try to use "deinterlace-mode=1 deinterlace-method=2", the display image will show smoothly. It is to say that the bob deinterlace feature enabled.
Comment 8 yutong.pan 2016-08-08 09:10:14 UTC
Hi Haihao & Focus,

Does this mean that the Bob Deinterlacing will behave like this naturally(jerking in such kind of video)? Or there is something wrong with the implementation of the Bob Deinterlacing?
Thank you very much.

BRs,
Yutong
Comment 9 haihao 2016-08-10 02:12:24 UTC
Each deinterlacing method might result in artifact. the artifact might disappear with another video.
Comment 10 yutong.pan 2016-08-10 03:57:47 UTC
(In reply to haihao from comment #9)
> Each deinterlacing method might result in artifact. the artifact might
> disappear with another video.

Ok, thanks Haihao.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.