GNOME Bugzilla – Bug 760995
deinterlace: Do passthrough if downstream only supports interlaced
Last modified: 2016-01-27 15:49:20 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.
Created attachment 319564 [details] [review] patch file
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
More unit tests for deinterlace negotiation would also be awesome :)
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.
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.
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