[vlc-devel] [PATCH 00/23] add video context to filters (v2)
Steve Lhomme
robux4 at ycbcr.xyz
Thu Nov 7 10:31:13 CET 2019
Changes since v1:
- added D3D9/D3D11 deinterlace use of the vctx on input and output
- use the input vctx in the NVDEC GPU to CPU filter
- add VLC_USED to the inline picture_NewFromFormat()
- reorder some patches
- add documentation to vlc_video_context_IsSimilar()
- fix crash when the vctx doesn't have "operations" callbacks (nvdec)
- less variable renaming
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 patchet 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).
The patches of this set can be found in this branch:
https://code.videolan.org/robUx4/vlc/tree/push/merge/63
Steve Lhomme (23):
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
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: only update the current format if filters were added in
the chain
video output: rename the filters input format with a less generic name
video_output: pass the input video context with the source format
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
display: keep the video context to feed the converter 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
transcode: pass the input video context when creating filters
chroma: chain: set the output vctx from the internal filter chain
output vctx
nvdec: don't keep the decoder_device_nvdec_t in the picture context
dxva2_deinterlace: init the IDirect3DDevice9 from the video context
d3d11_deinterlace: only create the module with a valid input video
context
include/vlc_filter.h | 23 +++++-
include/vlc_picture.h | 25 ++++++-
include/vlc_picture_pool.h | 2 +
modules/codec/qsv.c | 2 +-
modules/codec/vt_utils.c | 2 +-
modules/hw/d3d11/d3d11_deinterlace.c | 43 ++++++-----
modules/hw/d3d11/d3d11_surface.c | 2 +-
modules/hw/d3d9/dxa9.c | 2 +-
modules/hw/d3d9/dxva2_deinterlace.c | 25 +++++--
modules/hw/mmal/vout.c | 2 +-
modules/hw/nvdec/chroma.c | 21 +++++-
modules/hw/nvdec/nvdec.c | 5 +-
modules/hw/nvdec/nvdec_fmt.h | 3 -
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 | 61 +++++++++------
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 | 16 ++++
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 | 74 ++++++++++++++-----
src/video_output/vout_internal.h | 3 +-
src/video_output/vout_wrapper.c | 2 +-
47 files changed, 380 insertions(+), 162 deletions(-)
--
2.17.1
More information about the vlc-devel
mailing list