[vlc-devel] [PATCH 00/13] Full hardware encoding support
Steve Lhomme
robux4 at ycbcr.xyz
Mon Dec 23 16:49:24 CET 2019
This patchset adds support for the decoder device to use when transcoding.
The same decoder device can be used by the decoder and the encoder to provide
GPU decoding to GPU encoding.
An example of (unfinished) QSV encoder is provided that supports getting D3D11
textures to encode using the D3D11 engine. It was tested with the following
command line:
--sout=#transcode{venc=qsv{gop-size=250,gop-refdist=1,num-slice=0,num-ref-frame=0,target-usage=balanced,rc-method=qp,qpi=2,qpb=5,qpp=3,async-depth=4},vcodec=h264}:file{dst=gpu.mkv,mux=avformat}
It may not compile properly on Linux (yet). The D3D11 specific code should probably
be moved in its own file.
You can find all those patches in this branch:
https://code.videolan.org/robUx4/vlc/tree/push/sout/2
Steve Lhomme (13):
transcode: create the actual encoder outside of
transcode_encoder_new()
sout: provide the structure size to allocate for the encoder
transcode: create the test encoder outside of the test function
encoder: add a function to get the decoder device to use with the
encoder
transcode: provide the decoder device to use with the encoder
sout: transcode: simplify code
sout: transcode: the fmt_input_video is always the video part of
decoder_out
sout: transcode: remove unused parameters
sout: transcode: keep track of the decoder video context
transcode: clean the decoder output format before using it as the
encoder input
encoder: provide a video context to match the input format
sout: transcode: set the decoder video context in the encoder
WIP qsv: add support for encoding from D3D11 source textures
include/vlc_codec.h | 23 ++
include/vlc_sout.h | 4 +-
modules/codec/Makefile.am | 1 +
modules/codec/qsv.c | 377 +++++++++++++++++-
modules/stream_out/transcode/audio.c | 4 +-
modules/stream_out/transcode/encoder/audio.c | 8 +-
.../stream_out/transcode/encoder/encoder.c | 27 +-
.../stream_out/transcode/encoder/encoder.h | 11 +-
.../transcode/encoder/encoder_priv.h | 4 +-
modules/stream_out/transcode/encoder/video.c | 37 +-
modules/stream_out/transcode/spu.c | 2 +-
modules/stream_out/transcode/transcode.c | 5 +-
modules/stream_out/transcode/transcode.h | 12 +-
modules/stream_out/transcode/video.c | 108 +++--
src/input/decoder_helpers.c | 11 +
src/libvlccore.sym | 1 +
src/misc/image.c | 2 +-
src/missing.c | 2 +-
src/stream_output/stream_output.c | 5 +-
19 files changed, 537 insertions(+), 107 deletions(-)
--
2.17.1
More information about the vlc-devel
mailing list