summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-05-11 15:23:02 +0200
committerwm4 <wm4@nowhere>2016-05-11 15:40:31 +0200
commitcb694ffd8e485bfc08a05d82618ebe0f1832da14 (patch)
tree3d823f624375c3366f444a1840964d71d9afce49
parent7983cda5bf9913ec7f2fac457787168619056253 (diff)
downloadmpv-cb694ffd8e485bfc08a05d82618ebe0f1832da14.tar.bz2
mpv-cb694ffd8e485bfc08a05d82618ebe0f1832da14.tar.xz
vo_opengl: d3d11egl: support full range YUV
MSDN documents this as "Introduced in Windows 8.1.". I assume on Windows 7 this field will simply be ignored. Too bad for Windows 7 users. Also, I'm not using D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_16_235 and D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE_0_255, because these are apparently completely missing from the MinGW headers. (Such a damn pain.)
-rw-r--r--video/out/opengl/hwdec_d3d11egl.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/video/out/opengl/hwdec_d3d11egl.c b/video/out/opengl/hwdec_d3d11egl.c
index 734229c3c5..bd4c050ac3 100644
--- a/video/out/opengl/hwdec_d3d11egl.c
+++ b/video/out/opengl/hwdec_d3d11egl.c
@@ -503,9 +503,8 @@ static int create_video_proc(struct gl_hwdec *hw, struct mp_image_params *params
p->video_proc,
0, FALSE);
- if ((params->colorspace != MP_CSP_BT_601 &&
- params->colorspace != MP_CSP_BT_709) ||
- params->colorlevels != MP_CSP_LEVELS_TV)
+ if (params->colorspace != MP_CSP_BT_601 &&
+ params->colorspace != MP_CSP_BT_709)
{
MP_WARN(hw, "Unsupported video colorspace (%s/%s). Consider disabling "
"hardware decoding, or using --hwdec=d3d11va-copy to get "
@@ -516,6 +515,7 @@ static int create_video_proc(struct gl_hwdec *hw, struct mp_image_params *params
D3D11_VIDEO_PROCESSOR_COLOR_SPACE csp = {
.YCbCr_Matrix = params->colorspace != MP_CSP_BT_601,
+ .Nominal_Range = params->colorlevels == MP_CSP_LEVELS_TV ? 1 : 2,
};
ID3D11VideoContext_VideoProcessorSetStreamColorSpace(p->video_ctx,
p->video_proc,