[MPlayer-cvslog] CVS: main/libvo gl_common.c,1.26,1.27
Reimar Döffinger CVS
syncmail at mplayerhq.hu
Sun Sep 25 18:17:05 CEST 2005
CVS change done by Reimar Döffinger CVS
Update of /cvsroot/mplayer/main/libvo
In directory mail:/var2/tmp/cvs-serv2329
Modified Files:
gl_common.c
Log Message:
contrast 0 should lead to a grey, not a black image
Index: gl_common.c
===================================================================
RCS file: /cvsroot/mplayer/main/libvo/gl_common.c,v
retrieving revision 1.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- gl_common.c 25 Sep 2005 16:12:01 -0000 1.26
+++ gl_common.c 25 Sep 2005 16:17:03 -0000 1.27
@@ -563,6 +563,11 @@
rc = (-16 * ry + (-128) * ru + (-128) * rv) / 255.0 + brightness;
gc = (-16 * gy + (-128) * gu + (-128) * gv) / 255.0 + brightness;
bc = (-16 * by + (-128) * bu + (-128) * bv) / 255.0 + brightness;
+ // these "center" contrast control so that e.g. a contrast of 0
+ // leads to a grey image, not a black one
+ rc += 0.5 - contrast / 2.0;
+ gc += 0.5 - contrast / 2.0;
+ bc += 0.5 - contrast / 2.0;
rgamma = 1.0 / rgamma;
ggamma = 1.0 / ggamma;
bgamma = 1.0 / bgamma;
More information about the MPlayer-cvslog
mailing list