[vlc-devel] [PATCH] direct3d11: slighty better rgb precision

Jean-Baptiste Kempf jb at videolan.org
Wed Mar 25 17:54:37 CET 2015


Did you take those values from the OpenGL one?

On 25 Mar, Steve Lhomme wrote :
> ---
>  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
> 
> _______________________________________________
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
> https://mailman.videolan.org/listinfo/vlc-devel

-- 
With my kindest regards,

-- 
Jean-Baptiste Kempf
http://www.jbkempf.com/ - +33 672 704 734
Sent from my Electronic Device



More information about the vlc-devel mailing list