[vlc-devel] [PATCH] fps: clone the extra pictures we send

Alexandre Janniaux ajanni at videolabs.io
Tue Oct 6 15:25:37 CEST 2020


Hi,

On Tue, Oct 06, 2020 at 02:08:35PM +0200, Steve Lhomme wrote:
> On 2020-10-06 13:53, Steve Lhomme wrote:
> > The same picture is supposed to be filtered or rendered at a different date,
> > but the source pixels should be the same. The content is not going to be
> > changed in the pictures we output from this filter. Even blenders take care
> > of this in their source picture to avoid modifying pictures used by the decoder
> > as reference frames.
>
> It means we can use the fps even for GPU sources. Right now there is no
> check on the source but will in fact fail and maybe even crash.
>
> Note that this is a case where the fps is bigger than the source. It's
> probably not common but it can be used to test display modules capabilities.

Just for information, in the use case I'm working on, it's actually the
most common case (~90% of time) and with GPU buffers.

Regards,
--
Alexandre Janniaux
Videolabs

> > ---
> >   modules/video_filter/fps.c | 5 +----
> >   1 file changed, 1 insertion(+), 4 deletions(-)
> >
> > diff --git a/modules/video_filter/fps.c b/modules/video_filter/fps.c
> > index 312e0eba91b..2d5d32b1013 100644
> > --- a/modules/video_filter/fps.c
> > +++ b/modules/video_filter/fps.c
> > @@ -118,10 +118,7 @@ static picture_t *Filter( filter_t *p_filter, picture_t *p_picture)
> >           should be avoided, it's only here as filter should work in that direction too*/
> >       while( unlikely( (date_Get( &p_sys->next_output_pts ) + p_sys->i_output_frame_interval ) < p_picture->date ) )
> >       {
> > -        picture_t *p_tmp = NULL;
> > -        p_tmp = picture_NewFromFormat( &p_filter->fmt_out.video );
> > -
> > -        picture_Copy( p_tmp, p_sys->p_previous_pic);
> > +        picture_t *p_tmp = picture_Clone( p_sys->p_previous_pic );
> >           p_tmp->date = date_Get( &p_sys->next_output_pts );
> >           vlc_picture_chain_Append( &chain, p_tmp );
> > --
> > 2.26.2
> >
> > _______________________________________________
> > vlc-devel mailing list
> > To unsubscribe or modify your subscription options:
> > https://mailman.videolan.org/listinfo/vlc-devel
> >
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel


More information about the vlc-devel mailing list