[vlc-devel] [PATCH 00/19] Add draining support to filters

Steve Lhomme robux4 at ycbcr.xyz
Tue Oct 13 15:51:43 CEST 2020


In order to avoid filters processing multiple outputs in one call and attaching
the result to the main picture, we can handle a filter drain.

The main picture is output from the first call. Then filters or filter chains
are drained until they produce no output. Then a new input picture can be fed 
to filter (chains) and so on.

It's no longer possible to call filter chain with a NULL picture. The filter
chains also don't keep the "chained pictures" since filters don't produced 
chained pictures anymore. After this patchset we can remove:
- vlc_picture_chain_AppendChain()
- picture_GetAndResetChain()

This patchset sits on top of
* fps: implement Flush callback
* vdpau/deinterlace: implement flushing

Steve Lhomme (19):
  filter: add a drain callback for video filters
  d3d11_surface: make sure the converter doesn't expect draining calls
  dxa9: make sure the converter doesn't expect draining calls
  vout_subpictures: make sure the scaler/converter doesn't expect
    draining calls
  ci_filters: make sure converters doesn't expect draining calls
  image: make sure the converter doesn't expect draining calls
  fps: implement draining of extra pictures
  deinterlace: implement draining of extra pictures
  vaapi: implement draining of extra pictures in x2 deinterlacer
  vdpau: implement draining of extra pictures in deinterlacer
  mmal/deinterlace: implement draining of extra pictures in deinterlacer
  transcode: video: don't drain the secondary filters
  transcode: video: reindent code
  filter_chain: separate the picture filtering from filter draining
  filters: drain filter chains after the regular picture filtering
  filters: drain internal filter chains when draining
  transcode: video: drain all filter chains sequentially until they're
    dry
  filter_chain: do not drain pictures inside filter_chain_VideoFilter()
  filter_chain: rework filter_chain_VideoDrain()

 include/vlc_filter.h                          |  25 ++-
 modules/hw/d3d11/d3d11_deinterlace.c          |  12 ++
 modules/hw/d3d11/d3d11_surface.c              |   3 +
 modules/hw/d3d9/dxa9.c                        |   3 +
 modules/hw/d3d9/dxva2_deinterlace.c           |   7 +
 modules/hw/mmal/deinterlace.c                 |  35 ++--
 modules/hw/vaapi/filters.c                    | 100 ++++++++----
 modules/hw/vdpau/deinterlace.c                |  62 ++++---
 modules/stream_out/mosaic_bridge.c            |  13 ++
 modules/stream_out/sdi/SDIStream.cpp          |  12 +-
 modules/stream_out/transcode/video.c          |  49 +++---
 modules/video_chroma/chain.c                  |   9 +-
 modules/video_chroma/cvpx.c                   |   7 +
 modules/video_filter/canvas.c                 |   8 +-
 modules/video_filter/ci_filters.m             |   2 +
 modules/video_filter/deinterlace/common.c     | 152 +++++++++---------
 modules/video_filter/deinterlace/common.h     |   5 +
 .../video_filter/deinterlace/deinterlace.c    |   7 +
 modules/video_filter/edgedetection.c          |  27 +++-
 modules/video_filter/fps.c                    |  22 +--
 src/libvlccore.sym                            |   1 +
 src/misc/filter_chain.c                       |  47 +++---
 src/misc/image.c                              |   2 +
 src/video_output/video_output.c               |   2 +-
 src/video_output/vout_subpictures.c           |   2 +
 25 files changed, 400 insertions(+), 214 deletions(-)

-- 
2.26.2



More information about the vlc-devel mailing list