Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MADI on at least IVB and SNB assumes that reference surface is NV12, even when it's not (e.g. when feeding YUY2 surfaces from software to VPP) #17

Open
seanvk opened this issue Jan 29, 2017 · 0 comments
Assignees

Comments

@seanvk
Copy link
Contributor

seanvk commented Jan 29, 2017

migrated from Bugzilla #79377
status NEEDINFO severity normal in component intel for ---
Reported in version unspecified on platform x86-64 (AMD64)
Assigned to: PengChen

Original attachment names and IDs:

On 2014-05-28 16:43:30 +0000, Simon Farnsworth wrote:

With VA-API intel-driver 1.3.1 on IVB, or on SNB with the SNB MADI backport applied, I see issues when I upload YUY2 surfaces from a V4L2 capture card to VA-API for deinterlacing using gstreamer-vaapi version 0.5.8 with the patch from https://bugzilla.gnome.org/show_bug.cgi?id=726361 applied to enable me to force deinterlacing.

My pipeline looks like:

gst-launch-1.0 v4l2src ! vaapipostproc deinterlace-mode=interlaced deinterlace-method=motion-adaptive ! vaapisink

The problem is that the reference frame passed to hardware is still in YUY2 format, whereas the hardware is expecting NV12 format. I've come up with a very hacky patch which "fixes" the problem, which I'll attach to this bug.

On 2014-05-28 16:48:23 +0000, Simon Farnsworth wrote:

Created attachment 100041
Hacky patch that fixes the deinterlacing bug

This patch isn't suitable for applying to the source tree as-is. It puts in a special case for MADI, where the colour space conversion is applied to the reference frame, too.

Applying this "fixes" my issue with deinterlacing YUY2 surfaces, implying that it's about colour space of the reference frame.

On 2014-05-29 06:40:00 +0000, haihao wrote:

It would be better to fix this issue in gstreamer-vaapi, could you file a bug in gsteamer bugzilla to track the issue ?

On 2014-05-29 09:09:45 +0000, Simon Farnsworth wrote:

(In reply to comment # 2)

It would be better to fix this issue in gstreamer-vaapi, could you file a
bug in gsteamer bugzilla to track the issue ?

I'll file a bug there, too.

At a minimum, though, intel-driver needs to reject the reference surface if it's in the wrong format, just as it refuses to work without a reference surface. I'll cook up a quick patch to show what I mean.

On 2014-05-29 09:29:27 +0000, Simon Farnsworth wrote:

Created attachment 100098
Patch against staging to reject non-NV12 surfaces

This patch (against the staging branch) simply has intel-driver reject non-NV12 references on SNB and IVB, returning the same error code (different warning message) as it would if you asked for MADI without providing a reference surface.

I haven't gone deep enough into MCDI and MADI on HSW/BDW to work out whether they need a similar patch.

On 2014-05-29 09:37:04 +0000, Simon Farnsworth wrote:

https://bugzilla.gnome.org/show_bug.cgi?id=730925 filed for gstreamer-vaapi.

On 2014-08-19 05:53:21 +0000, Pengfei wrote:

the patch Patch against staging to reject non-NV12 surfaces has been sent to Libva libva-bounces@lists.freedesktop.org. and assign to you.

On 2014-08-19 05:57:21 +0000, Pengfei wrote:

the patch Patch against staging to reject non-NV12 surfaces has been sent to Libva libva-bounces@lists.freedesktop.org. and assign to you.

On 2014-09-12 11:22:41 +0000, Simon Farnsworth wrote:

I can't find the patch in my archive of the list. Could someone give me a pointer to it?

On 2015-11-23 16:27:46 +0000, haihao wrote:

Sorry for slow response. do you still experience this issue?

On 2016-01-12 02:54:01 +0000, Simon Farnsworth wrote:

(In reply to haihao from comment # 9)

Sorry for slow response. do you still experience this issue?

I've left ONELAN, and no longer have access to this hardware. You should be able to reproduce with the details in comment # 0 if it's still an issue on IVB or SNB.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants