diff options
author | wm4 <wm4@nowhere> | 2016-04-27 13:49:47 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2016-04-27 13:49:47 +0200 |
commit | 3706918311ef4cc57b1241e87dcc43d699e960f9 (patch) | |
tree | d887022bd92e40274ab956b705a808f02104a705 /video/out/opengl/hwdec.c | |
parent | cf9b415173b57befb410ecbe92c298cfe36f0451 (diff) | |
download | mpv-3706918311ef4cc57b1241e87dcc43d699e960f9.tar.bz2 mpv-3706918311ef4cc57b1241e87dcc43d699e960f9.tar.xz |
vo_opengl: D3D11VA + ANGLE interop
This uses ID3D11VideoProcessor to convert the video to a RGBA surface,
which is then bound to ANGLE. Currently ANGLE does not provide any way
to bind nv12 surfaces directly, so this will have to do.
ID3D11VideoContext1 would give us slightly more control about the
colorspace conversion, though it's still not good, and not available
in MinGW headers yet.
The video processor is created lazily, because we need to have the coded
frame size, of which AVFrame and mp_image have no concept of. Doing the
creation lazily is less of a pain than somehow hacking the coded frame
size into mp_image.
I'm not really sure how ID3D11VideoProcessorInputView is supposed to
work. We recreate it on every frame, which is simple and hopefully
doesn't affect performance.
Diffstat (limited to 'video/out/opengl/hwdec.c')
-rw-r--r-- | video/out/opengl/hwdec.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/opengl/hwdec.c b/video/out/opengl/hwdec.c index b58af9bae9..02aa0c2cd2 100644 --- a/video/out/opengl/hwdec.c +++ b/video/out/opengl/hwdec.c @@ -29,6 +29,7 @@ extern const struct gl_hwdec_driver gl_hwdec_vaglx; extern const struct gl_hwdec_driver gl_hwdec_videotoolbox; extern const struct gl_hwdec_driver gl_hwdec_vdpau; extern const struct gl_hwdec_driver gl_hwdec_dxva2egl; +extern const struct gl_hwdec_driver gl_hwdec_d3d11egl; extern const struct gl_hwdec_driver gl_hwdec_dxva2gldx; extern const struct gl_hwdec_driver gl_hwdec_dxva2; @@ -47,6 +48,7 @@ static const struct gl_hwdec_driver *const mpgl_hwdec_drivers[] = { #endif #if HAVE_DXVA2_HWACCEL #if HAVE_EGL_ANGLE + &gl_hwdec_d3d11egl, &gl_hwdec_dxva2egl, #endif #if HAVE_GL_DXINTEROP |