[vlc-devel] [PATCH 00/19] add video context to filters (v1)

Steve Lhomme robux4 at ycbcr.xyz
Tue Nov 5 16:18:27 CET 2019


This patchset adds video context handling to filters.

The video context coming from the decoder is added to the filter chain
and each filter can create a video context on output if it outputs GPU surfaces.
This is not automatic.

Pictures also store a video context (via the picture pool).

A video context can be compared to another to detect changes in the source.
(like for video format)

This patchset doesn't have examples of filters setting an output video context.
This will come later.
It also doesn't apply directly on master but on top of previously submitted
patches to provide a decoder device to decoders in all use cases (or NULL).

These patches of this set can be found in this branch:
https://code.videolan.org/robUx4/vlc/tree/push/merge/60

Steve Lhomme (19):
  video output: only update the current format if filters were added in
    the chain
  picture: add a video context to the picture
  picture_pool: add a video context to the pictures in the pool
  video context: add a function to test if 2 context are similar
  display: keep the video context to feed the converter locally
  d3d11: add a video context similarity check callback
  d3d9: add a video context similarity check callback
  avcodec: vdpau: add a video context similarity check callback
  video output: rename the filters input format with a less generic name
  video_output: pass the input video context with the source format
  video output: rename fmt_target to fmt_input
  filter_chain: clarify how allowing output format chain works
  filter_chain: no need to reset the fmt_out each time a filter is added
  filter_chain: rename the chain output format
  filters: set the input/output video context on video filters
  sout: sdi: keep the decoder video context locally
  filter_chain: keep the input video context
  filter: add function to get the output video context
  video output: pass the input video context when creating filters

 include/vlc_filter.h                          | 23 +++++-
 include/vlc_picture.h                         | 15 +++-
 include/vlc_picture_pool.h                    |  2 +
 modules/codec/qsv.c                           |  2 +-
 modules/codec/vt_utils.c                      |  2 +-
 modules/hw/d3d11/d3d11_surface.c              |  2 +-
 modules/hw/d3d9/dxa9.c                        |  2 +-
 modules/hw/mmal/vout.c                        |  2 +-
 modules/hw/nvdec/nvdec.c                      |  2 +-
 modules/hw/vaapi/vlc_vaapi.c                  |  2 +-
 modules/hw/vdpau/avcodec.c                    |  9 ++-
 modules/hw/vdpau/picture.c                    |  2 +-
 modules/stream_out/mosaic_bridge.c            |  8 +-
 modules/stream_out/sdi/SDIStream.cpp          | 18 ++++-
 modules/stream_out/sdi/SDIStream.hpp          |  2 +-
 modules/stream_out/transcode/video.c          | 24 +++---
 modules/video_chroma/chain.c                  | 46 ++++++-----
 modules/video_chroma/copy.c                   |  2 +-
 modules/video_chroma/d3d11_fmt.c              |  2 +-
 modules/video_chroma/d3d11_fmt.h              |  7 ++
 modules/video_chroma/d3d9_fmt.c               |  2 +-
 modules/video_chroma/d3d9_fmt.h               |  7 ++
 modules/video_filter/canvas.c                 |  4 +-
 modules/video_filter/edgedetection.c          |  2 +-
 modules/video_output/android/display.c        |  2 +-
 modules/video_output/fb.c                     |  2 +-
 modules/video_output/kms.c                    |  2 +-
 .../video_output/opengl/converter_android.c   |  2 +-
 modules/video_output/opengl/converter_sw.c    |  2 +-
 modules/video_output/vmem.c                   |  2 +-
 modules/video_output/win32/direct3d11.c       |  4 +-
 modules/video_output/win32/direct3d9.c        |  2 +-
 src/input/decoder.c                           |  1 +
 src/input/decoder_helpers.c                   | 11 +++
 src/libvlccore.sym                            |  4 +-
 src/misc/filter_chain.c                       | 71 ++++++++++------
 src/misc/picture.c                            | 18 ++++-
 src/misc/picture_pool.c                       |  5 +-
 src/test/picture_pool.c                       |  4 +-
 src/video_output/display.c                    | 17 +++-
 src/video_output/video_output.c               | 80 ++++++++++++++-----
 src/video_output/vout_internal.h              |  3 +-
 src/video_output/vout_wrapper.c               |  2 +-
 43 files changed, 295 insertions(+), 128 deletions(-)

-- 
2.17.1



More information about the vlc-devel mailing list