diff options
author | wm4 <wm4@nowhere> | 2017-01-18 08:17:29 +0100 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-01-18 08:17:29 +0100 |
commit | da8011c5df76ea79d939aaa4f6f4ddd927f51b5d (patch) | |
tree | c2bdb97a5999fa4e8244b33830ce1d39bc31a1dc /wscript | |
parent | 398e2d5d4278f89601cac0e031d3535cfc610df0 (diff) | |
download | mpv-da8011c5df76ea79d939aaa4f6f4ddd927f51b5d.tar.bz2 mpv-da8011c5df76ea79d939aaa4f6f4ddd927f51b5d.tar.xz |
vaapi: detect new API on FFmpeg too, and disable it by default
Since the only way to detect the API is by a version check, this had to
wait until the patches were actually pushed to FFmpeg git (which now
happened).
Since this does not include the new magic GPU memcpy libavutil function
yet, the new vaapi code would be slower if copy mode (like vaapi-copy)
is used. This would be quite bad to use by default, so check for the
function, and if not present, disable the new vaapi code. This
effectively disables it by default on FFmpeg.
(We assume that if the new GPU memcpy exists, vaapi's AVHWFramesContext
implementation will use it.)
Diffstat (limited to 'wscript')
-rw-r--r-- | wscript | 13 |
1 files changed, 11 insertions, 2 deletions
@@ -475,6 +475,12 @@ FFmpeg/Libav libraries. You need at least {0}. Aborting.".format(libav_versions_ 'func': check_statement('libavutil/frame.h', 'AV_FRAME_DATA_MASTERING_DISPLAY_METADATA', use='libav'), + }, { + 'name': 'avutil-imgcpy-uc', + 'desc': 'libavutil GPU memcpy for hardware decoding', + 'func': check_statement('libavutil/imgutils.h', + 'av_image_copy_uc_from(0,0,0,0,0,0,0)', + use='libav'), }, ] @@ -842,10 +848,13 @@ hwaccel_features = [ }, { 'name': '--vaapi-hwaccel-new', 'desc': 'libavcodec VAAPI hwaccel (new)', - 'deps': [ 'vaapi-hwaccel' ], + 'deps': [ 'vaapi-hwaccel', 'avutil-imgcpy-uc' ], 'func': check_statement('libavcodec/version.h', 'int x[(LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 26, 0) && ' - ' LIBAVCODEC_VERSION_MICRO < 100) ? 1 : -1]', + ' LIBAVCODEC_VERSION_MICRO < 100) ||' + ' (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 74, 100) && ' + ' LIBAVCODEC_VERSION_MICRO >= 100)' + ' ? 1 : -1]', use='libav'), }, { 'name': '--vaapi-hwaccel-old', |