[vlc-devel] [PATCH 00/14] filter cleaning v2

Steve Lhomme robux4 at ycbcr.xyz
Thu Jul 25 12:33:59 CEST 2019


As one of the key use of the video context will be through filters, we need to
clean the code a bit. Especially to have only a few places to look at when
changing how pictures are allocated. The video context will be needed for
GPU filters and the filter chain will have to know which goes with what.

This new set of patches also updates the filter API to allow filters to
allocate their own output pictures. The plan is to use an (expandable) pool for
each filter which its specific video format and video context.

The filter buffer callbacks (also called owners) are split between video/spu/audio.
In the end only the video callbacks are really used. Audio filters don't have
callbacks, SPU filters only have one owner and one allocator (it may change if
one day we filter SPUs with the GPU).

In the end filter output pictures are always allocated using filter_NewPicture().
That will be the main place when the video context and pool can be added.

Passing NULL callbacks is now allowed to use the default implementation and
simplify using filter/filter chains.

Steve Lhomme (14):
  filter_chain: only set the filter callbacks for video
  filter_chain: don't use a filter_owner_t for local-only variables
  filters: separate the filter owners by type
  filter_chain: only set the video owner for video filters
  filter_chain: use filter_NewPicture when getting pictures for the last
    filter
  filter: allow the owner not to provide a buffer callback
  ci filters: remove default buffer callback implementation
  image: remove default buffer callback implementation
  vout blend: remove default buffer callback implementation
  vout_subpictures: remove default buffer callback implementation
  filter: allow the filter to provide a callback to get output pictures
  filter_chain: add a default implementation for the video_allocator
  filters: allow the filter owner not to provide pictures
  filter_chain: use an empty callback owner for intermediate filters

 include/vlc_filter.h                 |  48 +++++++++---
 modules/hw/d3d11/d3d11_surface.c     |   6 +-
 modules/hw/d3d9/dxa9.c               |   6 +-
 modules/stream_out/mosaic_bridge.c   |   4 +-
 modules/stream_out/sdi/SDIStream.cpp |   2 +-
 modules/stream_out/transcode/video.c |   2 +-
 modules/video_chroma/chain.c         |   4 +-
 modules/video_filter/canvas.c        |   4 +-
 modules/video_filter/ci_filters.m    |  12 ---
 modules/video_filter/edgedetection.c |   4 +-
 src/audio_output/filters.c           |   4 +-
 src/misc/filter_chain.c              | 109 +++++++++++++++------------
 src/misc/image.c                     |  11 ---
 src/video_output/display.c           |   4 +-
 src/video_output/video_output.c      |  19 +----
 src/video_output/vout_subpictures.c  |  27 ++-----
 16 files changed, 130 insertions(+), 136 deletions(-)

-- 
2.17.1



More information about the vlc-devel mailing list