[vlc-devel] [PATCH 0/6] Reduce reliance on picture_t for Video Acceleration

Steve Lhomme robux4 at videolabs.io
Thu Oct 20 15:26:07 CEST 2016

Now that d3d11va pulls its buffers from the vout pool there is an issue with
the way the decoder pool is used. The decoder was also getting a picture_t
from that pool for each frame the decoder needs to output. That means using
2 picture_t for each reference the decoder keeps. The picture_t used to extract
a decoded frame was tied to the surface buffer used by the va, which in the
d3d11va case was also using a picture_t with its own allocated buffer.

This set of patches fixes this by only getting a picture_t to extract the
surface data just before extract is called. The decoders don't have to deal
with picture->context anymore but a pointer to their internal buffer structure.

The first patches are cleanups of the va code so that it's clearer which buffer
is the actual surface data and which is just use to understand the surface

Steve Lhomme (6):
  avcodec: remove unused parameter in va->release()
  codec: use macros to avoid confusion between data[0] and data[3] types
  codec: av_buffer_create() uses the raw buffer data not the high level
  avcodec: vlc_va_Get() mostly get the data[3] surface buffer
  avcodec: get the context of the data allocated outside of a picture_t
  avcodec: pull the decoder picture_t only when the va has a picture to

 modules/codec/avcodec/d3d11va.c    |  8 +++----
 modules/codec/avcodec/directx_va.c | 14 ++++-------
 modules/codec/avcodec/directx_va.h |  4 ++--
 modules/codec/avcodec/dxva2.c      |  8 +++----
 modules/codec/avcodec/va.h         | 25 ++++++++++----------
 modules/codec/avcodec/vaapi.c      | 16 +++++--------
 modules/codec/avcodec/vda.c        | 16 ++++---------
 modules/codec/avcodec/video.c      | 48 +++++++++++++++++++-------------------
 modules/hw/vdpau/avcodec.c         |  8 +++----
 9 files changed, 65 insertions(+), 82 deletions(-)


More information about the vlc-devel mailing list