diff options
Diffstat (limited to 'video')
-rw-r--r-- | video/decode/d3d.c | 7 | ||||
-rw-r--r-- | video/decode/vd_lavc.c | 3 | ||||
-rw-r--r-- | video/out/opengl/context.c | 2 | ||||
-rw-r--r-- | video/out/opengl/hwdec.c | 6 |
4 files changed, 13 insertions, 5 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; diff --git a/video/decode/vd_lavc.c b/video/decode/vd_lavc.c index 226fd30bd3..a36adbf334 100644 --- a/video/decode/vd_lavc.c +++ b/video/decode/vd_lavc.c @@ -265,8 +265,11 @@ static const struct vd_lavc_hwdec *const hwdec_list[] = { #endif #if HAVE_D3D_HWACCEL &mp_vd_lavc_d3d11va, + + #if HAVE_D3D9_HWACCEL &mp_vd_lavc_dxva2, &mp_vd_lavc_dxva2_copy, + #endif &mp_vd_lavc_d3d11va_copy, #endif #if HAVE_ANDROID diff --git a/video/out/opengl/context.c b/video/out/opengl/context.c index 72311e11fa..a3b92ac8b4 100644 --- a/video/out/opengl/context.c +++ b/video/out/opengl/context.c @@ -56,7 +56,7 @@ static const struct mpgl_driver *const backends[] = { #if HAVE_GL_COCOA &mpgl_driver_cocoa, #endif -#if HAVE_EGL_ANGLE +#if HAVE_EGL_ANGLE_WIN32 &mpgl_driver_angle, #endif #if HAVE_GL_WIN32 diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c index 60a6ee82a9..346493671f 100644 --- a/video/out/opengl/hwdec.c +++ b/video/out/opengl/hwdec.c @@ -51,15 +51,15 @@ static const struct gl_hwdec_driver *const mpgl_hwdec_drivers[] = { &gl_hwdec_videotoolbox, #endif #if HAVE_D3D_HWACCEL -#if HAVE_EGL_ANGLE &gl_hwdec_d3d11egl, &gl_hwdec_d3d11eglrgb, + #if HAVE_D3D9_HWACCEL &gl_hwdec_dxva2egl, + #endif #endif -#if HAVE_GL_DXINTEROP +#if HAVE_GL_DXINTEROP_D3D9 &gl_hwdec_dxva2gldx, #endif -#endif #if HAVE_CUDA_HWACCEL &gl_hwdec_cuda, #endif |