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 760995 - deinterlace: Do passthrough if downstream only supports interlaced
deinterlace: Do passthrough if downstream only supports interlaced
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-good
git master
Other Linux
: Normal enhancement
: 1.7.2
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-01-22 17:00 UTC by Vivia Nikolaidou
Modified: 2016-01-27 15:49 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch file (6.09 KB, patch)
2016-01-22 17:01 UTC, Vivia Nikolaidou
none Details | Review
deinterlace: Do passthrough in auto mode if downstream only supports interlaced (4.75 KB, patch)
2016-01-26 17:00 UTC, Sebastian Dröge (slomo)
none Details | Review
deinterlace: Do passthrough in auto mode if downstream only supports interlaced (4.73 KB, patch)
2016-01-26 17:10 UTC, Sebastian Dröge (slomo)
committed Details | Review

Description Vivia Nikolaidou 2016-01-22 17:00:50 UTC
If the following conditions are met:
1) upstream and downstream caps are compatible
2) upstream is interlaced
3) downstream doesn't support progressive mode
then deinterlace will just do passthrough instead of failing to link.

This is done with the following scenario in mind:

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace name=dein_src ! tee name=t ! deinterlace name=dein_file ! filesink t. ! deinterlace name=dein_desktop ! autovideosink
In this case, dein_src will do the deinterlacing. However,

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace name=dein_src ! tee name=t ! deinterlace name=dein_file ! filesink t. ! deinterlace name=dein_desktop ! autovideosink t. ! "video/x-raw,interlace-mode=interleaved" ! fakesink

In this case, caps auto-negotiation will make dein_file and dein_desktop do the deinterlacing, while dein_src will be passthrough.
Comment 1 Vivia Nikolaidou 2016-01-22 17:01:30 UTC
Created attachment 319564 [details] [review]
patch file
Comment 2 Sebastian Dröge (slomo) 2016-01-22 17:05:05 UTC
I'll merge this after https://bugzilla.gnome.org/show_bug.cgi?id=720388 and https://bugzilla.gnome.org/show_bug.cgi?id=760553 (the first is probably a duplicate of the second).

The patch might need to be updated afterwards, we'll see
Comment 3 Tim-Philipp Müller 2016-01-22 17:20:07 UTC
More unit tests for deinterlace negotiation would also be awesome :)
Comment 4 Sebastian Dröge (slomo) 2016-01-26 17:00:36 UTC
Created attachment 319768 [details] [review]
deinterlace: Do passthrough in auto mode if downstream only supports interlaced

If the following conditions are met:
1) upstream and downstream caps are compatible
2) upstream is interlaced
3) downstream doesn't support progressive mode
then deinterlace will just do passthrough instead of failing to link.

This is done with the following scenario in mind:

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
queue ! deinterlace name=dein_desktop ! autovideosink
In this case, dein_src will do the deinterlacing. However,

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
queue ! deinterlace name=dein_desktop ! autovideosink t. ! queue !
"video/x-raw,interlace-mode=interleaved" ! fakesink

In this case, caps auto-negotiation will make dein_file and dein_desktop do
the deinterlacing, while dein_src will be passthrough.
Comment 5 Sebastian Dröge (slomo) 2016-01-26 17:10:12 UTC
Created attachment 319772 [details] [review]
deinterlace: Do passthrough in auto mode if downstream only supports interlaced

If the following conditions are met:
1) upstream and downstream caps are compatible
2) upstream is interlaced
3) downstream doesn't support progressive mode
then deinterlace will just do passthrough instead of failing to link.

This is done with the following scenario in mind:

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
queue ! deinterlace name=dein_desktop ! autovideosink
In this case, dein_src will do the deinterlacing. However,

videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
queue ! deinterlace name=dein_desktop ! autovideosink t. ! queue !
"video/x-raw,interlace-mode=interleaved" ! fakesink

In this case, caps auto-negotiation will make dein_file and dein_desktop do
the deinterlacing, while dein_src will be passthrough.
Comment 6 Sebastian Dröge (slomo) 2016-01-27 15:48:02 UTC
commit 5d728b3ce5c63e747f3a9019304f18e2042dcc5e
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Wed Jan 27 16:43:22 2016 +0100

    deinterlace: Add negotiation unit tests for all 4 modes
    
    These now check the output caps based on the input caps and a following
    capsfilter and make sure the caps are exactly as expected.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760995
    https://bugzilla.gnome.org/show_bug.cgi?id=720388

commit bd27a1f30b4458f2edee53c76dd07fb35904b61d
Author: Vivia Nikolaidou <vivia@toolsonair.com>
Date:   Tue Jan 26 17:39:20 2016 +0100

    deinterlace: Do passthrough in auto mode if downstream only supports interlaced
    
    If the following conditions are met:
    1) upstream and downstream caps are compatible
    2) upstream is interlaced
    3) downstream doesn't support progressive mode
    then deinterlace will just do passthrough instead of failing to link.
    
    This is done with the following scenario in mind:
    
    videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
    name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
    queue ! deinterlace name=dein_desktop ! autovideosink
    In this case, dein_src will do the deinterlacing. However,
    
    videotestsrc ! "video/x-raw,interlace-mode=interleaved" ! deinterlace
    name=dein_src ! tee name=t ! queue ! deinterlace name=dein_file ! filesink t. !
    queue ! deinterlace name=dein_desktop ! autovideosink t. ! queue !
    "video/x-raw,interlace-mode=interleaved" ! fakesink
    
    In this case, caps auto-negotiation will make dein_file and dein_desktop do
    the deinterlacing, while dein_src will be passthrough.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=760995

commit 46735f8de94d7e5a21a37fef003196bff5755fe5
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Jan 26 18:05:51 2016 +0100

    deinterlace: Add mode=auto-strict
    
    In this mode we will passthrough all progressive caps but interlaced caps must be
    caps where we actually support deinterlacing.
    
    This is the only difference between auto and auto-strict, auto would
    passthrough all unsupported interlaced caps.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720388

commit 2e8d4e8c7a7c24af7301793d32b77f4ec5d2d75c
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Jan 26 17:50:30 2016 +0100

    deinterlace: Implement reconfiguration a bit better
    
    And e.g. consider reconfiguration caused by RECONFIGURE events too.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720388

commit 8c1c091439ee9c732a7c65905926d6b2216a5e5e
Author: Sebastian Dröge <sebastian@centricular.com>
Date:   Tue Jan 26 11:57:09 2016 +0100

    deinterlace: Rewrite caps negotiation
    
    Previously the result of the CAPS query and ACCEPT_CAPS depended on what kind
    of caps were last set, and e.g. if we last had interlaced caps or not. That's
    just broken.
    
    Also previously the handling of non-sysmem caps features was rather random and
    unusuable.
    
    Now the behaviour is the following, depending on the mode property:
    1) mode=disabled
      Completely do passthrough of everything
    2) mode=interlaced
      Only accept formats we can actually deinterlace, and accept interlaced
      and progressive content and always run the deinterlacer and output
      progressive content
    3) mode=auto (i.e. playbin)
      Accept all progressive formats as passthrough, accept all formats that we
      can deinterlace ourselves (which we do then), but also accept everything
      else for which we then just passthrough. In auto mode, deinterlacing is best
      effort: If we can, we deinterlace, if we can't we just output interlaced
      content.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=720388
    https://bugzilla.gnome.org/show_bug.cgi?id=760553