[vlc-devel] [PATCH] transcode: video: fix filter drain

Alexandre Janniaux ajanni at videolabs.io
Mon Jul 20 18:39:16 CEST 2020


Hi,

Erratum, it already works correctly for the video output
pipeline, I didn't test correctly before writing the mail.

Regards,
--
Alexandre Janniaux
Videolabs

On Mon, Jul 20, 2020 at 06:03:35PM +0200, Alexandre Janniaux wrote:
> Hi,
>
> Note that the whole filtering pipeline could be improved by
> forcing filter_chain_VideoFilter to always return either
> zero or one picture, or at least for filters using GPU
> resources, and allow to drain as many time as there is an
> output picture.
>
> It would allow better control over the back pressure, in
> particular if filters are drained from the last one first
> instead of the first one.
>
> The issue is different in the video output pipeline, which
> doesn't seem to support this at all.
>
> Somehow refers #12155 although it is not the main topic of
> the ticket.
>
> Regards,
> --
> Alexandre Janniaux
> Videolabs
>
> On Mon, Jul 20, 2020 at 05:57:27PM +0200, Alexandre Janniaux wrote:
> > When filters like deinterlace are returning multiple pictures, forcing
> > the filtering of the second picture in a filter chain can be done by
> > calling filter_chain_VideoFilter with NULL.
> >
> > Without this, additional pictures are dropped instead of being filtered
> > and encoded.
> > ---
> >  modules/stream_out/transcode/video.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/modules/stream_out/transcode/video.c b/modules/stream_out/transcode/video.c
> > index 23fa505e358..f0214d16645 100644
> > --- a/modules/stream_out/transcode/video.c
> > +++ b/modules/stream_out/transcode/video.c
> > @@ -663,7 +663,7 @@ int transcode_video_process( sout_stream_t *p_stream, sout_stream_id_sys_t *id,
> >              filter_chain_t * primary_chains[] = { id->p_f_chain,
> >                                                    id->p_conv_nonstatic,
> >                                                    id->p_conv_static };
> > -            for( size_t i=0; p_in && i<ARRAY_SIZE(primary_chains); i++ )
> > +            for( size_t i=0; i<ARRAY_SIZE(primary_chains); i++ )
> >              {
> >                  if( !primary_chains[i] )
> >                      continue;
> > --
> > 2.27.0
> >
> _______________________________________________
> 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