[vlc-devel] [PATCH 0/6] D3D11VA / D3D11 decoder pool sharing

Steve Lhomme robux4 at videolabs.io
Tue Oct 4 17:40:22 CEST 2016


Until now D3D11 was allocating decoder pictures when using direct rendering but
the buffers were not used by the decoder itself. This set of patches changes
that and attempt to get all the pictures it needs from the vout. If something
is wrong we fall back to the way it was working before or when the vout doesn't
provide the buffers.

With this change playing H264 or H265 drops the number of buffers allocated
from 48 to 28. For mobile or when playing 4K content, that's a significant
improvement.

The issue came from the data ffmpeg/libav provides to the D3D11VA decoder. The
buffer index was not matching the slice that's set in each output buffer,
resulting in frame displayed in weird order and possibly using an invalid index.
The relevant patches have been submitted to ffmpeg/libav.

This patchset also include https://patches.videolan.org/patch/14610/ and 
https://patches.videolan.org/patch/14611/ which are also improving the order in
which the buffers are used. There's also an updated version of
https://patches.videolan.org/patch/14615/

Steve Lhomme (6):
  directx_va: don't use the first index if it's refcounted
  directx_va: don't start the surface order at 0
  direct3d11: use multiple texture slices instead of multiples textures
  direct3d11: the large decoder pool is for d3d11va
  d3d11va: attempt to get the decoding buffer slices from the decoder
    pool
  contrib: ffmpeg/libav: fix the D3D11 slice index used by the decoder

 .../0001-d3d11va-use-the-proper-slice-index.patch  |  56 ++++++++
 ...d3d11va-use-the-proper-slice-index.patch.ffmpeg |  56 ++++++++
 contrib/src/ffmpeg/rules.mak                       |   2 +
 modules/codec/avcodec/d3d11va.c                    | 146 ++++++++++++++++-----
 modules/codec/avcodec/directx_va.c                 |   4 +-
 modules/video_chroma/d3d11_surface.c               |   1 +
 modules/video_output/win32/direct3d11.c            |  36 +++--
 7 files changed, 255 insertions(+), 46 deletions(-)
 create mode 100644 contrib/src/ffmpeg/0001-d3d11va-use-the-proper-slice-index.patch
 create mode 100644 contrib/src/ffmpeg/0001-d3d11va-use-the-proper-slice-index.patch.ffmpeg

-- 
2.8.2



More information about the vlc-devel mailing list