summaryrefslogtreecommitdiffstats
path: root/wscript
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2017-03-23 11:06:28 +0100
committerwm4 <wm4@nowhere>2017-03-23 11:14:11 +0100
commita52a52fa6ec4265a2aeb39d775f46ebc928fe8c7 (patch)
tree2b1bf1963abecc291a35ef032f9be34e438b648a /wscript
parentb0cbda84ed923c8915642443b7cf5de5a2ba7b26 (diff)
downloadmpv-a52a52fa6ec4265a2aeb39d775f46ebc928fe8c7.tar.bz2
mpv-a52a52fa6ec4265a2aeb39d775f46ebc928fe8c7.tar.xz
vdpau: support new vdpau libavcodec decode API
The new API works like the new vaapi API, using generic hwaccel support. One minor detail is the error message that will be printed if using non-4:2:0 surfaces (which as far as I can tell is completely broken in the nVidia drivers and thus not supported by mpv). The HEVC warning (which is completely broken in the nVidia drivers but should work with Mesa) had to be added to the generic hwaccel code. This also trashes display preemption recovery. Fuck that. It never really worked. If someone complains, I might attempt to add it back somehow. This is the 4th iteration of the libavcodec vdpau API (after the separate decoder API, the manual hwaccel API, and the automatic vdpau hwaccel API). Fortunately, further iterations will be generic, and not require much vdpau-specific changes (if any at all).
Diffstat (limited to 'wscript')
-rw-r--r--wscript19
1 files changed, 18 insertions, 1 deletions
diff --git a/wscript b/wscript
index 318228cca2..098f53b131 100644
--- a/wscript
+++ b/wscript
@@ -832,10 +832,27 @@ hwaccel_features = [
'desc': 'Videotoolbox with OpenGL',
'deps': [ 'gl-cocoa', 'videotoolbox-hwaccel' ],
'func': check_true
- } , {
+ }, {
'name': '--vdpau-hwaccel',
'desc': 'libavcodec VDPAU hwaccel',
'deps': [ 'vdpau' ],
+ 'func': check_true,
+ }, {
+ 'name': '--vdpau-hwaccel-new',
+ 'desc': 'libavcodec VDPAU hwaccel (new)',
+ 'deps': [ 'vdpau-hwaccel' ],
+ 'func': check_statement('libavcodec/version.h',
+ 'int x[(LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 37, 1) && '
+ ' LIBAVCODEC_VERSION_MICRO < 100) ||'
+ ' (LIBAVCODEC_VERSION_INT >= AV_VERSION_INT(57, 85, 101) && '
+ ' LIBAVCODEC_VERSION_MICRO >= 100)'
+ ' ? 1 : -1]',
+ use='libav'),
+ }, {
+ 'name': '--vdpau-hwaccel-old',
+ 'desc': 'libavcodec VDPAU hwaccel (old)',
+ 'deps': [ 'vdpau' ],
+ 'deps_neg': [ 'vdpau-hwaccel-new' ],
'func': check_statement('libavcodec/vdpau.h',
'av_vdpau_bind_context(0,0,0,AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH)',
use='libav'),