[vlc-commits] direct3d11: define the 0.0625 magic value for the white point
Steve Lhomme
git at videolan.org
Wed Feb 8 13:55:47 CET 2017
vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Mon Feb 6 13:44:14 2017 +0100| [67c96dbb5f0047e9a24c2e6e887c92c785ead846] | committer: Jean-Baptiste Kempf
direct3d11: define the 0.0625 magic value for the white point
That's the "studio" range shifted for full range RGB.
Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=67c96dbb5f0047e9a24c2e6e887c92c785ead846
---
modules/video_output/win32/direct3d11.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index b3c33ef..6f52c72 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1977,7 +1977,8 @@ static int AllocQuad(vout_display_t *vd, const video_format_t *fmt, d3d_quad_t *
goto error;
}
- static const FLOAT WHITE_POINT_D65[4] = { -0.0625f, -0.5f, -0.5f, 1.f };
+#define FULL_TO_STUDIO_SHIFT (16.f / 256.f)
+ static const FLOAT WHITE_POINT_D65_TO_FULL[4] = { -FULL_TO_STUDIO_SHIFT, -0.5f, -0.5f, 1.f };
static const FLOAT COLORSPACE_BT601_TO_FULL[4*4] = {
1.164383561643836f, 0.f, 1.596026785714286f, 0.f,
@@ -2020,7 +2021,7 @@ static int AllocQuad(vout_display_t *vd, const video_format_t *fmt, d3d_quad_t *
break;
}
memcpy(colorspace.Colorspace, ppColorspace, sizeof(colorspace.Colorspace));
- memcpy(colorspace.WhitePoint, WHITE_POINT_D65, sizeof(colorspace.WhitePoint));
+ memcpy(colorspace.WhitePoint, WHITE_POINT_D65_TO_FULL, sizeof(colorspace.WhitePoint));
constantInit.pSysMem = &colorspace;
static_assert((sizeof(PS_COLOR_TRANSFORM)%16)==0,"Constant buffers require 16-byte alignment");
More information about the vlc-commits
mailing list