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 547603 - [playbin2] add deinterlacing support
[playbin2] add deinterlacing support
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal enhancement
: 0.10.30
Assigned To: Sebastian Dröge (slomo)
GStreamer Maintainers
: 515961 (view as bug list)
Depends on: 605231
Blocks: 491627
 
 
Reported: 2008-08-13 13:30 UTC by Bastien Nocera
Modified: 2010-04-29 17:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Adds deinterlace to video chain (7.83 KB, patch)
2009-12-24 02:09 UTC, Thiago Sousa Santos
reviewed Details | Review
add enable-deinterlace property to playbin2 (1.72 KB, patch)
2009-12-24 19:42 UTC, Robin Stocker
reviewed Details | Review

Description Bastien Nocera 2008-08-13 13:30:22 UTC
Playbin2 should have deinterlacer support so Totem can enable/disable it easily.
Comment 1 Bastien Nocera 2009-12-22 15:27:50 UTC
*** Bug 515961 has been marked as a duplicate of this bug. ***
Comment 2 Thiago Sousa Santos 2009-12-24 02:09:46 UTC
Created attachment 150332 [details] [review]
Adds deinterlace to video chain

After we get #605231 done, we can push this patch for always adding deinterlace to playsink and exporting its enabling/disabling through a property. This patch doesn't proxy it to playbin2, we need another one for it, should be trivial. I'll write once #605231 is solved.
Comment 3 Robin Stocker 2009-12-24 19:42:53 UTC
Created attachment 150358 [details] [review]
add enable-deinterlace property to playbin2

This also adds the property to playbin2.
Comment 4 Sebastian Dröge (slomo) 2009-12-26 07:43:01 UTC
Shouldn't you add another ffmpegcolorspace just before deinterlace, in case it doesn't support the color format?
Comment 5 Thiago Sousa Santos 2010-01-06 16:25:58 UTC
I think the idea here is to make deinterlace act as a passthrough for all those cases to avoid adding a ffmpegcolorspace.
Comment 6 Sebastian Dröge (slomo) 2010-01-06 19:28:06 UTC
So for all unsupported color formats by deinterlace, no deinterlacing would be done? IMHO it would make more sense to add support for all common formats and for all others do conversion.
Comment 7 Tim-Philipp Müller 2010-01-06 19:47:37 UTC
> I think the idea here is to make deinterlace act as a passthrough for all those
> cases to avoid adding a ffmpegcolorspace.

The reason to make deinterlace act as passthrough for all those unsupported formats is not to avoid plugging an ffmpegcolorspace in front (we still need that for the case where deinterlacing is done, as only one or two formats are supported by deinterlace), but to avoid doing two unnecessary colourspace conversions (before and after deinterlace) when no deinterlacing is needed/wanted. (I guess this depends a bit on whether the plan is to plug it conditionally or not, and whether we want to support disabling/enabling interlacing during playback, which I think we should).
Comment 8 Thiago Sousa Santos 2010-01-07 01:46:38 UTC
hm... got it now.

There will be the following cases for the caps handling:

1) video is not interlaced -> passthrough

2) video is interlaced and downstream accepts it -> passthrough

3) video is interlaced and downstream doesn't accept it

 3.1) The deinterlacing of the format is supported -> deinterlace
 3.2) The deinterlacing of the format is unsupported -> reject


For 3.2, the upstream ffmpegcolorspace would make the conversion to a format with a supported colorspace conversion.


Is this it?
Comment 9 Thiago Sousa Santos 2010-01-07 01:47:03 UTC
(In reply to comment #8)
> hm... got it now.
> 
> There will be the following cases for the caps handling:
> 
> 1) video is not interlaced -> passthrough
> 
> 2) video is interlaced and downstream accepts it -> passthrough
> 
> 3) video is interlaced and downstream doesn't accept it
> 
>  3.1) The deinterlacing of the format is supported -> deinterlace
>  3.2) The deinterlacing of the format is unsupported -> reject
> 
> 
> For 3.2, the upstream ffmpegcolorspace would make the conversion to a format
> with a supported colorspace *deinterlacing*.
> 
> 
> Is this it?

Edited something.
Comment 10 Bastien Nocera 2010-04-01 08:11:30 UTC
Does anything else need to be done here? Would be nice to get the code into GNOME 2.31 ASAP.
Comment 11 Sebastian Dröge (slomo) 2010-04-02 17:01:06 UTC
(In reply to comment #10)
> Does anything else need to be done here? Would be nice to get the code into
> GNOME 2.31 ASAP.

deinterlace still needs support for more color formats before this can get commited IMHO. I should really work on this soon...
Comment 12 Sebastian Dröge (slomo) 2010-04-26 15:29:51 UTC
Ok, I implemented this locally a bit different by adding a new flag and putting ffmpegcolorspace before the deinterlacer and putting it right after the decoder before subtitles and scaling and all that. I'll push this after next release and after fixing some remaining issues.
Comment 13 Benjamin Otte (Company) 2010-04-26 15:58:16 UTC
Question (from someone without any playbin knowledge): When gst-plugins-cairo gets useful and we have plugins entirely in Cairo (ie decoder outputs video/x-cairo) will the deinterlacer be smart enough to handle this case? 
I'm asking because I'm not sure you're thinking about this potential future usecase and I had to hardcode a fix into playbin to use cairo converters instead of ffmpegcolorspace/videoscale already to get projectm working.
Comment 14 Sebastian Dröge (slomo) 2010-04-26 16:10:53 UTC
Well, that's the same problem as with videoscale, ffmpegcolorspace and textoverlay... and has nothing to do with this bug.

We need something generic in the future to prevent hardcoding of element names everywhere. cairoscale will probably not be the perfect scaling element that can be used in all situations either.

(But deinterlace might support video/x-cairo in the future, yes. But that's not a solution)
Comment 15 Sebastian Dröge (slomo) 2010-04-29 17:07:53 UTC
commit eec0f7c8766e55b3d9993b38df4ce2d45612938d
Author: Sebastian Dröge <sebastian.droege@collabora.co.uk>
Date:   Mon Apr 26 17:30:44 2010 +0200

    playsink: Add support for deinterlacing
    
    This is disabled by default and can be enabled with the
    deinterlace flag.
    
    Fixes bug #547603.