diff options
author | wm4 <wm4@nowhere> | 2017-06-30 12:27:15 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2017-06-30 18:57:37 +0200 |
commit | dd408e68ed57fa5130bef976751e58a5d6e42f75 (patch) | |
tree | 7b47f293f3a07b318289ac277bcba6c588f0e586 /video/decode/d3d.c | |
parent | c61520b6bd51d2ab8ba1fa14d89170844ebd159b (diff) | |
download | mpv-dd408e68ed57fa5130bef976751e58a5d6e42f75.tar.bz2 mpv-dd408e68ed57fa5130bef976751e58a5d6e42f75.tar.xz |
d3d: make DXVA2 support optional
This partially reverts the change from a longer time ago to always build
DXVA2 and D3D11VA together.
To make it simpler, we change the following:
- building with ANGLE headers is now required to build D3D hwaccels
- if DXVA2 is enabled, D3D11VA is still forcibly built
- the CLI vo_opengl ANGLE backend is now under --egl-angle-win32
This is done to reduce the dependency mess slightly.
Diffstat (limited to 'video/decode/d3d.c')
-rw-r--r-- | video/decode/d3d.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/video/decode/d3d.c b/video/decode/d3d.c index d81f481e7c..3e6e1accc8 100644 --- a/video/decode/d3d.c +++ b/video/decode/d3d.c @@ -377,9 +377,12 @@ AVBufferRef *d3d9_wrap_device_ref(struct IDirect3DDevice9 *device) { return NULL #else /* !HAVE_D3D_HWACCEL_NEW */ #include <libavutil/hwcontext.h> -#include <libavutil/hwcontext_dxva2.h> #include <libavutil/hwcontext_d3d11va.h> +#if HAVE_D3D9_HWACCEL +#include <libavutil/hwcontext_dxva2.h> +#endif + void d3d_hwframes_refine(struct lavc_ctx *ctx, AVBufferRef *hw_frames_ctx) { AVHWFramesContext *fctx = (void *)hw_frames_ctx->data; @@ -400,11 +403,13 @@ void d3d_hwframes_refine(struct lavc_ctx *ctx, AVBufferRef *hw_frames_ctx) fctx->width = FFALIGN(fctx->width, alignment); fctx->height = FFALIGN(fctx->height, alignment); +#if HAVE_D3D9_HWACCEL if (fctx->format == AV_PIX_FMT_DXVA2_VLD) { AVDXVA2FramesContext *hwctx = fctx->hwctx; hwctx->surface_type = DXVA2_VideoDecoderRenderTarget; } +#endif if (fctx->format == AV_PIX_FMT_D3D11) { AVD3D11VAFramesContext *hwctx = fctx->hwctx; |