vo_gl: improve 10-bit YUV->RGB conversion accuracy slightly
commita8168102668337f3c11619bea7e744fc245adff1
authorUoti Urpala <uau@mplayer2.org>
Thu, 8 Mar 2012 03:25:33 +0000 (8 05:25 +0200)
committerUoti Urpala <uau@mplayer2.org>
Fri, 9 Mar 2012 18:48:55 +0000 (9 20:48 +0200)
tree5f847baf425b1e672db6e91b7f307c30f44fb6ec
parent2a2f8672188273831dacd58a0dc76055326e4ce2
vo_gl: improve 10-bit YUV->RGB conversion accuracy slightly

Modify the YUV->RGB conversion matrix to take into account the
difference between the same color value being x/255 in a 8-bit texture
and x*256/65535 in a 16-bit texture (actually things are stored as
x*4/65535 for 10-bit color, but that can be ignored here). This 0.4 %
difference in the shader float value could make shades of gray in
10-bit (or generally more than 8 bit) YUV produce RGB values with
green slightly higher than red/blue.
libvo/csputils.c
libvo/csputils.h
libvo/vo_gl.c
libvo/vo_vdpau.c