[vlc-devel] [PATCH 0/2] copy and vaapi enhancement

Jean-Yves Avenard jyavenard at gmail.com
Sun Jun 15 12:04:36 CEST 2014

This is a correction to my earlier attempt.
As pointed out to me by JB, while the CopyFromNV12 I submitted was significantly faster when working on standard memory, it caused a severe regression when copying from Uncacheable Speculative Write Combining (USWC).

So this is another attempt at improving the existing copy. The improvements are very minors however, yet they do exist.

Patch 0002, is more interesting. It causes the YV12 format to be preferred over NV12 when using VAAPI, the gains are significant here.

There's room for further improvements with using VAAPI in the copy routine. What I've found is that vaGetImage doesn't return memory from USWC, and is "standard" memory. As such, the standard memcpy is actually faster. As I can't guarantee this behaviour to be identical across all VAAPI driver backend, it may not be a safe conclusion to make.

*** BLURB HERE ***

Jean-Yves Avenard (2):
  copy: minor speed enhancement to USWC copy
  vaapi: prefer vaGetImage over vaDeriveImage under most circumstances.

 modules/codec/avcodec/vaapi.c | 27 +++++++++++++++++++++++++++
 modules/video_chroma/copy.c   | 41 +++++++++++++++++++++++------------------
 2 files changed, 50 insertions(+), 18 deletions(-)


More information about the vlc-devel mailing list