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 793678 - vaapipostproc: if dmabuf then disable deinterlace
vaapipostproc: if dmabuf then disable deinterlace
Status: RESOLVED OBSOLETE
Product: GStreamer
Classification: Platform
Component: gstreamer-vaapi
unspecified
Other All
: Normal normal
: git master
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 797278 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2018-02-20 22:56 UTC by Víctor Manuel Jáquez Leal
Modified: 2018-11-03 15:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
vaapipostproc: if dmabuf then disable deinterlace (9.33 KB, patch)
2018-02-20 22:56 UTC, Víctor Manuel Jáquez Leal
none Details | Review

Description Víctor Manuel Jáquez Leal 2018-02-20 22:56:18 UTC
dmabuf can contain interlaced content, but, as far as I understand, the sink
should have the mechanism to deinterlace dmabuf-based buffers. For example, 
when using EGL_EXT_image_dma_buf_import[1], two EGLImages should be generated
from one dmabuf-based buffer.

1. https://www.khronos.org/registry/EGL/extensions/EXT/EGL_EXT_image_dma_buf_import.txt
Comment 1 Víctor Manuel Jáquez Leal 2018-02-20 22:56:23 UTC
Created attachment 368683 [details] [review]
vaapipostproc: if dmabuf then disable deinterlace

When dmabuf-based buffers are pushed downstream, vaapipostproc should
not deinterlace, that's is reponsibility of the video sink.

For example, glimagesink should import the dmabuf into two EGLImages.
Comment 2 Nicolas Dufresne (ndufresne) 2018-02-20 23:48:12 UTC
Review of attachment 368683 [details] [review]:

Where is the glimagesink patch to support that ? Importing into seperate EGLImage does not magically deinterlace. You still have half a frame/plane in each EGL Image and need to do something if you are rendering to a progressive display.
Comment 3 Víctor Manuel Jáquez Leal 2018-02-21 16:45:06 UTC
(In reply to Nicolas Dufresne (stormer) from comment #2)
> Review of attachment 368683 [details] [review] [review]:
> 
> Where is the glimagesink patch to support that ? 

It is a missing part indeed.

> Importing into seperate
> EGLImage does not magically deinterlace. You still have half a frame/plane
> in each EGL Image and need to do something if you are rendering to a
> progressive display.

Agreed.

Rethinking the issue, I guess this is a bad option to "hide" a problem with interlaced streams with dmabuf: in-between black frames.

My options:

1\ keep this and add code in glupload for deinterlacing dmabuf (??)
2\ a bug in vaapi-intel-driver VPP and it could export non-black dmabuf-based frames when deinterlacing
3\ another workaround: if deinterlacing ignore dmabuf-buf negotiation
Comment 4 Nicolas Dufresne (ndufresne) 2018-02-21 17:34:36 UTC
Ok, so I missed that vaapi-intel-driver bug, so it's trying to workaround it. I just checked, and we have gldeinterlace, maybe we just need to test ?
Comment 5 Julien Isorce 2018-02-21 23:20:20 UTC
Does vaapivideodec push A) the 2 parts (interlaced) of an image as 1 gstbuffer (so to 2 gstmemory with each one a dmabuf) or B) 2 separate gstbuffers (the 2 parts of one image are delivered on after another) ?
Because gldeinterlace currently works with the B) case (it always keeps a ref on the previous buffer, see https://cgit.freedesktop.org/gstreamer/gst-plugins-base/tree/ext/gl/gstgldeinterlace.c#n491) but it should not be too hard to make it compatible with the A) case.
Comment 6 Víctor Manuel Jáquez Leal 2018-10-12 13:16:07 UTC
*** Bug 797278 has been marked as a duplicate of this bug. ***
Comment 7 Soon, Thean Siew 2018-10-15 03:07:14 UTC
Based on the discussion here, can I say that flickering issue for deinterlacing is basically due to a bug in vaapi-intel-driver or media driver, where it would export black dmabuf-based frames and displayed directly by glimagesink on screen?
Comment 8 Víctor Manuel Jáquez Leal 2018-10-15 14:11:15 UTC
(In reply to Soon, Thean Siew from comment #7)
> Based on the discussion here, can I say that flickering issue for
> deinterlacing is basically due to a bug in vaapi-intel-driver or media
> driver, where it would export black dmabuf-based frames and displayed
> directly by glimagesink on screen?

Yes, it might be a problem in the driver: when the VPP deinterlace, when requesting the second frame from the second field, the dmabuf contains a black frame, and that's the reason of the flickering when dmabuf is negotiated with interlaced media.
Comment 9 GStreamer system administrator 2018-11-03 15:53:05 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/83.