[vlc-devel] [PATCH 00/17] DXVA cleaning

Steve Lhomme robux4 at videolabs.io
Tue Jun 20 17:45:32 CEST 2017


Misc patches to clean the code of DXVA which is a bit messy.

Part of the generic code has been split to use a new va_pool and va_surface
items. These elements can be reused as-is in VAAPI and VDPAU. They share code
from both.

After more cleaning it is clear that release() and extract() callbacks are not
needed anymore, now that get() fill the picture context with its own lifecycle.

The deprecated setup() callback is not needed anymore either as the DXVA
modules only output opaque formats.

Steve Lhomme (17):
  direct3d11: remove dead code
  directx_va: release the d3ddev in pf_destroy_device()
  directx_va: do the d3ddec release in pf_destroy_video_service()
  dxva: split the directx related parts from the pool/va parts
  dxva2: move the device check in dxva since it's the only one that
    supports it
  directx_va: remove unused parameter
  va_surface: remove the unused decoderSurface
  directx_va: don't pass the AVCodecContext and es_format_t to
    directx_va_Open
  d3d11va: it's safe to load/unload d3d11.dll even in direct rendering
  directx_va: make va_pic_context public via va_surface.h
  directx_va: the context copy is responsible for the va_surface
    refcount increment
  directx_va: move the pre-allocated hw_surface in directx_va
  dxva: we don't need a special release or Extract callback
  va: remove vlc_va_Release() and vlc_va_Extract()
  va_surface: release the surfaces held locally in DestroyVideoDecoder()
  d3d11_fmt: don't nullify after a release
  va: remove the deprecated setup() callback

 modules/codec/Makefile.am                   |   2 +
 modules/codec/avcodec/d3d11va.c             | 219 +++++++++++-----------------
 modules/codec/avcodec/directx_va.c          | 182 +++--------------------
 modules/codec/avcodec/directx_va.h          |  56 +------
 modules/codec/avcodec/dxva2.c               | 171 +++++++++-------------
 modules/codec/avcodec/va.c                  |  13 --
 modules/codec/avcodec/va.h                  |  40 +----
 modules/codec/avcodec/va_surface.c          | 204 ++++++++++++++++++++++++++
 modules/codec/avcodec/va_surface.h          |  40 +++++
 modules/codec/avcodec/va_surface_internal.h |  96 ++++++++++++
 modules/codec/avcodec/vaapi.c               |  10 --
 modules/codec/avcodec/video.c               |  10 +-
 modules/hw/vdpau/avcodec.c                  |   8 -
 modules/video_chroma/d3d11_fmt.h            |  30 +---
 modules/video_chroma/d3d9_fmt.h             |  10 +-
 modules/video_output/win32/direct3d11.c     |  17 ---
 16 files changed, 533 insertions(+), 575 deletions(-)
 create mode 100644 modules/codec/avcodec/va_surface.c
 create mode 100644 modules/codec/avcodec/va_surface.h
 create mode 100644 modules/codec/avcodec/va_surface_internal.h

-- 
2.12.1



More information about the vlc-devel mailing list