Bug 79528 - vpp deinterlacing madi/maci alternating green frames, jumpy
Summary: vpp deinterlacing madi/maci alternating green frames, jumpy
Status: RESOLVED FIXED
Alias: None
Product: libva
Classification: Unclassified
Component: intel (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Gwenole Beauchesne
QA Contact: Sean V Kelley
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-06-02 05:51 UTC by Rainer Hochecker
Modified: 2015-11-24 05:05 UTC (History)
5 users (show)

See Also:
i915 platform:
i915 features:


Attachments

Description Rainer Hochecker 2014-06-02 05:51:44 UTC
madi/maci does not work on haswell

Testsystem: i5-4570T CPU @ 2.90GHz
Ubuntu Trusty 64, (standard and newer kernels)
libva: master branch
intel-driver: master branch
gst-plugins: branch 0.4 (git@gitorious.org:gst-plugins-vaapi/gst-plugins-vaapi.git)

Here is a video of how it looks like:
https://dl.dropboxusercontent.com/u/47522966/CIMG1615.AVI

gst cmd:

gst-launch-0.10 filesrc location="/home/xbmc/Videos/1080i50.ts" ! tsdemux ! vaapidecode ! vaapipostproc deinterlace=1 deinterlace-method=3 ! vaapisink
Comment 1 Rainer Hochecker 2014-06-02 06:50:40 UTC
here is the link to the sample I was using: https://dl.dropboxusercontent.com/u/47522966/1080i50.ts

576i seems to work
Comment 2 haihao 2014-06-03 01:55:56 UTC
Does it work on IVB ?
Comment 3 Rainer Hochecker 2014-06-03 06:10:24 UTC
I don't have a IVB system for testing. I tried a mpeg2 1080i sample which was ok. Looks like it fails on any h264 regardless of size.

I would have thought that postprocessing would not care about codec
Comment 4 Peter Frühberger 2014-06-03 06:27:01 UTC
I got my IVB System up and running and it seems, that it totally ignores every method despite method 1 which is BOB (1):
LANG=US gst-launch-0.10 filesrc location=~/1080i50.ts ! tsdemux ! vaapidecode ! vaapipostproc deinterlace=1 deinterlace-method=3 ! vaapisink display=0
libva info: VA-API version 0.35.1
libva info: va_getDriverName() returns 0
libva info: Trying to open /usr/local/lib/dri/i965_drv_video.so
libva info: Found init function __vaDriverInit_0_35
libva info: va_openDriver() returns 0
Setting pipeline to PAUSED ...
Pipeline is PREROLLING ...

(gst-launch-0.10:19451): GStreamer-CRITICAL **: _gst_util_uint64_scale: assertion 'denom != 0' failed
Pipeline is PREROLLED ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
WARNING: A forward temporal reference is needed for Motion adaptive deinterlacing !!!
vaapisink Current fps: 19.36, Total avg fps: 19.36
vaapisink Current fps: 25.00, Total avg fps: 21.82
vaapisink Current fps: 25.00, Total avg fps: 22.79
vaapisink Current fps: 25.00, Total avg fps: 23.30
vaapisink Current fps: 25.00, Total avg fps: 23.62
vaapisink Current fps: 25.00, Total avg fps: 23.84
vaapisink Current fps: 25.00, Total avg fps: 24.00
vaapisink Current fps: 25.00, Total avg fps: 24.12
vaapisink Current fps: 25.00, Total avg fps: 24.22


gstreamer-vaapi version: 90713fdc442f27b4ea449b92660a294f7796f83e on branch 0.4 of git://gitorious.org/gst-plugins-vaapi/gst-plugins-vaapi.git

VAAPI:
vainfo: VA-API version: 0.35 (libva 1.3.2.pre1)
vainfo: Driver version: Intel i965 driver for Intel(R) Ivybridge Desktop - 1.3.2.pre1 (master)

Tennis.ts is working as it should with MADI (method 3), MACI looks so interlaced, that I am not sure it does anything at all.

@Haihao: Does that work on your test systems?
Comment 5 Peter Frühberger 2014-06-03 06:31:39 UTC
So, to summarize that correctly:

IVB:
1080i50ts h264 sample -> nothing despite BOB is doing anything, MADI / MACI does not deinterlace at all, but also does not produce green surfaces. See the "WARNING: A forward temporal reference is needed for Motion adaptive deinterlacing !!!"

tennis.ts: BOB, MADI are fine, MACI tells that it would do something - but in fact does nothing (might be not supported on IVB).

HSW:
Same as Rainer reported, tested on a core i5 4200U.
Comment 6 haihao 2014-06-05 13:12:10 UTC
(In reply to comment #5)
> So, to summarize that correctly:

IVB:
1080i50ts h264 sample -> nothing
> despite BOB is doing anything, MADI / MACI does not deinterlace at all, but
> also does not produce green surfaces. See the "WARNING: A forward temporal
> reference is needed for Motion adaptive deinterlacing !!!"

Seems it is gst vaapi issue.

tennis.ts: BOB,
> MADI are fine, MACI tells that it would do something - but in fact does
> nothing (might be not supported on IVB).

MACI isn't supported on IVB.

HSW:
Same as Rainer reported,
> tested on a core i5 4200U.
Comment 7 Peter Frühberger 2014-06-05 13:25:38 UTC
Is there any software, library out there that has VPP succesfully imlemented on HSW, that proofs the driver is working correctly on real world data?
Comment 8 haihao 2014-06-05 13:31:09 UTC
(In reply to comment #7)
> Is there any software, library out there that has VPP succesfully imlemented
> on HSW, that proofs the driver is working correctly on real world data?

As Rainer said 576i works without the warning message
Comment 9 Rainer Hochecker 2014-06-05 13:35:21 UTC
(In reply to comment #8)
> (In reply to comment #7)
> > Is there any software, library out there that has VPP succesfully imlemented
> > on HSW, that proofs the driver is working correctly on real world data?
> 
> As Rainer said 576i works without the warning message

That was mpeg2. h264 fails on every size.
Comment 10 haihao 2014-06-05 13:51:00 UTC
VPP doesn't know where the frame comes from :)
Comment 11 Peter Frühberger 2014-06-05 13:57:42 UTC
That we hope so.

From what I see, the driver goes in "no don't hurt me"-mode after it gets one time an empty reference list, which can easily happen when the material has a semi broken frame. It can easily happen, when processing real world data like live tv and so on.

As we are currently developing VPP for xbmc - do you have a sample that is known to be working?
Comment 12 haihao 2014-06-05 14:35:45 UTC
I only checked MPEG-2 video too, I will try other H.264 samples
Comment 13 haihao 2014-06-05 14:40:52 UTC
(In reply to comment #11)
> That we hope so.

From what I see, the driver goes in "no don't hurt
> me"-mode after it gets one time an empty reference list, which can easily
> happen when the material has a semi broken frame. It can easily happen, when
> processing real world data like live tv and so on.

How about falling back to BobDI for this case ?


As we are currently
> developing VPP for xbmc - do you have a sample that is known to be working?
Comment 14 Peter Frühberger 2014-06-05 15:34:58 UTC
You could return a bobbed surface and warn as it is already done right now, but the driver should not disable MADI for the rest of the processing just handle that case gracefully. Also please no assert.

That missing reference might always occur when one fast forwards.

Let's see what Rainer says. He has implemented support for every video decoding API on this linux planet and can share how vdpau, obsolete xvba and also dxva on windows handle that case.
Comment 15 Rainer Hochecker 2014-06-05 18:43:58 UTC
(In reply to comment #14)
> You could return a bobbed surface and warn as it is already done right now,
> but the driver should not disable MADI for the rest of the processing just
> handle that case gracefully. Also please no assert.
> 
> That missing reference might always occur when one fast forwards.
> 
> Let's see what Rainer says. He has implemented support for every video
> decoding API on this linux planet and can share how vdpau, obsolete xvba and
> also dxva on windows handle that case.

I think falling back to bob is ok. The Windows driver for intel accepts one forward and one backward reference. None of those are mandatory.
Comment 16 Rainer Hochecker 2014-08-19 17:11:25 UTC
fixed by recent changes of Gwenole:
https://github.com/gbeauchesne/libva-intel-driver/commits/17.vpp.vebox
Comment 17 Gwenole Beauchesne 2014-08-19 17:16:55 UTC
(In reply to comment #16)
> fixed by recent changes of Gwenole:
> https://github.com/gbeauchesne/libva-intel-driver/commits/17.vpp.vebox

Well, I'd prefer to keep the bug open until the changes land the git master branch. :)
Comment 18 haihao 2015-11-23 16:36:11 UTC
Can you reproduce this issue with the latest driver? I remember all patches have been merged into master branch.
Comment 19 Rainer Hochecker 2015-11-23 16:55:06 UTC
all fine. this can be closed.
Comment 20 haihao 2015-11-24 05:05:51 UTC
Thanks for your confirmation, closed it as fixed


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.