[vlc-devel] [PATCH] direct3d11: slighty better rgb precision
Steve Lhomme
robux4 at videolabs.io
Wed Mar 25 17:52:48 CET 2015
---
modules/video_output/msw/direct3d11.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/modules/video_output/msw/direct3d11.c b/modules/video_output/msw/direct3d11.c
index 333fa60..952c309 100644
--- a/modules/video_output/msw/direct3d11.c
+++ b/modules/video_output/msw/direct3d11.c
@@ -156,12 +156,12 @@ static const char* globVertexShaderDefault = "\
float4 rgba;\
yuv.x = shaderTextureY.Sample(SampleType, In.Texture).x;\
yuv.yz = shaderTextureUV.Sample(SampleType, In.Texture).xy;\
- yuv.x = 1.164 * (yuv.x-0.0625);\
+ yuv.x = 1.164383 * (yuv.x-0.0625);\
yuv.y = yuv.y - 0.5;\
yuv.z = yuv.z - 0.5;\
- rgba.x = saturate(yuv.x + 1.596 * yuv.z);\
- rgba.y = saturate(yuv.x - 0.813 * yuv.z - 0.391 * yuv.y);\
- rgba.z = saturate(yuv.x + 2.018 * yuv.y);\
+ rgba.x = saturate(yuv.x + 1.596027 * yuv.z);\
+ rgba.y = saturate(yuv.x - 0.812968 * yuv.z - 0.391762 * yuv.y);\
+ rgba.z = saturate(yuv.x + 2.017232 * yuv.y);\
rgba.w = 1.0;\
return rgba;\
}\
--
2.3.0
More information about the vlc-devel
mailing list