[vlc-devel] [PATCH 0/8] Early DXVA creation
Steve Lhomme
robux4 at videolabs.io
Fri May 5 18:42:16 CEST 2017
On NVIDIA hardware the decoder crashes when too many textures are created for
the decoder. See #18261
And the number of textures depend on the number of threads used by libavcodec.
So it's working fine with 1 or 2 threads, but when there's more (either when
the user defines the value or it remains to 0 with a CPU that has many cores)
it just crashes when using hardware decoding.
But we don't need all these threads when we know we're going to use DXVA. So
I tried to find a solution to force the number of threads to 1 when DXVA is used.
To do this, I try to create the vout and the va module before actually creating
the libavcodec instance. It is based on the data from the input format, the same
that will be used to initialize the codec. It is not using the parameters
provided by libavcodec, since it's not created yet. If these values change
during playback we will be notified and use the usual vout+decoder
reconfiguring.
Steve Lhomme (8):
avcodec: video: move the hardware acceleration setup in a separate
function
avcodec: va: move the picture query in the va creation
avcodec: video: move call to lavc_GetVideoFormat() outside of
lavc_UpdateVideoFormat()
avcodec: video: move call to lavc_GetVideoFormat outside of
SetupHardwareFormat
avcodec: video: check the va chroma directly
avcodec: video: allow initializing the codec format when it's known
early
avcodec: video: move the profile/level setting closer to where it's
tested
avcodec: video: setup the hardware pipeline before ffmpeg_OpenCodec is
called on Win32
modules/codec/avcodec/va.c | 24 ++++--
modules/codec/avcodec/va.h | 7 +-
modules/codec/avcodec/video.c | 184 +++++++++++++++++++++++++++++-------------
3 files changed, 145 insertions(+), 70 deletions(-)
--
2.12.1
More information about the vlc-devel
mailing list