[vlc-devel] [PATCH v2 09/20] deinterlace: implement draining of extra pictures

Steve Lhomme robux4 at ycbcr.xyz
Fri Oct 16 09:25:04 CEST 2020

On 2020-10-15 21:41, Romain Vimont wrote:
> On Wed, Oct 14, 2020 at 07:25:22PM +0300, Rémi Denis-Courmont wrote:
>> Le keskiviikkona 14. lokakuuta 2020, 15.39.09 EEST Steve Lhomme a écrit :
>>> Each filter using the common deinterlacing code now calls DoDrain (similar
>>> to DoDeinterlacing) to do its draining.
>> That does not sound like what is usually called draining, which means to
>> process all buffers *before* an end or a discontinuity.
> I agree, this is different from "draining" IMO (I made the same remark
> when we discussed about this mechanism with Alexandre few weeks ago).
> However, I think this is just a naming issue.
> The goal is to be able to produce several output pictures, but one at a
> time, so that the first picture could be sent to the vout before
> processing the second one. This solves real performance issues (as
> detailed by Alexandre [1]).
> [1] https://mailman.videolan.org/pipermail/vlc-devel/2020-October/139336.html
> Why not using filter(NULL) instead of a new callback?

That's a possibility. But IMO it involves changing *all* filters. Not 
just to add the parameter but to add the "if (!pic) return NULL" in all 
of them. That's extra code when we can do the same thing with an 
optional callback. And that callback gives more visibility to which 
filter actually produce more than one picture and why.

More information about the vlc-devel mailing list